Why is RegOpenKeyEx() returning error code 2 on Vista 64bit?

后端 未结 5 1026
旧巷少年郎
旧巷少年郎 2020-12-05 17:48

I was making the following call:

result = RegOpenKeyEx(key, s, 0, KEY_READ, &key);

(C++, Visual Studio 5, Vista 64bit).

It is f

5条回答
  •  粉色の甜心
    2020-12-05 18:13

    I discovered that I could solve my problem using the flag: KEY_WOW64_64KEY , as in:

    result = RegOpenKeyEx(key, s, 0, KEY_READ|KEY_WOW64_64KEY, &key);
    

    For a full explanation: 32-bit and 64-bit Application Data in the Registry

提交回复
热议问题