[This is preliminary documentation and subject to change.]
The OpenNtmsSession function sets up a session with a RSM server.
HANDLE WINAPI OpenNtmsSession(
LPCTSTR lpServer,
LPCTSTR lpApplication,
DWORD dwOptions
);
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.
If you build your application on a newer version of RSM than the service is using, RPC_S_NO_INTERFACES returns when you call OpenNtmsSession.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in ntmsapi.h.
Import Library: Use ntmsapi.lib.
Session Management Functions, CloseNtmsSession