Open PhillyNJ opened 5 years ago
Nevermind - Had to change the Platform to run in x86. Not dure that was even mentioned in anywhere,
Yes, it's described in the readme: "Please be aware that all projects must be compiled with "x86" setting even on a 64bit platform." But I'm glad you already identified and fixed the issue yourself.
Hi, I loaded your demo project, change the VID and PID to a known device, When trying to connect here:
if (SetupDiEnumDeviceInterfaces(DeviceInfoTable, IntPtr.Zero, ref InterfaceClassGuid, InterfaceIndex, ref InterfaceDataStructure)) { ErrorStatus = (uint)Marshal.GetLastWin32Error(); if (ErrorStatus == ERROR_NO_MORE_ITEMS) //Did we reach the end of the list of matching devices in the DeviceInfoTable? { //Cound not find the device. Must not have been attached. SetupDiDestroyDeviceInfoList(DeviceInfoTable); //Clean up the old structure we no longer need. return null; } } else //Else some other kind of unknown error ocurred... { ErrorStatus = (uint)Marshal.GetLastWin32Error(); SetupDiDestroyDeviceInfoList(DeviceInfoTable); //Clean up the old structure we no longer need. return null; // error here }
SetupDiEnumDeviceInterfaces returns error 1784