<div class="content"><p>The SetNtmsUIOptionsA method modifies 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 SetNtmsUIOptionsA(
   [in, unique] const LPNTMS_GUID lpObjectId,
   [in] DWORD dwType,
   [in] DWORD dwOperation,
   [in, string] const  char* lpszDestination
 );
</pre></div>
</dd></dl><p><b>lpObjectId: </b>A pointer to the identifier of a
computer or library whose UI MUST be redirected. To choose all events for this
session, set this parameter to NULL.</p><p><b>dwType: </b>The 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 message to enumerate.</p><p><b>dwOperation: </b>The value from the <a href="3ff13376-f3bc-4897-a201-26811aa925ec" data-linktype="relative-path">NtmsUIOperations (section 2.2.5.1)</a>
enumeration specifying the type of change to make to the destination list.</p><p><b>lpszDestination: </b>The null-terminated
destination to add to or delete from the list.</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>0x80070057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>A parameter is invalid.</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></tbody></table>
</dd></dl><p>The purpose of this method is to add or delete <i>lpszDestination</i>
from the list of computer names to which the specified type of UI is being
directed for the specific object.</p><p>Upon receiving this message, the server MUST 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 verify
that the user has the required access rights. If the client does not have the
required access rights, the server MUST return ERROR_ACCESS_DENIED
(0x80070005).</p><p>If <i>lpszDestination</i> is NULL, the server MUST use the
computer name of the client as <i>lpszDestination</i>.</p><p>The action taken depends upon the value of <i>dwOperation</i>.</p><table><thead>
  <tr>
   <th>
   <p> Value </p>
   </th>
   <th>
   <p> Meaning </p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>NTMS_UIDEST_ADD</p>
  </td>
  <td>
  <p>Add a new <i>lpszDestination</i> (computer name) to
  the list.</p>
  </td>
 </tr><tr>
  <td>
  <p>NTMS_UIDEST_DELETE</p>
  </td>
  <td>
  <p>Remove an <i>lpszDestination</i> from the list.</p>
  </td>
 </tr><tr>
  <td>
  <p>NTMS_UIDEST_DELETEALL</p>
  </td>
  <td>
  <p>Clear all names from the list.</p>
  </td>
 </tr></tbody></table><p>Strings sent to this method as parameters MUST be
ASCII-encoded. </p></div>