It wont work becuase Marshal.LPxxxx does not convert to basic_string, but
only gets you a pointer to the raw string charcters in memory.
You can try using a wrapper around your function which takes LPTSTR, this
way you can use Marshal.LPxxxx
---------
- G Himangi, LogicNP Software
http://www.ssware.com
Shell MegaPack: GUI Controls For Drop-In Windows Explorer like File/Folder
Browsing Functionality (.Net & ActiveX Editions).
EZNamespaceExtensions: Develop namespace extensions rapidly in .Net and
MFC/ATL/C++
EZShellExtensions: Develop all shell extensions,explorer bars and BHOs
rapidly in .Net & MFC/ATL/C++
---------
"Neomite" <Ne*****@discussions.microsoft.comwrote in message
news:0B**********************************@microsof t.com...
Hi, I'm having some difficulty converting a String to a std::basic_string
(c++).
I've tried using StringBuilder and Marshal.LPxxxx , no luck.
I consistently get AccessViolation errors.
I've been reading all day but I can't seem to find the same problem posted
anywhere.
bool NNSMCAPI::Client::initialize(class std::basic_string<unsigned
short,struct std::char_traits<unsigned short>,class
std::allocator<unsigned
short const &)
Can anyone help me with this issue?
thanks!