3.1.4.18 GetDataSetNumber (Opnum 23)

The GetDataSetNumber method returns the dataset number associated with a node in the metabase. A dataset number is a unique number identifying the data items at that node, including inherited data items. Nodes with the same dataset number have identical data.

 HRESULT GetDataSetNumber(
   [in] METADATA_HANDLE hMDHandle,
   [unique, in, string] LPCWSTR pszMDPath,
   [out] DWORD* pdwMDDataSetNumber
 );

hMDHandle: An unsigned 32-bit integer value containing an open metabase handle specifying the key to be queried.

pszMDPath: A pointer to a Unicode string that contains the path of the node to have its dataset number retrieved, relative to the path of the hMDHandle parameter.

pdwMDDataSetNumber: A pointer to an integer value that returns the number associated with this dataset. This value can be used to identify datasets common to multiple nodes.

Return Values: A signed 32-bit value that indicates return status. If the method returns a negative value, it failed. If the 12-bit facility code (bits 16–27) is set to 0x007, the value contains a Win32 error code in the lower 16 bits. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation. For more information about Win32 error codes and HRESULT values, see [MS-ERREF].

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

The opnum field value for this method is 23.

When processing this call, the server MUST do the following:

  • Determine the metabase node that most closely matches the path specified by pszMDPath. If no part of the path specified matches a node in the metabase, the server returns the data set number of the metabase key referenced by the hMDHandle parameter. Otherwise, the server returns the data set number of the most closely matching node. The dataset number for the METADATA_MASTER_ROOT_HANDLE is 1.