Click here to Skip to main content
15,900,511 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDetecting mouse clicks outside my dialog Pin
djtommye16-Mar-05 15:59
djtommye16-Mar-05 15:59 
GeneralRe: Detecting mouse clicks outside my dialog Pin
namaskaaram16-Mar-05 19:51
namaskaaram16-Mar-05 19:51 
GeneralRe: Detecting mouse clicks outside my dialog Pin
djtommye17-Mar-05 19:26
djtommye17-Mar-05 19:26 
GeneralRe: Detecting mouse clicks outside my dialog Pin
namaskaaram17-Mar-05 19:51
namaskaaram17-Mar-05 19:51 
GeneralVS6 and Inline Assembly Pin
quantum6916-Mar-05 15:58
quantum6916-Mar-05 15:58 
GeneralRe: VS6 and Inline Assembly Pin
David Crow17-Mar-05 3:24
David Crow17-Mar-05 3:24 
GeneralRe: VS6 and Inline Assembly Pin
John R. Shaw17-Mar-05 7:21
John R. Shaw17-Mar-05 7:21 
GeneralRe: VS6 and Inline Assembly Pin
quantum6917-Mar-05 15:29
quantum6917-Mar-05 15:29 
I've read all of that, both my local copy of MSDN and the latest online MSDN. I'm talking about how parameters are handled in the stack and returning values. There is a "Playing with the Stack" article here on CodeProject, but he goes off into some tangents after glossing over the initial stack setup. Looking at source code listings generated from VS gives a prologue and epilog that isn't described anywhere in MSDN (online or otherwise).

The default prologue (regardless of parameters that I've seen) is:
<br />
  00000	55		 push	 ebp<br />
  00001	8b ec		 mov	 ebp, esp<br />
  00003	83 ec 40	 sub	 esp, 64			; 00000040H<br />
  00006	53		 push	 ebx<br />
  00007	56		 push	 esi<br />
  00008	57		 push	 edi<br />
  00009	8d 7d c0	 lea	 edi, DWORD PTR [ebp-64]<br />
  0000c	b9 10 00 00 00	 mov	 ecx, 16			; 00000010H<br />
  00011	b8 cc cc cc cc	 mov	 eax, -858993460		; ccccccccH<br />
  00016	f3 ab		 rep stosd<br />


The standard push'ing of necessary registers isn't at issue. The reasoning VC skips 64 bytes (the sub esp,64) isn't discussed. Then the hop of stack with the "rep stosd" loop to fill in 16 double-words... again, no docs even touch this. Because EBP = ESP after the first push, the "lea edi, DWORD PTR [ebp-64]" points back to the beginning of the skipped area, then the "rep stosd" fill loop of "CCCCCCCCh". No params were transfered and yet it set aside these 16 dw's for some purpose? No MSDN or online resource I've located so far gets anywhere near the specifics of this. That's what I'm looking for. ASM is easy, but finding out how to shoehorn VC to perform even rudamentary tasks is a real pain.

Anyone here ever done much inline assembler? I'd like to open a dialog with you to discuss the mechanics of this.

thanks.

Glenn
Unix Systems Programmer
Generalhooking my mouse Pin
shdwwlkr16-Mar-05 15:37
shdwwlkr16-Mar-05 15:37 
GeneralRe: hooking my mouse Pin
John R. Shaw17-Mar-05 7:26
John R. Shaw17-Mar-05 7:26 
GeneralRe: hooking my mouse Pin
shdwwlkr17-Mar-05 15:04
shdwwlkr17-Mar-05 15:04 
GeneralSOM Pin
mostafadotnet16-Mar-05 12:57
mostafadotnet16-Mar-05 12:57 
GeneralSOM Pin
Anonymous16-Mar-05 12:56
Anonymous16-Mar-05 12:56 
GeneralFind process by name Pin
Christian Graus16-Mar-05 11:41
protectorChristian Graus16-Mar-05 11:41 
GeneralRe: Find process by name Pin
Blake Miller16-Mar-05 11:48
Blake Miller16-Mar-05 11:48 
GeneralRe: Find process by name Pin
Rick York16-Mar-05 12:41
mveRick York16-Mar-05 12:41 
GeneralIO completion port woes Pin
Jim Crafton16-Mar-05 11:26
Jim Crafton16-Mar-05 11:26 
GeneralRe: IO completion port woes Pin
cmk16-Mar-05 16:38
cmk16-Mar-05 16:38 
GeneralRe: IO completion port woes Pin
Jim Crafton17-Mar-05 3:52
Jim Crafton17-Mar-05 3:52 
GeneralRe: IO completion port woes Pin
cmk17-Mar-05 10:41
cmk17-Mar-05 10:41 
GeneralRe: IO completion port woes Pin
Jim Crafton17-Mar-05 11:17
Jim Crafton17-Mar-05 11:17 
GeneralRe: IO completion port woes Pin
cmk17-Mar-05 21:05
cmk17-Mar-05 21:05 
GeneralGetComputerName and GetUserName Apis in Windows 2000 Pin
brilliant10116-Mar-05 4:16
brilliant10116-Mar-05 4:16 
GeneralRe: GetComputerName and GetUserName Apis in Windows 2000 Pin
Blake Miller16-Mar-05 11:45
Blake Miller16-Mar-05 11:45 
GeneralUsing SOAP in vc++ service application Pin
16-Mar-05 2:21
suss16-Mar-05 2:21 

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.