Results 1 to 3 of 3

Thread: Making an API declaration in C++ ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Cool API Declarations

    Hi everybody,

    Does anybody know how to make an API declaration in C++ ? If so, could you please give me an example using the GetTickCount API and printing the result using the Cout method. Thanks
    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    in c++, just #include "windows.h" is enough, because that will set up the whole api for you:

    Code:
    #include <iostream>
    #include "windows.h"
    
    using namespace std;
    
    void main() {
        long lMyNum = GetTickCount(); // use API function
        cout << "Count: " << lMyNum << endl;
    }
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Leeds, UK
    Posts
    287

    Smile Thanks

    Thanks a lot Parksie! Wow, thats even easier than in VB!
    rino_2
    Visual Basic, HTML
    Please Visit my Site: Richard's VB Site

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