Referencing Both NA and Europe in .NET

Anonymous
03-04-2005, 09:09 PM
Anyone know how to reference and make calls to the COM libraries for both north america and europe?

You can't directly reference both in a vb.net project due to name conflicts, so I used tlbimp to create a .net dll wrapper for the north american version, and referenced that. In code it all looks good, but you try and run it, it fails saying object library or dependency not found.

Ideas?

Thanks,
Nick.

Anonymous
03-05-2005, 08:00 PM
Use the tlbimp utility but DONT rename your output dll (leave it as mpna82.dll, and leave it in the same path as mpna82.tlb) and reference that library.

Anonymous
03-09-2005, 09:19 AM
Nick,
I also need to reference both EUR and NA object models.

Can you give me a kinda step-by-step? First I need to know how to generate a .tlb file (I think).

Thanks in advance!
Ox

Anonymous
03-09-2005, 01:49 PM
I referenced the Europe version the regular way (by adding it in the references section of my project).

Then in the visual studio command prompt navigate to the path that contains mpna82.dll (I think program files\windows mappoint\mpna82.dll) and type "tlbimp mpna82.tlb /out:mpna82.dll" (without quotes). Reference the mpna82.dll in the references section of your project. Now you can make calls to the europe version from namespace MapPoint and call the NA version from namespace mpna82.

Hope this helps...Nick.

Anonymous
03-09-2005, 10:09 PM
WOrks great, Nick. You're a genius! Thanks for the quick reply too.
Ox

 
Web mp2kmag.com
mapforums.com