c++ - Determine a Registry Key's Object Name -
i attempting set discretionary access control list(dacl) registry key using function setnamedsecurityinfo().
i'm not sure first parameter pobjectname should function if setting registry key? not sure format of string, ie, current user use hkey_current_user\ or current_user?
for registry key object name path registry key or else?
for example:
lptstr pobjectname = _t("hkey_current_user\\software\\myappname"); // or should be... lptstr pobjectname = _t("current_user\\software\\myappname");
read documentation setnamedsecurityinfo():
for descriptions of string formats different object types, see se_object_type.
.
se_registry_key indicates registry key. registry key object can in local registry, such classes_root\somepath or in remote registry, such \computername\classes_root\somepath.
the names of registry keys must use following literal strings identify predefined registry keys: "classes_root", "current_user", "machine", , "users".
so answer question this:
lptstr pobjectname = _t("current_user\\software\\myappname");
Comments
Post a Comment