Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COM error call?
Message
 
 
To
26/05/2004 20:12:15
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00907570
Message ID:
00907602
Views:
11
David,

You should just put the code inside the class' Error() method. Any errors that occur within the methods of the class will be cause that method to execute.
define class mydll as ...
function Error( nError, cMethod, nLine )
strtofile( dtoc( datetime() ) + " error:" + transform( nError ) + " in " + ;
   cMethod + " at line " + transform( nLine ) + chr(13) + chr(10), "c:\errorlog.txt", .t. )
endfuc
enddefine
>I have a VFP8 MTDLL. Inside are various functions. One of the functions is an ErrorProc to handle errors. When I attempt to set ON ERROR DO ErrorProc or ON ERROR This.ErrorProc or ON ERROR DO This.ErrorProc I get an Error (??).
>
>How does one set up an Error handler from within a COM environment?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform