Results 1 to 4 of 4

Thread: Basic API concept

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    The Dark Side of the Moon
    Posts
    448

    Basic API concept

    Can someone explain to me the basic concept of API and the parts of it and how it functions just be declaring an API call?

    Also, how does one go about understanding and using advanced API?

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    OK well the way Windows works is this:

    You have a bunch of processes, which are launched by EXEs/DLLs/etc. Each process can have several threads. The threads are the things that do all the work.

    Normally, for a program to do something, one of its threads has to have the instructions that make that something happen.

    Now the way API works is that your program says, I don't want to store this code myself, because someone else already did it, and here's the code I want to run when I want to do this. That is the Declare statement.

    A Declare statement is sort of like a link on a web page: activating it takes you somewhere else; for API, it tells Windows to run code from a thread that doesn't belong to your program.

    ActiveX also uses the same idea, but it adds in COM and some other messy stuff that I won't go into here.

    Windows API functions are categorized into 3 main parts:

    GDI (graphics device interface, handles EVERYTHING you see on the screen)

    USER (which is basically stuff for making your program work and making all programs work basically the same way, with taskbar buttons and so on)

    and

    KERNEL (which handles actually creating and managing processes and threads)

    In addition to the 3 windows API sets, you can access API functions from other programs or DLLs.



    Now about advanced API...what exactly do you mean there?
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3
    jim mcnamara
    Guest
    api is application programming interface.

    Basically it is a large group (5400+) of functions provided by components of the OS and the browser. Many functions are not callable in VB or or not documented. VB'er's use about 700-800 of these calls. Probably maybe 5-15 per program.

    To get help with api download the api-guide & apiviewer from www.allapi.net

    www.allapi.net
    www.vbapi.com
    www.mvps.org/vbnet

    are all excellent sources for sample code for using api calls.

  4. #4
    tamathaltarak
    Guest

    Smile re API

    Thanks - I have also been looking for API info and how to use.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width