Hehe, I got it working! I looked in the Win32 API Reference and it said that the first DWORD must be the type of data.. Seeing as we want to receive a zero terminated string, I used REG_SZ. And the second DWORD had to be the buffer size.. you declared the buffer as being able to hold 255 bytes, so that's what I set it to.. Here's the code:
Hey, I learnt something too!
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLne, int nCmdShow)
TCHAR sk = "Software\\Microsoft\\Windows\\CurrentVersion\\"
DWORD a = REG_SZ; // <-- Zero terminated string
DWORD b = 255; // <-- Buffer size