INtmsSession1::OpenNtmsServerSessionA (Opnum 4)

The OpenNtmsServerSessionA method sets up a session with the server. All input parameters for this method are optional.

 HRESULT OpenNtmsServerSessionA(
   [in, unique] const  char* lpServer,
   [in, unique] const  char* lpApplication,
   [in] const  char* lpClientName,
   [in] const  char* lpUserName,
   [in] DWORD dwOptions

lpServer: The null-terminated DNS or WINS name of the computer with which to set up the session. If this parameter is NULL, the current computer name MUST be used.

lpApplication: The null-terminated unique character string that identifies the application. This name identifies resources and requests made by the operator. It is optional and can be NULL.

lpClientName: The null-terminated DNS or WINS name of the computer sending the request.

lpUserName: A null-terminated sequence of characters specifying the name of the interactive user sending the request.

dwOptions: This parameter is unused. It MUST be sent as 0 and MUST be ignored on receipt.

Return value/code




The call was successful.



Access to an object was denied.



The service has not started. The application is to wait and retry its request.



The format of the supplied computer name is invalid.



The server is using an older version of RSM than that of the client.

Upon receiving this message, the server MUST perform the following actions:

  • Initialize a session object.

  • Verify the type of session.

  • Use "RSM" as the application name if none has been provided in lpApplication.

  • Verify that the user has the required access rights.

  • Initialize an RSM database.

  • Return the handle that uniquely identifies the session.

If the service has not started, the server MUST return ERROR_NOT_READY (0x80070015). If the input parameters lpServer or lpClientName are not NULL, the supplied computer name format is checked for invalidity. If the name is invalid, the server MUST return ERROR_INVALID_COMPUTERNAME (0x800704BA). If the server is using an older version of RSM than that of the client, the server MUST return RPC_S_NO_INTERFACES (0x80070719).

Strings sent to this method as parameters MUST be ASCII-encoded.