IOProc
The
IOProc function accesses a unique storage system, such as a database or file
archive. You can install or remove this callback function by using the
mmioInstallIOProc function.
IOProc is a placeholder for the application-defined function name. The actual name
must be exported by including it in a EXPORTS statement in the application's
module-definition file.
LRESULT PASCAL IOProc(
LPSTR lpmmioinfo,
|
|
UINT wMsg,
|
|
LPARAM lParam1,
|
|
LPARAM lParam2
|
|
);
|
|
Parameters
lpmmioinfo
Address of an
MMIOINFO structure containing information about the open file. The I/O procedure must
maintain the
lDiskOffset member in this structure to indicate the file offset to the next read or
write location. The I/O procedure can use the
adwInfo member to store state information. The I/O procedure should not modify any
other members of the
MMIOINFO structure.
wMsg
Message indicating the requested I/O operation. Messages that can be received
include
MMIOM_OPEN,
MMIOM_CLOSE,
MMIOM_READ,
MMIOM_WRITE, and
MMIOM_SEEK.
lParam1 and
lParam2
Parameters for the message.
Return Values
Returns a value that corresponds to the message specified by wMsg. If the I/O
procedure does not recognize a message, it should return zero.
Remarks
The four-character code specified by the
fccIOProc member of the
MMIOINFO structure associated with a file identifies a filename extension for a custom
storage system. When an application calls the
mmioOpen function with a filename such as EXAMPLE.XYZ!
ABC, the I/O procedure associated with the four-character code "XYZ" is called to
open the ABC element of the file EXAMPLE.XYZ.
The
mmioInstallIOProc function maintains a separate list of installed I/O procedures for each
Windows application. Therefore, different applications can use the same I/O
procedure identifier for different I/O procedures without conflict.
If an application calls
mmioInstallIOProc more than once to register the same I/O procedure, it must call this function
to remove the procedure once for each time it installed the procedure.
The
mmioInstallIOProc function does not prevent an application from installing two different I/O
procedures with the same identifier, or installing an I/O procedure with one of
the predefined identifiers (DOS or MEM). The most recently installed procedure
takes precedence, and the most recently installed procedure is the first one to
be removed.
When searching for a specified I/O procedure, local procedures are searched
first, then global procedures.
See Also
mmioInstallIOProc,
MMIOINFO,
MMIOM_OPEN,
MMIOM_CLOSE,
MMIOM_READ,
MMIOM_WRITE,
MMIOM_SEEK,
mmioOpen,
ABC
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database