|
You last visited: Today at 00:18
Advertisement
Help me please
Discussion on Help me please within the C/C++ forum part of the Coders Den category.
09/18/2014, 21:22
|
#1
|
elite*gold: 0
Join Date: Sep 2014
Posts: 82
Received Thanks: 30
|
Help me please
Could you help me set up this foundation HWID in DLL?
Code:
if (_reason == DLL_PROCESS_ATTACH)
{
HW_PROFILE_INFO hwProfileInfo;
if(GetCurrentHwProfile(&hwProfileInfo) != NULL){
char *cHWID = "{846ee340-7039-11de-9d20-806e6f6e6963}";
char *cHWID2 = hwProfileInfo.szHwProfileGuid;
MessageBox(0,cHWID2,cHWID,0);
printf("Hardware GUID: %s\n", hwProfileInfo.szHwProfileGuid);
printf("Hardware Profile: %s\n", hwProfileInfo.szHwProfileName);
//if(strcmp(hwProfileInfo.szHwProfileGuid, cHWID)){
if(mystrcmp(cHWID2, cHWID)){
MessageBoxA(0,"HWID Checked","",0);
printf("Hardware ID check passed.\n");
}else{
HGLOBAL hText;
char *pText;
hText = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE, 100);
pText = (char*)GlobalLock(hText);
strcpy(pText, hwProfileInfo.szHwProfileGuid);
GlobalUnlock(hText);
OpenClipboard(NULL);
EmptyClipboard();
SetClipboardData(CF_TEXT, hText);
CloseClipboard();
MessageBoxA(0, TEXT("HWID detection failed !!!\n HWID copyied to Clipboard! \n Bye"),"Information",0);
}
}else{
return 0;
}
}
|
|
|
09/18/2014, 21:25
|
#2
|
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
|
Here you go !
|
|
|
09/18/2014, 21:38
|
#3
|
elite*gold: 130
Join Date: Apr 2012
Posts: 1,173
Received Thanks: 670
|
Quote:
Originally Posted by GemeosBSVIP
Could you help me set up this foundation HWID in DLL?
Code:
if (_reason == DLL_PROCESS_ATTACH)
{
HW_PROFILE_INFO hwProfileInfo;
if(GetCurrentHwProfile(&hwProfileInfo) != NULL){
char *cHWID = "{846ee340-7039-11de-9d20-806e6f6e6963}";
char *cHWID2 = hwProfileInfo.szHwProfileGuid;
MessageBox(0,cHWID2,cHWID,0);
printf("Hardware GUID: %s\n", hwProfileInfo.szHwProfileGuid);
printf("Hardware Profile: %s\n", hwProfileInfo.szHwProfileName);
//if(strcmp(hwProfileInfo.szHwProfileGuid, cHWID)){
if(mystrcmp(cHWID2, cHWID)){
MessageBoxA(0,"HWID Checked","",0);
printf("Hardware ID check passed.\n");
}else{
HGLOBAL hText;
char *pText;
hText = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE, 100);
pText = (char*)GlobalLock(hText);
strcpy(pText, hwProfileInfo.szHwProfileGuid);
GlobalUnlock(hText);
OpenClipboard(NULL);
EmptyClipboard();
SetClipboardData(CF_TEXT, hText);
CloseClipboard();
MessageBoxA(0, TEXT("HWID detection failed !!!\n HWID copyied to Clipboard! \n Bye"),"Information",0);
}
}else{
return 0;
}
}
|
I going to die you copied my code 1 to 1 from my thread and mr smith posted the fix there #close
Next time make it self or copy a bit because i think you c and p it only
|
|
|
09/18/2014, 21:42
|
#4
|
elite*gold: 724
Join Date: Mar 2011
Posts: 10,480
Received Thanks: 3,319
|
Quote:
Originally Posted by Dreamsläps
I going to die you copied my code 1 to 1 from my thread and mr smith posted the fix there #close
|
^this.
Oh, and it was Omdihar, not Smith.
#closed
|
|
|
All times are GMT +2. The time now is 00:18.
|
|