LIMITER Posted April 3, 2008 Share Posted April 3, 2008 (edited) What is the equivalent of "Real" in DllCall return type parameter ? (i tried them all but with no success) This is the code that i'm using and @error is retruning 3 (it returns 3 if i use the functions without parameters) and if you put instead of "int", "double", it returns 2 $dll = DllOpen(@ScriptDir & "/Super Video Play 2.dll") $b = DllCall($dll,"int","SVP_Init") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $b = ' & $b & @crlf & '>Error code: ' & @error & @crlf);### Debug Console The DLL : Super_Video_Play_2.dll The helpfile : Main function (Real) SVP_Init(); - Make the DLL ready for useMedia handling functions (Real) SVP_Open (String filename); - Open media file and return handle (Real) SVP_OpenStream (String url); - Open media url and return handle Control functions (Real) SVP_Play (Real handle); - Play media (Real) SVP_Stop (Real handle); - Stop playing (Real) SVP_Pause (Real handle); - Pause playing (Real) SVP_Resume (Real handle); - Resume playing when paused (Real) SVP_GetPos (Real handle); - Get media position (Real) SVP_GetLen (Real handle); - Get media length (Real) SVP_SetPos (Real handle, Real mode, Real pos); - Set media position (Real) SVP_SetSpeed (Real handle, Real speed); - Set media speed, 1000 = normal speed (Real) SVP_GetSpeed (Real handle); - Get media speed Thx in advance ! Edited April 3, 2008 by LIMITER Link to comment Share on other sites More sharing options...
weaponx Posted April 3, 2008 Share Posted April 3, 2008 What is returned by SVP_Open? Its probably that. Link to comment Share on other sites More sharing options...
LIMITER Posted April 3, 2008 Author Share Posted April 3, 2008 (edited) It returns 0 (and sets @error to 2 or 3) Edited April 3, 2008 by LIMITER Link to comment Share on other sites More sharing options...
LarryDalooza Posted April 3, 2008 Share Posted April 3, 2008 Here are the exports I see for this dll... see attached picture. Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
LIMITER Posted April 3, 2008 Author Share Posted April 3, 2008 (edited) Thx Larry but now i get this error : >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "D:\de pe c\AutoIt\test.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +>21:59:55 Starting AutoIt3Wrapper v.1.10.1.7 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 2 CPU:X86) >Running AU3Check (1.54.10.0) from:C:\Program Files\AutoIt3 +>21:59:55 AU3Check ended.rc:0 >Running:(3.2.10.0):C:\Program Files\AutoIt3\autoit3.exe "D:\de pe c\AutoIt\test.au3" !>21:59:57 AutoIT3.exe ended.rc:-1073741819 >Exit code: -1073741819 Time: 3.260 For the code : $dll = DllOpen(@ScriptDir & "/Super Video Play 2.dll") $b = DllCall($dll,"int","hobbl_com_open","int","C:\Leona Lewis - Better In Time.wma") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $b = ' & $b & @crlf & '>Error code: ' & @error & @crlf);### Debug Console Edited April 3, 2008 by LIMITER Link to comment Share on other sites More sharing options...
Synapse Posted April 3, 2008 Share Posted April 3, 2008 Thx Larry but now i get this error : For the code : $dll = DllOpen(@ScriptDir & "/Super Video Play 2.dll") $b = DllCall($dll,"int","hobbl_com_open","int","C:\Leona Lewis - Better In Time.wma") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $b = ' & $b & @crlf & '>Error code: ' & @error & @crlf);### Debug Console Hi LIMITER...i`ve tryed it 2 and i`ve got the same result as u did... Link to comment Share on other sites More sharing options...
LarryDalooza Posted April 3, 2008 Share Posted April 3, 2008 consider... $a = DLLCall("Super_Video_Play_2.dll","int:cdecl","hobbl_com_open","str",@ScriptDir & "\me.wav") MsgBox(4096,"",$a[0]) $b = DLLCall("Super_Video_Play_2.dll","int:cdecl","hobbl_com_close","int",$a[0]) MsgBox(4096,"",$b[0]) AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Synapse Posted April 3, 2008 Share Posted April 3, 2008 consider... $a = DLLCall("Super_Video_Play_2.dll","int:cdecl","hobbl_com_open","str",@ScriptDir & "\me.wav") MsgBox(4096,"",$a[0]) $b = DLLCall("Super_Video_Play_2.dll","int:cdecl","hobbl_com_close","int",$a[0]) MsgBox(4096,"",$b[0]) The first DllCall does not return an array.... Link to comment Share on other sites More sharing options...
weaponx Posted April 3, 2008 Share Posted April 3, 2008 The first DllCall does not return an array.... Do you have "me.wav" in your script folder? Link to comment Share on other sites More sharing options...
LIMITER Posted April 3, 2008 Author Share Posted April 3, 2008 I used this : $a = DLLCall(@ScriptDir & "\Super_Video_Play_2.dll","int:cdecl","hobbl_com_open","str","C:\Leona Lewis - Better In Time.wma") MsgBox(4096,"",$a[0]) $b = DLLCall(@ScriptDir & "\Super_Video_Play_2.dll","int:cdecl","hobbl_com_close","int",$a[0]) MsgBox(4096,"",$b[0]) And got this : D:\de pe c\AutoIt\test.au3 (3) : ==> Subscript used with non-Array variable.: MsgBox(4096,"",$a[0]) MsgBox(4096,"",$a^ ERROR ->22:17:40 AutoIT3.exe ended.rc:1 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