found the answer on this forum:

http://www.xtremedotnettalk.com/showthread.php?t=71907

This is easy to figure out but you can also combine the 2 lines:

String * fname = “Whatever String”;

char* ufname = ( char * ) ( void * ) Marshal::StringToHGlobalAnsi(fname);
// do your stuff with ufname here
Marshal::FreeHGlobal((int)ufname);

This is a very nice article, I found on for CString management. In fact it is an in depth , one place explanation for various unanswered String questions that you must have encountered in C++.

http://www.flounder.com/cstring.htm

1) http://support.microsoft.com/default.aspx?scid=kb;EN-US;311259

2) http://www.codeguru.com/forum/archive/index.php/t-372096.html

2) http://www.codeguru.com/Cpp/Cpp/cpp_managed/moving/article.php/c8031/

Found a nice link for people who want to use dll written in oldĀ C++ (.NET) (unmanaged)

http://www.brainbell.com/tutors/C_Sharp/Interoperating_with_Unmanaged_Code.htm