3.1.3 Initialization
The client MUST be initialized by creating an RPC binding handle to the INtmsSession1 interface. How to get a client-side RPC binding handle for an INtmsSession1 interface is specified in [MS-DCOM] section 3.2.4.
If a client wants to receive event notifications from a server, the client MUST support the INtmsNotifySink interface to register and deregister a callback method with the server.
A client can implement the IClientSink interface. If a client wants to implement the IClientSink interface, the INtmsNotifySink interface MUST be implemented as a notification forwarder, and IClientSink is implemented as a client sink. To initialize a session with the server, a client MUST do the following:
Invoke the INtmsSession1::OpenNtmsServerSessionW method for a UTF-16–encoded session or INtmsSession1::OpenNtmsServerSessionA for an ASCII-encoded session.
Create an instance of a class that implements the IClientSink interface (the client-side notification sink that receives change notifications).
Create and register an instance of the class that implements INtmsNotifySink if the client wants to receive notifications.
If the client does not want to implement IClientSink, the INtmsNotifySink interface MUST be implemented as a client sink.
To initialize a session with the server, the client MUST do the following:
Invoke the INtmsSession1::OpenNtmsServerSessionW method for a Unicode session or INtmsSession1::OpenNtmsServerSessionA for an ASCII session.
Create an instance of the class that implements INtmsNotifySink.
Call its INtmsNotifySink::ConnectCallback method, passing the server's IUnknown interface and the client-side notification sink interface as NULL.
The client MUST call the INtmsNotifySink::ReleaseCallback method followed by INtmsSession1::CloseNtmsSession before ending the session.