Click here to Skip to main content
16,011,949 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: "non-unicode programs" problem Pin
Luc Pattyn16-Dec-07 4:53
sitebuilderLuc Pattyn16-Dec-07 4:53 
QuestionBit Copying Pin
Jeffrey Walton15-Dec-07 15:21
Jeffrey Walton15-Dec-07 15:21 
GeneralRe: Bit Copying Pin
Christian Graus15-Dec-07 15:47
protectorChristian Graus15-Dec-07 15:47 
GeneralRe: Bit Copying Pin
Jeffrey Walton15-Dec-07 15:51
Jeffrey Walton15-Dec-07 15:51 
GeneralRe: Bit Copying Pin
Jeffrey Walton16-Dec-07 7:32
Jeffrey Walton16-Dec-07 7:32 
GeneralRe: Bit Copying [modified] Pin
Luc Pattyn15-Dec-07 16:18
sitebuilderLuc Pattyn15-Dec-07 16:18 
GeneralRe: Bit Copying Pin
Jeffrey Walton16-Dec-07 1:59
Jeffrey Walton16-Dec-07 1:59 
GeneralRe: Bit Copying Pin
Luc Pattyn16-Dec-07 4:26
sitebuilderLuc Pattyn16-Dec-07 4:26 
Hi Jeff,

memcpy (or code that you would write yourself using two byte pointers that autoincrement)
just moves bytes, one after the other; it does not swap bytes, it does not understand or care
about the meaning of those bytes. It is just a physical operation on memory, as it name implies.
And all is fine as long as the two pointers have the same type.

But then the semantics of your data may kick in:
Multibyte integers need a byte order convention, that is what big and little endianness is about.
If you memcpy using two pointers of different types, you may get a surprise, since now the
first byte of a byte array is the one with index 0, whereas the first byte of an integer may be
the most significant (BE) or the least significant (LE) byte of that integer. And the same holds
true for floats.

So if you suspect memcpy of swapping bytes, you are basically saying that you are:
- mixing pointer types
- running on a little-endian processor
- but in favor of big-endian

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles]


Sorry for any delays in replying, I currently don't always get e-mail notifications.


GeneralUser Controls Pin
mikobi15-Dec-07 0:09
mikobi15-Dec-07 0:09 
GeneralRe: User Controls Pin
Christian Graus15-Dec-07 0:24
protectorChristian Graus15-Dec-07 0:24 
Question[Message Deleted] Pin
(Steven Hicks)n+114-Dec-07 12:39
(Steven Hicks)n+114-Dec-07 12:39 
GeneralRe: Question about redeclaring header files Pin
Christian Graus14-Dec-07 14:48
protectorChristian Graus14-Dec-07 14:48 
QuestionRe: [Message Deleted] Pin
Hamid_RT20-Dec-07 2:23
Hamid_RT20-Dec-07 2:23 
QuestionClass intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 9:42
Dewm Solo14-Dec-07 9:42 
GeneralRe: Class intantiation renders app unresponsive [modified] Pin
Luc Pattyn14-Dec-07 10:24
sitebuilderLuc Pattyn14-Dec-07 10:24 
GeneralRe: Class intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 10:36
Dewm Solo14-Dec-07 10:36 
GeneralRe: Class intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 10:50
Dewm Solo14-Dec-07 10:50 
GeneralRe: Class intantiation renders app unresponsive Pin
Luc Pattyn14-Dec-07 11:14
sitebuilderLuc Pattyn14-Dec-07 11:14 
GeneralRe: Class intantiation renders app unresponsive Pin
Dewm Solo14-Dec-07 11:20
Dewm Solo14-Dec-07 11:20 
GeneralRe: Class intantiation renders app unresponsive Pin
Luc Pattyn14-Dec-07 11:34
sitebuilderLuc Pattyn14-Dec-07 11:34 
GeneralRe: Class intantiation renders app unresponsive Pin
Mark Salsbery14-Dec-07 11:41
Mark Salsbery14-Dec-07 11:41 
GeneralRe: Class intantiation renders app unresponsive Pin
Luc Pattyn14-Dec-07 12:05
sitebuilderLuc Pattyn14-Dec-07 12:05 
GeneralRe: Class intantiation renders app unresponsive Pin
Mark Salsbery14-Dec-07 12:10
Mark Salsbery14-Dec-07 12:10 
GeneralRe: Class intantiation renders app unresponsive Pin
Luc Pattyn14-Dec-07 12:26
sitebuilderLuc Pattyn14-Dec-07 12:26 
GeneralRe: Class intantiation renders app unresponsive Pin
Mark Salsbery14-Dec-07 11:45
Mark Salsbery14-Dec-07 11:45 

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.