Click to See Complete Forum and Search --> : How to use API in C++
kourosh
Feb 3rd, 2001, 02:06 AM
HI, sinc i am pretty new to C++ I am reading all the threads and I have learned alot. Although I am seeing people talking about API and programing APi for C++ and things like that. Since I am pretty good in VB and I use alot of API, I was wondering is API in C++ same as API in VB.
I guess sounds little stupid, well what I mean is. Does C++ have a API viewer like VB has. I really appreciate if I get a little explanation about API's with C++ and how to sue them.
Thanks in Advance
Vlatko
Feb 3rd, 2001, 05:19 AM
In C++ you just #include <windows.h> and use API's without declaring them. There is no API viewer but you don't need one beacuse the API functions don't have to be declared. Use the MSDN to get info about the parameters of the API Functions and their use.
Example:
#include <windows.h>
//call apis
Sleep(2000);
long tm = GetTickCount();
.....
kourosh
Feb 4th, 2001, 12:09 AM
I have msdn cd's although I am not going to install them. I would look for what you said in msdn online, although what kind of keyword I am seppose to look for?
parksie
Feb 4th, 2001, 04:24 AM
http://msdn.microsoft.com/library
You need the Platform SDK -- this is basically the API documentation and a whole lot more :)
As for keywords, just think of what you want to do. Need to use a file? OpenFile seems fair enough...so you go to that page...and MS says it's been superseded by CreateFile :rolleyes:
Hehehehe.....they never said it would be simple :D
kourosh
Feb 4th, 2001, 01:34 PM
Thanks alot for the tip. I think I have SDK-Platform and I think it is version 5.0.
parksie
Feb 4th, 2001, 01:39 PM
They're not given in versions - the latest Platform SDK is the Whistler Beta 1 Edition at http://www.microsoft.com/msdownload/platformsdk/setuplauncher.htm
kourosh
Feb 4th, 2001, 01:54 PM
Yeah I think that is the one I got. Although I was just wondering what is windows whistle or something like that. I saw you guys where talking about it in Chitchat Forum and I saw couple of screen shots if I am not mistaking.
i.e. I am using Windows 95
parksie
Feb 4th, 2001, 02:08 PM
Whistler is Microsoft's new OS...and seems quite interesting, but I'll only be bothering if they get the hardware stuff sorted out :rolleyes:
Since you're on Windows 95, pay special attention to the information in the PSDK about what functions are supported on what versions of Windows -- for example some things are supported on 98 but not 95.
kourosh
Feb 4th, 2001, 03:25 PM
so does that mean this is a new OS by it self? What I mean is that can it be integrated with win95? Also I heard that it is going to be released by the end of this year. How did you guys manage to get it now??
parksie
Feb 4th, 2001, 03:28 PM
No. It is a separate OS and cannot be integrated with any other, whether it is 95, 98, 2000 or ME.
I don't have a copy, but at least one person does...he uploaded some screenshots.
Anyway -- it's still in beta so it's not for sale yet, but MSDN subscribers may have it.
kourosh
Feb 4th, 2001, 03:40 PM
So the OS is not as reliable as other window's yet. Right?? Although do you have any idea about the price when microsoft release this OS? Also is it going to effect C++ functions and other porgramming languages??
sail3005
Feb 4th, 2001, 03:46 PM
it is probably going to be more expensive than windows me was, but less expensive than win2k (at least for the basic edition). I don't know for sure, but i think that it is based on the NT kernal, and that it will run all old windows software, not directly but through emulators. So i think your win95 c++ stuff is safe for now, but i am sure after a few years they will drop windows 95/98/ME off the face of the planet as they did with win 3.1.
SteveCRM
Feb 4th, 2001, 05:32 PM
Why are they trying to do this?????? Why not make it compatable with the old software? Does this bring up speed issues and stuff like that?
sail3005
Feb 4th, 2001, 07:32 PM
I don't know why they are doing it. as far as i know it is going to completly eliminate DOS, and is going to be based on the NT kernal. I am almost positive that it is not going to be realeaed by the end of this year, and may not even be realesed in 2002.
Whistler is completly different from 95/98/me from the ground up. The only reason that i can think that they would use emulators is because of the new 64 bit machines coming out. But who knows!
sail3005
Feb 4th, 2001, 07:35 PM
oh and as far as speed, processor speed has more than doubled since last year, and if they come out with whistler in 2002, who knows, maybe computers will be running at 2 GHZ!? I think they just might get away with it.
SteveCRM
Feb 4th, 2001, 09:25 PM
Will it be different programming? Because if they have the emulator, and (at least somewhat) the same programming I'm all for it.
SteveCRM
Feb 4th, 2001, 09:26 PM
DAMN! and I just bought my new computer last feb. its 500 mghz DVD ROM, 64 RAM (getting 128 more in a week)....and now they're up to 2 ghz!!!!!!!!!!!!!! DAMN! GRRRRRRRRR :mad:
Oh by the way...I heard the Win 2K console has scrollbars. Is it possible that someone could send it to me and this could take over as my normal console? :confused:
sail3005
Feb 4th, 2001, 09:48 PM
i have win2k, and the console does have scrollbars. I can send it to you, but i am not guarnteeing that it will work. How do you want me to send it?
SteveCRM
Feb 5th, 2001, 07:57 AM
Yes Thanks!
SteveCRM@aol.com
Yes I know...aol sucks...but my family can't use this machine without it :rolleyes:
parksie
Feb 5th, 2001, 01:24 PM
I doubt it will work - I expect it will whinge about Unicode support if you try and use cmd.exe on a non-NT system (if it dies with a missing export function ending in "W", then that's the problem).
SteveCRM
Feb 5th, 2001, 03:18 PM
didn't...but thanks for sending it anyway :D
Chris_SE
Feb 8th, 2001, 01:50 PM
Come to think of it, didn't Microsoft promise win 2000 would remove dos a few years back? Not that I care, I use Unix and Win2Lin now.
parksie
Feb 8th, 2001, 03:19 PM
Win2K doesn't have DOS. It merely has a program that acts as a command interpreter.
sail3005
Feb 8th, 2001, 06:11 PM
actually, i think that while the dos use is limited, it does still use it to some extent. there is a hidden msdos 7 folder in the root directory. That could be just for making the bootdisk or backup or something though.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.