<div class="content"><p>The GetNtmsMediaPoolNameWR method retrieves the full name
hierarchy of a media pool, with strings encoded using Unicode.</p><dl>
<dd>
<div><pre> HRESULT GetNtmsMediaPoolNameWR(
   [in] LPNTMS_GUID lpPoolId,
   [out, size_is(*lpdwNameSizeBuf), length_is(*lpdwNameSize)] 
     wchar_t* lpBufName,
   [in] DWORD* lpdwNameSizeBuf,
   [out] DWORD* lpdwNameSize,
   [out] DWORD* lpdwOutputSize
 );
</pre></div>
</dd></dl><p><b>lpPoolId: </b>A pointer to the identifier of the
media pool for which to retrieve the name. </p><p><b>lpBufName: </b>The null-terminated buffer that
contains the name of the media pool.</p><p><b>lpdwNameSizeBuf: </b>A pointer to the size, in
bytes, of <i>lpBufName</i>. </p><p><b>lpdwNameSize: </b>A pointer to the length of the
string in <i>lpBufName</i>, including the terminating null character.</p><p><b>lpdwOutputSize: </b>A pointer to the buffer size
required to return the name.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>S_OK</p>
  </td>
  <td>
  <p>The call was successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070005</p>
  <p>ERROR_ACCESS_DENIED</p>
  </td>
  <td>
  <p>Access to an object was denied. </p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070008</p>
  <p>ERROR_NOT_ENOUGH_MEMORY</p>
  </td>
  <td>
  <p>An allocation error occurred during processing.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>The parameter is missing or invalid.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x8007007A</p>
  <p>ERROR_INSUFFICIENT_BUFFER</p>
  </td>
  <td>
  <p>The specified buffer size is too small. The required
  size is returned in <i>lpdwOutputSize</i>.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x800710CE</p>
  <p>ERROR_INVALID_MEDIA_POOL</p>
  </td>
  <td>
  <p>The media pool identifier is missing or invalid.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST:</p><ul><li><p><span><span> 
</span></span>Verify that <i>lpPoolId</i> is not NULL.</p>
</li><li><p><span><span> 
</span></span>Verify that <i>lpdwNameSize</i> is not NULL.</p>
</li><li><p><span><span> 
</span></span>Verify that <i>lpBufName</i> is not NULL.</p>
</li><li><p><span><span> 
</span></span>Verify that <i>lpdwOutputSize</i> is not NULL.</p>
</li></ul><p>If parameter validation fails, the server MUST fail the
operation immediately and return ERROR_INVALID_PARAMETER (0x80070057).</p><p>If parameter validation succeeds, the server MUST verify
that the user has the required access rights, retrieve all the name hierarchy
for the given media pool, and return it to the caller in the buffer <i>lpBufName</i>.
If the client does not have the required access rights, the server MUST return
ERROR_ACCESS_DENIED (0x80070005).</p><p>If the output data size is bigger than the size of the
buffer pointed to by <i>lpBufName</i>, the server MUST copy the required buffer
size in <i>lpdwOutputSize</i> and return ERROR_INSUFFICIENT_BUFFER
(0x8007007A). Otherwise, the server MUST copy the name hierarchy in the <i>lpBufName</i>
and return this to the user.</p><p>Strings sent to this method as parameters MUST be
Unicode-encoded.</p></div>