Select to view content in your preferred language

Calling managed code from unmanged C++. ArcGIS Pro CoreHost SDK.

313
1
4 weeks ago
BillSmith
Regular Contributor

Hello,  This question would be targeted to one of the devs on Pro SDK.  Here is a quick background.

We have a large C++ geospatial application that integrates with geodatabase access.  We used to call ArcObjects directly in our DB library code to manipulate geodatabases.  We went 64 bit, ArcMap didn't, so I made an a separate 32bit application that took on the responsibilities of accessing the geodatabase and talked to it from our app via IPC..  Pro came out as 64 bit, we needed to support both users of ArcMap and Pro, so we made a decision to access via the same method and wrote a 64 bit C# app to access geodatabases and communicate via IPC the same as the 32 bit ArcObject standalone app. Now ArcMap goes bye bye. To increase performance I am investigating bringing it back in process of our large geospatial application and get rid of both standalone app.

Sure I can wrap the C# calls I need  in C++, either by CLI, marshalling, or dog forbid, even COM.  I know when I've been debugging code I've seen symbols down deep that look very familiar to ArcObject interfaces.  I'm pretty sure you guys didn't re-write the entire geodatabase access in .NET, or maybe you did and this question is moot.  If at the core of the SDK there still lies ArcObject code, how hard would it be to expose that for direct C++ API access?  I'm sure all of the new functionality is written in C#, but we don't need a lot of the fancy stuff.  Just basic read/write.  Any thoughts?

I realize this is a shot in the dark and don't expect much from this post, but maybe, just maybe, I can glean something from responses that will assist me in this arduous task.

Cheers,

-Mr. Bill

Tags (3)
0 Kudos
1 Reply
seenohearnospeaknoevil
Emerging Contributor

I am kind of wondering if anyone there has played with AOT compilation to usable native C++ code?  https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?tabs=windows%2Cnet8#aot-compatib...

Thx, -Mr. Bill

0 Kudos