Jump to content

MMProgRef - SMH Messages

From EDM2
Revision as of 00:51, 9 June 2025 by Martini (talk | contribs) (Created page with "{{MMProgRef}} 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). T...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation

Multimedia Programming Reference
  1. Introduction
  2. What's New...
  3. MCI Functions
  4. High-Level Macro Service Functions
  5. Subsystem Messages
  6. Notification Messages
  7. MCI Command Messages
  8. String Commands
  9. Memory Playlist Commands
  10. Graphic Button Control
  11. Secondary Window Functions
  12. MMIO Functions
  13. MMIO Messages
  14. CODEC Messages
  15. DIVE Functions
  16. Real-Time MIDI Functions
  17. SPI Functions
  18. Data Stream State Table
  19. SMH Messages
  20. DDCMD Messages
  21. VSD Commands
  22. SHD Messages
  23. SHC Messages
  24. Data Types
  25. Types of MIDI Messages
  26. Multimedia Specification Overview
  27. Resource Interchange File Format
  28. Multimedia File Formats
  29. RIFF Compound Files and Elements - Sharing and Access
  30. Return Codes
  31. Notices
  32. Glossary

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