<div class="content" name="GetNtmsUIOptionsA" uuid="c8c26452-ec00-40c7-a707-4b46b528fe03"><p>The GetNtmsUIOptionsA method enumerates the list of computer
names to which the specified type of UI is being directed for an object, with
strings encoded using ASCII.</p><dl>
<dd>
<div><pre> HRESULT GetNtmsUIOptionsA(
   [in, unique] const LPNTMS_GUID lpObjectId,
   [in] DWORD dwType,
   [out, size_is(*lpdwBufSize), length_is(*lpdwDataSize)] 
     unsigned  char* 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">NtmsUITypes (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
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> MUST be 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>0x00000000 S_OK</td>
  <td>The call was successful.</td>
 </tr><tr>
  <td>0x80070005 ERROR_ACCESS_DENIED</td>
  <td>Access to an object was denied.</td>
 </tr><tr>
  <td>0x80070008 ERROR_NOT_ENOUGH_MEMORY</td>
  <td>An allocation failure occurred during processing.</td>
 </tr><tr>
  <td>0x80070057 ERROR_INVALID_PARAMETER</td>
  <td>The parameter is not valid.</td>
 </tr><tr>
  <td>0x8007007A ERROR_INSUFFICIENT_BUFFER</td>
  <td>The specified buffer size is not large enough.</td>
 </tr><tr>
  <td>0x800710D8 ERROR_OBJECT_NOT_FOUND</td>
  <td>The object was not found.</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 of 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 given 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, the
server MUST return ERROR_ACCESS_DENIED (0x80070005). 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
ASCII-encoded. </p></div>