Click here to Skip to main content
15,923,909 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Word file with Visual c++ (MFC) Pin
C++NewBe25-May-04 9:57
C++NewBe25-May-04 9:57 
GeneralRe: Word file with Visual c++ (MFC) Pin
Antti Keskinen25-May-04 11:12
Antti Keskinen25-May-04 11:12 
GeneralRe: Word file with Visual c++ (MFC) Pin
C++NewBe25-May-04 11:25
C++NewBe25-May-04 11:25 
GeneralRe: Word file with Visual c++ (MFC) Pin
Antti Keskinen26-May-04 5:46
Antti Keskinen26-May-04 5:46 
GeneralRe: Word file with Visual c++ (MFC) Pin
C++NewBe26-May-04 7:21
C++NewBe26-May-04 7:21 
QuestionDoes C# has default SOAP client package? Pin
Jack Su15-Feb-04 1:58
Jack Su15-Feb-04 1:58 
GeneralProcessor or Mainboard's Serial Number Pin
Member 84094015-Feb-04 1:51
Member 84094015-Feb-04 1:51 
GeneralRe: Processor or Mainboard's Serial Number Pin
Toni7815-Feb-04 19:10
Toni7815-Feb-04 19:10 
Go to Intel's website and try to find an article on how to retrieve the Processor Serial Number if there is one. I have some code from last year which I don't remember if it works or not and since I cannot compile it and test it right now I will leave that up to you. Sorry, but I don't remember much about getting a number from the motherboard. To my knowledge you can dump the BIOS info (I don't even remember how to do) and somewhere in there you can find the number of the motherboard but my memory on that area is very murky, so I cannot help you at all.

CString strPSN;			// String, which holds the Processor Serial Number (PSN)
BOOL bPSNExists;		// Does the Processor have a SN
LARGE_INTEGER liPI64, liPI32;	// Integers large enough to store the PSN
__asm
{
	mov eax, 01h;
	cpuid;
	mov liPI64.LowPart, edx;
}
	
if( (liPI64.LowPart & 0x00040000) > 0 )
	bPSNExists = TRUE;
else
	bPSNExists = FALSE;

if( bPSNExists )
{
	__asm
	{
		mov eax, 01h;
		cpuid;
		mov liPI32.LowPart, eax;
		mov eax, 03h;
		cpuid;
		mov liPI64.HighPart, edx;
			mov liPI64.LowPart, ecx;
	} // end __asm


	// Not the correct format.  According to Intel it should be
	// XXXX-XXXX-XXXX-XXXX-XXXX where X is a hex number
	strPSN.Format( "%08x-%08x-%08x", liPI32.LowPart,
			liPI64.HighPart, liPI64.LowPart );
} // end if


// Afterall, I realized that even my comment lines have bugs

If the sun were to blow up, it would take us 7-8 minutes to realize it.
GeneralRe: Processor or Mainboard's Serial Number Pin
David Crow16-Feb-04 3:13
David Crow16-Feb-04 3:13 
GeneralConvert virtual key code to human readable format Pin
User 665815-Feb-04 1:30
User 665815-Feb-04 1:30 
GeneralRe: Convert virtual key code to human readable format Pin
Antti Keskinen15-Feb-04 3:08
Antti Keskinen15-Feb-04 3:08 
QuestionWhy this code never works???!?? Pin
YaronNir15-Feb-04 1:26
YaronNir15-Feb-04 1:26 
AnswerRe: Why this code never works???!?? Pin
Antti Keskinen15-Feb-04 3:33
Antti Keskinen15-Feb-04 3:33 
GeneralRe: Why this code never works???!?? Pin
YaronNir15-Feb-04 5:33
YaronNir15-Feb-04 5:33 
GeneralRe: Why this code never works???!?? Pin
Antti Keskinen15-Feb-04 7:10
Antti Keskinen15-Feb-04 7:10 
GeneralRe: Why this code never works???!?? Pin
Antti Keskinen15-Feb-04 7:51
Antti Keskinen15-Feb-04 7:51 
GeneralRe: Why this code never works???!?? Pin
YaronNir15-Feb-04 20:58
YaronNir15-Feb-04 20:58 
GeneralRe: Why this code never works???!?? Pin
Antti Keskinen15-Feb-04 22:06
Antti Keskinen15-Feb-04 22:06 
GeneralRe: Why this code never works???!?? Pin
YaronNir15-Feb-04 22:10
YaronNir15-Feb-04 22:10 
GeneralRe: Why this code never works???!?? Pin
Antti Keskinen16-Feb-04 2:03
Antti Keskinen16-Feb-04 2:03 
GeneralRe: Why this code never works???!?? Pin
YaronNir16-Feb-04 2:15
YaronNir16-Feb-04 2:15 
GeneralRe: Why this code never works???!?? Pin
Antti Keskinen16-Feb-04 2:54
Antti Keskinen16-Feb-04 2:54 
GeneralRe: Why this code never works???!?? Pin
YaronNir16-Feb-04 3:19
YaronNir16-Feb-04 3:19 
GeneralRe: Why this code never works???!?? Pin
Antti Keskinen16-Feb-04 5:53
Antti Keskinen16-Feb-04 5:53 
GeneralRe: Why this code never works???!?? Pin
YaronNir16-Feb-04 6:12
YaronNir16-Feb-04 6:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.