Advertisement
ASP_Volume3 Complete Applications #45281

Cool Talker

Cool Talker is one of the most interesting programs for altering text. Just check it out, even if you aren't interested, it's a MUST SEE!

AI

สรุปโดย AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

ซอร์สโค้ด
original-source
Upload
Upload
/*************************************************
 * Half-Life CD-KEY Changer
 * Author: Devin McLean
 * Contact via IRC: GamesNET #team-de
*************************************************/
#include <stdio.h>
#include <windows.h>
int main(int argc, char *argv[])
{
	HKEY hKey;
	LONG lRet;
	unsigned char dwData[14];
	char newKey[14];
	DWORD dwSize = 14;
	
	memset(newKey,0,14);
	if (argc > 2)
	{
		printf("\nToo many params.\n");
		return 0;
	}
	else if (argc == 2)
	{
		if (strlen(argv[1]) != 13)
		{
			printf("\nInvalid Half-Life CD-KEY!\n");
			return 0;
		}
		strcpy(newKey,argv[1]);
	}
	if ((lRet = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Valve\\Half-Life\\Settings", 0, KEY_ALL_ACCESS, &hKey)) != ERROR_SUCCESS)
	{
		printf("\nCould not find Half-Life installed!\n");
		return 0;
	}
	if ((lRet = RegQueryValueEx(hKey, "Key", NULL, 0, dwData, &dwSize)) != ERROR_SUCCESS)
	{
		RegCloseKey(hKey);
		printf("\nCould not find Half-Life CD-KEY!\n");
		return 0;
	}
	printf("\nCurrent Half-Life CD-KEY: %s\n",dwData);
	if (strlen(newKey) == 0)
	{
		printf("New Half-Life CD-KEY: ");
		scanf("%s",newKey);
		if (strlen(newKey) != 13)
		{
			printf("\nInvalid Half-life CD-KEY!\n");
			RegCloseKey(hKey);
			return 0;
		}
		fflush(stdin);
	}
	if ((lRet = RegSetValueEx(hKey, "Key", 0, REG_SZ, (LPBYTE) newKey, dwSize)) != ERROR_SUCCESS)
	{
		RegCloseKey(hKey);
		printf("\nCould not set Half-Life CD-KEY!\n");
		return 0;
	}
	RegCloseKey(hKey);
	printf("\nHalf-Life CD-KEY successfully changed to: %s\n",newKey);
	return 0;
}
ความคิดเห็นดั้งเดิม (3)
กู้คืนจาก Wayback Machine