MMProgRef - SMH Messages
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
Multimedia Programming Reference |
---|
|
The Sync/Stream Manager helper (SMH) messages, provided by the Sync/Stream Manager, are used by all stream handlers to do the following.
- Register with the Sync/Stream Manager.
- Report events and synchronization pulses to the Sync/Stream Manager.
- Request or return buffers to the Sync/Stream Manager.
The SMH messages are synchronous calls and available to both DLL stream handlers (as a DLL call) and to device driver stream handlers (as an IDC call).
These helper messages are provided through a single entry point, SMHEntryPoint, which accepts a parameter structure as input. This permits the DLL and the device driver interfaces to the Sync/Stream Manager to be the same. For the DLL interface, all pointers are 0:32 linear; for the device driver interface, all are 16:16 pointers, which enables the current 16-bit device-driver model to be used for device driver stream handlers. The following table contains the message numbers for all Sync/Stream Manager helper messages. These numbers must be used in the ulFunction field, of the parameter structure passed in the call, to indicate which message is being requested by the stream handler.
The following table lists the SMH messages.
Message Number | Message | Description |
---|---|---|
1L | SMH_DEREGISTER | Disconnects a stream handler from the Sync/Stream Manager. |
4L | SMH_LOCKMEM | Locks a memory object. (Available at ring 3 only.) |
3L | SMH_NOTIFY | Notifies the Sync/Stream Manager of a stream buffer request. |
0L | SMH_REGISTER | Registers a stream handler with the Sync/Stream Manager. |
2L | SMH_REPORTEVENT | Reports events or sync pulses to the Sync/Stream Manager. |
All of these messages are available to DLL stream handlers, as well as to device driver stream handlers. The Sync/Stream Manager device driver IDC entry point can be acquired by calling the ATTACHDD DevHelp function when the device driver is initialized; however, the IDC entry point cannot be used until after the device drive is initialized. As a result, it is impossible for a device driver stream handler to issue SMH_REGISTER through the IDC interface. The Sync/Stream Manager provides the SMH_REGISTER through a call to DosDevIOCtl, so that SMH_REGISTER can be issued during stream handler initialization. The following information is required in the SMH_REGISTER DosDevIOCtl call:
The SMH_REGISTER DosDevIOCtl interface: Device driver name "SSM$" Category 0x0081 SMH_REGISTER message 0x0040 Parameter packet Same as IDC interface Data packet NONE