MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Closing: MapPoint process stilll running

This is a discussion on Closing: MapPoint process stilll running within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, in my C# program, I start a MapPoint instance: Code: ApplicationClass mapPointApplication = new ApplicationClass(); Now it's up to ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-28-2005
Member
Yellow Belt
 
Join Date: Feb 2005
Posts: 32
Closing: MapPoint process stilll running

Hello,
in my C# program, I start a MapPoint instance:
Code:
ApplicationClass mapPointApplication = new ApplicationClass();
Now it's up to the user, when he wants to close MapPoint. The problem is, that after the user closes MapPoint, there is still a MapPoint.exe process running.
How can I avoid that?

Bye,

MD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 04-28-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 893
Blog Entries: 10
You need to make sure that you don't have any valid references in your program to any MapPoint objects,

Eg. in C++ you'd call Release on a COM object to free the reference.
In VB6 you set the object to "Nothing".

In my experience, you have to do this before the user closes MapPoint, rather than after.

Yes when I'm developing, I usually end up with a collection of zombie MapPoints that have to be cleared out every so often.


Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 04-28-2005
Member
Yellow Belt
 
Join Date: Feb 2005
Posts: 32
Hello,
I use the following code:
Code:
			mapPointApplication = null;
			System.GC.Collect();

But when the user now closes teh MapPoint application, there is still a MapPoint.exe running. How do I close it?

MD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-29-2005
Member
Yellow Belt
 
Join Date: Feb 2005
Posts: 32
another thing, that doesn't work:

1. My program starts a MapPoint instance.
2. The user closes the MapPoint instance from step 1.
3. My program closes the MapPointApplication form step 1 with "mapPointApp.Quit();"

But now there's still a process MapPointe.exe running.

What am I doing wrong?

Bye,

MD
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 04-29-2005
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 893
Blog Entries: 10
Are you releasing the COM pointers?
I haven't tried COM and C# so I'm not sure how it handles them. VB is clever enough to do it if you assign "Nothing".
For C++ you have to hold its hand and call "Release()" before setting the pointer to NULL.

Also, have you tried closing MapPoint in your program without the user being involved. This should work unless you have COM pointers dangling.

Or by setting the flags to tell MapPoint that the user is in charge of quiting. This works for me (GridImp). When my program tidies up, it releases ALL MapPoint COM objects. My program closes, and MapPoint is left running for the user. It then closes properly when they want it to close.

Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
closing, mappoint, process, running, stilll


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Mappoint as background process for Filemaker Pro App Anonymous MapPoint 2006/2009 Discussion 8 03-12-2008 02:04 PM
MapPoint crashs after closing the application Elbarto MapPoint 2006/2009 Discussion 12 12-30-2006 10:47 PM
Disabling closing of MapPoint? MD2000 MapPoint 2006/2009 Discussion 1 05-09-2005 05:57 PM
Waiting for shutdown of mappoint process Gauloisid MapPoint 2006/2009 Discussion 1 10-27-2003 08:46 AM
I am currently running Mappoint 2001 and will buy .... Anonymous MapPoint 2006/2009 Discussion 1 09-19-2001 09:49 AM


All times are GMT -5. The time now is 03:39 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54