Greetings.
Can anyone suggest one or more good API reference sources?
I am an experienced - but very far from expert - amateur assembly programmer, who has finally decided that DOS is not enough (XP does not support the DOS clipboard and 98 is dying in terms of hard/soft-ware support. There are other reasons.)
So, I am slogging through Petzold and Iczelion, but am finding the going tough because I have not found a good - clear and concise - reference to the API functions.
I am looking for something that just gives the essential features, something for the windows API like what Dettmann (*DOS Programmer's Reference*) and Ralf Brown (http://www.ctyme.com/rbrown.htm) give for DOS.
This is what I imagine one entry in such a reference might look like:
___________
Name Source Call with (Parameters) Returns
ExitProcess kernel32.dll DWORD (exit code) - stack top does not return
Terminate process and return to parent - compare DOS int 21/4C. Close files and release memory.
Example of use:
push eax ; where eax contains the exit code to be returned
call ExitProcess
See also:
___________
Best Wishes,
ral (Robert Allen Leeper)
Can anyone suggest one or more good API reference sources?
I am an experienced - but very far from expert - amateur assembly programmer, who has finally decided that DOS is not enough (XP does not support the DOS clipboard and 98 is dying in terms of hard/soft-ware support. There are other reasons.)
So, I am slogging through Petzold and Iczelion, but am finding the going tough because I have not found a good - clear and concise - reference to the API functions.
I am looking for something that just gives the essential features, something for the windows API like what Dettmann (*DOS Programmer's Reference*) and Ralf Brown (http://www.ctyme.com/rbrown.htm) give for DOS.
This is what I imagine one entry in such a reference might look like:
___________
Name Source Call with (Parameters) Returns
ExitProcess kernel32.dll DWORD (exit code) - stack top does not return
Terminate process and return to parent - compare DOS int 21/4C. Close files and release memory.
Example of use:
push eax ; where eax contains the exit code to be returned
call ExitProcess
See also:
___________
Best Wishes,
ral (Robert Allen Leeper)
http://msdn.microsoft.com and http://spiff.tripnet.se/~iczelion/files/win32api.zip
Nothing comes even close to the SDK at MSDN, it is free, huge and full of useful snippets of code to look at as well as articles. It can be downloaded here.
If you are using RadASM you can have it called via the F1 key for context sensitive help on any API command.
If you are using RadASM you can have it called via the F1 key for context sensitive help on any API command.
Nothing comes even close to the SDK at MSDN, it is free, huge and full of useful snippets of code to look at as well as articles. It can be downloaded here.
If you are using RadASM you can have it called via the F1 key for context sensitive help on any API command.
Thanks.
I have the CDs. They are not reference materials. They do not have indices or even tables of contents. No doubt the information is all there and can be dug out with hard work and perseverence, but I am looking for useful data, not discipline.
http://msdn.microsoft.com and http://spiff.tripnet.se/~iczelion/files/win32api.zip
win32api.zip - The .hlp file looks useful, but I was hoping for something that did not have to be decyphered, stripped of the C verbiage, and translated.
I have the CDs. They are not reference materials. They do not have indices or even tables of contents. No doubt the information is all there and can be dug out with hard work and perseverence, but I am looking for useful data, not discipline.
Ral,
I have the PSDK 2003 and have it INSTALLED on my system.
There is an index, and when I want to look up something about an api,
all i do is type the name or part of the api name in the "look for" list box, and the api is highlighted in the index below. Doubleclick on the highlighted item to display the info on the api.
Hang in there, the api reference material isn't too dificult to understand after awhile.
Regards,
Rags
Nothing comes even close to the SDK at MSDN, it is free, huge and full of useful snippets of code to look at as well as articles. It can be downloaded here.
If you are using RadASM you can have it called via the F1 key for context sensitive help on any API command.
Thanks.
I have the CDs. They are not reference materials. They do not have indices or even tables of contents. No doubt the information is all there and can be dug out with hard work and perseverence, but I am looking for useful data, not discipline.
I am not sure what you mean by not having indices or a table of contents, it has both of those and advanced search functions as well as "see also" for most API functions. In addition it has primers and tutorials for every Windows interface along with comprehensive function lists. I use it with H2Viewer and have it plugged into RadASM directly, I can place the cursor on any API keyword, press F1 and have a help page on that function displayed. I think perhaps you have not configured either H2Viewer or DExplore properly.
Donkey
http://msdn.microsoft.com and http://spiff.tripnet.se/~iczelion/files/win32api.zip
win32api.zip - The .hlp file looks useful, but I was hoping for something that did not have to be decyphered, stripped of the C verbiage, and translated.
To my knowlege, there isn't any documenation on the Windows API that uses Assembly as it's "verbiage". The documenation is developed to be used by the majority programmers, and the truth be told, the majority programmers are C and C++ programmers. The API references aren't that hard to understand, arguments are pushed onto the stack in reverse order then the call is made. For example:
LRESULT SendMessage(
HWND hWnd, // handle of destination window
UINT Msg, // message to send
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
Return: The return value specifies the result of the message processing and depends on the message sent.
This could be interpreted as the assembly code:
push DWORD lParam ; second message parameter
push DWORD wParam ; first message parameter
push DWORD Msg ; message to send
push DWORD hWnd ; handle of destination window
call
Return: EAX contains the result of the message processing and depends on the message sent.
Get used to seeing the C source code, because most of the information you will find will be in C or C++.
Regards,
Bryant Keller
ral, probably you haven't installed your MSDN copy correctly. Or you haven't installed it at all. (yes, it needs installation...) . Or you can simply view it online.
Note Synfire's remark - you'd better know a bit of C (takes a few days to learn), and you can easily convert C examples/code to asm:
Sleep(1000);
gets converted to
invoke Sleep,1000 ; in MASM, FASM and NASM (not sure about last two ^^')
or in direct asm:
push 1000
call Sleep
Only complex floating-point operations will be a bugger sometimes.
To quickly find example code for the usage of some API, sometimes you might need to google for 2-3 seconds :).
Note Synfire's remark - you'd better know a bit of C (takes a few days to learn), and you can easily convert C examples/code to asm:
Sleep(1000);
gets converted to
invoke Sleep,1000 ; in MASM, FASM and NASM (not sure about last two ^^')
or in direct asm:
push 1000
call Sleep
Only complex floating-point operations will be a bugger sometimes.
To quickly find example code for the usage of some API, sometimes you might need to google for 2-3 seconds :).