clearguy Posted January 22, 2007 Share Posted January 22, 2007 Hi all, it's the first time I try to call a dll.I want to use GetProcessTimes function from Kernel32.dll.So far I understand I got this:#include <Array.au3> $hProcess = WinGetHandle("PeerGuardian 2") $lpCreationTime=DllStructCreate ( "dword;dword" ) $lpExitTime=DllStructCreate ( "dword;dword" ) $lpKernelTime=DllStructCreate ( "dword;dword" ) $lpUserTime =DllStructCreate ( "dword;dword" ) $result = DllCall("Kernel32.dll", "none", "GetProcessTimes", "hwnd", $hProcess, "ptr", DllStructGetPtr ($lpCreationTime), "ptr", DllStructGetPtr ($lpExitTime) , "ptr",DllStructGetPtr ($lpKernelTime),"ptr",DllStructGetPtr ($lpUserTime) ) ; hProcess if Not $result[0] Then MsgBox(0,"DllCall Error","DllCall Failed : "&$hProcess) exit EndIf MsgBox(0,'DllCall',DllStructGetData($lpKernelTime,2)) ;~ _ArrayDisplay($result,1)But I get always an error.Some helpful guy in here? I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 22, 2007 Moderators Share Posted January 22, 2007 If you follow through here, you should be able to get it easy enough:http://www.autoitscript.com/forum/index.ph...st&p=288692 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Zedna Posted January 22, 2007 Share Posted January 22, 2007 (edited) Look hereThere is example of using this API.EDIT: Sorry I didn't notice SmOke_N replay. Edited January 22, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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