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

C / C++ / MFC

 
Generalclown! Pin
Nish Nishant16-Jul-02 15:22
sitebuilderNish Nishant16-Jul-02 15:22 
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 
Hello,
I am getting this error in my program in debug mode..

Damage: after Normal block (#63) at 0x011E1A20

It happens after I try the following code.


void CEncryptDlg::EncryptMsg()
{
UpdateData(TRUE);

KeyGen((DWORD)m_iKey);

DWORD* pdwTemp;

// Gets the length of the msg for the loop
m_nMsgLength = (UINT) m_strMessage.GetLength();

m_pFileData = new BYTE[m_nMsgLength];

// Fills the m_pFileData with the String
m_pFileData = (BYTE*) (LPCTSTR) m_strMessage.LockBuffer();

for(UINT i = 0; i < m_nMsgLength; i += 16)
{
pdwTemp = (DWORD*)&m_pFileData[i];

pdwTemp[0] = (pdwTemp[0] - m_dwS[2 * R + 2]);
pdwTemp[2] = (pdwTemp[2] - m_dwS[2 * R + 3]);

for(int j = R; j >= 1; j--)
{
DWORD temp = pdwTemp[3];
pdwTemp[3] = pdwTemp[2];
pdwTemp[2] = pdwTemp[1];
pdwTemp[1] = pdwTemp[0];
pdwTemp[0] = temp;

DWORD t = LeftRotate((pdwTemp[1] * (2 * pdwTemp[1] + 1)),
OffsetAmount((DWORD)(log((double)W)/log(2.0))));
DWORD u = LeftRotate((pdwTemp[3] * (2 * pdwTemp[3] + 1)),
OffsetAmount((DWORD)(log((double)W)/log(2.0))));
pdwTemp[0] = (RightRotate((pdwTemp[0] - m_dwS[2 * j]), OffsetAmount(u))) ^ t;
pdwTemp[2] = (RightRotate((pdwTemp[2] - m_dwS[2 * j + 1]), OffsetAmount(t))) ^ u;
}

pdwTemp[1] = (pdwTemp[1] - m_dwS[0]);
pdwTemp[3] = (pdwTemp[3] - m_dwS[1]);
}

m_strMessage.UnlockBuffer();

// Displays the String after being encrypted
m_strMessage = (LPCTSTR) m_pFileData;

m_pFileData = NULL;
m_nMsgLength = 0;
pdwTemp = NULL;

UpdateData(FALSE);
}
Any ideas? 

Thanks!!

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 
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 

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.