Using the DLL for EasyLabel32

Please help. I am having trouble accessing the DLL for Tharo's EasyLabel32. It is finding the DLL and seems to be running the Function, but returns error code of 0, which really doesnt help! Anyway I am new to this DLL programming and was wondering if someone had some insight as to what I might be doing wrong. Please find the code below:
/******************************************************/
set-size(pmessage) = 300.
assign vMessage = "formatname = 'c:\labelapi\IMLBOT03';" + chr(0).
put-string(pmessage,1) = vMessage.

/* Label Command DLL Call */
RUN LabelCommand (input pMessage,
output vJobNo).

PROCEDURE LabelCommand EXTERNAL "c:\program files\tharo\easylabel 32\labelapi.dll":
DEFINE INPUT PARAMETER Data AS memptr.
define return parameter retCode as long.
END PROCEDURE. /* Label Command */

/******************************************************/

have also tried sending via
RUN LabelCommand (INPUT get-pointer-value(pMessage), output vJobNo).

both return the error code.

Also was told by Tharo that it needs to be a FAR POINTER that is passed in. I cant, for the life of me, remember what a FAR POINTER is, let alone how to use one in Progress.

Anyway any help that is offered really will be appreciated.

Thank you in advance.
 
Can you try the following?

/******************************************************/
PROCEDURE LabelCommand EXTERNAL "c:\program files\tharo\easylabel 32\labelapi.dll":
DEFINE INPUT PARAMETER Data as character.
define return parameter retCode as long.
END PROCEDURE. /* Label Command */

/* Label Command DLL Call */
RUN LabelCommand
(input "formatname = 'c:\labelapi\IMLBOT03';",
output vJobNo).


P.S.: You do not need to add null at the end of Data.
Anyway, what is the definition of LabelCommand in C/Pascal?
 
Sorry

Firstly sorry for not getting back to you sooner, but have been real busy. Secondly the reason it wasn't working, is that when I installed EasyLabel32 it mustn't of installed correctly, as I reinstalled and it worked fine.

Once again sorry Gabor
 
Top