We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [c++-cli]

C++/CLI is based on C++, modified to allow compilation of a mixture of native code and code for Microsoft's Common Language Infrastructure (CLI). It replaces Microsoft's Managed Extensions for C++, which aimed for stronger C++ conformance.

Filter by
Sorted by
Tagged with
19
votes
3answers
8k views

scoped_ptr for C++/CLI (ensure managed object properly frees owned native object)

Motivating SO question: Is there a C++/CLI smart pointer project (e.g. scoped_ptr)? I'm interested in any reviewer comments, and especially identified bugs or inconsistencies with the native ...
2
votes
0answers
161 views

Wrapping C++ library in C++/CLI using shared_ptr

Background: I'm writing C++ code after a fairly long time, so I may not be up to date on the best practices, so please bear with me. I'm only trying to improve and learn. Problem I need to write a ...
5
votes
2answers
2k views

C++/CLI wrapper around a C library

I have a C library written by a third-party company. It calculates photo positions on a book page, position of a photo inside an area (which part of the photo to crop), it fills a book with random ...
3
votes
0answers
91 views

Calculate compilation time from AssemblyVersion attribute

In my program, I display the compilation time which is calculated from the AssemblyVersion attribute. The attribute is set to automatically generate a version ...
6
votes
1answer
5k views

Interop between C++ and C# via C++/CLI with callbacks

I want to use an existing C++ library in a C# app. The C++ library will have async callbacks for things like OnConnect and user updates so I want to reflect this in ...
2
votes
0answers
72 views

Pointers for C++/CLI library header formatting, layout and design

I have designed a C++/CLI wrapper library that allows C++ applications on windows, and other platforms that can load C dlls (e.g. Java via JNA or Python) to make calls to my .Net library. I was ...
4
votes
1answer
1k views

Implementation of a managed wrapper DLL

I'm not entirely sure on how to handle errors on this: Is returning a nullptr in case of bad parameters okay, or is it better to return a ...