getNames(char **pnameList);
|
DEFINE VARIABLE ix AS INTEGER NO-UNDO.
DEFINE VARIABLE mNames AS MEMPTR NO-UNDO EXTENT 10. DO ix = 1 TO EXTENT(mNames): SET-SIZE(mNames[ix]) = 50. END. RUN getNames (mNames). DO ix = 1 TO EXTENT(mNames): DISPLAY GET-STRING(mNames[ix], 1). END. PROCEDURE getNames EXTERNAL "myApp.dll" PERSISTENT: DEFINE OUTPUT PARAMETER names AS MEMPTR NO-UNDO. END. |
DEFINE VARIABLE hCall AS HANDLE NO-UNDO.
DEFINE VARIABLE ix AS INTEGER NO-UNDO. DEFINE VARIABLE mNames AS MEMPTR NO-UNDO EXTENT 10. DO ix = 1 TO EXTENT(mNames): SET-SIZE(mNames[ix]) = 50. END. CREATE CALL hCall. ASSIGN hCall:CALL-NAME = "getNames" hCall:LIBRARY = "myApp.dll" hCall:CALL-TYPE = DLL-CALL-TYPE hCall:RETURN-VALUE-DLL-TYPE = "CHARACTER" hCall:PERSISTENT = TRUE hCall:NUM-PARAMETERS = 1. hCall:SET-PARAMETER(1, "MEMPTR", "INPUT", mNames). hCall:INVOKE( ). DO ix = 1 TO EXTENT(mNames): DISPLAY GET-STRING(mNames[ix], 1). END. |