void SetWinReg(HKEY hkRootKey, LPSTR szKey, BOOL bOverwriteKey, LPSTR szName, BOOL bOverwriteName, DWORD dwType, LPSTR szData, DWORD dwSize)
void SetWinReg(HKEY hkRootKey, LPSTR szKey, BOOL bOverwriteKey, LPSTR szName, BOOL bOverwriteName, DWORD dwType, LPBYTE lpbData, DWORD dwSize)
void SetWinReg(HKEY hkRootKey, LPSTR szKey, BOOL bOverwriteKey, LPSTR szName, BOOL bOverwriteName, DWORD dwType, LPSTR szData, DWORD dwSize){  HKEY    hkResult;  DWORD   dwErr;  DWORD   dwDisp;  BOOL    bKeyExists;  BOOL    bNameExists;  bKeyExists  = WinRegKeyExists(hkRootKey, szKey);  bNameExists = WinRegNameExists(hkRootKey, szKey, szName);  dwErr       = RegOpenKeyEx(hkRootKey, szKey, 0, KEY_WRITE, &hkResult);  if(dwErr != ERROR_SUCCESS)    dwErr = RegCreateKeyEx(hkRootKey, szKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkResult, &dwDisp);  if(dwErr == ERROR_SUCCESS)  {    if((bNameExists == FALSE) ||      ((bNameExists == TRUE) && (bOverwriteName == TRUE)))      dwErr = RegSetValueEx(hkResult, szName, 0, dwType, szData, dwSize);    RegCloseKey(hkResult);  }}