Click here to Skip to main content
15,914,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
Llasus4-Nov-07 15:06
Llasus4-Nov-07 15:06 
GeneralRe: HOW TO get length of BYTE variable in C++ Pin
Ontanggabe Parulian4-Nov-07 15:55
Ontanggabe Parulian4-Nov-07 15:55 
GeneralRe: HOW TO get length of BYTE variable in C++ Pin
Llasus4-Nov-07 16:59
Llasus4-Nov-07 16:59 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
Chris Losinger4-Nov-07 15:49
professionalChris Losinger4-Nov-07 15:49 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
Ontanggabe Parulian4-Nov-07 22:30
Ontanggabe Parulian4-Nov-07 22:30 
QuestionRe: HOW TO get length of BYTE variable in C++ Pin
David Crow4-Nov-07 16:15
David Crow4-Nov-07 16:15 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
James R. Twine5-Nov-07 1:41
James R. Twine5-Nov-07 1:41 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
kcynic4-Nov-07 16:47
kcynic4-Nov-07 16:47 
In fact,at C/C++ RUNTIME,when you new or malloc a block memory,the system really allocate 4 bytes more than the count you want(you can find at the memory window of VC):0xFD,0xFD,0xFD,0xFD.
When you delete or free the pointer,the system will check the end of pointer you want to free,if they are not 0xFD,0xFD,0xFD,0xFD,system will indicate that block was ruined and an assert would occur!

So,you also can do your work by find the end 4 special bytes.
But you have to make sure that the block's real data does not include a four-byte sequence:0xFD,0xFD,0xFD,0xFD,if so,the result would not believable.
Make the code work well is your own job.
I am sorry,my english is poor.Have a good day!
GeneralRe: HOW TO get length of BYTE variable in C++ Pin
James R. Twine5-Nov-07 1:41
James R. Twine5-Nov-07 1:41 
GeneralRe: HOW TO get length of BYTE variable in C++ Pin
kcynic5-Nov-07 14:06
kcynic5-Nov-07 14:06 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
cmk4-Nov-07 18:28
cmk4-Nov-07 18:28 
QuestionSocket ptogramming Pin
Amjath Rahman4-Nov-07 14:34
Amjath Rahman4-Nov-07 14:34 
AnswerRe: Socket ptogramming Pin
Llasus4-Nov-07 14:41
Llasus4-Nov-07 14:41 
GeneralRe: Socket ptogramming Pin
Amjath Rahman4-Nov-07 15:38
Amjath Rahman4-Nov-07 15:38 
GeneralRe: Socket ptogramming Pin
Llasus4-Nov-07 15:53
Llasus4-Nov-07 15:53 
GeneralRe: Socket ptogramming Pin
Amjath Rahman4-Nov-07 16:01
Amjath Rahman4-Nov-07 16:01 
QuestionRe: Socket ptogramming Pin
David Crow4-Nov-07 16:19
David Crow4-Nov-07 16:19 
GeneralRe: Socket ptogramming Pin
Llasus4-Nov-07 16:48
Llasus4-Nov-07 16:48 
QuestionA question about exit codes Pin
Llasus4-Nov-07 14:08
Llasus4-Nov-07 14:08 
QuestionFtpPutFile problem Pin
dellthinker4-Nov-07 10:16
dellthinker4-Nov-07 10:16 
AnswerRe: FtpPutFile problem Pin
Peter Weyzen4-Nov-07 13:13
Peter Weyzen4-Nov-07 13:13 
QuestionRe: FtpPutFile problem Pin
David Crow4-Nov-07 16:20
David Crow4-Nov-07 16:20 
AnswerRe: FtpPutFile problem Pin
dellthinker4-Nov-07 17:48
dellthinker4-Nov-07 17:48 
GeneralRe: FtpPutFile problem Pin
vijay_aroli5-Nov-07 0:29
vijay_aroli5-Nov-07 0:29 
GeneralRe: FtpPutFile problem Pin
dellthinker5-Nov-07 3:07
dellthinker5-Nov-07 3: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.