Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Parameters Between VB and VFP Com Objects
Message
De
05/01/2001 21:41:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Passing Parameters Between VB and VFP Com Objects
Divers
Thread ID:
00460139
Message ID:
00460139
Vues:
73
Background: I have created a VFP com object which is instantiated from a VB com object for use in a Web application.The VB com obj is instantiated by a web page and passed several parameters, 1 of which ia passed by reference (cfilename) and the rest by value. The VB com object than instantiates the VFP com object passing the required parameters including the cfilename parameter. The VFP com object's role is to create and save an excel file and return an interger, 0 if successful, back to the VP object which than returns to the calling web page which loads the excel sheet in the browser. Since VB by default sends parameters by referenc I assumed (my 1st mistake) that the cfilename parameter in the VB com object would retain the value assigned to it in the VFP com obj.

Problem: The confusing part is that it works fine when run from the web server where the com packages are installed. Debugging code in both objects write the value of the paramters to files and they contain the expected values. However when run from a client machine, the excel file still gets created on the web server (i checked) but the cfilename parameter in the VB object does not retain the name assigned to it in the VFP com object and thus the browser opens a blank page. Also the debug values written by the VFP com show only the 1st paramter passed is correct all other are blank and code in the VFP com object which chceck if a particular param is empty gets fired. Still the file is created correctly based on the passed params. ??

Questions:
Why does it work when run on the Web server but not from a client machine?
How do you pass parameters by referenc from a VB object to A VFP con obj?
Would this work? cfilename =vfpobj.getfilename()?

Thanks for any help you can give!!
Tom
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform