Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The GetDSPath method retrieves the Active Directory path for the specified section of the GPO.
Syntax
HRESULT GetDSPath(
[in] DWORD dwSection,
[out] LPOLESTR pszPath,
[in] int cchMaxPath
);
Parameters
[in] dwSection
Specifies the GPO section. This parameter can be one of the following values.
GPO_SECTION_ROOT
Root section
GPO_SECTION_USER
User section
GPO_SECTION_MACHINE
Computer section
[out] pszPath
Receives the Active Directory path to the root of the requested section. For more information, see the following Remarks section.
[in] cchMaxPath
Specifies the size, in characters, of the pszPath parameter.
Return value
If the method succeeds, the return value is S_OK. Otherwise, the method returns one of the COM error codes defined in the Platform SDK header file WinError.h.
Remarks
If you call the GetDSPath method and specify a computer GPO, the method succeeds, but on return, the pszPath parameter contains an empty string. This is because computer GPOs do not have Active Directory storage; they have only file system storage.
To retrieve the file system path for the specified section of a GPO, you can call the GetFileSysPath method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | gpedit.h |
DLL | Gpedit.dll |