Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
I am trying to fuly understand API's - I am aware it stands for Application Prorgramming Interface and have looked at the general outline provided by Wikipedia https://en.wikipedia.org/wiki/Application_programming_interface

But, I am still a little unclear.

From what I have found so far in my investigation there are various API's including win32 API's and Web API's. There appears to be application specific API's and operating system API's. Is this correct?

Are win32 API's classes in a language such as C# and implemented as Windows services or DLL's installed into the windows operating system or are they simply classes referenced by an application to use the classes methods etc? If an APi can be set up as a DLL or even a Windows Service can they utilise operating system functions?

API's also seemed to be provided with an application provided by a third party but I am correct in assuming these are limited to exposing and using functionality of the third party application?

I am interested in learning how to create APi's on both Windows and Unix\Linux and wondered if anyone could provide any resouces for learning these.
Posted

Quote:
There appears to be application specific API's and operating system API's. Is this correct?
Yes.



Quote:
Are win32 API's classes in a language such as C#
What do you mean? Win32 API are functions packaged in (several) DLLs.



Quote:
If an APi can be set up as a DLL or even a Windows Service can they utilise operating system functions?
Yes, an API can internally use other APIs, in fact an API can use whatever is available.



Quote:
API's also seemed to be provided with an application provided by a third party but I am correct in assuming these are limited to exposing and using functionality of the third party application?
The very purpose of an API is exposing functionality.



Quote:
I am interested in learning how to create APi's on both Windows and Unix\Linux and wondered if anyone could provide any resouces for learning these.
That's not difficult. Create a bunch of functions (or classes, etc..) make them available (e.g. package them in a dynamic or static library or whatever) and document it. The difficult task is providing a good API.
 
Share this answer
 
Comments
jar8695 30-Sep-15 12:37pm    
Thanks for response CPallini. So an API can be created in a language like C# as classes etc and compiled as a Dynamic Linked Library and installed on the operating system. Then depending on what the author wants to do they can provide functionality that is part of the operating system or another application by referencing the relevant DLL. Is this correct?
An API is just a set of methods, classes, and suchlike which help you to interface to some other software (or hardware in some cases) - the "target" software can be an application like Word or Excel, an operating system like Windows (or a smaller part of it, you get individual API's for specific functions in the OS as well), to handle Zip files, or a web based service like the CodeProject and PayPal API's.

They can be provided for any target language, but are usually only for a small number depending on what the PAI author want's to support - each additional framework takes more work for the original developer.

Providing and authoring an API is not a "do this and you're there" thing - they are all different because they all have to interact with different end systems.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900