Eletronic Serial Number

  • Thread starter Thread starter mmuzilli
  • Start date Start date
M

mmuzilli

Howdy all,

I'd like to know how can I get the Eletronic Serial Number of my
handheld. Which API do I have to access?

I'm developing using MS VS2003 C# (Compact FrameWork) for a Intermec
CN3 handheld. I don't know if I can access via Windows API or if I have
to access using Intermec API.

Can you please help me?

Thank you in advance,

Marcelo Muzilli
 
There is not necessarily any such thing, so there's no API to access it. If
you are sure that the vendor of your device stamps each one electronically,
ask them what API they can provide.

Paul T.
 
You can use ITCGetSerialNumber() from the Intermec Device Resource Kit to do
this. It's a native function, but is easy to P/Invoke e.g.

using System.Text;
using System.Runtime.InteropServices;

[DllImport("itc50.dll")]
private static extern int ITCGetSerialNumber(StringBuilder buffer,
int bufferSize);

public string GetSerialNumber()
{
// Serial number is 11 digits
StringBuilder buffer = new StringBuilder(12);

// Returns HRESULT so non-negative result means success
if (ITCGetSerialNumber(buffer, buffer.Capacity) >= 0)
{
return buffer.ToString();
}
else
{
return "00000000000";
}
}

Note that itc50.dll should already be installed by default on your CN3.

You can download Resource Kits for accessing other Intermec-specific
functionality from the Intermec Developers Library at
http://www.intermec.com/idl

Hope that helps,
Darren
 
Back
Top