Click here to Skip to main content
15,884,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can and what type of dll is created by MFC to use in any language? Pin
Albert Holguin30-Jun-11 4:26
professionalAlbert Holguin30-Jun-11 4:26 
GeneralRe: How can and what type of dll is created by MFC to use in any language? Pin
Richard MacCutchan30-Jun-11 5:57
mveRichard MacCutchan30-Jun-11 5:57 
QuestionCEdit Control property in a SDI- Split Window [modified] Pin
AneeshValeri29-Jun-11 18:23
AneeshValeri29-Jun-11 18:23 
AnswerRe: CEdit Control property in a SDI- Split Window Pin
AneeshValeri29-Jun-11 19:00
AneeshValeri29-Jun-11 19:00 
QuestionWhat is the unique in any PC? Pin
Le@rner29-Jun-11 1:21
Le@rner29-Jun-11 1:21 
AnswerRe: What is the unique in any PC? Pin
enhzflep29-Jun-11 1:43
enhzflep29-Jun-11 1:43 
AnswerRe: What is the unique in any PC? Pin
Albert Holguin29-Jun-11 4:28
professionalAlbert Holguin29-Jun-11 4:28 
GeneralRe: What is the unique in any PC? Pin
Le@rner29-Jun-11 21:50
Le@rner29-Jun-11 21:50 
Albert Holguin wrote:
Traditionally, people have used disk serial numbers, or MAC ids, or other
hardware identification number to uniquely identify a PC.



disk serial numbers is changed when format the disk, and MAC id is also changebale.

i find the processor id like this
struct CPUInfo 
{ 
        int EAX; 
        int EBX; 
        int ECX; 
        int EDX; 
}; 
void __cpuid(int CPUInfo[4], int InfoType); 
 
//in main function:
  int b[4]; 
        char eax_hex[9]= {0,0,0,0,0,0,0,0}; 
        char edx_hex[9]= {0,0,0,0,0,0,0,0}; 
 
        //initialize the value 
        char cpuid_hex[17] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; 
         
        // get the points to appropriate locations within the character arrays 
        char* first = &cpuid_hex[0]; 
        char* second = &cpuid_hex[8]; 
         
         
        // get level 1 data from __cpuid 
        __cpuid(b,1); 
 
         
        // b[0] will have the value of eax register 
        // b[3] will have the value of edx register 
        //when converting to string,  we ened to reverse the order of first and second due to endianness 
 
        sprintf_s(first,9, "%08X",b[3]); 
        sprintf_s(second,9, "%08X",b[0]); 
 
        // print this on command line -- normally this would be a return value of the function so it could be consumed elsewhere 
        fprintf(stdout, "processorid (equal to wmi repoted processor id): %s\n", cpuid_hex); 
 
        // uncomment below if we want to see the real values returned 
        fprintf(stdout,"eax:%d ebx:%d ecx:%d edx:%d\n",b[0],b[1],b[2],b[3]); 


its return value like: BFEBFBFF00010676

so please tell me its a write way to calculate the processor id.

and can i use the processor ID as unique ID to idetify the PC.

Thanks in advance.
GeneralRe: What is the unique in any PC? Pin
enhzflep29-Jun-11 23:31
enhzflep29-Jun-11 23:31 
GeneralRe: What is the unique in any PC? Pin
Le@rner29-Jun-11 23:38
Le@rner29-Jun-11 23:38 
GeneralRe: What is the unique in any PC? Pin
enhzflep30-Jun-11 0:02
enhzflep30-Jun-11 0:02 
GeneralRe: What is the unique in any PC? [modified] Pin
Le@rner30-Jun-11 1:14
Le@rner30-Jun-11 1:14 
GeneralRe: What is the unique in any PC? Pin
Albert Holguin30-Jun-11 4:09
professionalAlbert Holguin30-Jun-11 4:09 
GeneralRe: What is the unique in any PC? [modified] Pin
enhzflep30-Jun-11 5:34
enhzflep30-Jun-11 5:34 
GeneralRe: What is the unique in any PC? Pin
Albert Holguin30-Jun-11 4:06
professionalAlbert Holguin30-Jun-11 4:06 
GeneralRe: What is the unique in any PC? Pin
Le@rner30-Jun-11 19:19
Le@rner30-Jun-11 19:19 
GeneralRe: What is the unique in any PC? Pin
enhzflep30-Jun-11 19:33
enhzflep30-Jun-11 19:33 
GeneralRe: What is the unique in any PC? Pin
Le@rner30-Jun-11 19:48
Le@rner30-Jun-11 19:48 
GeneralRe: What is the unique in any PC? Pin
enhzflep30-Jun-11 20:21
enhzflep30-Jun-11 20:21 
GeneralRe: What is the unique in any PC? Pin
Le@rner30-Jun-11 23:30
Le@rner30-Jun-11 23:30 
GeneralRe: What is the unique in any PC? Pin
enhzflep30-Jun-11 23:51
enhzflep30-Jun-11 23:51 
AnswerRe: What is the unique in any PC? Pin
Albert Holguin1-Jul-11 3:40
professionalAlbert Holguin1-Jul-11 3:40 
QuestionWhat is Name of my process Pin
Pranit Kothari28-Jun-11 20:58
Pranit Kothari28-Jun-11 20:58 
AnswerRe: What is Name of my process Pin
Randor 29-Jun-11 1:10
professional Randor 29-Jun-11 1:10 
AnswerRe: What is Name of my process Pin
Abhi Lahare29-Jun-11 10:12
Abhi Lahare29-Jun-11 10: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.