<div class="content" name="SetNtmsUIOptionsA" uuid="57ccb488-7f9c-4994-a229-22074993bd8c"><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>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>0x80070057 ERROR_INVALID_PARAMETER</td>
  <td>A parameter is invalid.</td>
 </tr><tr>
  <td>0x80070008 ERROR_NOT_ENOUGH_MEMORY</td>
  <td>An allocation failure occurred during processing.</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>NTMS_UIDEST_ADD</td>
  <td>Add a new lpszDestination (computer name) to the list.</td>
 </tr><tr>
  <td>NTMS_UIDEST_DELETE</td>
  <td>Remove an lpszDestination from the list.</td>
 </tr><tr>
  <td>NTMS_UIDEST_DELETEALL</td>
  <td>Clear all names from the list.</td>
 </tr></tbody></table><p>Strings sent to this method as parameters MUST be
ASCII-encoded. </p></div>