Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a book that explains assembly in Win32

Status
Not open for further replies.

laskar

Technical User
Oct 11, 2002
7
0
0
SE
Hi again all! Could somebody recommend me
a book that gives some explanation on what windows
needs ..?

What I actually want to understand is what these things below(handle, hInst etc.) is and why its necessary ?

Regards,
laskar

DATA SECTION
;
hInst DD 0 ;to keep the handle to the process itself
hDC DD 0 ;to keep the handle of the device context
PAINTSTRUCT DD 16 DUP 0 ;structure to hold stuff from Windows on WM_PAINT
MSG DD 7 DUP 0 ;structure to hold messages from Windows as follows:-
;hwnd, +4=message, +8=wParam, +C=lParam, +10h=time, +14h/18=pt
WNDCLASS DD 10D DUP 0 ;structure to send to RegisterClass holding data:-
;+0 window class style (CS_)
;+4 pointer to Window Procedure
;+8 no. of extra bytes to allocate after structure
;+C no. of extra bytes to allocate after window instance
;+10 handle to instance of this window class
;+14 handle to the class icon
;+18 handle to the class cursor
;+1C identifies the class background brush
;+20 pointer to resource name for class menu
;+24 pointer to string for window class name
;******************** Window message table
; (in a real program this would deal with many more messages)
MESSAGES DD (ENDOF_MESSAGES-$-4)/8 ;=number to be done
DD 1h,CREATE,2h,DESTROY,0Fh,PAINT
ENDOF_MESSAGES: ;label used to work out how many messages
 
Try Assembly Language for Intel Based Computers 4th Edition by Kip R. Irvine, this book is great if your new to 32-bit protected mode windows programming.
Kunal.
 
Hi laskar,

Another thing is, what you are talking about is Win32 assembly in term to deal with Win32API. Since Win32API is created in C/C++ (mostly I think) we have to deal with Handle, hInstance, Structure, etc..

If we want to call Win32API from assembly of course we also need to pass parameter to the API function, and we must follow what is the parameter requirement.

Now in order to understand this, you need to understand about Win32API and at least a little C/C++. The first place to visit is msdn.microsoft.com

Good luck
[thumbsup2]

-- AirCon --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top