COMException in RAPIDeviceUI sample app

Feb 12, 2013 at 4:00 AM
The RAPIDeviceUI sample app won't work properly on my development system.

I've downloaded the source for v2.0 and compiled it in VS2010 under Win7 Ultimate 64-bit. I've set RAPIDeviceUI to be the startup project. If I hit F5 without a device connected, I get a COMException in the VS debugger on line 330 of RemoteDeviceManager.cs:

IRAPIDevice iDev = iEnum.Next();

The exception helper says "COMException crossed a native/managed boundary" and the exception message is "Element not found. (Exception from HRESULT: 0x80070490)".

If I use Ctrl-F5 to run the program outside the debugger, it starts OK and detects device connection/disconnection but it reports incorrect status information for a connected device. Specifically, it says that dev.SystemInformation.ProcessorLevel is 1 whereas the CPU is actually an ARM4, and it reports 0K for both physical and virtual memory. It does this for both a Juniper Mesa Notepad running WM 6.5.3 and a Trimble Recon running WM6.1. I have uninstalled and reinstalled WMDC 6.1, but this made no difference.

If I copy RAPIDeviceUI.exe and associated DLLs to another machine (Win7 32-bit) and run it there, everything is fine. For both devices, the ProcessorLevel is reported as 4 and the amount of used physical and virtual memory are both non-zero.

What could be wrong with my dev machine?
Feb 12, 2013 at 4:25 PM
On my similar system, I have the WM 6 SDK Refresh and the WM 6.5.3 DTK installed. These have the native COM libraries on which this wrapper is based.
Feb 13, 2013 at 4:53 AM
I have both of those installed as well. In fact, I've just uninstalled and reinstalled them. I still get the COMException.
Feb 15, 2013 at 4:08 PM
I don't have any other guesses. Given what you described in your first post, it is something between the app and the device, i.e. SDK, drivers, OS.