JohnWang Posted July 24, 2010 Share Posted July 24, 2010 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. Link to comment Share on other sites More sharing options...
ProgAndy Posted July 24, 2010 Share Posted July 24, 2010 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 Link to comment Share on other sites More sharing options...
JohnWang Posted July 24, 2010 Author Share Posted July 24, 2010 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! Link to comment Share on other sites More sharing options...
KaFu Posted July 24, 2010 Share Posted July 24, 2010 I solved that problem... hmmmm, 3 times ? After the last time I ran into that error I added this to the top of my script: If @AutoItX64 Then MsgBox(0, "Error", "SMF won't run as x64 => 32bit dll") Exit EndIf OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now