Menu

#717 hidsdi.h behave differently than other headers and than in minGW32

v1.0 (example)
unread
nobody
hid (1)
5
2018-04-05
2018-04-05
No

Hi there,

Upon upgrading from minGW32 to minGW64 I realise that hidsdi.h header works in different way that before. Furthermore, it works differently to other header in the project as far as I know. In order to use functions from hidsdi.h, the declaration need to be with the extern C marker whereas all other headers do not require this.

I propose to reintroduce the anti-mangling in the hidsdi.h header in order to avoid the confusion of use versus other headers of the library.

Below is a code example showing difference of use for hidsdi.h vs. setupapi.h

#include <windows.h>

extern "C"
{
    #include <hidsdi.h>
}

#include <setupapi.h>

int main()
   {
      HDEVINFO yo;
      PSP_DEVINFO_DATA yi;
      SetupDiAskForOEMDisk(yo , yi);

      PHIDP_PREPARSED_DATA yu;
      HidD_FreePreparsedData(yu);

      GUID test;
      HidD_GetHidGuid(&test);

      return 0;
   }

Regards,
S.

Discussion

  • Sylvain Viguier

    Sylvain Viguier - 2018-04-05

    Do you guys accept pull requests?

     

Log in to post a comment.

Auth0 Logo