Click here to Skip to main content
15,893,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Disallowing Ctrl-Alt-Del Pin
Maximilien4-Aug-05 9:16
Maximilien4-Aug-05 9:16 
GeneralRe: Disallowing Ctrl-Alt-Del Pin
Graham Bradshaw4-Aug-05 10:37
Graham Bradshaw4-Aug-05 10:37 
GeneralRe: Disallowing Ctrl-Alt-Del Pin
Tom Archer4-Aug-05 11:54
Tom Archer4-Aug-05 11:54 
GeneralRe: Disallowing Ctrl-Alt-Del Pin
Anonymous4-Aug-05 15:59
Anonymous4-Aug-05 15:59 
GeneralRe: Disallowing Ctrl-Alt-Del Pin
David Crow9-Aug-05 9:23
David Crow9-Aug-05 9:23 
GeneralConverting char* to unicode big-endian Pin
scchan19844-Aug-05 5:36
scchan19844-Aug-05 5:36 
GeneralRe: Converting char* to unicode big-endian Pin
GKarRacer4-Aug-05 6:26
GKarRacer4-Aug-05 6:26 
GeneralRe: Converting char* to unicode big-endian Pin
scchan19844-Aug-05 16:17
scchan19844-Aug-05 16:17 
Actually I want to convert the string pointed by a char* to big-endian encoding, nothing deal with TCP/IP.

Like the following managed C++ code but work in unmanaged C++:

#include "stdafx.h"

#using <mscorlib.dll>
using namespace System;
using namespace System::Text;

int main()
{
String* unicodeString = S"This string contains the unicode character Pi(中)";

// Create two different encodings.
Encoding * unicode = Encoding::Unicode;
Encoding * bigendian = Encoding::BigEndianUnicode;

// Convert the string into a Byte->Item[].
Byte unicodeBytes[] = unicode -> GetBytes(unicodeString);

// Perform the conversion from one encoding to the other.
Byte bigendianBytes[] = Encoding::Convert(unicode, bigendian, unicodeBytes);

// Convert the new Byte into[] a char and[] then into a string.
// This is a slightly different approach to converting to illustrate
// the use of GetCharCount/GetChars.
Char bigendianChars[] = new Char[bigendian ->GetCharCount(bigendianBytes, 0, bigendianBytes -> Length)];
bigendian -> GetChars(bigendianBytes, 0, bigendianBytes->Length, bigendianChars, 0);
String* bigendianString = new String(bigendianChars);

// Display the strings created before and after the conversion.
Console::WriteLine(S"Original String*: {0}", unicodeString);
Console::WriteLine(S"bigendian converted String*: {0}", bigendianString);
}
GeneralRe: Converting char* to unicode big-endian Pin
Jose Lamas Rios4-Aug-05 19:59
Jose Lamas Rios4-Aug-05 19:59 
GeneralRe: Converting char* to unicode big-endian Pin
scchan19844-Aug-05 20:41
scchan19844-Aug-05 20:41 
GeneralRe: Converting char* to unicode big-endian Pin
Jose Lamas Rios4-Aug-05 21:59
Jose Lamas Rios4-Aug-05 21:59 
GeneralRe: Converting char* to unicode big-endian Pin
scchan19844-Aug-05 22:37
scchan19844-Aug-05 22:37 
GeneralRe: Converting char* to unicode big-endian Pin
scchan19844-Aug-05 23:42
scchan19844-Aug-05 23:42 
GeneralRe: Converting char* to unicode big-endian Pin
Jose Lamas Rios5-Aug-05 6:19
Jose Lamas Rios5-Aug-05 6:19 
GeneralRe: Converting char* to unicode big-endian Pin
scchan19844-Aug-05 22:31
scchan19844-Aug-05 22:31 
GeneralRe: Converting char* to unicode big-endian Pin
Nemanja Trifunovic4-Aug-05 6:55
Nemanja Trifunovic4-Aug-05 6:55 
GeneralWinSpy for Java Applications Pin
Member 17897714-Aug-05 5:20
Member 17897714-Aug-05 5:20 
Generalftp Pin
Aditya Rao4-Aug-05 4:51
Aditya Rao4-Aug-05 4:51 
Generalquestion about DEBUG setting Pin
valerie994-Aug-05 4:07
valerie994-Aug-05 4:07 
GeneralRe: question about DEBUG setting Pin
toxcct4-Aug-05 5:11
toxcct4-Aug-05 5:11 
GeneralRe: question about DEBUG setting Pin
valerie994-Aug-05 5:26
valerie994-Aug-05 5:26 
GeneralRe: question about DEBUG setting Pin
toxcct4-Aug-05 5:28
toxcct4-Aug-05 5:28 
GeneralRe: question about DEBUG setting Pin
ThatsAlok5-Aug-05 1:42
ThatsAlok5-Aug-05 1:42 
GeneralProxy Server UDP, TCP Pin
Robert M Greene4-Aug-05 3:59
Robert M Greene4-Aug-05 3:59 
Questionhow to control windows shutdown? Pin
ThinkingPrometheus4-Aug-05 1:54
ThinkingPrometheus4-Aug-05 1:54 

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.