GetNtmsMediaPoolNameA function (ntmsapi.h)

[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]

The GetNtmsMediaPoolName function retrieves the specified media pool's full name hierarchy.

Syntax

DWORD GetNtmsMediaPoolNameA(
  [in]      HANDLE      hSession,
  [in]      LPNTMS_GUID lpPoolId,
  [out]     LPSTR       lpNameBuf,
  [in, out] LPDWORD     lpdwBufSize
);

Parameters

[in] hSession

Handle to the session returned by the OpenNtmsSession function.

[in] lpPoolId

Unique identifier of the media pool whose name is to be retrieved.

[out] lpNameBuf

Pointer to a buffer that receives the name of the media pool.

[in, out] lpdwBufSize

Size of the lpBufName buffer, on input. On output, the number of characters in the full name hierarchy.

Return value

This function returns one of the following values.

Value Meaning
ERROR_INSUFFICIENT_BUFFER
The buffer size is not large enough. The correct size is returned in lpdwBufSize.
ERROR_INVALID_HANDLE
The value specified in the hSession parameter is NULL or is not valid.
ERROR_INVALID_MEDIA_POOL
The media pool ID is missing or is not valid.
ERROR_INVALID_PARAMETER
The parameter is missing or is not valid.
ERROR_NOT_ENOUGH_MEMORY
The memory allocation failed.
ERROR_SUCCESS
The function was successful.

Remarks

Note

The ntmsapi.h header defines GetNtmsMediaPoolName as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header ntmsapi.h
Library Ntmsapi.lib
DLL Ntmsapi.dll

See also

CreateNtmsMediaPool

Media Services Functions