PDA

View Full Version : Determining path of Add-in



Anonymous
01-26-2005, 04:22 AM
Using the .net deployment of a COM add-in for MapPoint. How do you determine the directory where the user installed the add-in? For instance, if I want to look for files in that directory, I have no idea where to look.

Thanks,
Craig

maelstrom
01-26-2005, 05:10 PM
I don't see an easy way through MapPoint.AddIns, there's no file/path information other than the MapPoint.exe path.

Looks like your best bet might be WinAPI GetModuleFileName, that can be used to return the path of your DLL as it is loaded in MapPoint. If you're in VB then App.Path should work about the same, I'm not really sure.

See MSDN for GetModuleFileName info:
http://msdn.microsoft.com/library/en-us/dllproc/base/getmodulefilename.asp