2.2.2.3 CreateService Message Payload

The purpose of the CreateService message is to allow a client to instantiate a remote service, and the message payload contains all information needed to that end: the class ID and service ID that describe the service to be instantiated, and a client-generated service handle that will be used to uniquely identify this service for the life of the DSLR session.

As the CreateService message is a function exposed by the DSLR built-in dispenser service, it follows the same convention as would a call on an application-defined DSLR remote service call. The message tag and payload is a child of the DSLR Dispatch Request tag defined in section 2.2.1, and includes the input parameters for the CreateService function call.

  • CreateService MUST be called before invoking any remote function calls (dispatch requests) or sending any events (dispatch events).

  • CreateService is a 2-way request message, so the CallingConvention parameter in the Dispatch Request tag MUST be dslrRequest (0x00000001).

  • CreateService is a call on the dispenser service, so the ServiceHandle parameter in the Dispatch Request tag MUST be DispenserHandle (0x00000000).

  • The FunctionHandle parameter in the Dispatch Request tag for CreateService MUST be CreateService (0x00000001).

The format for the CreateService message payload (the CreateService function's input parameters) is as follows:


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

ClassID (16 bytes)

...

...

ServiceID (16 bytes)

...

...

ServiceHandle

ClassID (16 bytes): A GUID that represents the Class ID for the service being created. The DSLR wire format for the GUID can be found in section 2.2.2.6.

ServiceID (16 bytes): A GUID that represents the Service ID for the service being created. The DSLR wire format for the GUID can be found in section 2.2.2.6.

ServiceHandle (4 bytes): An unsigned 32-bit integer. The service handle that identifies the service being created. The service handle is allocated by the client to uniquely identify the service being created in this CreateService call, and is used in each subsequent request on the newly created remote service.

See section 2.2.2.5 for the format of the Response payload for the CreateService message.