delete [] pBytes;
static BYTE * GetValueBytes( HKEY hKey, const char *pValueName, DWORD *pLen){  LONG err;  DWORD bufSz;  LPBYTE pBytes = NULL;  err = ::RegQueryValueEx( hKey, pValueName, NULL, NULL, NULL, &bufSz);   if (err == ERROR_SUCCESS) {    pBytes = new BYTE[bufSz];    err = ::RegQueryValueEx( hKey, pValueName, NULL, NULL, pBytes, &bufSz);    if (err != ERROR_SUCCESS) {      delete [] pBytes;      pBytes = NULL;    } else {      // Return length if caller wanted it.      if ( pLen ) {        *pLen = bufSz;      }    }  }  return( pBytes);}