Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loading an .APP file from a VFP COM object
Message
De
06/05/2011 16:43:12
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
 
À
05/05/2011 23:32:15
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01503828
Message ID:
01509898
Vues:
49
Hi Hank,

In general, I find that VFP can find PRGs inside another app, but it needs help finding DBF-based objects (SCX, VCX, FRX, etc.). Code inside the app has no trouble instantiating other objects inside the same app. Anyway, thanks for replying. This behavior affects Parallel.CallMethod() in ParallelFox, and I wanted to double-check there wasn't some magic I was missing, but it looks like specifying the APP/EXE is required.

>Hi Joel,
>
>Yes, I do specify the app. And as usual <s>, Rick is likely right.
>
>In the situation where I had to use SET PROC, I was not creating an object from the calling program, but rather from a called form -- which has to be done through a call within the exe. The menu item calling the form in the exe was therefore: do procthatcallsthe form in (the exe).
>
>What theprocthatcallstheform did was:
>
>1) in the Load, first SET PROC to the EXE itself
>2) use newobject() to instantiate a class in the EXE, which was then attached to the form
>3) after which the form could use the class object for its various tasks, as well as use PRG's in the EXE directly.
>
>So, maybe for the class itself I wouldn't have need the SET PROC. It's quite likely, in fact, that the form needed the SET PROC to use the other PRG's in the App, but not for creating the object.
>
>Hank
>
>>Hank,
>>
>>Are you saying it works for you without specifying the app in NewObject()? I'm seeing the same behavior as Rick. If you test, make sure source VCXs aren't in your path.
>>
>>>I get the same error with NewObject() and it'll work only if I add the .APP file explicitly. Of course then I wouldn't need SET PROCEDURE TO wcDemo.app at all :-)
>>>
>>>Just seems odd that PRG files are found just fine but the VCXs not.
>>>
>>>+++ Rick ---
>>>
>>>>Hi Rick,
>>>>
>>>>I use newobject() to instantiate classes, once SET PROC is done, and that works fine for me, in several scenarios.
>>>>
>>>>Hank
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform