What's wrong? It crashes when I want to get value of AUVersion. This key exists in registry but I can't get it.

```
int main(int argc, char *argv[])
{
    HKEY key;
    if (RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\JavaSoft\\Auto Update\\"), &key) != ERROR_SUCCESS)
    {
        cout << "Unable to open registry key\n\n";
    }

    char path[1024];
    DWORD value_length = 1024;
//here is the crash
    RegQueryValueEx(key, "AUVersion", NULL, (LPDWORD)REG_SZ, (LPBYTE)&path, &value_length);
    cout << "the value read from the registry is: " << path << endl;

    system("pause");
    return 0;
}

```