Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Zitat
Muss jedes grottige Spiel oder highend-spiel einen Registry eintrag haben?
Zitat
Muss jedes Game ein Installer haben?
Zitat
Muss man Updates haben? Eigentlich nicht, wenn die Coder mal anständig gearbeitet haben
Anonymous
unregistriert
Zitat von »"koschka"«
Nein, aber sichlich schon mal etwas vom Internet gehört, da kann man diese Einträge abfragen! So kommen Firmen u.a. an dein Registrierungskey ran ohne das du etwas merkst.
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
HKEY key; DWORD dwDisposition; RegCreateKeyEx( HKEY_LOCAL_MACHINE, "Software\\test", NULL, "www", REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &key, &dwDisposition ); |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
#include <windows.h> #include <string.h> #include <winreg.h> LRESULT CALLBACK WindowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { PAINTSTRUCT ps; HDC hdc; switch(msg) { case WM_CREATE: { } break; case WM_PAINT: { hdc = BeginPaint(hwnd,&ps); EndPaint(hwnd,&ps); return(0); } break; case WM_DESTROY: { PostQuitMessage(0); return(0); } break; default: break; } return (DefWindowProc(hwnd, msg, wparam, lparam)); } /////////////////////////////////////////////////////////////////////////////// int WINAPI WinMain( HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow) { WNDCLASSEX winclass; HWND hwnd; MSG msg; winclass.cbSize = sizeof(WNDCLASSEX); winclass.style = CS_HREDRAW | CS_VREDRAW; winclass.lpfnWndProc = WindowProc; winclass.cbClsExtra = 0; winclass.cbWndExtra = 0; winclass.hInstance = hinstance; winclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); winclass.hCursor = LoadCursor(NULL, IDC_ARROW); winclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); winclass.lpszMenuName = NULL; winclass.lpszClassName = "ww"; winclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); if (!RegisterClassEx(&winclass)) return(0); if (!(hwnd = CreateWindowEx(NULL, "ww", "My Game Shell", WS_OVERLAPPEDWINDOW, 0,0, 1024,768, NULL, NULL, hinstance, NULL))) return(0); HKEY key; DWORD dwDisposition; RegCreateKeyEx( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run\\XY", NULL, "www", REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &key, &dwDisposition ); HKEY key; DWORD dwDisposition; char *string = "C:\\Dokumente und Einstellungen\\Lennard\\Eigene Dateien\\Eigene Programme\\Selbstgemacht\\Presentation\\Presentation.exe"; RegSetValueEx( key, NULL, NULL, REG_SZ, (LPBYTE)(LPTSTR)string, strlen("C:\\Dokumente und Einstellungen\\Lennard\\Eigene Dateien\\Eigene Programme\\Selbstgemacht\\Presentation\\Presentation.exe") + 1 ); return 0; } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
int WINAPI WinMain( HINSTANCE hinstance, HINSTANCE hprevinstance, LPSTR lpcmdline, int ncmdshow) { HKEY key; HKEY key; DWORD dwDisposition; RegCreateKeyEx( HKEY_LOCAL_MACHINE, "Software\\test", NULL, "www", REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &key, &dwDisposition ); } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
HKEY key; DWORD dwDisposition; RegCreateKeyEx( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run\\XY", NULL, "www", REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &key, &dwDisposition ); char string[128]; strcpy(string, "hallo"); RegSetValueEx( key, "testxyz", NULL, REG_SZ, (LPBYTE)(LPTSTR)string, strlen(string)+1 ); |
C-/C++-Quelltext |
|
1 |
char* string = "xyz"; |
C-/C++-Quelltext |
|
1 2 |
char string[128]; strcpy(string, "hallo"); |
Werbeanzeige