all groups > dotnet interop > august 2005 >
You're in the

dotnet interop

group:

How to convert char* to Byte[] in Managed C++



How to convert char* to Byte[] in Managed C++ aca02djr NO[at]SPAM sheffield.ac.uk
8/31/2005 5:02:34 PM
dotnet interop: I have a managed C++ function which returns a managed byte array - and
i need the contents of said array to be the same as the contents of a
char* array (which represents image data). How can I convert this
unmanaged char* to a managed Byte[]?
RE: How to convert char* to Byte[] in Managed C++ udayt NO[at]SPAM microsoft.com
9/19/2005 5:45:42 AM

In C# you have something like..

byte[] blob = System.Text.Encoding.UTF8.GetBytes(char [],....);

You may find eqvailent for managed C++.

Thanks,
Uday Takbhate [MSFT]
Microsoft Developer Support
--------------------
[quoted text, click to view]
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onli
ne.de!news.glorb.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-fo
r-mail
[quoted text, click to view]
AddThis Social Bookmark Button