<div class="content"><p>The GetNtmsUIOptionsW method enumerates the list of computer
names to which the specified type of UI is being directed for an object. This
method encodes strings using Unicode.</p><dl>
<dd>
<div><pre> HRESULT GetNtmsUIOptionsW(
   [in, unique] const LPNTMS_GUID lpObjectId,
   [in] DWORD dwType,
   [out, size_is(*lpdwBufSize), length_is(*lpdwDataSize)] 
     wchar_t* lpszDestination,
   [in] DWORD* lpdwBufSize,
   [out] DWORD* lpdwDataSize,
   [out] DWORD* lpdwOutSize
 );
</pre></div>
</dd></dl><p><b>lpObjectId: </b>A pointer to the identifier of a
computer or library whose UI is being redirected. To choose all events for this
session, set this parameter to NULL.</p><p><b>dwType: </b>A value from the <a href="7a997c88-e0bd-4966-8792-7964cbcf3eef" data-linktype="relative-path">NtmsUIType (section 2.2.5.2)</a>
enumeration specifying the type of UI messages to enumerate.</p><p><b>lpszDestination: </b>A buffer of null-terminated
Unicode characters denoting destinations, with the buffer terminated by two
null characters.</p><p><b>lpdwBufSize: </b>A pointer to the size, in bytes,
of <i>lpszDestination</i>.</p><p><b>lpdwDataSize: </b>A pointer to the number of
strings in <i>lpszDestination</i>.</p><p><b>lpdwOutSize: </b>A pointer to the required size of
the <i>lpdwDataSize</i> parameter if more data needs to be returned than can
fit in <i>lpszDestination</i>. In such a case, <i>lpdwDataSize</i> is set to 0.</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 is denied.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070008</p>
  <p>ERROR_NOT_ENOUGH_MEMORY</p>
  </td>
  <td>
  <p>An allocation failure occurred during processing.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>A parameter is not valid.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x8007007A</p>
  <p>ERROR_INSUFFICIENT_BUFFER</p>
  </td>
  <td>
  <p>The specified buffer size is not large enough.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x800710D8</p>
  <p>ERROR_OBJECT_NOT_FOUND</p>
  </td>
  <td>
  <p>The object was not found.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>Upon receiving this message, the server MUST verify that <i>lpszDestination</i>
is not NULL, verify that <i>dwType</i> is not equal to NTMS_UITYPE_INVALID, and
verify that <i>dwType</i> is not equal to or greater than NTMS_UITYPE_MAX. If
parameter validation fails, the server MUST immediately fail the operation and
return ERROR_INVALID_PARAMETER (0x80070057).</p><p>If parameter validation succeeds, the server MUST perform
the following actions:</p><ul><li><p><span><span> 
</span></span>Ensure that the client has READ permissions on the object.</p>
</li><li><p><span><span> 
</span></span> Validate the object container.</p>
</li><li><p><span><span> 
</span></span> Allocate a large enough buffer to hold all the destinations.</p>
</li><li><p><span><span> 
</span></span> Traverse through all the available destinations and generate the
list of machine names to which the specified type of UI is being directed for
the specified object.</p>
</li><li><p><span><span> 
</span></span> Return this list to the client.</p>
</li></ul><p>If the client does not have the required access rights,
NTMS_MODIFY_ACCESS to the library is denied and the server MUST return
ERROR_ACCESS_DENIED (0x80070005). Other security errors are possible but
indicate a security subsystem error. If the buffer size specified by <i>lpdwBufSize</i>
is too small, the server MUST return ERROR_INSUFFICIENT_BUFFER (0x8007007A)
with <i>lpdwOutSize</i> set to the required size.</p><p>Strings sent to this method as parameters MUST be
Unicode-encoded.</p></div>