Skip to Content
author's profile photo Former Member
Former Member

How to get a structure back from a dll function using ABAP????

Hi everyone,

I have a requirement to call a dll function that takes 2 parameters:

a) port enumerator

b) time delay in seconds

and returns back a structure consisting of 3 different text fields (all add up to 36 characters long).

I have manged to call the dll function using the

CALL METHOD OF Win32 'Register'
#1 = 'epos_xenta.dll'
#2 = '_EDPOS_InitComm'
#3 = 'i=hh'
#4 = 'r=l'.

CALL METHOD OF Win32 '_EDPOS_InitComm' = ret
#1 = 3
#2 = 4.

The problem is I don't know how to get back the return structure (how must i declare it, and how to pass it to the function etc).

The specs for the function are as follows:


int err = EDPOS_InitComm(port, timeout_sec, [cfgPOS])

This function should be the first one called by the ECR, and should be called only once per system boot. It

informs the EDPOS system about: a) in which serial port is the EFT/POS connected, and b) what time-out (in

seconds) to set for each transaction. The static transaction parameters are saved in the cfgPOS structure,

which is an output parameter. Note that, since no dynamic allocation occurs in the implementation, the output

parameter should be pre-allocated.

The function operates synchronously and when it returns with zero, it informs that the serial communication

with the EFT/POS was successful, and that the configuration is saved in cfgPOS. Otherwise, the return value is

non-zero, and this usually indicates a problem in the serial-port setup/connection.


Thanks for any help,


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.