Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class vs DLL
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00944057
Message ID:
00944205
Views:
18
Excuse me, for not getting the terms right and I will try to be clearer

I have a class MyClass, with a method called FormatPrice
that I can call from the command prompt like this
SET CLASSLIB TO Classes
oMyClass = CreateObject("myClass")
myPrice = "1234444.444444444"
?oMyClass.FormatPrice(myPrice)
1234
And the first line in my FormatPrice method is
parameters MyPrice
I have copied the code for the FormatPrice method to a prg class
definition
DEFINE CLASS 	testclass as Session olepublic	
PROCEDURE 	FormatPrice(myPrice as String) 				
Parameters MyPrice
*** rest of code
EndProc
EndDefine
then created a DLL like this
Build Project 	VFPopubtest From oPubClass.prg	
Build Mtdll 	VFPoPubTest From VFPoPubTest recompile
Then at the command prompt called this function like this
>
oVfpDll = CreateObject("VfpOpubTest.TestClass")  
myPrice = "1234444.444444444"
? alltrim(oVfpDll.FormatPrice(myPrice)  
1234
Normally, this works fine. However, suddenly, the oVfpDll.Format_Price
does not work unless I first remove the "parameters MyPrice" statement
from the Format_Price Method from MyClass. Of course if I do this, then
the Format_PRice method, when called from MyClass, no longer works.

I can't figure out why this is happening. I have tried unregistering the
VFPoPubTest DLL and deleting it. Is there something else I can delete or try?

Thanks so much
Steve Elster
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform