I am trying to allocate memory for a SP_DEVICE_INTERFACE_DATA structure.
In a Windows based program using VS2008 I successfully used this:
Qt Code:
  1. #include <windows.h>
  2. #include <winbase.h>
  3.  
  4. ...
  5.  
  6. SP_DEVICE_INTERFACE_DATA deviceinterface;
  7. SecureZeroMemory(&deviceinterface, sizeof(SP_DEVICE_INTERFACE_DATA));
  8.  
  9. ...
To copy to clipboard, switch view to plain text mode 

In QT 4 using netbeans 7.2.1 I am trying to use:
Qt Code:
  1. #include <windows.h>
  2. #include <winbase.h>
  3.  
  4. ...
  5.  
  6. SP_DEVICE_INTERFACE_DATA devInterfaceInfo;
  7. devInterfaceInfo =
  8. (SP_DEVICE_INTERFACE_DATA)malloc(sizeof(SP_DEVICE_INTERFACE_DATA));
  9.  
  10. ...
To copy to clipboard, switch view to plain text mode 

In QT 4 I get the following error:
QEnumerator.cpp:57: error: no matching function for call to '_SP_DEVICE_INTERFACE_DATA::_SP_DEVICE_INTERFACE_D ATA(void*)'
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/setupapi.h:722: note: candidates are: _SP_DEVICE_INTERFACE_DATA::_SP_DEVICE_INTERFACE_DA TA()
c:\qtsdk\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/setupapi.h:722: note: _SP_DEVICE_INTERFACE_DATA::_SP_DEVICE_INTERFACE_DA TA(const _SP_DEVICE_INTERFACE_DATA&)
I have successfully used the malloc() function in QT 4 for other structures and devtypes.
Any help would be appreciated.

Thanks
DCM