Platform SDK: Group Policy |
Retrieves a handle to the root of the registry key for the specified GPO section.
HRESULT GetFileSysPath( DWORD dwSection, HKEY *hKey );
Value | Meaning |
---|---|
GPO_SECTION_USER | User section |
GPO_SECTION_MACHINE | Computer section |
If the function succeeds, the return value is S_OK. Otherwise, the function returns one of the COM error codes defined in the Platform SDK header file WinError.h. If the registry information is not loaded, GetRegistryKey returns E_FAIL.
The registry handle is a handle to the root of the registry key. To get or set values in the Policies key, call the RegOpenKey function to open the Software\Policies key first.
When you have finished using the registry handle, call the RegCloseKey function to close the handle.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Gpedit.h.
Group Policy Overview, Group Policy Interfaces, IGroupPolicyObject