3.2.5.2.7.5 INtmsObjectManagement2::SetNtmsUIOptionsW (Opnum 16)

The SetNtmsUIOptionsW method modifies the list of computer names to which the specified type of UI is being directed for an object, with strings encoded using Unicode.

 HRESULT SetNtmsUIOptionsW(
   [in, unique] const LPNTMS_GUID lpObjectId,
   [in] DWORD dwType,
   [in] DWORD dwOperation,
   [in, string] const wchar_t* lpszDestination
 );

ObjectId: A pointer to the identifier of a computer or library whose user interface MUST be redirected. To choose all events for this session, set this parameter to NULL.

dwType: The value from the NtmsUIType (section 2.2.5.2) enumeration specifying the type of UI message to enumerate.

dwOperation: The value from the NtmsUIOperations (section 2.2.5.1) enumeration specifying the type of change to make to the destination list.

lpszDestination: The null-terminated destination to add to or delete from the list.

Return value/code

Description

0x00000000

S_OK

The call was successful.

0x80070005

ERROR_ACCESS_DENIED

Access to an object was denied.

0x80070057

ERROR_INVALID_PARAMETER

A parameter is invalid.

0x80070008

ERROR_NOT_ENOUGH_MEMORY

An allocation failure occurred during processing.

The purpose of this method is to add or delete lpszDestination from the list of computer names to which the specified type of UI is being directed for the given object.

After the server receives this message, it MUST verify that dwType is not equal to NTMS_UITYPE_INVALID, and verify that dwType 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).

If parameter validation succeeds, the server MUST compose a response to the client after verifying 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).

If lpszDestination is NULL, the server MUST use the computer name of the client as lpszDestination.

The action taken depends on the value of dwOperation.

 Value

 Meaning

NTMS_UIDEST_ADD

Add a new lpszDestination (computer name) to the list.

NTMS_UIDEST_DELETE

Remove an lpszDestination from the list.

NTMS_UIDEST_DELETEALL

Clear all names from the list.

Strings that are sent to this method as parameters MUST be Unicode-encoded.