Platform SDK: Removable Storage Manager |
The OpenNtmsSession function sets up a session with a RSM server.
HANDLE WINAPI OpenNtmsSession( LPCTSTR lpServer, LPCTSTR lpApplication, DWORD dwOptions );
Value | Meaning |
---|---|
ERROR_INVALID_COMPUTERNAME | An invalid computer name format was supplied. |
ERROR_INVALID_PARAMETER | Invalid parameters were supplied. |
ERROR_NO_NETWORK | The network is not started or not available. |
ERROR_NOT_CONNECTED | Unable to connect to the RSM service. |
ERROR_NOT_READY | RSM service has not started. The application should wait and retry. |
ERROR_SUCCESS | The function was successful. |
INVALID_HANDLE_VALUE | RSM cannot open a session. |
RPC_S_NO_INTERFACES | The service is using an older version of RSM than your application. |
The OpenNtmsSession function returns a session handle used with other RSM functions, establishes a connection with the RSM database, and initializes the RSM subsystem for the application.
The OpenNtmsSession function returns a handle that uniquely identifies this session, or it returns INVALID_HANDLE_VALUE if RSM cannot open a session. Other RSM functions use this session handle to perform operations.
If INVALID_HANDLE_VALUE returns, you can call the Win32 GetLastError function to retrieve the error code.
When OpenNtmsSession returns, the application can perform RSM operations.
Sessions are thread-safe but cannot be passed among processes.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntmsapi.h.
Library: Use Ntmsapi.lib.