C++ - RegCreateKeyEx succès, mais sans résultat

Quelqu'un pourrait-il me dire quel est le problème est avec ce code? Il n'y a pas d'erreurs. Tout revient ERROR_SUCCESS mais dans le registre ne peut pas voir tous les changements.

void Utils::writePath(LPCTSTR data)
{
    HKEY hkey;
    DWORD dwDisposition;
    if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, 
      TEXT("SOFTWARE\\aaTestCompany\\testApp"), 
      0, NULL, 0, 
      KEY_WRITE, NULL, 
      &hkey, &dwDisposition) == ERROR_SUCCESS) 
    {
        long setRes = RegSetValueEx (hkey, "testPath", 0, REG_SZ, (LPBYTE)data, strlen(data)+1);
         if (setRes == ERROR_SUCCESS) {
                printf("Success writing to Registry.");
            } else {
                printf("Error writing to Registry.");
            }
        RegCloseKey(hkey);
    }
    else
        MessageBox(NULL,"error","",0);
}
Est-ce une application 32 bits sur un OS 64 bits?
Yup, c'est l'application 32 bits sur un OS 64 bits. Est-il important?
LPCTSTR = Long Pointeur vers une chaîne constante -c'est gratuit pour info
Voir question.
double possible de j'ai ajouté une clé de registre, mais je ne le trouve pas par programmation

OriginalL'auteur Charlie Hopperson | 2013-01-29