I am trying to write to the registry. I can create a key, but not a value. can someone tell me what is wrong with this code?
Code:HKEY hkey; DWORD dmDisposition; RegCreateKeyEx( HKEY_LOCAL_MACHINE, TEXT("Software\\My Company\\My App"), 0, 0, 0, 0, 0, &hkey, &dmDisposition ); DWORD dwType, cbData; BYTE m_dwMaxFileSize; dwType = REG_SZ; cbData = sizeof(REG_SZ); RegSetValueEx( hkey, TEXT("MaxFileSize"), 0, dwType, (PBYTE)"hi", cbData ); RegCloseKey(hkey);


Reply With Quote
