Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing paramters to a vfp com
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00591478
Message ID:
00591514
Views:
32
Larry,

You just saved the day. I have spent the last 8 hours of my life trying to figure that simple answer out. Thanks. Was there documentation (VFP 7) where I should have seen that?

Jeff

>Jeffrey,
>You can't pass parameters to the Init of an object in the COM world. Create a new method that accepts the same parameters and use it to process the values.
>
>HTH.
>
>>We are having a problem when taking a working class through the vfp ide and making it an independent class. When we set proc to (our .prg file with the define class, [scandocs]) and instantiate the class otest.createobject(scanning, parm1, parm2 ...) everything functions as planned. All looks good in the debugger as well. But when it is built as a dll, and called as an external class [otest.createobject(scandocs.scanning, parm1, parm2 ...) it fails with a classfactory error message. The debugger shows all of the properties as being uninitialized or set. What am I missing???
>>
>>DEFINE CLASS scanning AS CUSTOM OLEPUBLIC
>>
>> DataFilePath = ''
>> ProgramFilePath = ''
>> GCUserID = ''
>>
>> #INCLUDE stiilink.inc
>>
>> PROCEDURE init
>> LPARAMETERS pcDataFilePath, pcProgramFilePath, pcGCUserID, pnScannerPort
>> This.DataFilePath = pcDataFilePath
>> This.ProgramFilePath = pcProgramFilePath
>> This.GCUserID = pcGCUserID
>>
>> RETURN .T.
>> ENDPROC
>>
>> ... other functions not called yet
>>
>>ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform