Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CreateObject passing parameters problem
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00792780
Message ID:
00792898
Views:
28
Thanks for that information. It looks like online help is not quite correct.

Paul.



>Hi Paul,
>
>Jeff is rigt, you cannot pass parameters to the COM object init. You can create another method and call it with parameter right after COM object is instantiated.
>
>
>>Hello all,
>>
>>
>>I have a problem trying to pass parameters to a VFP COM server that I have created. When I create the COM server the parameter is not passed to the INIT event within the COM object eg.
>>
>>lo = CREATEOBJECT("ob.recordoleobject", "YES")
>>
>>INIT() EVENT CODE &&&BEGIN
>>LPARAMETERS tcStr
>>this.ctest = tcStr
>>
>>RETURN &&END
>>
>>When ?lo.ctest is queried .f. is displayed instead of "YES" the original parameter passed when creating the object. Not sure if I have done something wrong??
>>
>>Platform: Windows 2000 SP3, VFP7SP1
>>
>>Thanks,
>>
>>Paul.
Previous
Reply
Map
View

Click here to load this message in the networking platform