Re: API or standard DLL?




<louw.elbie@xxxxxxxxx> wrote in message
news:1185258062.689196.225340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi there

I got a project where a client wants a API written to access external
product provider databases and return results as a recordset.

What is the difference between an API and standard DLL? As I
understand, API doesn't rely on any other
software than e.g. Windows APIs to perform a task?
Should one write the API in C++ or will VB.NET or C# work? If so,
will the API will depend on the dotNet framework to be loaded?

An API (Application Programming Interface) is just a description of the
interface you provide to your users, like, for example, the list of
functions (and their arguments) you provide.

A DLL is just a library, and that library might be (but isn't necessarily)
an implementation of a specific API.

Based on what you've said above, is is not totally clear if your client
wants an API *implemented*, or if he is just asking you to define an API
(that is, write the specs for a set of functions that would work, but not
actually implement them). If he wants an implementation, how you implement
it is up to you. It can be in a DLL, a static library, or an executable.
It all depends on what your client wants. Does he want a DLL? If so,
create a DLL.

If you do create a DLL, the language you choose doesn't really matter,
except in terms of which language is best for the task. As long as you
export your functions properly, the DLL will be usable from any language.
For example, if you write your DLL in C++ and your functions are exported
correctly, the DLL can be used from C, C++, Delphi, VB, C# -- you name it.

However, I think any further discussion on this subject is probably going to
be off-topic in this group. If you want Windows-specific help, such as how
to create a DLL that correctly exports functions so they can be used by any
language/compiler, I suggest you visit a newsgroup dedicated to Windows
development and/or your development environment, where you are much more
likely to get (correct) answers to your specific questions.

- Dennis


.



Relevant Pages

  • Re: WIN API and PAF Integration
    ... a MUMPS database. ... the software to developers and therefore implement our own API calls etc. ... > client, I rather suspect that it is being hammered right now. ... > accesses the DLL ...
    (alt.comp.lang.borland-delphi)
  • Re: RUNDLL32.EXE
    ... 0x66800000 0x155000 Windows Shell Common Dll ... 0x75FA0000 0xA000 BSD Socket API for Windows ... 0x794D0000 0x15000 Microsoft WinSock Extension APIs ...
    (comp.security.firewalls)
  • Re: nunit deploy and accessibility modifiers
    ... and the client of the DLL would be the View. ... View consumes is the Controller API, and the Model is marked internal, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ZoneAlarm -- Alert for "Run a DLL"
    ... I am blocking it from accessing the internet also... ... DLL file called SENSAPI.DLL. ... 0x60000000 0x5000 SENS Connectivity API DLL ... 0x794D0000 0x15000 Microsoft WinSock Extension APIs ...
    (comp.security.firewalls)
  • Re: API PrntDlg function
    ... You're supposed to also follow the instructions to register the DLL using ... more or less the same job without requiring you to use any API functions. ... anything to the chosen printer you still need to use the VB Printer Object ... printing methods in the normal way. ...
    (microsoft.public.vb.general.discussion)