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

C / C++ / MFC

 
GeneralRe: Delete Executeable Pin
Mazdak10-Apr-02 4:16
Mazdak10-Apr-02 4:16 
GeneralRe: Delete Executeable Pin
Li Mu Bai10-Apr-02 5:38
Li Mu Bai10-Apr-02 5:38 
GeneralRe: Delete Executeable Pin
Li Mu Bai10-Apr-02 5:43
Li Mu Bai10-Apr-02 5:43 
GeneralRe: Delete Executeable Pin
Rickard Andersson2010-Apr-02 5:54
Rickard Andersson2010-Apr-02 5:54 
GeneralRe: Delete Executeable Pin
Black Horus10-Apr-02 7:19
Black Horus10-Apr-02 7:19 
GeneralRe: Delete Executeable Pin
Ravi Bhavnani10-Apr-02 7:30
professionalRavi Bhavnani10-Apr-02 7:30 
QuestionHow can get the CPU unique ID? Pin
wangyiming10-Apr-02 3:58
wangyiming10-Apr-02 3:58 
AnswerRe: How can get the CPU unique ID? Pin
moliate10-Apr-02 9:27
moliate10-Apr-02 9:27 
Assuming the processor supports unique serial number:

#define cpuid __asm __emit 0fh __asm __emit 0a2h
UINT PSN, ID1, ID2, ID3; 

__asm
{
mov eax, 01H
cpuid
mov PSN, edx
}

if (PSN&<s>0x20000</s> 0x40000) //Check bit 18 if serial number is available 
{
__asm
{
mov eax, 01H
cpuid
mov ID1, eax
mov eax, 03H
cpuid
mov ID2, edx
mov ID3, ecx
}
}
else
{//Processor does not support unique ID
}


If everything works out ID1, ID2, ID3 should contain the unique 96 bit ID. I havn´t tested the code since I don´t have a PIII, but I hope it works...

More info on cpuid here (pdf).


Hope this helps

/moliate
GeneralRe: How can get the CPU unique ID? Pin
wangyiming10-Apr-02 23:28
wangyiming10-Apr-02 23:28 
GeneralRe: How can get the CPU unique ID? Pin
moliate11-Apr-02 5:29
moliate11-Apr-02 5:29 
QuestionHow to save DC's content as bitmap! Pin
white jungle10-Apr-02 3:53
white jungle10-Apr-02 3:53 
AnswerRe: How to save DC's content as bitmap! Pin
wangyiming10-Apr-02 3:57
wangyiming10-Apr-02 3:57 
AnswerRe: How to save DC's content as bitmap! Pin
Rickard Andersson2010-Apr-02 4:07
Rickard Andersson2010-Apr-02 4:07 
GeneralVisual Studio .NET class overloading Pin
dazinith10-Apr-02 3:50
dazinith10-Apr-02 3:50 
Generalchanging ip address, mask gateway dynamically by programming Pin
10-Apr-02 3:50
suss10-Apr-02 3:50 
GeneralCodeWizard Problem Pin
Li Mu Bai10-Apr-02 3:26
Li Mu Bai10-Apr-02 3:26 
GeneralCString Pin
Mazdak10-Apr-02 2:38
Mazdak10-Apr-02 2:38 
GeneralRe: CString Pin
Niklas L10-Apr-02 2:46
Niklas L10-Apr-02 2:46 
GeneralRe: CString Pin
Mazdak10-Apr-02 3:13
Mazdak10-Apr-02 3:13 
GeneralProgram-Icon Pin
klawipo10-Apr-02 2:26
klawipo10-Apr-02 2:26 
GeneralRe: Program-Icon Pin
lucy10-Apr-02 3:01
lucy10-Apr-02 3:01 
GeneralRe: Program-Icon Pin
klawipo10-Apr-02 4:57
klawipo10-Apr-02 4:57 
GeneralRe: Program-Icon Pin
Joel Holdsworth10-Apr-02 6:13
Joel Holdsworth10-Apr-02 6:13 
GeneralRe: Program-Icon Pin
klawipo10-Apr-02 6:32
klawipo10-Apr-02 6:32 
QuestionWhat's that? Pin
Lizp10-Apr-02 2:25
Lizp10-Apr-02 2:25 

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.