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.
Breakage happened with commit 509d31de (where hidpi.h is affected the same way):
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/509d31de1e3549560da0b17671ecfe00146f8819/
Do you guys accept pull requests?