Jump to content

DLL Call freezing program


Recommended Posts

Hi, I am using Windows 7, and I have a dll with MultiThreaded support (not for AutoIt) that I am trying to call a function from.

I use:

$Dll = DllOpen("DLL.dll")
$Start = DllCall($Dll, "int", "Start", "int", "1", "int", "1")
MsgBox(0, "Start:", $Start)

Where the function is

int Start(int Instances, int Threads)

When the Dll is called, the program freezes. The only way I can figure this is that MsgBox is never called. No message comes up at all. The script freezes and a "Windows Error Reporting" process is created (yet nothing actually shows up).

I have the dll in the same location as the script, and I have even tried compiling and running the script.

Any ideas what to do/can it be fixed/give up now?

Any more info needed can be provided.

Link to comment
Share on other sites

trance, adding cdecl stops the freezing, but the call now returns nothing. not an int, not a string, nothing.

From the header:

int mnStart(int Number_of_instances, int Number_of_threads);

My line:

$Start = DllCall($DLL, "int:cdecl", "mnStart", "int", "1", "int", "0")

$DLL returns a "1" when opened, so it's opening. Any more ideas? The Dll isn't mine and I cannot reproduce it or anything.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...