views:

184

answers:

2

We have a Windows Mobile application which is currently running on Symbol (now Motorola) devices. We use the manufacturer's SDKs in order to do things like register barcode scans.

We now need to make the software work with Intermec devices.

I already have the scanning code abstracted behind an interface so all I need to do is wrap the Intermec APIs behind that interface and then load the correct version for the device in use.

However, I am having some difficulty in working out which type of device the software is running. I could just try loading the Symbol code and then when that fails try the Intermec code but that's rather rubbish.

Does anyone know how I can work out the type of device programmatically?

+2  A: 

See this link. It will help you get the OEM info of the device.

kgiannakakis
Thanks, I'll give that a try and see if it helps.
Garry Shutler
Excellent, seems to give me something to work with at least.
Garry Shutler
A: 

This is native code but it works for me.

TCHAR buf[255];
SystemParametersInfo(SPI_GETOEMINFO, 255, &buf, NULL);

Then just parse the buffer to figure out which device it is.

JDM
The origianl question is clearly tagged for NetCF, so this won't work without a lot more code. Even then it doesn't tell you what type of device it is unless you have some master list of what could possibly get returned.
ctacke