Jump to content

Recommended Posts

Posted

Hello,

I am trying to use some function in MediaInfo.dll specifically the Inform function to get video bitrate. However, Dllopen function seems to always return -1. I have searched the forum and most people does not have problem using it and is incorporated in many scripts. I have redownloaded the dll file from another source but still the same thing. Here's the the test code I used: (I made sure MediaInfo.dll was located in C:\)

Dim $MediaInfo = @ScriptDir & "\Tools\MediaInfo\"

Func GetBitrate($iFile)
    Dim $MediaInfoDll = DllOpen("C:\MediaInfo.dll")
    MsgBox(0,"Error", $MediaInfoDll)
EndFunc   ;==>GetBitrate

GetBitrate("C:\Test1.mp4")

The return is always -1, I didn't try dllcall yet because dllOpen wouldn't work correctly, and Dllcall looks a bit complex to try to debug. Thanks.

Posted

I think the dll is a 32-bit dll. If you are working on a 64bit-Machine, you have to take care and execute AutoIt as 32bit, too. Otherwise the script won't be able to open the DLL.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

I think the dll is a 32-bit dll. If you are working on a 64bit-Machine, you have to take care and execute AutoIt as 32bit, too. Otherwise the script won't be able to open the DLL.

YES! That's exactly the problem, I just figured it out as well. Thanks for the prompt reply!

Posted

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...