Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionConverting unsigned short int to its hex representation Pin
yeah10003-Nov-09 1:58
yeah10003-Nov-09 1:58 
AnswerRe: Converting unsigned short int to its hex representation Pin
Richard MacCutchan3-Nov-09 2:06
mveRichard MacCutchan3-Nov-09 2:06 
AnswerRe: Converting unsigned short int to its hex representation [fixed: thanks to David] Pin
CPallini3-Nov-09 2:30
mveCPallini3-Nov-09 2:30 
QuestionRe: Converting unsigned short int to its hex representation Pin
David Crow3-Nov-09 3:16
David Crow3-Nov-09 3:16 
AnswerRe: Converting unsigned short int to its hex representation Pin
CPallini3-Nov-09 3:29
mveCPallini3-Nov-09 3:29 
AnswerRe: Converting unsigned short int to its hex representation Pin
yeah10003-Nov-09 4:41
yeah10003-Nov-09 4:41 
AnswerRe: Converting unsigned short int to its hex representation Pin
softwaremonkey4-Nov-09 11:23
softwaremonkey4-Nov-09 11:23 
Questionc++ code Pin
anilga3-Nov-09 1:51
anilga3-Nov-09 1:51 
AnswerRe: c++ code Pin
Nikola Tanev3-Nov-09 2:08
Nikola Tanev3-Nov-09 2:08 
AnswerRe: c++ code Pin
Richard MacCutchan3-Nov-09 2:15
mveRichard MacCutchan3-Nov-09 2:15 
AnswerRe: c++ code Pin
CPallini3-Nov-09 2:18
mveCPallini3-Nov-09 2:18 
AnswerRe: c++ code Pin
Michael Schubert3-Nov-09 2:36
Michael Schubert3-Nov-09 2:36 
AnswerRe: c++ code Pin
David Crow3-Nov-09 3:13
David Crow3-Nov-09 3:13 
AnswerRe: c++ code Pin
Rajesh R Subramanian3-Nov-09 3:15
professionalRajesh R Subramanian3-Nov-09 3:15 
AnswerRe: c++ code Pin
Hamid_RT3-Nov-09 6:39
Hamid_RT3-Nov-09 6:39 
GeneralOT Pin
CPallini3-Nov-09 6:50
mveCPallini3-Nov-09 6:50 
GeneralRe: OT Pin
Hamid_RT3-Nov-09 19:28
Hamid_RT3-Nov-09 19:28 
QuestionHow can add path of all files to List Ctrl those are present in folder ? Pin
Le@rner3-Nov-09 1:51
Le@rner3-Nov-09 1:51 
AnswerRe: How can add path of all files to List Ctrl those are present in folder ? Pin
Code-o-mat3-Nov-09 1:57
Code-o-mat3-Nov-09 1:57 
GeneralRe: How can add path of all files to List Ctrl those are present in folder ? Pin
iwt.dev3-Nov-09 4:34
iwt.dev3-Nov-09 4:34 
GeneralRe: How can add path of all files to List Ctrl those are present in folder ? Pin
David Crow3-Nov-09 5:11
David Crow3-Nov-09 5:11 
QuestionRe: How can add path of all files to List Ctrl those are present in folder ? Pin
David Crow3-Nov-09 3:12
David Crow3-Nov-09 3:12 
QuestionCopy code Pin
Nikola Tanev3-Nov-09 1:24
Nikola Tanev3-Nov-09 1:24 
AnswerRe: Copy code Pin
Nikola Tanev3-Nov-09 11:32
Nikola Tanev3-Nov-09 11:32 
Ok so i found the solution:

I Execute the code in Release mode.

In this current case the problem was the _RTC_CheckEsp that checks checks the validity of the ESP register. It works ok for the original function (call _RTC_CheckEsp) but for the copied it was a jump to an address containing invalid memory (call 00030090 and on that address was nothing (no mans land) except 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00). I guess the call to _RTC_CheckEsp is actually a call to a relative address and it gets lost when the code is copied in another memory location.


_RTC_CheckEsp
00041120 jne esperror (41123h)
00041122 ret

It seams that this function works only in debug mode. What it does is that it checks the ESP register (stack register) and if corrupted jumps to 41123h (esperror)

I thought i give the solution here and my opinion for the solution in case anyone else has a similar problem

P.S. It is an interesting subject so if anyone has an idea (or if i am wrong) i would be more than happy to hear it... (maybe even write an article about it)

regards
Nikola
GeneralRe: Copy code Pin
enhzflep3-Nov-09 11:44
enhzflep3-Nov-09 11:44 

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.