load

The load command loads a file in a device-specific format. Digital-video and video-overlay devices recognize this command.

To send this command, call the mciSendString function with the lpszCommand parameter set as follows.

_stprintf_s(
  lpszCommand, 
  TEXT("load %s %s %s"), 
  lpszDeviceID, 
  lpszFilePos, 
  lpszFlags
); 

Parameters

lpszDeviceID

Identifier of an MCI device. This identifier or alias is assigned when the device is opened.

lpszFilePos

Path and filename to load. For video-overlay devices, this can also include a target rectangle for the data. To specify a target rectangle, specify "at" followed by X1 Y1 X2 Y2, where X1 Y1 specify the upper left corner of the rectangle, and X2 Y2 specify the width and height. The rectangle is relative to the video buffer origin.

lpszFlags

Can be "wait", "notify", or both. For digital-video devices, "test" can also be specified. For more information about these flags, see The Wait, Notify, and Test Flags.

Return Values

Returns zero if successful or an error otherwise.

Remarks

The following command loads a file into the "vidboard" device:

load vidboard c:\vid\fish.vid notify

The "vidboard" device sends a notification message when the loading is completed.

Requirements

**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.

See Also

MCI, MCI Command Strings