GianAutoitprogrammer Posted May 27, 2011 Share Posted May 27, 2011 (edited) Hellow I cant just figure out how to call the dll function in JkDefrag.dll jkDefrag.dll is a defragmenter i am trying to execute 3 functions 1. DefragInitialize 2. RunDefrag 3. StopDefrag Module name:JkDefrag.dll More TimeDateStamp: 45E0C591 Version: 0.00 Ordinal base: 00000001 Number of functions: 00000003 Number of Names: 00000003 DefragInitialize rva: 00007490 ord: 1 => jkdefrag.dll - functions RunDefrag rva: 00007450 ord: 2 =>jkdefrag.dll - functions StopDefrag rva: 00007480 ord: 3 =>jkdefrag.dll - functions DllCall(@Scriptdir & "\Jkdefrag.dll", "", "DefragInitialize", "" ) DllCall(@Scriptdir & "\Jkdefrag.dll", "", "RunDefrag", "C:\" ) DllCall(@Scriptdir & "\Jkdefrag.dll", "", "StopDefrag", "" ) ' I dont know what return type I will choose? The attachment contains the JkDefrag.dllJkDefrag.dll Edited May 27, 2011 by GianAutoitprogrammer Link to comment Share on other sites More sharing options...
sleepydvdr Posted May 27, 2011 Share Posted May 27, 2011 Is there a reason why you want to call the dll instead of the executable? Their website show lots of switches to perform numerous functions with their exe. #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 27, 2011 Share Posted May 27, 2011 (edited) You need to find documentation of the additional parameters required for each of the functions you want to use in that DLL, then you need to learn how to use DllCall(). For eample, your attempt at "RunDefrag" isn't even valid syntax in AutoIt. Where is the type definition for the return, and for the parameter "C:\", and what makes you think that is supposed to be a string? Maybe it wants a handle to the target drive instead. Only the documentation knows for sure. Edited May 27, 2011 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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