Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

windows fax service job id

Posted on 2004-04-12
3
Medium Priority
?
393 Views
Last Modified: 2006-11-17
hi expert,

l'm using .Net 1.1 and C#. l'm writing fax client that using Windows XP Fax Service Extended COM API.i do Faxdocument.submit and return job id with 144612306415010325. but when register server event OnJobChanged, job id pass as parameter is 201c420668231ee. why its differ from above ? when i go to fax console and open the properties of that job. it's job id also 201c420668231ee. then what is job id return from Faxdocument.submit ?

regards
eddie
0
Comment
Question by:Explorer060599
  • 2
3 Comments
 
LVL 3

Expert Comment

by:int_20h
ID: 10808940
One is hex and the other is in Decimal notation.  However, I did the convertion and it's still wrong!
144612306415010325  == 201C42062044215
144612306490372590  == 201C420668231EE

Are you sure about the job id you get from Faxdocument.submit ?
0
 

Author Comment

by:Explorer060599
ID: 10810286
i think the number is wrong, but nevermind as long as you know the format. can you please guilde me how to convert from hex to decimal or vice versa in C# ?
0
 
LVL 3

Accepted Solution

by:
int_20h earned 500 total points
ID: 10810426
I don't know how to convert decimal string to hex string in one shot, but here are the way to convert them to number and then to string.  Note I use Int64 since you the job id you get is pretty big!

To Convert from decimal to hex:
-------------------------------------
string strdecimal = "2434522";
Int64 number = Int64.Parse(strdecimal);
string hex = number.ToString('x');

or

string str = System.Convert.ToString(number, 16);

To Convert from hex to decimal:
-------------------------------------
Int64 number = Convert.ToInt64(hexString.Trim(), 16);
string strdecimal = number.ToString();
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question