简体   繁体   English

在c ++中使用std :: string作为非托管c#dll

[英]Using std::string in c++ for unmanaged c# dll

I'm trying to set up an unmanaged DLL package for c# for a c++ SDK that a client has provided. 我正在尝试为客户端提供的c ++ SDK设置c#的非托管DLL包。 This SDK uses std::string and std::wstring variables. 此SDK使用std :: string和std :: wstring变量。 I found out that it's hard/impossible to use STL variables like string and wstring for this but it's kind of my last resort. 我发现很难/不可能使用像字符串和wstring这样的STL变量,但这是我的最后一招。 I'm really hoping for someone that could tell me a possible way of building ac# dll wrapper for c++ methods that use std::string & std::wstring. 我真的希望有人可以告诉我为使用std :: string&std :: wstring的c ++方法构建ac#dll包装器的可能方法。

您是否尝试过将std::string转换为System::String^MSDN文档中所述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM