Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 5 of 5

Closing: MapPoint process stilll running

This is a discussion on Closing: MapPoint process stilll running within the MapPoint Desktop 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 ...

  1. #1
    MD2000 is offline 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

  2. #2
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    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

  3. #3
    MD2000 is offline 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

  4. #4
    MD2000 is offline 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

  5. #5
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96