Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Registry Keys

Name: Anonymous 2007-08-27 20:57 ID:YDYUOXhr

Ok, so I've been successful editing the value of other keys, but this is my first time trying to create them and well it just isn't working...any help anon? This is what I have (I'm using Bloodshed Dev c++):

#include <windows.h>
#include <iostream>



int main(int argc, char *argv[])
{

HKEY hKey;
DWORD buffersize = 1024;
char* lpData = new char[buffersize];

strcpy(lpData,"c:\\winlib60.exe");

RegCreateKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run\\winlib",
NULL,
NULL,
NULL,
KEY_ALL_ACCESS,
NULL,
&hKey,
NULL);

RegOpenKeyEx (HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\Run\\",
NULL,
KEY_READ,
&hKey);

RegSetValueEx(hKey,
"Winlib",
NULL,
REG_SZ,
(LPBYTE) lpData,
buffersize);

RegCloseKey (hKey);

system("pause");
return EXIT_SUCCESS;
}

Name: Anonymous 2007-08-27 21:14 ID:Heaven

>>1
yuo should use C POUND .NUT instead

Name: Anonymous 2007-08-27 22:30 ID:YDYUOXhr

>>2
Very helpful...

Name: Anonymous 2007-08-27 22:33 ID:Heaven

this board is for EXPERT PROGRAMMERs only

Name: Anonymous 2007-08-28 6:11 ID:6taj/yqN

Put some basic error checking in or use a debugger to step through it, you fucking noob.

Name: Anonymous 2007-08-28 7:27 ID:Heaven

NULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULLNULL

Name: Anonymous 2009-11-05 23:38

testing                                                                           > testing

Name: Anonymous 2009-11-05 23:39

testing > testing

Name: Anonymous 2010-12-10 9:51

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List