Click here to Skip to main content
15,899,313 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: SetWindowPos don't accept values Pin
Mark Salsbery22-Sep-08 5:37
Mark Salsbery22-Sep-08 5:37 
QuestionCopy Byte information to structure Pin
nitin321-Sep-08 23:29
nitin321-Sep-08 23:29 
AnswerRe: Copy Byte information to structure Pin
SandipG 21-Sep-08 23:50
SandipG 21-Sep-08 23:50 
AnswerRe: Copy Byte information to structure Pin
CPallini21-Sep-08 23:53
mveCPallini21-Sep-08 23:53 
AnswerRe: Copy Byte information to structure Pin
Alan Balkany22-Sep-08 3:55
Alan Balkany22-Sep-08 3:55 
AnswerRe: Copy Byte information to structure [modified] Pin
cmk22-Sep-08 12:29
cmk22-Sep-08 12:29 
QuestionWindows Mail plugin : IStoreFolder/IStoreNamespace Fails on Vista Pin
dolly21-Sep-08 23:27
dolly21-Sep-08 23:27 
Questionvirtual function call issue [modified] Pin
George_George21-Sep-08 22:25
George_George21-Sep-08 22:25 
Hello everyone,


The different assembly code when we call through z and z1 in below sample is,

- we know the type of z, so no need to access vtable to make function call;
- we do not know the exact type for a pointer, so need to access vtable to make function call.

My question is whether my two items' understanding is correct. Thanks.

	z.func();
000A1575  lea         ecx,[z] 
000A1578  call        Zoo::func (0A11A4h) 

	z1->func();
000A157D  mov         eax,dword ptr [z1] 
000A1580  mov         edx,dword ptr [eax] 
000A1582  mov         esi,esp 
000A1584  mov         ecx,dword ptr [z1] 
000A1587  mov         eax,dword ptr [edx] 
000A1589  call        eax  
000A158B  cmp         esi,esp 
000A158D  call        @ILT+440(__RTC_CheckEsp) (0A11BDh) 


class Zoo
{
public:
	virtual void func() {cout << "Zoo" << endl; }
};

int main()
{
	Zoo z;

	Zoo* z1 = new Zoo();

	z.func();

	z1->func();

	delete z1;

	return 0;
}



thanks in advance,
George

modified on Monday, September 22, 2008 4:49 AM

QuestionHow to uniquely identify or distinguish windows that have no window name, same class name and resource id is zero [modified] Pin
georgekjolly21-Sep-08 22:16
georgekjolly21-Sep-08 22:16 
AnswerRe: How to uniquely identify or distinguish windows that have no window name, same class name and resource id is zero Pin
CPallini22-Sep-08 3:20
mveCPallini22-Sep-08 3:20 
QuestionChange the bold effect when create a control. Pin
nguyenbinh0721-Sep-08 21:54
nguyenbinh0721-Sep-08 21:54 
AnswerRe: Change the bold effect when create a control. Pin
_AnsHUMAN_ 21-Sep-08 22:03
_AnsHUMAN_ 21-Sep-08 22:03 
GeneralRe: Change the bold effect when create a control. [modified] Pin
nguyenbinh0721-Sep-08 22:41
nguyenbinh0721-Sep-08 22:41 
GeneralRe: Change the bold effect when create a control. Pin
_AnsHUMAN_ 21-Sep-08 23:35
_AnsHUMAN_ 21-Sep-08 23:35 
AnswerRe: Change the bold effect when create a control. Pin
shubhi21-Sep-08 23:19
shubhi21-Sep-08 23:19 
QuestionRe: Change the bold effect when create a control. Pin
David Crow22-Sep-08 2:30
David Crow22-Sep-08 2:30 
AnswerRe: Change the bold effect when create a control. Pin
Mark Salsbery22-Sep-08 5:39
Mark Salsbery22-Sep-08 5:39 
QuestionFlash Window Pin
tanmay.kol21-Sep-08 21:16
tanmay.kol21-Sep-08 21:16 
AnswerRe: Flash Window Pin
Cedric Moonen21-Sep-08 21:20
Cedric Moonen21-Sep-08 21:20 
AnswerRe: Flash Window Pin
_AnsHUMAN_ 21-Sep-08 21:23
_AnsHUMAN_ 21-Sep-08 21:23 
QuestionRe: Flash Window Pin
Rajesh R Subramanian21-Sep-08 21:24
professionalRajesh R Subramanian21-Sep-08 21:24 
AnswerRe: Flash Window Pin
Hamid_RT22-Sep-08 19:12
Hamid_RT22-Sep-08 19:12 
QuestionInstalling drivers and Inno Setup Pin
AnithaSubramani21-Sep-08 21:15
AnithaSubramani21-Sep-08 21:15 
AnswerRe: Installing drivers and Inno Setup Pin
_AnsHUMAN_ 21-Sep-08 21:24
_AnsHUMAN_ 21-Sep-08 21:24 
Questionones compliment of zero Pin
spicy_kid200021-Sep-08 20:38
spicy_kid200021-Sep-08 20:38 

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.