Click here to Skip to main content
15,907,001 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Marshal::Copy fails when trying to copy from a char* to a System::Char[] Pin
Cyrilix25-Sep-08 12:27
Cyrilix25-Sep-08 12:27 
GeneralRe: Marshal::Copy fails when trying to copy from a char* to a System::Char[] Pin
Mark Salsbery25-Sep-08 13:00
Mark Salsbery25-Sep-08 13:00 
QuestionGames and C++/CLI Pin
Cyon11125-Sep-08 0:50
Cyon11125-Sep-08 0:50 
GeneralRe: Games and C++/CLI Pin
George L. Jackson25-Sep-08 4:07
George L. Jackson25-Sep-08 4:07 
Questionarray initilization Pin
staticv24-Sep-08 23:27
staticv24-Sep-08 23:27 
AnswerRe: array initilization Pin
George L. Jackson25-Sep-08 4:00
George L. Jackson25-Sep-08 4:00 
QuestionAttach DLL to Program Pin
DemonPT24-Sep-08 14:03
DemonPT24-Sep-08 14:03 
QuestionUnmanaged string to managed string Pin
N a v a n e e t h23-Sep-08 17:08
N a v a n e e t h23-Sep-08 17:08 
class MyNative{
public:
	std::string GetANativeString(){
		return "Some text";
	}
};
Above class returns a std::string to the caller. I need to convert the returned string to a managed string(String^). I have done it, but want to make sure this is the correct method. Here it goes,
MyNative native;
String^ str = gcnew String(native.GetANativeString().c_str());
Console::WriteLine(str);
System::String has an overloaded constructor which accepts a char*. Is this the correct approach or should I change GetANativeString() method to return a char* ?

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

AnswerRe: Unmanaged string to managed string Pin
George L. Jackson23-Sep-08 17:33
George L. Jackson23-Sep-08 17:33 
Question.net runtime eror Pin
balu1234522-Sep-08 9:18
balu1234522-Sep-08 9:18 
AnswerCross Post Pin
led mike23-Sep-08 4:45
led mike23-Sep-08 4:45 
QuestionCalling Windows.Form from MFC with /cli [modified] Pin
ToSchi9819-Sep-08 1:43
ToSchi9819-Sep-08 1:43 
AnswerRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery19-Sep-08 6:58
Mark Salsbery19-Sep-08 6:58 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
ToSchi9819-Sep-08 8:58
ToSchi9819-Sep-08 8:58 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery19-Sep-08 10:44
Mark Salsbery19-Sep-08 10:44 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
ToSchi9822-Sep-08 3:18
ToSchi9822-Sep-08 3:18 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery22-Sep-08 4:50
Mark Salsbery22-Sep-08 4:50 
GeneralRe: Calling Windows.Form from MFC with /cli [modified] Pin
ToSchi9824-Sep-08 3:27
ToSchi9824-Sep-08 3:27 
QuestionRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery24-Sep-08 5:55
Mark Salsbery24-Sep-08 5:55 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
Mark Salsbery24-Sep-08 6:21
Mark Salsbery24-Sep-08 6:21 
GeneralRe: Calling Windows.Form from MFC with /cli Pin
ToSchi9824-Sep-08 20:56
ToSchi9824-Sep-08 20:56 
QuestionHow to create C# Control for any language Pin
Andy Rama17-Sep-08 23:16
Andy Rama17-Sep-08 23:16 
AnswerRe: How to create C# Control for any language Pin
Mark Salsbery18-Sep-08 4:14
Mark Salsbery18-Sep-08 4:14 
GeneralRe: How to create C# Control for any language Pin
Andy Rama18-Sep-08 21:18
Andy Rama18-Sep-08 21:18 
GeneralRe: How to create C# Control for any language Pin
Mark Salsbery19-Sep-08 5:41
Mark Salsbery19-Sep-08 5:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.