Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling in a COM server
Message
From
18/04/2008 11:38:24
 
 
To
17/04/2008 20:31:25
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01311297
Message ID:
01311698
Views:
11
Ha, I did just that and the DLL then refused to even instantiate.
function error
lparameters nError,cMethod, nLine
this.lError = .t.
this.cErrorMessage = ""
this.cErrorMessage = "<br>Error No: " + str(nError) + ": " + ;
		"<br>Method: " + cMethod + ;
		"<br>Line No: " + str(nLine) + ;
		"<br>Message: " + message() + message(1) + "<HR>"				
comreturnerror(this.cErrorMessage,_vfp.servername)
endfunc
Took out that 1 line and it works OK.
-------------------------------------------------
>Put COMRETURNERROR in the Error method or CATCH of your DLL/method. It will immediately send the error back to the calling program.
>
>>Thanks Craig. I had read that before and I hate to say its still pretty greek to me. The help fails to provide an example that would be really helpful. AS I read it, we would still need something to trigger the COMRETURNERROR() call. What would that be? and how would we access the returned value from an ASP page?
Previous
Reply
Map
View

Click here to load this message in the networking platform