Jump to content

Recommended Posts

I tried it, got a 126, which meant it couldn't find it, so I relocated some files.

I fixed that and got a 6, which means it is an invalid handle. This doesn't help me.

can you post the DLL?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to post
Share on other sites

It is a dll I have custom written to tackle the managed code calling. It is a standard WIN32 dll.

http://freehost07.websamba.com/goobco/netinterop.dll

I can provide source if necessary.

get a copy of "PE Explorer" and have a look at your exported symbols.

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to post
Share on other sites

I have the PE Explorer already, but how do I know what the exports are? I've only used it to get resources.

Ctrl+E in "PE Explorer"

Using the dependency walker, I see all the functions are listed as exported symbols.

It isn't calling the functions that is the problem though, it is the loading of the dll.

1.) I can load the DLL without errors with AU3 3.2.2.0. As I don't know how DllLoad is implemented (most certainly via LoadLibrary()) I can't tell you exactly what the problem is with your error code "6".

2.) Even if you can load the DLL you will get into trouble when you try to call the exported functions, as you exported them with the C++ decorated names. Again, I don't know how DllCall is implemented, but I don't think that DllCall will handle all the different decoration styles of the various C++ compilers.

Read this: http://en.wikipedia.org/wiki/Name_mangling

BTW: If you can't figure it out, post the code and a description how you compiled the DLL.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to post
Share on other sites

1.) I can load the DLL without errors with AU3 3.2.2.0. As I don't know how DllLoad is implemented (most certainly via LoadLibrary()) I can't tell you exactly what the problem is with your error code "6".

It may be a leftover error code from some other function call. IceKirby will need to check that the DLL actually loaded okay by checking the return value of DllOpen().

2.) Even if you can load the DLL you will get into trouble when you try to call the exported functions, as you exported them with the C++ decorated names. Again, I don't know how DllCall is implemented, but I don't think that DllCall will handle all the different decoration styles of the various C++ compilers.

There's no magic to it. To use the functions, you call them by whatever name they are exported as. For example, to call Delete(), you would pass "?Delete@@YAXH@Z" to DllCall().

IceKirby, I see no reason the DLL won't load unless you've implemented DllMain() wrong or something.

Link to post
Share on other sites

You'll probably want to make all the functions use __stdcall (WINAPI) for their calling convention or you'll need to specify cdecl with AutoIt when you use DllCall(). As for exporting the symbols, I usually use a definition file but there are other ways. MSDN can show you a couple different ways.

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...