Click here to Skip to main content
15,907,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using Win 2K Event Viewer are an App event viewer Pin
Mike Nordell9-May-02 20:55
Mike Nordell9-May-02 20:55 
GeneralRe: Using Win 2K Event Viewer are an App event viewer Pin
niverson10-May-02 4:41
niverson10-May-02 4:41 
GeneralRe: Using Win 2K Event Viewer are an App event viewer Pin
Mike Nordell10-May-02 15:51
Mike Nordell10-May-02 15:51 
GeneralRe: Using Win 2K Event Viewer are an App event viewer Pin
niverson13-May-02 4:21
niverson13-May-02 4:21 
GeneralCan't use the CMenu options in the OnPaint under VC++ 7 Pin
MaTrIX2k28-May-02 19:38
MaTrIX2k28-May-02 19:38 
GeneralRe: Can't use the CMenu options in the OnPaint under VC++ 7 Pin
Nish Nishant8-May-02 20:05
sitebuilderNish Nishant8-May-02 20:05 
GeneralSaving COleDateTime To Access using CRecordset Pin
Komtiki8-May-02 19:11
Komtiki8-May-02 19:11 
GeneralQuestion about viewing memory address. Pin
Maxwell Chen8-May-02 18:56
Maxwell Chen8-May-02 18:56 
Suppose I code such a very simple code:
void main()
{
  printf("main is at 0x%p\n", main);
  // ... some other code.
}


I get a result:
main is at 0x0040100F

But if I hover the cursor on the variable main while debugging, VC++ tells me, the address of main at 0x00401030.

So how can I printf the actual address of main (0x00401030) ??

Here's the assembly code:
@ILT+10(_main):
0040100F E9 1C 00 00 00       jmp         main (00401030)
 
  

5:    void main()
6:    {
00401030 55                   push        ebp
00401031 8B EC                mov         ebp,esp
00401033 83 EC 48             sub         esp,48h
00401036 53                   push        ebx
00401037 56                   push        esi
00401038 57                   push        edi
00401039 8D 7D B8             lea         edi,[ebp-48h]
0040103C B9 12 00 00 00       mov         ecx,12h
00401041 B8 CC CC CC CC       mov         eax,0CCCCCCCCh
00401046 F3 AB                rep stos    dword ptr [edi]



Maxwell Chen
People say "No news is good news". Then, no code is good code!?
GeneralRe: Question about viewing memory address. Pin
Nish Nishant8-May-02 20:03
sitebuilderNish Nishant8-May-02 20:03 
GeneralRe: Question about viewing memory address. Pin
Maxwell Chen9-May-02 0:53
Maxwell Chen9-May-02 0:53 
Questionhow to load a Dll in an ATL COM Server Pin
GooGoo8-May-02 18:39
GooGoo8-May-02 18:39 
AnswerRe: how to load a Dll in an ATL COM Server Pin
Ollie8-May-02 23:14
Ollie8-May-02 23:14 
GeneralMFC Extension DLL Problems Pin
Tony Fontenot8-May-02 17:51
Tony Fontenot8-May-02 17:51 
GeneralRe: MFC Extension DLL Problems Pin
Tony Fontenot8-May-02 18:12
Tony Fontenot8-May-02 18:12 
QuestionHow do I make this Unicode? Pin
Matt Newman8-May-02 17:08
Matt Newman8-May-02 17:08 
AnswerRe: How do I make this Unicode? Pin
Michael Dunn8-May-02 17:21
sitebuilderMichael Dunn8-May-02 17:21 
GeneralRe: How do I make this Unicode? Pin
Matt Newman9-May-02 11:26
Matt Newman9-May-02 11:26 
GeneralRe: How do I make this Unicode? Pin
Michael Dunn9-May-02 16:39
sitebuilderMichael Dunn9-May-02 16:39 
GeneralRe: How do I make this Unicode? Pin
Matt Newman14-May-02 15:26
Matt Newman14-May-02 15:26 
AnswerRe: How do I make this Unicode? Pin
Paul M Watt8-May-02 17:24
mentorPaul M Watt8-May-02 17:24 
AnswerRe: How do I make this Unicode? Pin
Nish Nishant8-May-02 17:24
sitebuilderNish Nishant8-May-02 17:24 
GeneralUsing struct with CList Pin
Coremn8-May-02 17:07
Coremn8-May-02 17:07 
GeneralRe: Using struct with CList Pin
Paul M Watt8-May-02 17:46
mentorPaul M Watt8-May-02 17:46 
GeneralRe: Using struct with CList Pin
Christian Graus8-May-02 18:34
protectorChristian Graus8-May-02 18:34 
GeneralRe: Using struct with CList Pin
Coremn8-May-02 18:51
Coremn8-May-02 18:51 

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.