>Hi everybody,
>
>I have a COM server with a LPARAMETERS in the INIT event :
>
>Define Class MyClass As Custom Olepublic
>SomeProperty = ""
>
>Function Init
>LParameters p_MyParameter
>
>If PCount() = 1
> This.SomeProperty = p_MyParameter
>Else
> This.SomeProperty = "No parameter"
>EndIf
>
>EndFunc
>
>EndDefine
>
>I compile this project as a DLL COM server....
You can't pass parameters to a VFP COM object during Init. You have to make a subsequent call to set the property.
>
>In another application, I use the following syntax :
>
>OInstance = CreateObject("MyComServerProject.MyClass","Parameter passed")
>MessageBox(OInstance.SomeProperty)
>
>The MessageBox always displays "No parameter"...
>
>Any idea why ????
>
>Thanks in davance...