Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.c++
winternl.h compile error
Gabriel
10/3/2008 2:55:00 AM
Hi,
I downloaded the last platform sdk which works with vc++ 6 (February
2003):
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psd...
However im getting a strange error when i compile. what i do is the
following:
- Run this shortcut from the start menu to set variables: Set Windows
XP 32-bit Build Environment (Retail).lnk
- Open vc++ 6 and create a new Win32 Simple Application
- Include winternl.h
This is the code:
#include "stdafx.h"
#include <winternl.h>
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
PROCESS_BASIC_INFORMATION p;
return 0;
}
When compiling i get these errors:
error C2065: 'PROCESS_BASIC_INFORMATION' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'p'
error C2065: 'p' : undeclared identifier
The include is done correctly but still that (and any) member from the
header isn't recognized.
If i use other headers (just tried a couple) everything works fine.
Any ideas?
2 Answers
Jack Klein
10/3/2008 3:43:00 AM
0
On Thu, 2 Oct 2008 19:55:29 -0700 (PDT), Gabriel
<gabriel.manya@gmail.com> wrote in comp.lang.c++:
> Hi,
>
> I downloaded the last platform sdk which works with vc++ 6 (February
> 2003):
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psd...
>
> However im getting a strange error when i compile. what i do is the
> following:
>
> - Run this shortcut from the start menu to set variables: Set Windows
> XP 32-bit Build Environment (Retail).lnk
>
> - Open vc++ 6 and create a new Win32 Simple Application
>
> - Include winternl.h
>
>
>
> This is the code:
>
> #include "stdafx.h"
> #include <winternl.h>
>
> int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
> LPSTR lpCmdLine, int nCmdShow) {
> PROCESS_BASIC_INFORMATION p;
> return 0;
> }
>
>
>
> When compiling i get these errors:
>
> error C2065: 'PROCESS_BASIC_INFORMATION' : undeclared identifier
> error C2146: syntax error : missing ';' before identifier 'p'
> error C2065: 'p' : undeclared identifier
>
>
>
> The include is done correctly but still that (and any) member from the
> header isn't recognized.
> If i use other headers (just tried a couple) everything works fine.
>
> Any ideas?
My idea is that you should ask in a Windows programming group.
news:comp.os.ms-windows.programmer.win32 is a very good one.
Nether of these headers is part of the C++ language, they are all
Windows specific extensions. Non-standard extensions are off-topic
here.
--
Jack Klein
Home:
http://JK-Tech...
FAQs for
comp.lang.c
http://...
comp.lang.c++
http://www.parashift.com/c++...
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-...
Gabriel
10/3/2008 5:44:00 AM
0
On Oct 3, 1:43 am, Jack Klein <jackkl...@spamcop.net> wrote:
> On Thu, 2 Oct 2008 19:55:29 -0700 (PDT), Gabriel
> <gabriel.ma...@gmail.com> wrote in comp.lang.c++:
>
>
>
> > Hi,
>
> > I downloaded the last platform sdk which works with vc++ 6 (February
> > 2003):
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psd...
>
> > However im getting a strange error when i compile. what i do is the
> > following:
>
> > - Run this shortcut from the start menu to set variables: Set Windows
> > XP 32-bit Build Environment (Retail).lnk
>
> > - Open vc++ 6 and create a new Win32 Simple Application
>
> > - Include winternl.h
>
> > This is the code:
>
> > #include "stdafx.h"
> > #include <winternl.h>
>
> > int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
> > LPSTR lpCmdLine, int nCmdShow) {
> > PROCESS_BASIC_INFORMATION p;
> > return 0;
> > }
>
> > When compiling i get these errors:
>
> > error C2065: 'PROCESS_BASIC_INFORMATION' : undeclared identifier
> > error C2146: syntax error : missing ';' before identifier 'p'
> > error C2065: 'p' : undeclared identifier
>
> > The include is done correctly but still that (and any) member from the
> > header isn't recognized.
> > If i use other headers (just tried a couple) everything works fine.
>
> > Any ideas?
>
> My idea is that you should ask in a Windows programming group.
> news:comp.os.ms-windows.programmer.win32 is a very good one.
>
> Nether of these headers is part of the C++ language, they are all
> Windows specific extensions. Non-standard extensions are off-topic
> here.
>
> --
> Jack Klein
> Home:
http://JK-Tech...
> FAQs for
> comp.lang.c
http://...
> comp.lang.c++
http://www.parashift.com/c++...
> alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-...
OK, thank you for the advice, I'll do that and sorry for asking in the
wrong group.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
winternl.h compile error
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password