Hey Jayant
This is a copy of the reply I sent to the MapInfo-L
In the IntegratedMappingWpf example that comes with MapBasic v2023, I can see the MapInfo Pro is initiated using this statement:
// Initialize the IMapInfoApplication interface.
Application = MapInfoCore.Initialize(this, this);
if (Application == null)
{
return;
}
We do supply four samples with MapBasic.
Can you check them out and see if this approach works for you?
I can't tell from your screenshot if this is calling a constructor of your own.
_MIApp = new MapInfoApplication()
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------
Original Message:
Sent: 01-07-2025 02:30
From: Jayant Grover
Subject: Problem Statement: Issues with Creating a MapInfo Instance in .Net Application (MapInfo 2023)
I am currently working on a MapInfo-based application using .NET and Visual Studio 2017. The application is developed with C#.NET Framework 4.7.2 on a Windows 10 system. The goal is to interact with MapInfo Professional to perform specific tasks. However, I am encountering challenges while creating the MapInfo instance in the 2023 version.
The same code or approach worked fine in earlier versions, but in this version, the MapInfo instance is not initializing as expected.
Here are the details of the problem:
Environment:
- MapInfo Professional 2023
- Visual Studio 2017
- C#.NET Framework 4.7.2
- Windows 10
Issue: When attempting to create the MapInfo instance, the initialization process fails. The instance is not created, and the application cannot proceed further. No specific error messages are displayed.
Expected Outcome: The MapInfo instance should initialize correctly, enabling interaction as intended.
Troubleshooting Attempts: I have tried using various DLLs provided with MapInfo Professional 2023 to address potential compatibility or functionality issues, but the problem persists.
Has anyone else experienced similar issues with the 2023 version? Are there any changes in the DLLs, or initialization process specific to this version? Could the issue be related to the .NET framework version or Visual Studio compatibility? Any guidance or suggestions would be greatly appreciated.
------------------------------
Jayant Grover
Knowledge Community Shared Account
Burlington MA
------------------------------