CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Dec 2012

    #include <WinBase.h> errors: how to avoid?

    I get a slew of syntax errors starting in line 243 of <WinBase.h>.

    The compiler underscores such typedefs as ULONG_PTR, DWORD, PVOID and HANDLE among others.

    Presumably, <winbase.h> has a prerequisite header file that it is not #include'g itself :-(.

    What am I missing?

    PS: I tried changing the order of #include <WinBase.h>, to no avail.

    The code is....

    #include "stdafx.h"
    #include <stdlib.h>
    #include <time.h>        // for time()
    #include <WinBase.h>  // for sleep()
    int _tmain(int argc, char* argv[])
    	time_t st, et;
    	st = time();
    	et = time();
    	printf("%ld\n%ld\n%ld\n", st, et, et-st);
    	printf("press Enter to terminate");
    	return 0;
    "stdafx.h" is (as provided by Visual C++)....

    #pragma once
    #include "targetver.h"
    #include <stdio.h>
    #include <tchar.h>

    "targetver.h" is (as provided by Visual C++)....

    #pragma once
    #include <SDKDDKVer.h>
    Last edited by Marc G; December 26th, 2012 at 03:55 AM. Reason: Added code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.