Sign in to follow this  
Followers 0
GianAutoitprogrammer

dllcall jkdefrag.dll

3 posts in this topic

#1 ·  Posted (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.dll

JkDefrag.dll

Edited by GianAutoitprogrammer

Share this post


Link to post
Share on other sites



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>

Share this post


Link to post
Share on other sites

#3 ·  Posted (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.

:huh2:

Edited 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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0