English 中文(简体)
C++/CLI需要制定哪些类型的项目?
原标题:What type of project needs to be created for C++/CLI?

我在C++/CLI中为我的本土C++方法写了一张画面,这些方法将暴露于C#。 现在我正在使用2008年视觉演播室。 任何人都能够告诉我,我需要创建哪一类项目,以便我的总结人能够接触到C#。 我在2008年视觉演播室看到,视像C++---->、CLR->下有不同类型的项目;

class library,
CLR Empty Project,
Windows form control library,
CLR Console Application,
Windows Forms Application,
Windows Service

我应该使用什么?

最佳回答

你们必须创建一类图书馆项目。 最重要的事情是,在项目房地产中,具体指明“共同语言功能支持”方案(称为“共同语言功能支持(/客户)”; 组合财产——和“一般”方案。

这将使你能够使用

#pragma managed
... use your native stuff here
#pragma unmanaged

pragmas and connection with the situ .lib file.

See thislink for subtle details

http://www.codeguru.com/cpp/cpp_admin/interop/article.php/c6867/Consuming-C-Class-Libraries- from-NET-Clients.htm>

拥有64个轨道建筑的渔获量(本条没有提及)。 “Linker->Input->force sign reference”必须定为64-bit的“DllMainCRTStartup”和32-bit的“_DllMainCRTStartup@12”。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签