Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: clown! Pin
TigerNinja_16-Jul-02 16:51
TigerNinja_16-Jul-02 16:51 
Generalthe copy cursor Pin
Steve L.16-Jul-02 13:45
Steve L.16-Jul-02 13:45 
GeneralRe: the copy cursor Pin
Shog916-Jul-02 14:04
sitebuilderShog916-Jul-02 14:04 
GeneralDialog DLL and Timers Pin
Wade H.16-Jul-02 12:34
Wade H.16-Jul-02 12:34 
GeneralRe: Dialog DLL and Timers Pin
[James Pullicino]17-Jul-02 4:59
[James Pullicino]17-Jul-02 4:59 
GeneralRe: Dialog DLL and Timers Pin
Wade H.17-Jul-02 6:32
Wade H.17-Jul-02 6:32 
GeneralError Damage after normal block 63 at .... Pin
Anonymous16-Jul-02 12:08
Anonymous16-Jul-02 12:08 
GeneralRe: Error Damage after normal block 63 at .... Pin
Joaquín M López Muñoz16-Jul-02 12:19
Joaquín M López Muñoz16-Jul-02 12:19 
I've noticed three errors:
// Fills the m_pFileData with the String
m_pFileData = (BYTE*) (LPCTSTR) m_strMessage.LockBuffer();
This does not copy the contents of m_strMessage into m_pFileData: instead, it simply makes m_pFileData point to those contents. I don't think your crash is due to this, but it's an error nevertheless.
m_pFileData = NULL;
You're having a memory leak here, as m_pFileData should be deleted with delete [] m_pFileData (once you've fixed the first error.) Again, your crash is probably not related to this.
for(UINT i = 0; i < m_nMsgLength; i += 16)
This is most likely what's causing the problem. You're handling the data as contiguous blocks of 16 bytes, but this won't be always the case: Consider for instance that m_nMsgLength is 20: then your code will overwrite 12 bytes past the end of m_pFileData. You should be adjusting the space allocated with m_pFileData to cope with this situation (and of course correct first the other errors.)

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Error Damage after normal block 63 at .... Pin
Shog916-Jul-02 12:25
sitebuilderShog916-Jul-02 12:25 
GeneralRe: Error Damage after normal block 63 at .... Pin
Anonymous16-Jul-02 12:49
Anonymous16-Jul-02 12:49 
GeneralDoBulkFieldExchange problem Pin
achandra00716-Jul-02 12:07
achandra00716-Jul-02 12:07 
GeneralOne column in list control Pin
ns16-Jul-02 11:46
ns16-Jul-02 11:46 
GeneralRe: I got it. Thanks anyways Pin
ns16-Jul-02 11:50
ns16-Jul-02 11:50 
GeneralRe: I got it. Thanks anyways Pin
kati4214-Nov-02 19:33
kati4214-Nov-02 19:33 
QuestionHow to read a file that is open by ... Pin
craigk16-Jul-02 11:25
craigk16-Jul-02 11:25 
GeneralDAO in VC++ not working. Pin
a3gupta16-Jul-02 11:15
a3gupta16-Jul-02 11:15 
GeneralRe: DAO in VC++ not working. Pin
Martin Ziacek16-Jul-02 19:36
Martin Ziacek16-Jul-02 19:36 
GeneralRe: DAO in VC++ not working. Pin
a3gupta16-Jul-02 20:36
a3gupta16-Jul-02 20:36 
GeneralRe: DAO in VC++ not working. Pin
Martin Ziacek16-Jul-02 22:33
Martin Ziacek16-Jul-02 22:33 
GeneralRe: DAO in VC++ not working. Pin
Schnemar16-Jul-02 22:35
Schnemar16-Jul-02 22:35 
GeneralModeless Dialog Pin
udayGovekar16-Jul-02 10:29
udayGovekar16-Jul-02 10:29 
GeneralRe: Modeless Dialog Pin
includeh1016-Jul-02 10:56
includeh1016-Jul-02 10:56 
GeneralRe: Modeless Dialog Pin
udayGovekar16-Jul-02 18:38
udayGovekar16-Jul-02 18:38 
Generaladding a new configuration Pin
NickOne16-Jul-02 10:27
NickOne16-Jul-02 10:27 
GeneralRe: adding a new configuration Pin
Joaquín M López Muñoz16-Jul-02 12:00
Joaquín M López Muñoz16-Jul-02 12:00 

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.