The IMSAdminBase::EnumData method enumerates the data entries of a key in the metabase. One entry is enumerated per call. Set dwMDEnumDataIndex to 0 on the first call and increment by 1 on each subsequent call until the method returns ERROR_NO_MORE_ITEMS.
HRESULT EnumData( METADATA_HANDLE hMDHandle, //metadata handle LPCWSTR pszMDPath, //path to a key, relative to hMDHandle PMETADATA_RECORD pmdrMDData, //pointer to a structure that // receives the data DWORD dwMDEnumDataIndex, //index of the current data entry DWORD *pdwMDRequiredDataLen //receives the required buffer size // for the data );
Returns HRESULT that contains one of the following values:
ERROR_ACCESS_DENIED | Access is denied. Either the open handle does not have read or write permission as needed, or the user does not have sufficient permissions to perform the operation. |
ERROR_INSUFFICIENT_BUFFER | The buffer passed into the method call is too small to receive the data. |
ERROR_INVALID_PARAMETER | The parameter is incorrect. |
ERROR_NO_MORE_ITEMS | There are no more entries to enumerate. |
ERROR_PATH_NOT_FOUND | The specified path is not found in the metabase. |
ERROR_SUCCESS | The method succeeded. |
The handle, METADATA_MASTER_ROOT_HANDLE, provides no guarantee against multiple thread access. If your application requires a constant data state, use a handle returned by IMSAdminBase::OpenKey.