This message is used for specifying a new file or RIFF chunk to be loaded
onto an already opened device instance.
ulParam1 (ULONG)
This
parameter can contain any of the following flags: The MCI_OPEN_ELEMENT and
MCI_OPEN_MMIO flags are mutually exclusive.
MCI_NOTIFY
A notification message will be posted
to the window specified in the hwndCallback parameter of the data
structure pointed to by the pParam2 parameter. The notification will
be posted when the action indicated by this message is completed or when
an error occurs.
MCI_WAIT
Control
is not to be returned until the action indicated by this message is completed
or an error occurs.
MCI_OPEN_ELEMENT
This
flag specifies that an element name is included. The element name can be
that of a file or a file element in a compound file. The element name is
specified in the pszElementName field of the MCI_LOAD_PARMS
data structure. If the element name does not exist or is NULL, then
a temporary element is created for subsequent use. (This is the equivalent
of specifying the NEW keyword with the LOAD
string command.) The temporary file can be made permanent by providing
a name using the MCI_SAVE message.
MCI_OPEN_MMIO
Indicates that an MMIO handle (hmmio) is
passed in the pszElementName field of the open data structure. The
file must have been opened through MMIO with the ulTranslate field
of the MMIOINFO data structure
set to MMIO_TRANSLATEHEADER, unless a particular MCD indicates differently.
Digital Video Extensions
MCI_READONLY
Opens the file in a read-only mode
and prevents inadvertent changes to the file. When no changes to the file
are allowed, the digital video driver can improve load and run-time performance,
while allowing other devices to share the file for playback purposes.
This flag can only be used in conjunction with the MCI_OPEN_ELEMENT flag.
Specifying the MCI_READONLY flag disables support for MCI_SAVE
and MCI_RECORD.
Video
Overlay Extensions
The image contained in the file is loaded into the image device element
and overwrites any image currently stored there. It can be displayed using
the MCI_RESTORE command.
The file is opened, accessed, and closed on this command.
If the format of the image file is not recognized as either a device specific
file format or a format supported by MMIO the load fails.
Load performs an automatic set of the following values for:
- IMAGE BITSPERPEL
- IMAGE PELFORMAT
- IMAGE COMPRESSION
- IMAGE QUALITY
- IMAGE EXTENTS
M-Motion Overlay
implementation values would be:
IMAGE BITSPERPEL = 21
IMAGE PELFORMAT = yuvb
IMAGE COMPRESSION= BI_NONE
IMAGE QUALITY = photo
IMAGE EXTENTS = image specific
The previous values for these attributes are ignored.
Load also automatically sets IMAGE FILEFORMAT to indicate information
about the original file.
Waveform Audio Extensions
MCI_READONLY
Opens the file in a read-only mode
and prevents inadvertent changes to the file. When no changes to the file
are allowed, the waveform audio driver can improve load and run-time performance,
while allowing other devices to share the file for playback purposes.
This flag can only be used in conjunction with the MCI_OPEN_ELEMENT flag.
Specifying the MCI_READONLY flag disables support for MCI_SAVE
and MCI_RECORD.
pParam2 (PMCI_LOAD_PARMS)
rc (ULONG)
Return
codes indicating success or type of failure:
MCIERR_SUCCESS
MMPM/2 command completed successfully.
MCIERR_OUT_OF_MEMORY
MCIERR_INVALID_DEVICE_ID
MCIERR_MISSING_PARAMETER
Missing
parameter for this command.
MCIERR_DRIVER
Internal
MMPM/2 driver error.
MCIERR_INVALID_FLAG
Invalid
flag specified for this command.
MCIERR_FLAGS_NOT_COMPATIBLE
MCIERR_INSTANCE_INACTIVE
MCIERR_FILE_NOT_FOUND
MCIERR_INVALID_MEDIA_TYPE
Invalid media type given or invalid data format.
MCIERR_HARDWARE
MCIERR_FILE_ATTRIBUTE
File
attribute error specified.
MCIERR_UNSUPP_SAMPLESPERSEC
The hardware does not support this sampling rate
MCIERR_UNSUPP_BITSPERSAMPLE
The
hardware does not support this bits per sample setting.
MCIERR_UNSUPP_CHANNELS
The hardware does not support this channel setting.
MCIERR_UNSUPP_FORMAT_MODE
The
hardware does not support this format mode.
MCIERR_UNSUPP_FORMAT_TAG
The hardware does not support this format tag.
[Back]
[Next]