tags:

views:

289

answers:

5

What is a Windows API?

+13  A: 

It's a set of functions and data structures that a Windows program can use to ask Windows to do something, like opening a file, displaying a message, etc.

Pretty much everything that a Windows program does involves calling various API functions.

Collectively, all the API functions that Windows makes available are called "The Windows API".

RichieHindle
+1 for keeping it simple.
Hooked
It's not one function. It's a set of functions.
UncleO
@uncleo Technically you're correct, but in practice programmers also use API to mean a function within the API. For example, "just call this API" or "expose that function as an API". I found it strange when I first encountered that usage, but gave up trying to correct it long ago.
Joe Holloway
+12  A: 

It is not a Windows API, it is the Windows API, and in short it is the set of functions exposed by Windows that allows software to interact with the operating system.

Fredrik Mörk
+1  A: 

API stands for Application Programming Interface.

It is the collection of visible functions in Windows that a programmer can call from his own application code.

UncleO
+7  A: 

The Windows API (Application Programming Interface) is the complete set of functions (exported by several DLLs) that enables each application to do what it has to do with almost no knowledge about the underlying hardware.

It consists of both functions and data structures (for example, each window has its a data structure).

A big difference between the windows API and the (venerable) DOS API is that the DOS API only provided the basic OS functions like open and close files, and write to screen (which was slow so most programs ignored this). A large portion of the Windows API has to do with Windows and its components (like buttons and edit boxes). That's why windows applications have a more or less similar look and feel. DOS applications were completely different in apearance.

Gamecat
+2  A: 

I have nothing to say.

aZn137
-1 for "Google iz da shit!" answers. For an untrained eye, it's not always easy to find the RIGHT page among the hundreds of search results.
TFM