• Advertisement

Archived

This topic is now archived and is closed to further replies.

winbase.h in console apps

This topic is 5939 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So I am talking about VC6. My problem is: - I make a fresh new and empty console app (Win32 of course) - then add an empty .cpp file - then I include iostream.h - and then I am so perkily to include winbase.h If I am trying to compile this, I get 74 errors in winbase.h, mostly about missing definitions (DWORD, WORD, wYear,...), missing brackets, missing semi-colons, etc. What the heck is going on? Shouldn''t at least the standard M$ headers work (actually they work in non-console apps)? Thanx in advance for saving my keyboard and my teeth Yesterday we still stood at the verge of the abyss, today we''re a step onward!

Share this post


Link to post
Share on other sites
Advertisement
Thanx that worked perfectly!
But why doesn''t winbase.h include windows.h on its own?


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!

Share this post


Link to post
Share on other sites
You know, I have no idea actually.

Edited by - Red Ant on October 16, 2001 6:39:12 PM

Share this post


Link to post
Share on other sites
Strange problem, but now that I know how to avoid it...


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!

Share this post


Link to post
Share on other sites
I dont think winbase.h is intended for direct inclusion in a user program. Same goes for a lot of the other windows include files. Save yourself some trouble and just include windows.h.

"A society without religion is like a crazed psychopath without a loaded .45"

Share this post


Link to post
Share on other sites
Well, it''s just because MSDN said, the relevant include would be winbase.h


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!

Share this post


Link to post
Share on other sites
MSDN usually says something like this: "Declared in winbase.h, include windows.h"

"A society without religion is like a crazed psychopath without a loaded .45"

Share this post


Link to post
Share on other sites
Excerpt from MSDN for ''GetTickCount'':
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.


so...


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!

Share this post


Link to post
Share on other sites
MSDN online:

Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.


"A society without religion is like a crazed psychopath without a loaded .45"

Share this post


Link to post
Share on other sites
MSDN online:

Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.


"A society without religion is like a crazed psychopath without a loaded .45"

Share this post


Link to post
Share on other sites
touché, but why should I use the online version when I have it all on my HDD...
So the MSDN isn''t updated by Service Packs...


Yesterday we still stood at the verge of the abyss,
today we''re a step onward!

Share this post


Link to post
Share on other sites

  • Advertisement