Consultor Eletrônico



Kbase P19628: How to pass data from Visual Basic to memptr
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to pass data from Visual Basic to memptr

FACT(s) (Environment):

Proxygen
Progress 9.x

FIX:

1. Code in appserver procedure =
DEF INPUT parameter mymemptr AS MEMPTR.
DEF VAR myint AS INT.
myint = GET-SIZE(mymemptr).

DEF VAR mystring AS CHAR.

mystring = GET-STRING ( mymemptr, 1, myint ).

OUTPUT TO d:\temp\memtest.txt.
PUT mystring.

2. Generate proxy based on rcode, deploy dll to VB client
3. VB client connects to AppServer and runs, for example:
Private Sub Command2_Click()
Dim mytest(100) As Byte
mytest(0) = Asc("T")
mytest(1) = Asc("E")
mytest(2) = Asc("S")
mytest(3) = Asc("T")

Call myobj.memptr1(mytest)
End Sub