Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with VFP dll in Excel
Message
 
À
15/01/2001 05:33:53
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00463519
Message ID:
00463904
Vues:
36
>COMRETURNERROR() seems to require you to provide an error message. I'm not sure how that is supposed to work - the object is failing to >instantiate second time around, but exactly the same code works first time around.
Does it crash if you close Excel after each cycle, then re-open and fire again?

I was thinking that Excel migh offer something similar to 'ON ERROR'. Then, in your VFP class container, you might be able to use a generic error procecedure. This one works inside a CUSTOM container (but the client is VFP).
PROCEDURE ERROR(errornumber, DESCRIPTION, scode, SOURCE, helpfile, HELPCONTEXT, fcanceldisplay)
* I forget what control I picked this from - but it has 7 elements the same as the AERROR VFP service. Check
* to see if Excel may have a corresponding error array.
* Send a message back to Excel Client (maybe)
COMRETURNERROR(DESCRIPTION,"VFP DLL Error") && You could cocanecnate all the parameters (not just DESCRIPTION)
ENDPROC
But for this to be helpful, Excel needs an ERROR handler SUB for the macro.
Is VFP still running when you release the COM? I'll fool around with it some and see what I can see!

>This DLL will eventually be used in a web server. It's really annoying when you get an error but no meaningful error message. I've tried using the object in VB, but I get the same error. VFP can use the DLL with no problems.
>
>Best.
>
>Matt.
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform