Ramnath Posted October 20, 2008 Share Posted October 20, 2008 Hi All, I have created my own dll by using win32 dynamic linked lib and added one function with that(int __declspec(dllexport) callTest(int ,int )). I tried to call this from autoit by using function DllCall() but it always returns 0. Im new to this area. Please help me. Code: $dllhandle = DllOpen(@ScriptDir & "\autoitdll.dll"); ConsoleWrite($dllhandle & @CRLF) $AddResult = DllCall("autoitdll.dll","int:cdecl","callTest","int",5,"int",6) Thanks, Ramnath Link to comment Share on other sites More sharing options...
BrettF Posted October 20, 2008 Share Posted October 20, 2008 Hi, Welcome to the forums. Regarding your post in another topic, there was no need to post in both places. I noticed you opened the dll and didn't use it in your dllcall function! So it should be something like: $dllhandle = DllOpen (....) $addresult = DllCall($dllhandle, ....) Also Please remember to only bump your topic once in a 24-hour-period. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
trancexx Posted October 20, 2008 Share Posted October 20, 2008 Hi All,I have created my own dll by using win32 dynamic linked lib and added one function with that(int __declspec(dllexport) callTest(int ,int )). I tried to call this from autoit by using function DllCall() but it always returns 0. Im new to this area. Please help me.Code:$dllhandle = DllOpen(@ScriptDir & "\autoitdll.dll");ConsoleWrite($dllhandle & @CRLF)$AddResult = DllCall("autoitdll.dll","int:cdecl","callTest","int",5,"int",6)Thanks,RamnathNext line of that script is kind of crucial to even be able to tell if your question have sense. Post it. ♡♡♡ . eMyvnE 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