MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




Regarding COM exception at the end of execution...

This is a discussion on Regarding COM exception at the end of execution... within the MP2K Magazine Articles forums, part of the Map Forums category; My response is related with COM exception ( 0xC0000005 ) at the end of execution MapPoint test application described in ...


Go Back   MapPoint Forums > Map Forums > MP2K Magazine Articles

Today's Posts Twitter Feed 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 05-12-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Regarding COM exception at the end of execution...

My response is related with COM exception ( 0xC0000005 ) at the end of execution MapPoint test application described in article ( Part 1 )...

Unhandled exception 0xC0000005 "Access Violation" happens because:

- all your COM objects were released after g_pMapPoint->Quit() was executed;

- but, pointers to COM objects you worked with are still NOT NULL.

You can fix it in a very simple way:

...
myMapPtr->Saved = true;

try
{
if( g_pMapPoint != NULL )
{
g_pMapPoint->Quit();
}
}
catch( ... ){}

resultsPtr = NULL;
locAddressPtr = NULL;
pinAddressPtr = NULL;
myMapPtr = NULL;
g_pMapPoint = NULL;

CoUninitialize();
}

I tested it and everything is fine now.

Best regards,
Sergey
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
end, exception, execution


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
Unknown Host Exception amitsh MapPoint 2006/2009 Discussion 3 12-19-2008 12:39 AM
MP 2004 + VS2005 COM exception NoDed MapPoint 2006/2009 Discussion 1 02-28-2006 02:06 PM
OutOfMemory Exception Gianmaria MapPoint 2006/2009 Discussion 1 01-24-2006 12:26 PM
Error "overflow execution stack" while readinq a Anonymous MapPoint 2006/2009 Discussion 5 02-18-2005 01:47 PM
Recordset exception. What am I doing wrong? Anonymous MapPoint 2006/2009 Discussion 3 01-25-2005 02:26 PM


All times are GMT -5. The time now is 03:15 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Larnaca Holiday
Take a Larnaca holiday through UlookUbook and enjoy beautiful seaside resorts and sandy beaches.



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