winbase.h and GetLastError() 
Author Message
 winbase.h and GetLastError()

Hello

I would like to use GetLastError()  in a VC++ project ( Win32 console
application not using MFC)

It's written in MSDN that the required header file for GetLastError()  is
winbase.h. Unfortunately if I add in my code      #include winbase.h,  74
errors appear by compilating the code . The first error is
"c:\program files\microsoft visual studio\vc98\include\winbase.h(216) :
error C2146: syntax error : missing ';' before identifier 'Internal'"

When using "wtypes.h" instead of "winbase.h" , the code executes without
problem.

Nevertheless, I'd like to understand what I did wrong by including
"winbase.h" as described in MSDN.

Can anyone help me ?

Thank you in advance

Serge Castelier



Mon, 13 Oct 2003 23:11:03 GMT  
 winbase.h and GetLastError()
From MSDN on GetLastError:

Requirements
    Header: Declared in Winbase.h; include Windows.h.

That should be clear enough.
--
With best wishes,
    Igor Tandetnik


Quote:
> Hello

> I would like to use GetLastError()  in a VC++ project ( Win32 console
> application not using MFC)

> It's written in MSDN that the required header file for GetLastError()  is
> winbase.h. Unfortunately if I add in my code      #include winbase.h,  74
> errors appear by compilating the code . The first error is
> "c:\program files\microsoft visual studio\vc98\include\winbase.h(216) :
> error C2146: syntax error : missing ';' before identifier 'Internal'"

> When using "wtypes.h" instead of "winbase.h" , the code executes without
> problem.

> Nevertheless, I'd like to understand what I did wrong by including
> "winbase.h" as described in MSDN.

> Can anyone help me ?

> Thank you in advance

> Serge Castelier



Mon, 13 Oct 2003 23:59:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. #include <winbase.h> gives me syntax errors in winbase.h

2. _WIN32_WINNT &WinBase.h

3. Question about "winbase.h" header file

4. Error whenever I include <winbase.h>

5. Sleep in winbase.h?

6. Function does not exist in winbase.h

7. Winbase.h and compilation errors

8. Missing Storage class error in winbase.h

9. C2061 in winbase.h

10. Bad winbase.h file

11. Error whenever I include winbase.h

12. Compiler complaining about WINBASE.H

 

 
Powered by phpBB® Forum Software