Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFPCOM.DLL can not use in VFP com server
Message
From
17/10/2005 11:21:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
VFPCOM.DLL can not use in VFP com server
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01059607
Message ID:
01059607
Views:
73
proj1.dll:

DEFINE CLASS Class1 AS Custom OLEPUBLIC
#DEFINE C_VFPCOMCLASS 'vfpcom.comutil'

FUNCTION ReturntRS()
oVFPCOM = CreateObject(C_VFPCOMCLASS)
SELECT * FROM c:\table1 INTO CURSOR foo
oRecordSet=CreateObject('ADODB.RECORDSET')
nError = oVFPCOM.CURSORTORS(oRecordSet)
RETURN oRecordSet
ENDFUNC

*--call

#DEFINE C_VFPCOMCLASS 'vfpcom.comutil'
oVFPCOM = CreateObject(C_VFPCOMCLASS)
o=CREATEOBJECT('proj1.Class1')
oRecordSet=o.ReturntRS ()
nError = oVFPCOM.RSToCursor(oRecordSet, 'mycursor')

question:
if I used "proj1.Class1" as VFP COM Server(dll), so when this program called this line it shows error message "OLE OBJECT May be corrupt"

if I did not use "proj1.Class1" as VFP COM Server, it was perfectly correct.
Why?
thank you for your help!
Next
Reply
Map
View

Click here to load this message in the networking platform