flat assembler
Message board for the users of flat assembler.

Index > Windows > [Solved] Calling DLL Function

Author
Thread Post new topic Reply to topic
ctl3d32



Joined: 30 Dec 2009
Posts: 204
Location: Brazil
ctl3d32
Hi,

I need help to call the highlighted function in the image attached.

Thanks in advance,
ctl3d32

Code:
format PE GUI 4.0
entry start

include 'win32ax.inc'

section '.text' code readable executable

  start:
        invoke  startTransaction,szTransaction
  exit:
        invoke  ExitProcess,0

section '.data' data readable writeable

  szTransaction db 'IH01',0

section '.idata' import data readable writeable

  library kernel32,'KERNEL32.DLL',\
          user32,'USER32.DLL',\
          msvcrt32,'MSVCRT.DLL',\
          SAPfront,'SAPfront.DLL'

  include 'api\kernel32.inc'
  include 'api\user32.inc'

  import  msvcrt32,\
          atof,'atof',\
          sprintf,'sprintf'

  import  SAPfront,\
          startTransaction,'CSession::startTransaction'
    


Description:
Filesize: 72.69 KB
Viewed: 908 Time(s)

sap function.png


Post 08 Oct 2013, 14:51
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
ctl3d32 wrote:
Hi,

I need help to call the highlighted function in the image attached.

Thanks in advance,
ctl3d32
Have you tried another calling convention (e.g. use "cinvoke" instead of "invoke")?
Post 08 Oct 2013, 15:49
View user's profile Send private message Visit poster's website Reply with quote
ctl3d32



Joined: 30 Dec 2009
Posts: 204
Location: Brazil
ctl3d32
Yes.

I'm gonna try LoadLibray and GetProcAddress and the Ordinal number of the function.
Post 08 Oct 2013, 16:05
View user's profile Send private message Reply with quote
ctl3d32



Joined: 30 Dec 2009
Posts: 204
Location: Brazil
ctl3d32
Forgot to say the error windows gives me!!!!!!

Function 'CSession::startTransaction' can't be found.
Post 08 Oct 2013, 16:07
View user's profile Send private message Reply with quote
ctl3d32



Joined: 30 Dec 2009
Posts: 204
Location: Brazil
ctl3d32
ctl3d32 wrote:
Yes.

I'm gonna try LoadLibray and GetProcAddress and the Ordinal number of the function.


Got it working.

Thanks
Post 08 Oct 2013, 16:10
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.