LPCSTR is ANSI =>
See: StringToHGlobalAnsi (System::Runtime::InteropServices::Marshal)
http://msdn.microsoft.com/library/en-
us/cpref/html/frlrfsystemruntimeinteropservicesmarshalclassstringtohglobala
nsitopic.asp
But conversion to ANSI is bad... because String is UNICODE... so if it
contains some unicode characters this might be lost.
Better convert to unicde: StringToHGlobalUni
or use PtrToStringChars (which is faster; if you do not need to modify the
string)
See also:
HOW TO: Convert from System::String* to Char* in Visual C++ .NET
http://support.microsoft.com/?kbid=311259
--
Greetings
Jochen
Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp