简体   繁体   中英

ATLGetDacl accessing 64bit reg keys from a 32bit process

I am trying to get DACL information of a 64bit registry key from a 32bit process.

AtlGetDacl("Machine\Software\Somekey", SE_REGISTRY_KEY, &dacl)

This redirects to "Machine\\Software\\Wow6432Node\\Somekey" , since I am running a 32bit process.

What I need is something like the samDesired flag which is available in Windows Registry functions (like RegOpenKeyEx), do you know if ATL has such a thing and how I can pass that to ATLGetDacl and ATLSetDacl?

Thanks.

Another overload of AtlGetDacl can take a registry key as an argument.

inline bool AtlGetDacl(
    _In_ HANDLE hObject,
    _In_ SE_OBJECT_TYPE ObjectType,
    _Inout_ CDacl *pDacl) throw(...)

You can use it for a key you already know how to open with RegOpenKeyEx .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM