Progress / Windows XP COM-handle respectively dll

Hello,
I use a dll as com-handle in Progress:
DEF VAR vh-qotrans AS COM-HANDLE NO-UNDO.
My Problem is the following:
I have one Integer-Parameter as INPUT for the dll and I receive the error
5900 (Wrong input/output parameter):
The Code:
DEF VAR vc-1 AS CHAR NO-UNDO.
DEF VAR vc-2 AS CHAR NO-UNDO.
DEF VAR vi-typ AS INT NO-UNDO.
vh-qotrans:qodelpath(INPUT-OUTPUT vc-1,INPUT-OUTPUT vc-2,INPUT-OUTPUT vi-typ) NO-ERROR.
qodelpath is the Method.
The third parameter vi-typ is defined in the dll as long.
Does anyone has an Idea?
 
The problem is modifier (INPUT-OUTPUT) not type (INTEGER), I think.

Try changing modifiers to INPUT only and OUTPUT only accordingly.

If this doesn't sort it, please post your DLL definition.

Lee
 
Hello,
by using the com-handle I have to use the INPUT-OUTPUT Parameter:
See the Code:
DEF VAR vc-1 AS CHAR NO-UNDO.
DEF VAR vi-2 AS INT NO-UNDO INIT 1.
DEF VAR vc-qo AS CHAR NO-UNDO INIT "qo1":U.
ASSIGN vc-1 = "\My Documents\qo\ini\test":U.
vh-qotrans:qodelpath(INPUT-OUTPUT vc-qo,INPUT-OUTPUT vc-1, INPUT-OUTPUT vi-2).
MESSAGE ERROR-STATUS:GET-NUMBER(1) SKIP ERROR-STATUS:GET-MESSAGE(1).
vh-qotrans is my com-handle.
qodelpath is the method.
If I use only an Input Parameter I get a Syntax Error.
Probably I have to use the Input-Output-Parameter in the way 'as short' etc?.
Matthias
 
Hello,
now I found the solution.
I have to define the Parameter like 'AS SHORT'. See the code:
DEF VAR vc-1 AS CHAR NO-UNDO.
DEF VAR vi-2 AS INTEGER NO-UNDO INIT 1.
DEF VAR vc-qo AS CHAR NO-UNDO INIT "qo1":U.
vh-qotrans:qodelpath(INPUT-OUTPUT vc-qo,INPUT-OUTPUT vc-1, vi-2 AS SHORT).
So the var 'vi-2' which is Integer put it in the com-handle like 'vi-2 AS SHORT' and then the function where this Parameter is defined as LONG works well.
Matthias
 
Thanks - three things:

1. I completely missed you were referencing a COM object (I got distracted by the dll reference, that's why I asked for a DLL 'External' definition).

2. Modifying parameter on the fly - I had no idea you could do that! I had to look it up in External Programming Interfaces.

3. In the code you've posted, you have actually changed the modifier (from INPUT-OUTPUT).

Lee
 
Back
Top