|
Opening an AVI File
The following example initializes the AVIFile library using the AVIFileInit function and opens an AVI file using the AVIFileOpen function. The function uses a default file handler.
// LoadAVIFile - loads AVIFile and opens an AVI file.
//
// szfile - filename
// hwnd - window handle
//
VOID LoadAVIFile(LPCSTR szFile, HWND hwnd)
{
LONG hr;
PAVIFILE pfile;
AVIFileInit(); // opens AVIFile library
hr = AVIFileOpen(&pfile, szFile, OF_SHARE_DENY_WRITE, 0L);
if (hr != 0){
ErrMsg("Unable to open %s", szFile);
return;
}
//
// Place functions here that interact with the open file.
//
AVIFileRelease(pfile); // closes the file
AVIFileExit(); // releases AVIFile library
}
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|