Well, I'm kind of familiar with using API in my VB projects and I was thinking, as I'm learning C now, if it's a good idea to start using API in C. I'm still a beginner in C, of course...
Printable View
Well, I'm kind of familiar with using API in my VB projects and I was thinking, as I'm learning C now, if it's a good idea to start using API in C. I'm still a beginner in C, of course...
Using API with C++ is not to different from VB. Sometimes you will need to handle pointers in API's, and that is the hardest part of API. Everything else is quite similar to VB.
To start using API you need to include the windows.h header file.
Code:#include <windows.h>
void main()
{
/* use API functions */
Sleep(2000);
/* and so on */
}
You will also need to be able to get used to the different data types. (In VB we only used Long, but in C++, we have many others).