Firstly, I’m some what new to C++/CLI.
After doing some research I’ve found that I can use Marshal::PtrToStringBSTR to convert an IntPtr to System::String. So, is there a way to convert my _bstr_t variable to an IntPtr so that I can pass it to the function mentioned and do conversion?
Or,
What is the correct way of converting a _bstr_t variable to System::String?
You should be able to use
marshal_asto get aSystem::String.Here’s the MSDN page for the different string types: http://msdn.microsoft.com/en-us/library/bb384865.aspx
Most important thing is to pay attention to the right #include depending on your string type.