Code snippet to convert JobID from MS Fax API

Posted on May 12, 2007. Filed under: Uncategorized |

Here’s a quick little code snippet which will convert a job ID into the correct format when you’re using the MS faxcomexlib.dll. This is needed because you’ll get different formats back from a ConnectedSubmit depending on whether your application is running on Windows XP or Windows 2003 Server. However, the format does not vary when you get status change events.

        private string ConvertJobID(string jobID)
string hexJobId = string.Empty;

Int64 i = Convert.ToInt64(jobID);
//Match event handler format:
// hex number; lowercase;
// no leading zeroes;
// no "0x" or other prefix
hexJobId = i.ToString("x");
catch // If there's an exception,
// then the Job ID is already correct
hexJobId = jobID;

return hexJobId;

Technorati tags: , , ,


Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

  • About Me

    My name is Alvin Ashcraft. I am a geek, daddy and husband. I have 12 years of software development experience in the healthcare and manufacturing industries using Microsoft technologies.
  • Flickr Photos


Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: