mciQuerySysValue
Appearance
This function queries the value of system-defined attributes.
Syntax
mciQuerySysValue(iSysValue, pValue)
Parameters
- iSysValue (USHORT) - input
- Specifies the system attribute. The possible system attributes are:
- MSV_CLOSEDCAPTION
- Returns TRUE if the user has enabled closed captioning and FALSE otherwise.
- MSV_MASTERVOLUME
- The master volume setting. The range is 0 to 100.
- MSV_HEADPHONES
- Returns TRUE if the user has headphones enabled for the system and FALSE otherwise.
- MSV_SPEAKERS
- Returns TRUE if the user has speakers (line out) enabled for the system and FALSE otherwise.
- MSV_WORKPATH
- Points to a character buffer of size CCHMAXPATH. This is the name of the file-system path where temporary files created by OS/2 multimedia are located (for example, c:\mmos2\temp).
- MSV_SYSQOSVALUE
- System wide Quality of Service (QOS) specification value used for band-width reservation (for example, bytes per second) over the network.
- MSV_SYSQOSERRORFLAG
- Description of error occurring during band-width reservation.
- pValue (PVOID) - in/out
- Pointer to the return field. The type of data object this field points to is dependent on the attribute requested:
System Attribute
Data Type MSV_CLOSEDCAPTION BOOL MSV_MASTERVOLUME ULONG MSV_HEADPHONES ULONG MSV_SPEAKERS ULONG MSV_WORKPATH PSZ MSV_SYSQOSVALUE ULONG MSV_SYSQOSERRORFLAG ULONG
Return Code
- rc (BOOL) - returns
- If the command completes successfully then MCIERR_SUCCESS is returned, otherwise non-zero is returned.
Remarks
Example Code
Declaration:
#define INCL_MCIOS2 #include <os2.h> USHORT iSysValue; /* System attribute. */ PVOID pValue; /* Pointer to return field. */ BOOL rc; /* Return code. */ rc = mciQuerySysValue(iSysValue, pValue);
The following code illustrates how to query a multimedia system value.
#define INCL_MCIOS2
#include <os2me.h>
CHAR szWorkPath[CCHMAXPATH];
mciQuerySysValue(MSV_WORKPATH, szWorkPath); /* Get temporary
file path. */