Desktop Functions: Smart Device Functions:
|
AVIFileOpen (avifil32)
C# Signature:
[DllImport("avifil32.dll", SetLastError=true)] VB Signature:
Declare Shared Function AVIFileOpenW Lib "avifil32.dll" (TODO) User-Defined Types:None. Notes:Test Tips & Tricks:For C#, use AviFileOpen together with CharSet = CharSet.Auto. Sample Code:See http://www.adp-gmbh.ch/csharp/avi/write_avi.html Alternative Managed API:Do you know one? Please contribute it! Notes:None. Tips & Tricks:Please add some! Sample Code:
'View Avinfo for Structure 'if a valid file, return the AVIFILEINFO structure public Function Avi_Lenght(ByVal sAVIFile as String) as int32 Dim hFile As Long Dim AFI As AVIFILEINFO 'initialize the AVIFile library AVIFileInit() If AVIFileOpen(hFile, sAVIFile, OF_SHARE_DENY_WRITE, 0&) = 0 Then
Dim aviFileInfo_lsize = Marshal.SizeOf(GetType(AVIFILEINFO)) Else 'Your Error handling Here end If AVIFileExit() Return System.Math.Round(AFI .dwLength / ((AFI .dwRate / AFI .dwScale)), 3) End Function A full working version is located here http://ess-image.com/Graphic/Video/AviInfo.aspx Reading AVI information In VB .net This sample as well as other image procssing source code provided by http://Ess-image.com">Ess-image.com microsoft.public.dotnet.framework.interop has a working example code to call AVIInit, AVIExit, and AVIFileInfo. Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|