Community of VE/MapPoint Users and Developers
This is a discussion on MapPoint 2004 and Visual Studio 2005 Runtime error within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I'm new to MapPoint and quite new to VB.Net. I am trying to create a very simple test application. ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| MapPoint 2004 and Visual Studio 2005 Runtime error I'm new to MapPoint and quite new to VB.Net. I am trying to create a very simple test application. I have added the reference to Microsoft MapPoint 11.0 Object Library and have the following vb.net code Dim app As MapPoint.Application app = New MapPoint.Application() Dim map As MapPoint.Map = app.ActiveMap I get a runtime error (see below) when the program gets to the second line of code. I have searched Google for hours now trying to find a solution and have had no luck at all. Does anyone have any ideas? Thanks. This is the error message displayed:- Retrieving the COM class factory for component with CLSID {15A40122-24D2-4FDB-8155-5F65FCE7017F} failed due to the following error: 80040154 This is the detailed error:- System.Runtime.InteropServices.COMException was unhandled ErrorCode=-2147221164 Message="Retrieving the COM class factory for component with CLSID {15A40122-24D2-4FDB-8155-5F65FCE7017F} failed due to the following error: 80040154." Source="Calculate Distance v1" StackTrace: at Calculate_Distance_v1.Form1.btnMapPoint_Click(Obje ct sender, EventArgs e) in C:\Documents and Settings\dave\My Documents\Visual Studio 2005\Projects\Calculate Distance v1\Calculate Distance v1\Form1.vb:line 40 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationCo ntext context) at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[] commandLine) at Calculate_Distance_v1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context( Object state) at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() |
| |||
|
Hi, I have no idea at the moment, but a simple experiment can probably show if all installations are OK. Just create a new winform application, drop a mapppoint activeX control on your main form and see if it load. if it run OK, and you can open a map then we are at least sure of search path, installation, etc.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi, I created the ActiveX control on the form and ran it and it did nothing. So I added this code:- AxMappointControl1.NewMap(MapPoint.GeoMapRegion.ge oMapEurope) And I get this error:- MapPoint Europe can't run because it is not registered on your system, or it can't be found. Install MapPoint Europe and try again. MapPoint is installed and it does seem to run ok. Should I try a reinstall? Note: MapPoint is not installed on Drive C: Due to space limitations I installed it on a spare harddrive U: Would that cause problems? |
| |||
|
Hi, Could be that different drive is an untested situation. A simple test is maybe to use OpenMap and give the rith path with it including the drive. Like this (with exact your path of course): Code: MP.OpenMap('U:\Program Files\Microsoft MapPoint Europe\MP2004\Templates\New European Map.ptt', False);
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Hi Wilfried, I gave that a try and it gave an error saying the file was not a MapPoint file. I am going to uninstall and re-install to drive C after some space cleaning. I will post to say whether it makes any difference. Thank You. |
| |||
|
Hi, Quote:
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
If I run MapPoint and open the template file it functions just as expected with no errors. I have re-installed Visual Studio 2005 and it made no difference. I have re-installed the .Net Framework (this was forced after re-installing Visual Studio). I have tried using Visual Studio 2003 which gives me this error:- An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in MapPointTest.exe Additional information: COM object with CLSID {15A40122-24D2-4FDB-8155-5F65FCE7017F} is either not valid or not registered I'm pretty much out of ideas. |
| |||
|
Hi, I'm pretty mutch also out of ideas. Can you try to register the component manually. I think it is with /RegServer command line argument.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tutorial mappoint in VB6.0 visual studio | lucci56 | MapPoint 2006/2009 Discussion | 1 | 07-14-2006 08:06 AM |
| Visual Studio | Anonymous | MapPoint 2006/2009 Discussion | 1 | 10-15-2004 07:57 PM |
| visual studio.netq | Anonymous | MapPoint 2006/2009 Discussion | 5 | 10-31-2003 11:59 AM |
| MapPoint 2002 ActiveX control and Visual Studio .NET 2003 | chulaka | MapPoint 2006/2009 Discussion | 1 | 09-30-2003 10:35 AM |
| Accessing Mappoint 2002 via Visual Studio .NET 2003 | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-14-2003 11:01 AM |
Ski Breaks
Book ski breaks to a range of great ski destinations online at Holiday Hypermarket. It is quick, easy and best of all, fantast value.
Cyprus Weather
Check out Cyprus Weather - Travel Counsellors details information on Cyprus including, weather, flights and accommodation.
Holidays to Jamaica
At dealchecker.co.uk, we'll shop around for cheap holidays to Jamaica so you don't have to. We search deals from the UK’s top holiday companies all in one go. Try it for free.
Cyprus Holidays
Cyprus holidays will offer you a wealth of activities all in the most beautiful surroundings. Relish the beauty of Cyprus on a short break.
Balearics
Before booking to the Balearics Islands make sure you check out our travel guide online. The Balearics are renowned for their vibrant nightlife but there are also some stunning Gothic cathedrals, Stone Age ruins and fishing villages.
Compare flight prices
Travel.co.uk makes it easy for you to compare flight prices from hundreds of UK based travel companies.
Holidays to Portugal
Want to take your family on a summer holiday? Visit On The Beach for more information on holidays to Portugal.