Exploring the API function list

Diposting oleh Admin | Saturday, July 19, 2008 | | 0 komentar »

There are literally thousands of API functions available throughout the numerous Windows API DLL libraries. Almost everything that Windows can do is listed as an API function. To view the available list of Windows API's, we can use the API viewer, which is installed along with Visual Basic. To start the API viewer, click Start -> Programs -> Microsoft Visual Studio 6 -> Microsoft Visual Studio 6 Tools -> API Text Viewer. You should be presented with a screen like the one shown below:

To get started, you'll need to load up the file that contains the list of API's. Start by clicking File, then Load Text File. Find the file named Win32api.txt and load it up. If a box appears asking you if you want to change this file from text to database, accept it. This will make your viewing much faster.

Try not to be overwhelmed by the jumble of weird and seemingly never-ending functions that greet you when the file is loaded, because you will get used to them after a while. Now, let’s make sure we're familiar with the new environment that we're working with. Starting from the top of the window and working down, you can see a drop-down menu. This is for changing the API type. Make sure that this is set to 'Declares', because we will need it for the next section.

Below the menu is a large list box. This lsit box displays all of the available items for the API Type that you have selected. When you have found the item that you want to learn more about, click on the 'Add' button and the command will appear in the box directly below the one I have just been explained.

When you have one or more items in this box, the two buttons labeled 'Remove' and 'Copy' will be enabled. The 'Remove' button deletes selected items that you do not require, and the 'Copy' button copies the whole lot onto the Windows clipboard. Make sure you keep the API viewer open now, because we will be using it in conjunction with the next section.

0 komentar