Jump to content

Dllcall Help


chrshea
 Share

Recommended Posts

I am running the 64 bit version of AutoIt V3 on Win7. I am trying to use a UDF that makes a DLL call to crtdll.dll. I am getting an error return of 1 (unable to use the DLL) from the DLL call. I created a little module to experiment with this. I used a DLLOpen and that also gives an error trying to access this module. The module is actually in SysWOW64 which is for the non-64 bit dlls. Normally Win7 tries to load dll's from the System32 library so unless it checks SysWOW64 as well, it would make sense that it wouldn't find it and return an error. If I need to reference a specific location, how do I do that? Neither DLLOpen or DLLCall seems to want more than the DLL name. If this isn't the problem, then what should I do to debug/ correct this.

Link to comment
Share on other sites

Did you try to run your script in x86 mode instead of x64?

I compiled it as a 32 bit application and that worked so thanks for the idea. It wouldn't run from the editor and I presume that is because I am running the 64 bit version of AutoIt. I would probably use this as a 32 bit application anyway but it seems that a 64 bit application should still be able to use 32 bit DLLs if there isn't a 64 bit version available.

Link to comment
Share on other sites

  • Developers

I compiled it as a 32 bit application and that worked so thanks for the idea. It wouldn't run from the editor and I presume that is because I am running the 64 bit version of AutoIt. I would probably use this as a 32 bit application anyway but it seems that a 64 bit application should still be able to use 32 bit DLLs if there isn't a 64 bit version available.

When you load the full version of SciTE4AutoIt3 you can add the directive to Run/F5 the script with x86 version of Autoit.exe

#AutoIt3Wrapper_UseX64=n

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Once I compiled the module once with the x86 option, AutoIt seemed to them recognize that it should run as 32-bit and the problem went away, even when I ran it from the editor.

nah ... I do not believe in magic.

When you have loaded the full SciTE4AutoIt3 version, the AutoIt3Wrapper script will take care of running the x86 version as you should be able to see in the console output of SciTE.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...