473,783 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use running ActiveX exe in another program instance ?

Hello,

I have Mapoint software installed on my machine.
Now, in VC++, I can use this mapoint application in my program as
below-
_Application mapapp;
_Map map;

if( mapapp.CreateDi spatch ("MapPoint.Appl ication")){
mapapp.SetVisib le (FALSE);
map=mapapp.GetA ctiveMap ();
map.SetMapStyle (0) ;
mappointInstall ed=true;
}else{
mappointInstall ed=false;
}

But, the problem is that when I run multiple instances of my program,
it starts those many instances of mapoint. That is very resource
consuming.

Is it possible to check if an instance of mappoint is already running
& if so, use this running mappoint in next instance of my program?
Please suggest some solution.

Thanks in advance.
Jul 23 '05 #1
1 2502
On 13 Mar 2005 21:14:13 -0800, pr************* ****@yahoo.com (Mandhare
Prashant) wrote in comp.lang.c++:
Hello,

I have Mapoint software installed on my machine.
Now, in VC++, I can use this mapoint application in my program as
below-
_Application mapapp;
_Map map;

if( mapapp.CreateDi spatch ("MapPoint.Appl ication")){
mapapp.SetVisib le (FALSE);
map=mapapp.GetA ctiveMap ();
map.SetMapStyle (0) ;
mappointInstall ed=true;
}else{
mappointInstall ed=false;
}

But, the problem is that when I run multiple instances of my program,
it starts those many instances of mapoint. That is very resource
consuming.

Is it possible to check if an instance of mappoint is already running
& if so, use this running mappoint in next instance of my program?
Please suggest some solution.

Thanks in advance.


C++ does not have ActiveX, or multiple instances either. These are
Microsoft specific extensions for Windows. Ask in
news:comp.os.ms-windows.program mer.win32 where the experts on such
things are.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
4567
by: AnalogKid | last post by:
Short question: What's the difference between SingleUse and MultiUse ? Long question: I've been writing some sample code to see how different Instancing values and threading models work. I tried all main combinations of Instancing (Multiuse/Singleuse) and of Threading models (per object/pool). Here's what I found: MultiUse - Thread per Object
6
10529
by: Pierre-Yves | last post by:
Hello, I would like to prevent my perl program to be executed several times simultaneously (if the program is already running, I would like to display a message like "another instance of this program is already running, please try again in a couple of minutes). For doing this, I guess I have to check the running processes... but I don't know how to do that and how I can identify my program in the running processes.
2
7577
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run the VB program on that same machine, I can view the ActiveX control fine. He is using Citrix. The same ActiveX controls can be viewed on other machines. When trying to view 1 of the ActiveX control, he got an error "Visual Basic Run-time redist...
0
1920
by: Craig | last post by:
I am having problems getting an ActiveX DLL written in VB6 to call a method in a C# class library component. My C# DLL is called CSharpProject.dll and contains a public class called CSharpClass. In this class is a single public method that returns the string "Hello from C sharp". My VB6 ActiveX DLL references the C# DLL (CSharpProject.dll) using the
2
1286
by: VB Programmer | last post by:
I have a VB.NET winform app that I created that uses an ActiveX control (cwui.ocx). I created a setup project for it and it installs fine on my machine. The app runs fine too. When I run it on another machine it installs fine, but when I run the program I get this error: ------- MyApp.exe - Common Language Runtime Debugging Services
1
1886
by: Patrick Dugan | last post by:
Is it possible to get the handle of a running service? I have a program (ActiveX program) running in memory. When I start my service I need to pass the service's handle to that program in order to attach to it. I cannot use Me.Handle because there is no such information within a service application. I have tried this small routine:
3
8994
by: Geoff Coope | last post by:
Hi all I created an ASP ActiveX DLL file in Delphi that works great using ASP on IIS. Is it possible to use ActiveX DLL files within PHP like in ASP? but on an Apache webserver that is running on a Windows machine? In ASP it works like this:
20
3063
by: Bradley | last post by:
Hey all, Another convert to vb.net here. My vb6 program was an application launcher that checked for previous instances of said programs and would alert the user with a message box. I can't, for the life of me, figure out how to do this in vb.net. Let's say notepad.exe (as an example) is already running. My program tries to launch it again, but I need to check if notepad.exe is already running before I launch it. Does anyone have a...
1
5059
by: Tobias Maier | last post by:
Hi I want to start a C# ActiveX Exe with a parameter. Now, start a WebBrowser. Within Html/javascript I initiate my component und want to retrieve the parameter from the startet exe. I have done this in VB6 with new ActiveXObject("name") and all works correct. Using C# or Vb.net it works different:
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.