[NTDLL]
[reactos.git] / base / applications / downloader / patches / d2fix.c
1 #include <windows.h>
2 #include <stdio.h>
3
4 int main()
5 {
6
7 HKEY hKey;
8 DWORD dwVal = 1;
9 DWORD dwSize = MAX_PATH;
10 DWORD lpdwDisposition = 0;
11 CHAR szBuf[MAX_PATH];
12
13 printf("%s", "Setting Diablo 2 commandline parameters to -w -glide...");
14
15 if (RegCreateKeyExA (HKEY_CURRENT_USER,
16 "SOFTWARE\\Blizzard Entertainment\\Diablo II Shareware",
17 0,
18 NULL,
19 0,
20 KEY_ALL_ACCESS,
21 NULL,
22 &hKey,
23 &lpdwDisposition));
24 {
25 strcpy(szBuf, "-w -glide");
26
27 RegSetValueExA(hKey, "UseCmdLine", 0, REG_DWORD, (LPCSTR)&dwVal, sizeof(dwVal));
28 RegSetValueExA(hKey, "CmdLine", 0, REG_SZ, (LPCSTR)szBuf, strlen(szBuf)+1);
29
30 RegCloseKey(hKey);
31 printf("%s", "done.");
32
33 }
34
35 return 0;
36 }