Main Content

Create the Client Runtime Context

The client runtime context encapsulates the information required by the client-server connection.

You create the context using the mpsClientRuntime createContext() function. The createContext() function takes a pointer to an uninitialized mpsClientContext variable and an initialized client configuration.

mpsClientRuntime* mpsruntime = mpsInitializeEx(MPS_CLIENT_1_1);
mpsClientConfig* config;
mpsStatus status = mpsruntime->createConfig(&config);
mpsClientContext* context;
status = mpsruntime->createContext(&context, config);

For information on creating a client configuration, see Configure the Client-Server Connection.

Note

Do not share an instance of mpsClientContext across multiple threads at the same time. In a multi-threaded environment, each thread should get its own instance of mpsClientContext.