walle Posted April 23, 2009 Share Posted April 23, 2009 Can someone help me to adapt this dllcall to the latest version of autoit.Thanks http://msdn.microsoft.com/en-us/library/ms710815(VS.85).aspxFunc mciSendString($s) DllCall("winmm.dll", "int", "mciSendString", "str", $s, "str", "", "int", 65534, "hwnd", 0) If @error Then SetError(1) Return 0 Else Return 1 EndIf EndFunc Link to comment Share on other sites More sharing options...
Zedna Posted April 23, 2009 Share Posted April 23, 2009 (edited) According to MSDN http://msdn.microsoft.com/en-us/library/ms709492(VS.85).aspxhere are some attempts, all works fine for me with AutoIt 3.2.12.1 (all return 1)note: leave uncommented only 1 function on each try$ret = mciSendString('abc')ConsoleWrite($ret) Func mciSendString($s) DllCall("winmm.dll", "int", "mciSendString", "str", $s, "ptr", 0, "int", 0, "hwnd", 0) If @error Then SetError(1) Return 0 Else Return 1 EndIf EndFunc Func mciSendString($s) $struct = DllStructCreate('char[65535]') DllCall("winmm.dll", "int", "mciSendString", "str", $s, "ptr", DllStructGetPtr($struct), "int", 65534, "hwnd", 0) If @error Then $struct = 0 SetError(1) Return 0 Else $struct = 0 Return 1 EndIf EndFunc Func mciSendString($s) DllCall("winmm.dll", "int", "mciSendString", "str", $s, "str", "", "int", 0, "hwnd", 0) If @error Then SetError(1) Return 0 Else Return 1 EndIf EndFunc Edited April 23, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
walle Posted April 23, 2009 Author Share Posted April 23, 2009 Thank you! 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