Connecting Tech Pros Worldwide Help | Site Map

How to use running ActiveX exe in another program instance ?

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 23rd, 2005, 02:00 AM
Mandhare Prashant
Guest
 
Posts: n/a
Default 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.CreateDispatch ("MapPoint.Application")){
mapapp.SetVisible (FALSE);
map=mapapp.GetActiveMap ();
map.SetMapStyle (0) ;
mappointInstalled=true;
}else{
mappointInstalled=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.

  #2  
Old July 23rd, 2005, 02:00 AM
Jack Klein
Guest
 
Posts: n/a
Default Re: How to use running ActiveX exe in another program instance ?

On 13 Mar 2005 21:14:13 -0800, prashant_mandhare04@yahoo.com (Mandhare
Prashant) wrote in comp.lang.c++:
[color=blue]
> 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.CreateDispatch ("MapPoint.Application")){
> mapapp.SetVisible (FALSE);
> map=mapapp.GetActiveMap ();
> map.SetMapStyle (0) ;
> mappointInstalled=true;
> }else{
> mappointInstalled=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.[/color]

C++ does not have ActiveX, or multiple instances either. These are
Microsoft specific extensions for Windows. Ask in
news:comp.os.ms-windows.programmer.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.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.