Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array and COM
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
01076896
Message ID:
01076908
Views:
17
>in dcom
> function _testarray( laarray)
> dimension larray[1,2]
> larray[1,1] = "a"
> larray[1,2] = "b"
> endfunc
>
>****
> in client
> app_com = createobject("mycom")
> comarray(app_com,11)
> loca array atab[1]
>
> app_com._testarray(@atab)
> &&&
>call "app_com._testarray(@atab)" geterated error
>
> Best regards

That is what works for me (VFP8 SP1_ I couldn't test it for slower version:
**** Server:
DEFINE CLASS cTest AS Session OLEPUBLIC

    FUNCTION GetArray(bbb AS ARRAY @)
        DIMENSION bbb[2,2]
        bbb[1,1] = 1
        bbb[1,2] = "aasdasdas"
        bbb[2,1] = 2
        bbb[2,2] = "aaaaaaaa"
    ENDFUNC
ENDDEFINE


**** Client
LOCAL m1
DIMENSION aaa[1]
CLEAR

m1 =CREATEOBJECT("aaa.cTest")
COMARRAY(m1,11)
m1.GetArray(@aaa)
DISPLAY MEMORY LIKE aaa
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform