Where is the address for the message queue? That's what I want to know.
We don't know. Somewhere in the kernel. We don't access the message queue directly, we talk to it by calling functions like GetMessage or PeekMessage. The same applies so an assembly program.
According to MSDN GetMessage is defined in Winuser.h and included in User32.lib/User32.dll. You will have to figure out how to link your assembly program against external libraries, and you should be able call the function.
You keep passing pointers to the message to functions that will read / interpret the message. Where do those pointers point?
Do you understand how pointers work in C? If so that should answer your question.
Code:
MSG msg; // allocate space on the stack for a MSG struct
GetMessage(&msg, ...) // pass the address of msg to the function
You can do the same in hand coded assembly as I mentioned a few posts back.
