|
mmioDescend
The mmioDescend function descends into a chunk of a RIFF file that was opened by using the mmioOpen function. It can also search for a given chunk.
MMRESULT mmioDescend(
HMMIO hmmio,
|
| LPMMCKINFO lpck,
|
| LPMMCKINFO lpckParent,
|
| UINT wFlags
|
| );
|
|
Parameters
hmmio
File handle of an open RIFF file.
lpck
Address an application-defined MMCKINFO structure.
lpckParent
Address of an optional application-defined MMCKINFO structure identifying the parent of the chunk being searched for. If this
parameter is not NULL, mmioDescend assumes the MMCKINFO structure it refers to was filled when mmioDescend was called to descend into the parent chunk, and mmioDescend searches for a chunk within the parent chunk. Set this parameter to NULL if
no parent chunk is being specified.
wFlags
Search flags. If no flags are specified, mmioDescend descends into the chunk beginning at the current file position. The following
values are defined:
MMIO_FINDCHUNK
Searches for a chunk with the specified chunk identifier.
MMIO_FINDLIST
Searches for a chunk with the chunk identifier "LIST" and with the specified
form type.
MMIO_FINDRIFF
Searches for a chunk with the chunk identifier "RIFF" and with the specified
form type.
Return Values
Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error
values include the following:
MMIOERR_CHUNKNOTFOUND
| The end of the file (or the end of the parent chunk, if given) was reached
before the desired chunk was found.
|
Remarks
A "RIFF" chunk consists of a four-byte chunk identifier (type FOURCC), followed by a four-byte chunk size (type DWORD), followed by the data portion of the chunk, followed by a null pad byte if
the size of the data portion is odd. If the chunk identifier is "RIFF" or
"LIST", the first four bytes of the data portion of the chunk are a form type or list
type (type FOURCC).
If you use mmioDescend to search for a chunk, make sure the file position is at the beginning of a
chunk before calling the function. The search begins at the current file
position and continues to the end of the file. If a parent chunk is specified, the
file position should be somewhere within the parent chunk before calling mmioDescend. In this case, the search begins at the current file position and continues
to the end of the parent chunk.
If mmioDescend is unsuccessful in searching for a chunk, the current file position is
undefined. If mmioDescend is successful, the current file position is changed. If the chunk is a "RIFF"
or "LIST" chunk, the new file position will be just after the form type or
list type (12 bytes from the beginning of the chunk). For other chunks, the new
file position will be the start of the data portion of the chunk (8 bytes from
the beginning of the chunk).
The mmioDescend function fills the MMCKINFO structure pointed to by the lpck parameter with the following information:
- The ckid member is the chunk. If the MMIO_FINDCHUNK, MMIO_FINDRIFF, or MMIO_FINDLIST
flag is specified for wFlags, the MMCKINFO structure is also used to pass parameters to mmioDescend. In this case, the ckid member specifies the four-character code of the chunk identifier, form type,
or list type to search for.
- The cksize member is the size, in bytes, of the data portion of the chunk. The size
includes the form type or list type (if any), but does not include the 8-byte chunk
header or the pad byte at the end of the data (if any).
- The fccType member is the form type if ckid is "RIFF", or the list type if ckid is "LIST". Otherwise, it is NULL.
- The dwDataOffset member is the file offset of the beginning of the data portion of the chunk.
If the chunk is a "RIFF" chunk or a "LIST" chunk, this member is the offset of
the form type or list type.
- The dwFlags member contains other information about the chunk. Currently, this
information is not used and is set to zero.
See Also
mmioOpen, MMCKINFO
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|