Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: module could not be found Pin
Sarath C1-Jun-06 2:04
Sarath C1-Jun-06 2:04 
AnswerRe: module could not be found Pin
NiceNaidu1-Jun-06 2:14
NiceNaidu1-Jun-06 2:14 
QuestionHow to copy string with NULL Pin
<color>Aljechin 1-Jun-06 1:03
<color>Aljechin 1-Jun-06 1:03 
AnswerRe: How to copy string with NULL Pin
Nibu babu thomas1-Jun-06 1:08
Nibu babu thomas1-Jun-06 1:08 
GeneralRe: How to copy string with NULL Pin
Cedric Moonen1-Jun-06 1:15
Cedric Moonen1-Jun-06 1:15 
GeneralRe: How to copy string with NULL Pin
Nibu babu thomas1-Jun-06 1:17
Nibu babu thomas1-Jun-06 1:17 
GeneralRe: How to copy string with NULL Pin
<color>Aljechin 1-Jun-06 1:43
<color>Aljechin 1-Jun-06 1:43 
GeneralRe: How to copy string with NULL Pin
Nibu babu thomas1-Jun-06 1:52
Nibu babu thomas1-Jun-06 1:52 
Aljechin wrote:
Hi, may i please request you to just try this code and comment on why memcpy is failing? Is it the way it goes or am I wrong somewhere? Can you suggest some workaround? Thanks for your time.


Sure! Please look up memcpy in MSDN. There is a working demo there.

See you were saying that szSource contains NULL characters right? So strlen won't work because it will return when it finds the first null character. Same with printf and other functions. They all return when the first NULL character is found. So if your string is...

"Nibu\0is a\0\0\0good\0boy\0".
strlen will return 4. printf will print only Nibu


Nibu thomas
A Developer

Programming tips[^]  My site[^]

GeneralRe: How to copy string with NULL Pin
<color>Aljechin 1-Jun-06 1:59
<color>Aljechin 1-Jun-06 1:59 
GeneralRe: How to copy string with NULL Pin
David Crow1-Jun-06 3:30
David Crow1-Jun-06 3:30 
GeneralRe: How to copy string with NULL Pin
<color>Aljechin 1-Jun-06 20:38
<color>Aljechin 1-Jun-06 20:38 
AnswerRe: How to copy string with NULL Pin
Nemanja Trifunovic1-Jun-06 1:35
Nemanja Trifunovic1-Jun-06 1:35 
GeneralRe: How to copy string with NULL Pin
<color>Aljechin 1-Jun-06 1:47
<color>Aljechin 1-Jun-06 1:47 
GeneralRe: How to copy string with NULL Pin
Cedric Moonen1-Jun-06 1:58
Cedric Moonen1-Jun-06 1:58 
GeneralRe: How to copy string with NULL Pin
<color>Aljechin 1-Jun-06 2:05
<color>Aljechin 1-Jun-06 2:05 
GeneralRe: How to copy string with NULL Pin
Cedric Moonen1-Jun-06 2:09
Cedric Moonen1-Jun-06 2:09 
GeneralRe: How to copy string with NULL Pin
<color>Aljechin 1-Jun-06 20:47
<color>Aljechin 1-Jun-06 20:47 
GeneralRe: How to copy string with NULL Pin
Nemanja Trifunovic1-Jun-06 2:26
Nemanja Trifunovic1-Jun-06 2:26 
GeneralRe: How to copy string with NULL Pin
<color>Aljechin 1-Jun-06 20:41
<color>Aljechin 1-Jun-06 20:41 
QuestionGet file size in mega bytes Pin
big_denny_2001-Jun-06 0:27
big_denny_2001-Jun-06 0:27 
AnswerRe: Get file size in mega bytes Pin
ThatsAlok1-Jun-06 0:32
ThatsAlok1-Jun-06 0:32 
AnswerRe: Get file size in mega bytes Pin
Hamid_RT1-Jun-06 1:15
Hamid_RT1-Jun-06 1:15 
GeneralRe: Get file size in mega bytes Pin
ThatsAlok1-Jun-06 1:54
ThatsAlok1-Jun-06 1:54 
GeneralRe: Get file size in mega bytes Pin
ThatsAlok1-Jun-06 1:55
ThatsAlok1-Jun-06 1:55 
GeneralRe: Get file size in mega bytes Pin
Hamid_RT1-Jun-06 2:12
Hamid_RT1-Jun-06 2:12 

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.