Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error handling in a COM server
Message
De
18/04/2008 11:38:24
 
 
À
17/04/2008 20:31:25
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01311297
Message ID:
01311698
Vues:
12
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?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform