Forum Post: Re: Pointer Memory, Linked Lists And Trees.

  • Thread starter Thread starter rblanchard
  • Start date Start date
Status
Not open for further replies.
R

rblanchard

Guest
We have had to use a MEMPTR typically when integrating with a 3rd party dll. The following RUN statement will make a call to MTX_GET_CashierDisplay which will return the text we are looking for. A similar approach would be used when sending info to the dll. DEF VAR cCashierDisplay AS CHAR NO-UNDO. RUN MTX_GET_CashierDisplay1 (OUTPUT cCashierDisplay). The following are defined in a persistent procedure. PROCEDURE MTX_POS_GET_CashierDisplay1 EXTERNAL {&MTX_POS} PERSISTENT: DEFINE OUTPUT PARAMETER CashierDisplay1 AS MEMPTR NO-UNDO. END PROCEDURE. PROCEDURE MTX_GET_CashierDisplay1 : DEFINE OUTPUT PARAMETER pcCashierDisplay1 AS CHARACTER NO-UNDO. DEFINE VARIABLE mCashierDisplay1 AS MEMPTR NO-UNDO. SET-SIZE(mCashierDisplay1) = 20. RUN MTX_POS_GET_CashierDisplay1 (OUTPUT mCashierDisplay1). ASSIGN pcCashierDisplay1 = GET-STRING(mCashierDisplay1,1). SET-SIZE(mCashierDisplay1) = 0. RETURN. END PROCEDURE.

Continue reading...
 
Status
Not open for further replies.
Back
Top