GetNtmsUIOptions Function
[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The GetNtmsUIOptions function obtains the list of computer names to which the specified type of user interface is being directed for the given object. A call to GetNtmsUIOptions returns the list of destinations for the instance determined by the lpObjectId and dwType parameters.
If there are no destinations in the list for the specified instance, the function returns ERROR_SUCCESS along with a list length of zero.
Syntax
DWORD GetNtmsUIOptions(
__in HANDLE hSession,
__in const LPNTMS_GUID lpObjectId,
__in DWORD dwType,
__out LPTSTR lpszDestination,
__inout LPDWORD lpdwSize
);
Parameters
hSession [in]
Handle to the session returned by the OpenNtmsSession function.lpObjectId [in]
Unique identifier of the object whose UI is being redirected. The object must be a container that can be a source for events. The object can be either be an application (a mount request triggered by the application), a library (a door open request in response to an eject) or a computer (all UI pertaining to the computer).To specify the computer container set the lpObjectId pointer to point to a buffer with the Removable Storage Manager's computer object GUID. To specify a particular library set it to point to a buffer with the library's GUID. To specify an application, pass in a NULL pointer. The identity of the application is determined by the session used in hSession. Note that an application can have multiple sessions open simultaneously. In this case, the value set applies only to the hSession session.
dwType [in]
This parameter can have one of the following values.Value Meaning NTMS_UITYPE_INFO UI messages that provide information. These include the work queue items that indicate progress. For example, mount requests.
NTMS_UITYPE_REQ UI messages that are requests. These include the operator requests that handle media. For example, a request to inject new media.
NTMS_UITYPE_ERR UI messages that give error information. These include operator requests that are related to error notification. For example, a request to clean the drive.
lpszDestination [out]
Multi-string that returns the names of the machines to which the UI is being redirected. This parameter cannot be NULL.lpdwSize [in, out]
Size of the destination string, in TCHARs.
Return Value
This function returns one of the following values.
Value | Meaning |
---|---|
ERROR_ACCESS_DENIED | Access to one or more RSM objects is denied. |
ERROR_INSUFFICIENT_BUFFER | The buffer size specified by lpdwSize is too small for the destinations found. The function returns the actual size in lpdwSize. |
ERROR_INVALID_HANDLE | The session handle is missing or is not valid. |
ERROR_INVALID_PARAMETER | The lpdwSize or lpszDestination parameter is NULL, or lpObjectId is not a valid container, or dwType is not one of the three valid values. |
ERROR_NOT_ENOUGH_MEMORY | An allocation failure occurred during processing. |
ERROR_OBJECT_NOT_FOUND | The GUID specified by lpObjectId is not the GUID of any computer or library object in the database. |
ERROR_SUCCESS | The function was successful. |
Remarks
A call to GetNtmsUIOptions returns a list of destinations for a particular instance determined by the lpObjectId and dwType parameters.
NTMS_UITYPE_INFO | NTMS_UITYPE_REQ | NTMS_UITYPE_ERR | |
---|---|---|---|
Application | Display work item progress UI for work items generated by this application. | Display operator request UI for operator requests generated by actions taken by this application. | Undefined. Applications cannot cause this sort of error event. |
Library | Display work item progress UI for work items associated with this library. | Display UI for requests associated with this library. | Display UI for errors associated with this library. |
Computer | Display informational UI in this instance of RSM running on this machine. | Display a request-type UI in this instance of RSM. | Display error-type UI in this instance of RSM. |
Requirements
Minimum supported client |
Windows XP |
Minimum supported server |
Windows Server 2003 |
End of client support |
Windows Vista |
End of server support |
Windows Server 2008 |
Header |
Ntmsapi.h |
Library |
Ntmsapi.lib |
DLL |
Ntmsapi.dll |
Unicode and ANSI names |
GetNtmsUIOptionsW (Unicode) and GetNtmsUIOptionsA (ANSI) |
See Also
Send comments about this topic to Microsoft
Build date: 6/9/2011