Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 00:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Help me please

Discussion on Help me please within the C/C++ forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
GemeosBSVIP's Avatar
 
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;
		}
			
	}
GemeosBSVIP is offline  
Old 09/18/2014, 21:25   #2




 
Omdi's Avatar
 
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
Here you go !
Omdi is offline  
Old 09/18/2014, 21:38   #3
 
Terrat's Avatar
 
elite*gold: 130
Join Date: Apr 2012
Posts: 1,173
Received Thanks: 670
Quote:
Originally Posted by GemeosBSVIP View Post
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
Terrat is offline  
Old 09/18/2014, 21:42   #4

 
snow's Avatar
 
elite*gold: 724
Join Date: Mar 2011
Posts: 10,480
Received Thanks: 3,319
Quote:
Originally Posted by Dreamsläps View Post
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
snow is offline  
Thanks
1 User
Closed Thread




All times are GMT +2. The time now is 00:18.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.