Hello:
I've seen many books mentioned about "API", I know that stands for "Application Programming Interface", but I just wonder what that is working for? or what should we do with it?
I'll Appreciate that.
Hello:
I've seen many books mentioned about "API", I know that stands for "Application Programming Interface", but I just wonder what that is working for? or what should we do with it?
I'll Appreciate that.
Don't laugh at me,I am just a SuperNewbie.
one example would be the Win32 api's, which is a set of commands (functions) that an application uses to request and carry out lover-level services performed by the windows operating system.
hi Dang
So,api actually is a set of functions or just a "black box" ?
Don't laugh at me,I am just a SuperNewbie.
well, the Win32 API is actually a set of black-box functions, you give them some parameters and thay actually do something, but they are really useful because all (well, with certain exceptions) Win32 Apps are made using the Win32 API, or maybe the DirectX or OpenGL API.
Oskilian
An API is basically a set of functions which you can use, in addition to the C/C++ standard functions, which allow you to do a specific task.
The Windows API, for example, is the basis of all GUI programs. It allows you to access all kinds of functions specific to the windows operating system. For example, instead of trying to write your own functions to read a registry key(which can't even legally be done), you would use the WinAPI commands to do this.
Another example would be of trying to display a window. Again, you use the API to create the window, and you will use API functions to manipulate this window.
Many times an API is designed to give you access to specific hardware or software, but this doesn't need to be the case. An API might allow you to read and manipulate files of various types, or anything else you feel like having it do.
"The" API is the win32 API, which is the heart and soul of GUI programs. Every GUI program uses the winAPI. Some might use wrapper classes, but the API itself is still being used, indirectly (MFC and OWL, for example, are libraries of wrapper classes which use the WinAPI to accomplish their tasks).