Jump to content

MMProgRef - DDCMD Messages

From EDM2
Revision as of 00:54, 9 June 2025 by Martini (talk | contribs) (Created page with "{{MMProgRef}} The device driver commands are an interface used by a stream handler to communicate with a physical device driver. This interface uses the inter-device driver communication (IDC) mechanism provided by OS/2 AttachDD DevHelp. The stream handler must attach to the device driver using AttachDD DevHelp to receive the DDCMD entry point address of the device driver. This must be done prior to issuing any DDCMDs. Some device drivers also might require that a DosOpe...")
(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 device driver commands are an interface used by a stream handler to communicate with a physical device driver. This interface uses the inter-device driver communication (IDC) mechanism provided by OS/2 AttachDD DevHelp. The stream handler must attach to the device driver using AttachDD DevHelp to receive the DDCMD entry point address of the device driver. This must be done prior to issuing any DDCMDs. Some device drivers also might require that a DosOpen call be used to open the device driver before it can be used through the AttachDD entry point.

The DDCMDs are provided through a single entry point, DDCMDEntryPoint, which accepts a parameter structure on input.

typedef ULONG (FAR*PSHDFN)        (PVOID pParmIn);
typedef ULONG (FAR*PDDCMDFN)      (PVOID pParmIn);

For the Ring 3 DLL interface, all pointers are 0:32 linear; for Ring 0 stream handlers all pointers are 16:16 far pointers to enable the 16-bit device driver model to be used. The following list contains the message numbers for all DDCMDs. It should be used in the ulFunction field, of the parameter structure passed on the call, to indicate which function is being requested by the stream handler.

Message Number Message Description
4L DDCMD_CONTROL Performs a device-specific command.
6L DDCMD_DEREG_STREAM Removes a stream instance from a device driver.
1L DDCMD_READ Performs a read from the device into a buffer.
5L DDCMD_REG_STREAM Registers a stream instance with a device driver.
0L DDCMD_SETUP Performs a device-specific stream instance setup.
3L DDCMD_STATUS Requests status from the device.
2L DDCMD_WRITE Performs a write from a buffer to the device.