#2025 Including wtypes.h gives OLE errors

WSL
closed
None
Bug
duplicate
Feature_in_WSL_4.1
False
2014-01-16
2013-09-03
No
#include <wtypes.h>
int main(void)
{
}

fails with a lot of errors like:

c:\mingw\include\objidl.h:1008:46: error: unknown type name 'OLECHAR'
  STDMETHOD(QueryBlanket)(THIS_ PDWORD,PDWORD,OLECHAR**,PDWORD,PDWORD,RPC_AUTHZ_
HANDLE*,PDWORD*) PURE;

Including windows.h first fixes it but previously working software is affected.

Discussion

  • Trent Gamblin

    Trent Gamblin - 2013-09-03

    Should have #include <wtypes.h> first line.

     
    Last edit: Trent Gamblin 2013-09-03
  • Earnie Boyd

    Earnie Boyd - 2013-09-03
    • status: unread --> assigned
    • assigned_to: Earnie Boyd
    • Group: OTHER --> WSL
    • Category: Unknown --> Feature_in_WSL_4.1
     
  • Earnie Boyd

    Earnie Boyd - 2013-09-03

    The fix here is to move the inclusion of rpc.h in wtypes.h above the file guard.

    Note that it is usually expected that windows.h is included before any other API header and I almost ping this as user land issue but I see that rpc.h includes windows.h already.

     
  • Earnie Boyd

    Earnie Boyd - 2013-09-03
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,12 +1,16 @@
    +~~~~~
     #include <wtypes.h>
     int main(void)
     {
     }
    +~~~~~
    
     fails with a lot of errors like:
    
    +~~~~~
     c:\mingw\include\objidl.h:1008:46: error: unknown type name 'OLECHAR'
       STDMETHOD(QueryBlanket)(THIS_ PDWORD,PDWORD,OLECHAR**,PDWORD,PDWORD,RPC_AUTHZ_
     HANDLE*,PDWORD*) PURE;
    +~~~~~
    
     Including windows.h first fixes it but previously working software is affected.
    
     
  • Earnie Boyd

    Earnie Boyd - 2013-09-03

    Resolving the markdown for code issue.

     
  • Earnie Boyd

    Earnie Boyd - 2013-09-19
    • status: assigned --> closed
    • Resolution: none --> duplicate
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks