C# + COM question

S

Simon

Hi all,

I have developed a C# application that uses the Microsoft MapPoint 2006
(COM) control in one of my applications.

Unfortunately the application has stpped working on one of our clients
PCs and because the issue is related to COM I'm very much stuck on how
to troubleshoot it.

The issue is that when the application loads, the maps all appear, but
when I call a particular method on the MapPoint control, I get a COM
style error. The full message is below:

Unable to cast COM object of type "System.__ComObject' to interface type
'MapPoint.Location'. This operation failed because the QueryInterface
call on the COM component for the interface with IID
'{7AFBA6C4-6B6E-4124-B350-85EED3450023}' failed due to the following
error: No such interface supported

The problem is, I have no idea how to remedy the situation. I have tried
various things such as using regsvr32.exe to register the activeX
control however because I've never done anything with COM I don't fully
understand why what I'm doing hasn't worked.

Could anyone advise me on how to troubleshoot this issue? Can anyone
tell me why that interface wouldn't be resolving?

Many thanks to anyone who can help!

S
 
G

Geoffrey Summerhayes

Hi all,

I have developed a C# application that uses the Microsoft MapPoint 2006
(COM) control in one of my applications.

Unfortunately the application has stpped working on one of our clients
PCs and because the issue is related to COM I'm very much stuck on how
to troubleshoot it.

The issue is that when the application loads, the maps all appear, but
when I call a particular method on the MapPoint control, I get a COM
style error. The full message is below:

Unable to cast COM object of type "System.__ComObject' to interface type
'MapPoint.Location'. This operation failed because the QueryInterface
call on the COM component for the interface with IID
'{7AFBA6C4-6B6E-4124-B350-85EED3450023}' failed due to the following
error: No such interface supported

The problem is, I have no idea how to remedy the situation. I have tried
various things such as using regsvr32.exe to register the activeX
control however because I've never done anything with COM I don't fully
understand why what I'm doing hasn't worked.

Could anyone advise me on how to troubleshoot this issue? Can anyone
tell me why that interface wouldn't be resolving?

Many thanks to anyone who can help!

What method????
 
S

Simon

The method that causes the error is MapPoint.Map.GetLocation(Double lat,
Double long, Double Altitude)

This method tries to return a MapPoint.Location which is where the
failure occurs because I don't think it can find MapPoint.Location in
the registry.

I have no idea how to remedy this though - uninstalling and reinstalling
the software seems to have zero effect

:-(

Thanks

S
 
C

Chris Bordeman

Does the version of the COM object match the version of MapPoint you have
installed? Or maybe there are multiple versions registered and you're
selecting the wrong one? Just a guess, don't use MapPoint myself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top