Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing parameters to the init of a com object
Message
From
15/12/2013 14:01:28
 
 
To
15/12/2013 13:49:15
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01590272
Message ID:
01590274
Views:
83
This message has been marked as the solution to the initial question of the thread.
Parameters to the init are not supported.

>Apologies for a very basic query: I have built a DLL and am trying to pass in a parameter to set a property in a class via the INIT - see code below ; however it
always returns an empty string i.e. the value given it when the class is defined, instead of say "P" as in the example below. The parameter being passed via the INIT is being ignored. I can get round this by using a procedure in the class to set the variable but I would have thought I should not have to do this?
>
>
>
>DEFINE CLASS myOLE as Session OLEPUBLIC 
>
>	myVar=""
>	
>	FUNCTION INIT
>	LPARAMETERS tVar
>		myVar = tVar
>	ENDFUNC
>
>ENDDEFINE
>
>o=CREATEOBJECT("myOLEDLL.myOLE","P")
>
>
>Thanks for any advice.
>
>Barry Sutton
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform