1

Please sorry for my bad english :(

Here is the situation:

I have a .Net DLL written on C#, witch contains windows form.

MapInfo calls function from this DLL witch opens form.

Is there any way to get instance of MapInfo, that called this function? (Not just first opened instance, because i can have multiple opened)

  • Have you taken a look at integrated mapping? – kinkajou May 3 '12 at 8:01
1

You can use the MapInfo 11.0 OLE Automation Type Library, and doing this:

public Class test 
{
    public static void MethodCalledFromMapInfo()
    {
        MapInfoApplication _MapInfoApplication = (MapInfo.MapInfoApplication)System.Runtime.InteropServices.Marshal.GetActiveObject("Mapinfo.application");
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.