api declaration with

Posted on 2005-04-11
Last Modified: 2012-05-05
Hello experts, i havent done a lot with api calls so i am not sure what is going on.  I need to make some api calls to external dlls, below i found an example of one of the calls.  Could someone explain what is going on or maybe direct me to a website that contains information on api calls with

For example how would i use this function?
Declare Function ADAMTCP_ReadReg Lib "ADAMTCP.dll" (ByVal IPAddress As String, ByVal wIDAddress As Short, ByVal wStartAddress As Short, ByVal wCount As Short, ByRef wData As Short) As Integer
Question by:tentavarious
    LVL 23

    Assisted Solution

    by:Jens Fiederer
    LVL 96

    Expert Comment

    by:Bob Learned
    What information do you need (I don't quite understand what you are asking)?

    Do you want to know to call the ADAMTCP_ReadReg function?  Or, do you want to know what this API is?

    Calling an API function is as easy as calling an internal function:

    ADAMTCP_ReadReg(ipAddress, wIDAddress, wStartAddress, wCount, wData)


    Author Comment

    I guess i am not really sure what API functions are?  Where is the actually function located?  The above function is just an example.  For the example above:  is the actual function located within the ADAMTP.dll file?   I tried adding the ADAMTP.dll file as a reference so that i could see all functions and methods, but I cant.  I just need some clarification, because I have never dealt with calling API functions.  I will check out the link from the first post to see if that helps me out.
    LVL 96

    Accepted Solution

    Start with definition:

    Abbreviation of "Application Program Interface".  

    A set of routines, protocols, and tools for building software applications. A good API makes it easier to develop a program by providing all the building blocks. A programmer puts the blocks together.

    Most operating environments, such as Micro$oft-Windows, provide an API so that programmers can write applications consistent with the operating environment. Although APIs are designed for programmers, they are ultimately good for users because they guarantee that all programs using a common API will have similar interfaces. This makes it easier for users to learn new programs.

    Where did the ADAMTP.dll library come from?  DLL library must export functions in order for the caller to call these functions.  You could use something like Dependency Walker ( to look at the exported functions for the DLL, but that doesn't necessarily help you in making calls correctly.  The "perfect" source is from the library's creator.


    Author Comment

    Thanks, got what i needed from this post.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now