4 Replies - 1337 Views - Last Post: 27 November 2001 - 04:10 PM Rate Topic: -----

#1 VxJasonxV  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 03-October 01

Windows Data Retrival Operators

Posted 05 November 2001 - 07:21 PM

Well...me and my friend were going through header files and came across winbase.h.  We are looking for a way to pull in the windows set date or time (or both).  We found SetLocalTime, GetLocalTime, SetSystemTime, and GetSystemTime.  (Along with Setlocaldate, getlocaldate, etc.)  Anyone know how to use those...all I found is:
GetSystemTime(
    LPSYSTEMTIME lpSystemTime
    );

Anyone know how to use that????

Is This A Good Question/Topic? 0
  • +

Replies To: Windows Data Retrival Operators

#2 Null and Void  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 204
  • Joined: 29-April 01

Re: Windows Data Retrival Operators

Posted 05 November 2001 - 08:04 PM

The Win32 API is easy:
SYSTEMTIME Time;
GetSystemTime(&Time);


Now time is full of information. See the MSDN (or a header file ;)) for information SYSTEMTIME has in it.
Was This Post Helpful? 0
  • +
  • -

#3 VxJasonxV  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 03-October 01

Re: Windows Data Retrival Operators

Posted 05 November 2001 - 09:11 PM

I'd agree with you and say it is easy, I'll just have to look through the header file, or explore MSDN a LOT deeper.
Was This Post Helpful? 0
  • +
  • -

#4 EnKRYpTeD  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 128
  • Joined: 11-May 01

Re: Windows Data Retrival Operators

Posted 09 November 2001 - 04:07 PM

d00d, why are you looking into this stuff. Where do you need it? I seriously doubt you will ever need that stuff while in that class. Now, you may just like to have it, in that case do what you want. But i have a feeling your getting that stuff to "Add" to the programs in class. First you should learn to code more before worrying about things like that.

While im here how can i access windows files from the terminal (if coded right of course) in a c++ program. Im looking for this cuz i want to make a personaly program at my house that i can use to start several other programs so i dont have to have all these shortcuts. Or is that even possible?

All im looking for is the header file if needed, and the way to use it.

Was This Post Helpful? 0
  • +
  • -

#5 VxJasonxV  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 03-October 01

Re: Windows Data Retrival Operators

Posted 27 November 2001 - 04:10 PM

It's not REQUIRED...sorry for wanting to do something different.  Yes I don't need TIME display, but I was just trying to find how to do it for a small part of this program and for future reference...turns out there's a macro in most C++ compilers, simply typing:
__TIME__ or __DATE__
in a cout statement will output the system time(have yet to test) or date( mmm dd yy format).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1