Paulo RB

Convertendo String managed e unmanaged

by paulorb on jan.31, 2012, under C++/CLI

Dica rápida:

* Convertendo de  unmanaged pra managed


TCHAR pszNome[50] = _T("Teste");

String^ uriString = gcnew String(pszNome);

* Convertendo de  managed pra unmanaged


String^ uriString =gcnew String("teste");

pin_ptr<const wchar_t> wname = PtrToStringChars(uriString);

tprintf(_T("%s"),wname);
:, ,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Calendário

outubro 2017
S T Q Q S S D
« mar    
 1
2345678
9101112131415
16171819202122
23242526272829
3031