Sign in to follow this  
Followers 0
jbc1

Problem with DllCall

13 posts in this topic

Hi,

I have a problem when using DllCall. It keeps giving me the error, 'Function not found in Dll'.

Here is the signiture of the function I am trying to call:

PVOID EXPORT WINAPI OpenChannel(void)

Here is my AutoIT code:

$result = DllCall("caccount.dll", "ptr", "OpenChannel")
    
    If @error Then
        If @error = 1 Then
            MsgBox(1, "DllCall Error - 1", "Unable to use the DLL file")
            Return
        EndIf
        
        If @error = 2 Then
            MsgBox(1, "DllCall Error - 2", "Unknown return type")
            Return
        EndIf
        
        If @error = 3 Then
            MsgBox(1, "DllCall Error - 3", "Function not found in the DLL file")
            Return
        EndIf
    Else
        MsgBox(0, "Num Chars Returned", $result[0])   ; number of chars returned
    EndIf

Can anybody give me some advice on this?

Thanks

Share this post


Link to post
Share on other sites



All is said. There is no such function in caccount.dll.

Find some tool to view exported functions. There are at least two posted as AutoIt scripts. One by monoceres (this one) and other by trancexx (yes, that would be me) - link.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

All is said. There is no such function in caccount.dll.

Find some tool to view exported functions. There are at least two posted as AutoIt scripts. One by monoceres (this one) and other by trancexx (yes, that would be me) - link.

I have the actual C++ code, the function does exist. So my AutoIT code is correct?

Share this post


Link to post
Share on other sites

Are you sure? Try checking with mine or trancexx tool anyway; because if this is the entire function prototype:

PVOID EXPORT WINAPI OpenChannel(void)

then I suspect you will be surprised when you see what the export viewer actually says.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

I have the actual C++ code, the function does exist. So my AutoIT code is correct?

No, you are wrong. You may have the code but you don't compile it, compiler do.

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Are you sure? Try checking with mine or trancexx tool anyway; because if this is the entire function prototype:

PVOID EXPORT WINAPI OpenChannel(void)

then I suspect you will be surprised when you see what the export viewer actually says.

I looked at the DLL using trancexx resource viewer and also PE Explorer, it looks like this under 'Exported Functions' in both applications:

_OpenChannel@0

How would I call this correctly?

Share this post


Link to post
Share on other sites

How would I call this correctly?

I have no clue! But whatever you do, DON'T try to use the name of the function the apps gave you. It could blow up your computer.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

I have no clue! But whatever you do, DON'T try to use the name of the function the apps gave you. It could blow up your computer.

Bitchen

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Bitchen

Fantastic news

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Fantastic news

Did you understand the sarcasm in monoceres' post? :D Why not simply take the name shown by PEExplorer? Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Fantastic news

You are pregnant?

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Did you understand the sarcasm in monoceres' post? :D Why not simply take the name shown by PEExplorer?

Yes I understood it quite well thank you. I find these forums get more immature each time I come.

Share this post


Link to post
Share on other sites

Yes I understood it quite well thank you. I find these forums get more immature each time I come.

How come?


Broken link? PM me and I'll send you the file!

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