Paulo RB

Tag: PtrToStringChars

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 Comment :, , more...

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

junho 2017
S T Q Q S S D
« mar    
 1234
567891011
12131415161718
19202122232425
2627282930