Here's my attempt at code that gets the raw wide characters from a CLR String into a std::wstring - I'll leave the conversion to ASCII to you - there are plenty of examples of how to do that part of it...
String^ ss = "hello";
array<wchar_t>^ chars = ss->ToCharArray();
pin_ptr<wchar_t> charPtr = &chars;
s = std::wstring(charPtr, charPtr+ss->Length);
By declaring it static, you've restricted the scope of that variable to the file where it is declared. You might want to look into the keyword extern (declare the variable globally without the static keyword and declare it as extern where you are trying to use it)
It is a crappy thing, but it's life -^Carlo Pallini