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 6 of 6

MapPoint.exe in list of processes

This is a discussion on MapPoint.exe in list of processes within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hey, I'm very new to MapPoint. I'm using it from BCB6. And I have the following problem: I execute my ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    MapPoint.exe in list of processes

    Hey,

    I'm very new to MapPoint. I'm using it from BCB6. And I have the following problem:

    I execute my C++program, in this program I run MapPoint. Everything works fine, but when I close the MapPoint application and my application, MapPoint.exe stays in the list of processes on my PC. I'm using Tapp to start MapPoint.

    Can anyone tell me how to prevent MapPoint from staying in my memory?


    Thanks in advance!

    Leen

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hi Leen,

    I had the same in Delphi. Since I only need a map object to do my stuff, I now use:
    mymap:=TMap.Create(myForm);
    ...
    mymap.destroy;

    This also creates a mapPoint.exe process, but it disappears afterwards. With the Map object you can do a lot of stuff. Hope this helps for you.

    Pascal

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hey,

    It seems that I don't have that method in C++, so I'm still having the problem, but anyway thanks for your help!

    Leen

  4. #4
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    It's been something like 7 years since I studied C++ and used it only rarely since then, but I think there was some way to un-instantiate or Undim/Unset or otherwise "destroy" an object (?).

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  5. #5
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    I am having the same issues with a COM component running in MTS. I set all objects including the Application object to Nothing. The MTS compenent remains active too.

  6. #6
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Kill all Mappoint instances before you run your app

    Hi all.

    I encounter the same problems after a program crash or debugger program halt.

    I have written a small function that kills all instances of the Mappoint object in memory, so your app will restart OK. It is in Delphi, so i hope that you can translate it in C. That should be no problem i guess, since most of the code is Windows system stuff anyway.

    Hope this helps a bit...

    Cheers.
    Martin.

    Code:
    (********************************************************************************
     Title         : Procedure KillMappointInstances
     Function      : Kill's all active MapPoint objects anywehere in memory
     Result        : Number of instances found and terminated
     Author        : Martin Beek, martin@martinbeek.net
     Uses          : TLHelp32
    ********************************************************************************)
    
    function KillMapPointInstances : Integer;
    const
      PROCESS_TERMINATE = $0001;
      EXEFILENAME       = 'MapPoint.exe';
    var
      ContinueLoop    : BOOL;
      FSnapshotHandle : THandle;
      FProcessEntry32 : TProcessEntry32;
    begin
      Result := 0;
      FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
      FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
      ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
    
      while Integer&#40;ContinueLoop&#41; <> 0 do
      begin
        if &#40;&#40;UpperCase&#40;ExtractFileName&#40;FProcessEntry32.szExeFile&#41;&#41; =
          UpperCase&#40;ExeFileName&#41;&#41; or &#40;UpperCase&#40;FProcessEntry32.szExeFile&#41; =
          UpperCase&#40;ExeFileName&#41;&#41;&#41; then
          Result &#58;= Integer&#40;TerminateProcess&#40;
                            OpenProcess&#40;PROCESS_TERMINATE,
                                        BOOL&#40;0&#41;,
                                        FProcessEntry32.th32ProcessID&#41;,
                                        0&#41;&#41;;
         ContinueLoop &#58;= Process32Next&#40;FSnapshotHandle, FProcessEntry32&#41;;
      end;
      CloseHandle&#40;FSnapshotHandle&#41;;
    end;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Getting MapPoint (ActiveX) to export a city's street list
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-08-2005, 08:02 PM
  2. Multiple mappoint processes with Delphi 6
    By dradey in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 01-18-2005, 01:55 PM
  3. Can I export a name list from mappoint
    By billholden in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-28-2003, 05:25 AM
  4. MapPoint Wish List Items
    By Harv in forum Wish List
    Replies: 1
    Last Post: 07-08-2003, 02:28 PM
  5. Looking for MapPoint Programming Resource list
    By MarkE in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 12-10-2002, 11:34 PM

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