|
AVIFileOpen
The AVIFileOpen function opens an AVI file and returns the address of a file interface used
to access it. The AVIFile library maintains a count of the number of times a
file is opened, but not the number of times it was released. Use the AVIFileRelease function to release the file and decrement the count.
STDAPI AVIFileOpen(
PAVIFILE * ppfile,
|
| LPCTSTR szFile,
|
| UINT mode,
|
| CLSID * pclsidHandler
|
| );
|
|
Parameters
ppfile
Address to contain the new file interface pointer.
szFile
Null-terminated string containing the name of the file to open.
mode
Access mode to use when opening the file. The default access mode is OF_READ.
The following access modes can be specified with AVIFileOpen:
OF_CREATE
Creates a new file. If the file already exists, it is truncated to zero length.
OF_SHARE_DENY_NONE
Opens the file nonexclusively. Other processes can open the file with read or
write access. AVIFileOpen fails if another process has opened the file in compatibility mode.
OF_SHARE_DENY_READ
Opens the file nonexclusively. Other processes can open the file with write
access. AVIFileOpen fails if another process has opened the file in compatibility mode or has
read access to it.
OF_SHARE_DENY_WRITE
Opens the file nonexclusively. Other processes can open the file with read
access. AVIFileOpen fails if another process has opened the file in compatibility mode or has
write access to it.
OF_SHARE_EXCLUSIVE
Opens the file and denies other processes any access to it. AVIFileOpen fails if any other process has opened the file.
OF_READ
Opens the file for reading.
OF_READWRITE
Opens the file for reading and writing.
OF_WRITE
Opens the file for writing.
pclsidHandler
Address of a class identifier of the standard or custom handler you want to
use. If the value is NULL, the system chooses a handler from the registry based
on the file extension or the RIFF type specified in the file.
Return Values
Returns zero if successful or an error otherwise. Possible error values
include the following:
AVIERR_BADFORMAT
| The file couldn't be read, indicating a corrupt file or an unrecognized format.
| AVIERR_MEMORY
| The file could not be opened because of insufficient memory.
| AVIERR_FILEREAD
| A disk error occurred while reading the file.
| AVIERR_FILEOPEN
| A disk error occurred while opening the file.
| REGDB_E_CLASSNOTREG
| According to the registry, the type of file specified in AVIFileOpen does not have a handler to process it.
|
See Also
AVIFileRelease
| 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
|