Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Converting ANSI to UNICODE Pin
Souldrift4-Aug-09 22:38
Souldrift4-Aug-09 22:38 
GeneralRe: Converting ANSI to UNICODE Pin
bhanu_reddy094-Aug-09 22:42
bhanu_reddy094-Aug-09 22:42 
GeneralRe: Converting ANSI to UNICODE Pin
Souldrift4-Aug-09 23:28
Souldrift4-Aug-09 23:28 
GeneralRe: Converting ANSI to UNICODE Pin
bhanu_85095-Aug-09 2:50
bhanu_85095-Aug-09 2:50 
Question_MailItemPtr Pin
john56324-Aug-09 21:15
john56324-Aug-09 21:15 
AnswerRe: _MailItemPtr Pin
Souldrift4-Aug-09 23:57
Souldrift4-Aug-09 23:57 
Questionmemcpy and buffer concatenation Pin
Madhu_Rani4-Aug-09 21:10
Madhu_Rani4-Aug-09 21:10 
AnswerRe: memcpy and buffer concatenation Pin
CPallini4-Aug-09 21:20
mveCPallini4-Aug-09 21:20 
for instance:

char buf[100];
const char * str1 = "Hello";
const char * str2 = "Hi";
char * ptr = buf;
unsigned int len;

len = strlen(str1);
memcpy(ptr, str1, len);
ptr += len;
len = strlen(str2);
memcpy(ptr, str2, len);
ptr += len;

// The two lines below just to have a NULL terminated string
*ptr = '\0'; 
ptr++;


In a real world case, you probably want to allocate dynamically the memory buffer (and increase its size whenever it is needed).
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: memcpy and buffer concatenation Pin
Madhu_Rani4-Aug-09 21:39
Madhu_Rani4-Aug-09 21:39 
GeneralRe: memcpy and buffer concatenation Pin
CPallini4-Aug-09 21:54
mveCPallini4-Aug-09 21:54 
AnswerRe: memcpy and buffer concatenation Pin
«_Superman_»4-Aug-09 21:22
professional«_Superman_»4-Aug-09 21:22 
GeneralRe: memcpy and buffer concatenation Pin
Madhu_Rani4-Aug-09 21:33
Madhu_Rani4-Aug-09 21:33 
AnswerRe: memcpy and buffer concatenation Pin
Rajesh R Subramanian5-Aug-09 1:17
professionalRajesh R Subramanian5-Aug-09 1:17 
Questionavi cap wrapper frame grabber Pin
vvlnkishore4-Aug-09 20:47
vvlnkishore4-Aug-09 20:47 
AnswerRe: avi cap wrapper frame grabber Pin
Randor 5-Aug-09 16:01
professional Randor 5-Aug-09 16:01 
GeneralRe: avi cap wrapper frame grabber Pin
vvlnkishore5-Aug-09 23:08
vvlnkishore5-Aug-09 23:08 
QuestionHello question about hooking function by using irregualar jumps like ret/push Pin
nah13374-Aug-09 20:29
nah13374-Aug-09 20:29 
QuestionCObject.. Pin
p_19604-Aug-09 20:11
p_19604-Aug-09 20:11 
AnswerRe: CObject.. Pin
CPallini4-Aug-09 21:00
mveCPallini4-Aug-09 21:00 
QuestionOutlook Pin
john56324-Aug-09 20:04
john56324-Aug-09 20:04 
QuestionWriteAllBytes..... Pin
lsh486love4-Aug-09 19:39
lsh486love4-Aug-09 19:39 
AnswerRe: WriteAllBytes..... Pin
«_Superman_»4-Aug-09 19:51
professional«_Superman_»4-Aug-09 19:51 
AnswerRe: WriteAllBytes..... Pin
_AnsHUMAN_ 4-Aug-09 19:53
_AnsHUMAN_ 4-Aug-09 19:53 
QuestionDLL Pin
p_19604-Aug-09 19:07
p_19604-Aug-09 19:07 
AnswerRe: DLL Pin
_AnsHUMAN_ 4-Aug-09 19:26
_AnsHUMAN_ 4-Aug-09 19:26 

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.