mmioQueryCODECNameLength
Appearance
The mmioQueryCODECNameLength function returns the length of the CODEC procedure name.
Syntax
#define INCL_MMIOOS2 #define INCL_MMIO_CODEC #include <os2.h> ULONG mmioQueryCODECNameLength(PCODECINIFILEINFO pCODECIniFileinfo, PULONG pulNameLength);
Parameters
- pCODECIniFileinfo (PCODECINIFILEINFO) - input
- Pointer to the CODECINIFILEINFO data structure containing the CODEC information. Only the fcc, ulCompressType, ulCompressSubType, szHWID, and ulCapsFlags fields of the structure are used to identify a CODEC procedure.
- pulNameLength (PULONG) - output
- Number of bytes in the CODEC procedure name is returned. The returned length does not include the NULL terminating character.
Return Value
- rc (ULONG) - returns
- Return codes indicating success or type of failure:
- MMIO_SUCCESS: If the function succeeds, 0 is returned.
- MMIO_ERROR: The function failed for a reason different from any of the following returns in this list.
- MMIOERR_INVALID_PARAMETER: An invalid parameter was passed.
Remarks
This function is typically used to determine the buffer size required before calling mmioQueryCODECName. Since the returned length does not include the NULL terminator, applications should typically add 1 (for the NULL character) when allocating the destination buffer.
Example Code
The following code illustrates how to obtain the length of the CODEC procedure name.
CODECINIFILEINFO CODECIniFileInfo;
ULONG pulNameLength;
ULONG rc;
...
memset( &CODECIniFileInfo, '\0', sizeof(CODECINIFILEINFO) );
CODECIniFileInfo.ulStructLen = sizeof(CODECINIFILEINFO);
CODECIniFileInfo.fcc = FOURCC_MYPROC;
CODECIniFileInfo.ulCompressType = COMPRESSTYPE_MYPROC;
CODECIniFileInfo.ulCompressSubType = COMPRESSSUBTYPE_MYPROC;
CODECIniFileInfo.ulMediaType = MEDIATYPE_MYPROC;
CODECIniFileInfo.ulCapsFlags = CODEC_CAN_DECOMPRESS;
CODECIniFileInfo.szHWID = HWID_MYPROC;
rc = mmioQueryCODECNameLength (&CODECIniFileInfo,
&pulNameLength);
if (rc)
/* error */
else
{
/* pulNameLength contains the size needed for the name buffer */
}
...