DECLARE LONG SetupDiGetClassDevs IN setupapi.dll ; STRING @cGuid, ; STRING Enumerator, ; INTEGER hwndParent, ; INTEGER nFlags ... DECLARE INTEGER SetupDiEnumDeviceInterfaces IN setupapi; LONG DeviceInfoSet,; STRING @ DeviceInfoData,; STRING @ ByRefterfaceClassGuid,; INTEGER MemberIndex,; STRING @ DeviceInterfaceDataHelp on Declare-DLL says it's both 32 bit, but LONG is 32bit long integer, I think they meant LONG is unsigned. That may help, didn't check it out though.