jgeiger
Posts: 21
Joined: Sat Sep 20, 2008 2:14 am

Device.Name

Mon Oct 06, 2008 10:34 pm

I am looking to filter the devices out by name in the "DeviceDiscovered" async routine. But it hangs. When I break on that routine, however, I look at the local variables and see that device.Name lists:
"'device.Name' threw and exception of type 'System.MissingMethodException'".
If you look at the base below that you see
"Can't find an Entry Point 'RemoteDevice_GetName' in a PInvoke DLL 'BlueTools.dll'."

Want to see some code?

//This line runs
device = (RemoteDevice)((DiscoveryEventArgs)eventArgs).Discovery;

//This line hangs...forever.
if (device.Name.Substring(0, 2) == "aa")
{ //...Add to the listbox...
}

Ideas?

Jason

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Device.Name

Tue Oct 07, 2008 12:21 am

System.MissingMethodException means that you are loading an old BlueTools.dll that doesn't have that function.
Make sure you have the same version of the core files as the Franson.BlueTools.dll wrapper.

Regards,
Jonas

jgeiger
Posts: 21
Joined: Sat Sep 20, 2008 2:14 am

RE: Device.Name

Tue Oct 07, 2008 12:49 am

That was it. I've reformatted my PC and redownloaded the SDK, but my PDA was running an older version and I was not aware there was a difference. Brilliant as always, Jonas. Thank you!

Return to “BlueTools”