View Full Version : MediaInfo (0.7b) Access Violation in delphi 7
Sirber
4th September 2005, 15:53
setting.source_copy := 'C:\Projects\RealAnimeLE\output\temp\source.avi';procedure TAnalyze.AnalyzeAVI();
var
handle: Cardinal;
info: integer;
begin
handle := MediaInfo_Open(pWideChar(setting.source_copy));
// Look for audio
if (MediaInfo_Count_Get(handle, 2, -1) = 1) then
begin
ShowMessage('audio');
end;
// Look for video
if (MediaInfo_Count_Get(handle, 1, -1) = 1) then
begin
ShowMessage('video');
end;
MediaInfo_Close(handle);
end;
My soft crash on "MediaInfo_Open" call. Do yo know why? The procedure is a direct call to the DLL. :confused:
Sirber
4th September 2005, 16:06
unit MediaInfoDll;
interface
uses
{$IFDEF WIN32}
Windows;
{$ELSE}
Wintypes, WinProcs;
{$ENDIF}
function MediaInfo_Open(File__: PWideChar): Cardinal cdecl {$IFDEF WIN32} stdcall {$ENDIF};
procedure MediaInfo_Close(Handle: Cardinal) cdecl {$IFDEF WIN32} stdcall {$ENDIF};
function MediaInfo_Inform(Handle: Cardinal;
Options: Integer): PWideChar cdecl {$IFDEF WIN32} stdcall {$ENDIF};
function MediaInfo_GetI(Handle: Cardinal;
StreamKind: Integer;
StreamNumber: Integer;
Parameter: Integer;
KindOfInfo: Integer): PWideChar cdecl {$IFDEF WIN32} stdcall {$ENDIF};
function MediaInfo_Get(Handle: Cardinal;
StreamKind: Integer;
StreamNumber: Integer;
Parameter: PWideChar;
KindOfInfo: Integer;
KindOfSearch: Integer): PWideChar cdecl {$IFDEF WIN32} stdcall {$ENDIF};
function MediaInfo_Option(Handle: Cardinal;
Option: PWideChar;
Value: PWideChar): PWideChar cdecl {$IFDEF WIN32} stdcall {$ENDIF};
function MediaInfo_State_Get(Handle: Cardinal): Integer cdecl {$IFDEF WIN32} stdcall {$ENDIF};
function MediaInfo_Count_Get(Handle: Cardinal;
StreamKind: Integer;
StreamNumber: Integer): Integer cdecl {$IFDEF WIN32} stdcall {$ENDIF};
implementation
function MediaInfo_Open; external 'MediaInfo.Dll';
procedure MediaInfo_Close; external 'MediaInfo.Dll';
function MediaInfo_Inform; external 'MediaInfo.Dll';
function MediaInfo_GetI; external 'MediaInfo.Dll';
function MediaInfo_Get; external 'MediaInfo.Dll';
function MediaInfo_Option; external 'MediaInfo.Dll';
function MediaInfo_State_Get; external 'MediaInfo.Dll';
function MediaInfo_Count_Get; external 'MediaInfo.Dll';
end.
Sirber
4th September 2005, 16:42
Doesn't crash with 0.6x, but I'm not getting my ShowMessage eityher. Gonna keep 0.6.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.