The IMSAdminBase::GetDataPaths determines which keys in the metabase contain a specified data identifier. This method retrieves the paths of all keys in the subtree relative to a specified starting key that actually contains the identifier. You can use this method to determine the scope of inherited data values, because only keys that contain the identifier itself are returned. Paths to keys that contain only inherited data for the specified identifier will not be returned.
HRESULT GetDataPaths(
METADATA_HANDLE hMDHandle, //metabase handle.
LPCWSTR pszMDPath, //path to the key, relative to hMDHandle.
DWORD dwMDIdentifier, //identifier of the data.
DWORD dwMDDataType, //type of data.
DWORD dwMDBufferSize, //the size, in wchars, of pbBuffe.r.
LPWSTR pszBuffer, //the buffer that receives the data.
DWORD *pdwMDRequiredBufferSize //if the method fails, receives
// the required buffer size.
);
Data type | Description |
ALL_METADATA | Copy or move all data, regardless of type. |
BINARY_METADATA | Binary data in any form. |
DWORD_METADATA | An unsigned 32-bit number. |
EXPANDSZ_METADATA | A null-terminated string that contains unexpanded environment variables, such as %PATH%. |
MULTISZ_METADATA | An array of null-terminated strings, terminated by two null characters. |
STRING_METADATA | A null-terminated ASCII string. |
Returns an HRESULT that contains one of the following values:
Value | Description |
ERROR_INVALID_PARAMETER | The parameter is incorrect. |
ERROR_NOT_ENOUGH_MEMORY | There is not enough memory to complete the operation. |
ERROR_PATH_NOT_FOUND | The specified path is not found. |
ERROR_SUCCESS | The method succeeded. |