VSDEntry
Appearance
This entry point enables communication between vendor-specific drivers (VSDs) and an application such as the user-level audio stream handler or amplifier mixer. For audio VSDs, be sure to define INCL_AUDIO_VSD before including the VSDCMDS.H header file.
Syntax
VSDEntry(hvsd, ulFunc, ulFlags, pRequest)
Parameters
- hvsd (HVSD) - input
- This parameter is the handle to the VSD instance.
- ulFunc (ULONG) - input
- The VSD command to be issued. The following commands are supported for audio VSDs.
Command | Description |
---|---|
VSD_CLOSE | Closes the device. (Required) |
VSD_DDCMD | Allows communication between stream handlers and their attached devices. (Required) |
VSD_ESCAPE | Sends a buffer to the device. (Optional) |
VSD_GETDEVCAPS | Retrieves the device capabilities. (Required) |
VSD_OPEN | Opens an instance of the device. (Required) |
VSD_QUERY | Queries the status of the device. (Required) |
VSD_RESOURCE | Manages resources. (Required) |
VSD_RESTORE | Restores device to a saved state. (Required) |
VSD_SAVE | Saves the current state of the device instance. (Required) |
VSD_SET | Modifies settings of the device. (Required) |
VSD_USER | Allows user-defined commands to be passed into the VSD. (Optional) |
- ulFlags (ULONG) - input
- The ulFlags parameter is used to further qualify the command specified in ulFunc. In many cases it is used as a subcommand. For more information on ulFlags, see the specific ulFunc parameter.
- pRequest (PVOID) - input
- Specifies the pointer to the request packet. The caller of the VSD supplies all request buffers. See individual commands for more detailed information.
Returns
- rc (ULONG) - returns
- The return codes are listed for each command and will vary based on the command sent.
- If a VSD requires unique return codes for certain conditions, it can use return codes starting at VSDERR_BASE.
Remarks
If a VSD requires unique return codes for certain conditions, it can use return codes starting at VSDERR_BASE.
Example Code
Declaration:
#define INCL_AUDIO_VSD #include <vsdcmds.h> #include <os2mixer.h> HVSD hvsd; /* Handle to VSD instance. */ ULONG ulFunc; /* Function code. */ ULONG ulFlags; /* Flags for driver. */ PVOID pRequest; /* Request parameter block value. */ ULONG rc; /* Return codes. */ rc = VSDEntry(hvsd, ulFunc, ulFlags, pRequest);