Is it possible to call multiple instances of EViews simultaneously from different classes in a C# project?
I am trying to call a wf on a button click and run some forecasts, and I am attempting to do this simultaneously across multiple forms.
I know I can use GetApplication with New/Existing/NewOrExisting settings. But I have faced some issues trying to do this and at times EViews would not run the intended forecast.
Multiple instances in COM Automation
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Steve
- EViews Developer
- Posts: 844
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Multiple instances in COM Automation
If you have multiple instances of EViews running, the only way to connect to a specific instance is to know the Process ID (PID) of that particular instance. The EViews Manager class provides a method called GetApplicationByProcess that allows you to specify the PID.
This method was added to support EViews Database EDX developers that have access to EViews PID when they are initialized by EViews itself. Unfortunately, we don't provide a way to get this PID value after getting an EViews Application instance. (Perhaps we need to add a GetPID() method.)
If you use a utility like Process Explorer (http://technet.microsoft.com/en-us/sysi ... s/bb896653), you can see the PID value for any running instance of EViews. Or if you kick off an instance of EViews from your program, then look for the PID programmatically (using Windows calls to look for EViews7.exe), you can keep track of which is which.
This method was added to support EViews Database EDX developers that have access to EViews PID when they are initialized by EViews itself. Unfortunately, we don't provide a way to get this PID value after getting an EViews Application instance. (Perhaps we need to add a GetPID() method.)
If you use a utility like Process Explorer (http://technet.microsoft.com/en-us/sysi ... s/bb896653), you can see the PID value for any running instance of EViews. Or if you kick off an instance of EViews from your program, then look for the PID programmatically (using Windows calls to look for EViews7.exe), you can keep track of which is which.
Who is online
Users browsing this forum: No registered users and 2 guests
