- #include <Windows.h>
- #include <Winreg.h>
- #include <iostream.h>
-
- void main ()
- {
- HKEY hkey;
- DWORD dwDisposition;
- int dwType = REG_SZ;
- unsigned char boum[7] = "chaine";
- int dwSize = sizeof (boum);
-
- cout << "creation ou ouverture de la clef\n";
- RegCreateKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\My Company\\My Application"), 0, NULL, 0, 0, NULL, &hkey, &dwDisposition);
-
- cout << "Manipulation...\n";
- RegSetValueEx(hkey, "La Chaine", NULL, REG_SZ, (PBYTE)&boum, dwSize);
-
- cout << "fermeture de la clef\n";
- RegCloseKey(hkey);
- }
-
#include <Windows.h>
#include <Winreg.h>
#include <iostream.h>
void main ()
{
HKEY hkey;
DWORD dwDisposition;
int dwType = REG_SZ;
unsigned char boum[7] = "chaine";
int dwSize = sizeof (boum);
cout << "creation ou ouverture de la clef\n";
RegCreateKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\My Company\\My Application"), 0, NULL, 0, 0, NULL, &hkey, &dwDisposition);
cout << "Manipulation...\n";
RegSetValueEx(hkey, "La Chaine", NULL, REG_SZ, (PBYTE)&boum, dwSize);
cout << "fermeture de la clef\n";
RegCloseKey(hkey);
}