Click here to Skip to main content
15,894,410 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: C++/CLI Array problem Pin
Bo Hunter5-Aug-04 12:40
Bo Hunter5-Aug-04 12:40 
GeneralReparing Access database Pin
Member 69261831-Jul-04 20:46
Member 69261831-Jul-04 20:46 
GeneralRe: Reparing Access database Pin
palbano2-Aug-04 6:28
palbano2-Aug-04 6:28 
GeneralC++ vs Managed Pin
---Mark---30-Jul-04 10:39
---Mark---30-Jul-04 10:39 
GeneralRe: C++ vs Managed Pin
palbano31-Jul-04 19:02
palbano31-Jul-04 19:02 
Generalassign mfc handle to dotnet form Pin
luke0530-Jul-04 1:36
luke0530-Jul-04 1:36 
GeneralUpdating multiple treeviews Pin
Sam Barham29-Jul-04 13:45
Sam Barham29-Jul-04 13:45 
GeneralConverting a managed .NET System::String to an unmanaged, UTF-8 encoded, null-terminated char array Pin
jerrycainjr29-Jul-04 8:30
jerrycainjr29-Jul-04 8:30 
I more or less want to write a method that accepts a .NET string (encoded more or less in UTF-16, as I understand it) to a UTF-8 encoded string. The prototype for this method might be something like this:

Convert(String *unicodeText, char buffer[], int buflen):

The intent it to populate the buffer with a null-terminated UTF-8 encoded string logically equalivalent to the .NET string passed in as the first argument. Of course, the buflen is there to prevent overflow, although in practice it will never impose any real limitations.

I've explored the Encoder and Encoding classes offered, but as far as I can tell, they only get me to a managed array of System::Chars or System::Bytes. Perhaps I can cast a System::Byte to a (char *) or a char. Can I use Marshal::StringToXXXX to convert it to ASCII and or Unicode and then use some other functions?

Any help? I'd be extremely grateful.

Jerry
jerry@cs.stanford.edu
GeneralRe: Converting a managed .NET System::String to an unmanaged, UTF-8 encoded, null-terminated char array Pin
palbano29-Jul-04 11:00
palbano29-Jul-04 11:00 
GeneralRe: Converting a managed .NET System::String to an unmanaged, UTF-8 encoded, null-terminated char array Pin
jerrycainjr30-Jul-04 10:07
jerrycainjr30-Jul-04 10:07 
GeneralQuestion about DLL imports - Fast Pin
Stanimir_Stoyanov24-Jul-04 20:20
Stanimir_Stoyanov24-Jul-04 20:20 
GeneralCOM Interop Question Pin
ursus zeta23-Jul-04 12:26
ursus zeta23-Jul-04 12:26 
GeneralFurther Adventures Pin
ursus zeta4-Aug-04 10:37
ursus zeta4-Aug-04 10:37 
GeneralPossible Memory Leak issues Pin
Anonymous23-Jul-04 5:19
Anonymous23-Jul-04 5:19 
GeneralFast question Pin
Oriocat22-Jul-04 10:50
Oriocat22-Jul-04 10:50 
GeneralRe: Fast question Pin
Daniel Turini22-Jul-04 10:57
Daniel Turini22-Jul-04 10:57 
Generalneed doctor to check this pice of code Pin
Oriocat22-Jul-04 9:58
Oriocat22-Jul-04 9:58 
GeneralProblem... Pin
Pazzuzu22-Jul-04 5:13
Pazzuzu22-Jul-04 5:13 
GeneralRe: Problem... Pin
palbano25-Jul-04 18:05
palbano25-Jul-04 18:05 
GeneralConverting ... Pin
User 91483322-Jul-04 3:59
User 91483322-Jul-04 3:59 
GeneralRe: Converting ... Pin
palbano25-Jul-04 18:04
palbano25-Jul-04 18:04 
GeneralWebService without ASP and IIS Pin
MyPaq22-Jul-04 2:08
MyPaq22-Jul-04 2:08 
GeneralGoing mad with this Pin
Pazzuzu21-Jul-04 6:11
Pazzuzu21-Jul-04 6:11 
GeneralRe: Going mad with this Pin
palbano21-Jul-04 17:28
palbano21-Jul-04 17:28 
GeneralRe: Going mad with this Pin
Pazzuzu22-Jul-04 0:07
Pazzuzu22-Jul-04 0:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.