PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

_tctime?

http://msdn.microsoft.com/library/defau ... wctime.asp

says it's in TCHAR.H but it doesn't work in eVC3. (Works in VC6 on PC.)

So how do I get the time on Pocket PC 2002? What am I doing wrong?
Take a look at the MFC source code and see how the CTime class converts time into a string.

Dan East
What a frickin mess.

I guess these functions aren't in eVC3 (even though they've been around in C for probably as long as I've been alive). No wonder they give it away, they can't sell it.

They are in VC6 tchar.h, but not eVC3 tchar.h.

If I try to use _wctime myself, it just won't link.

I mean, it's not like time functions are important to application developers, is it? (sarcasm)

There does appear to be some interesting functions named wce_ctirme, implemented in wcetime.cpp, declared in wcealt.h.

But if I include wcealt.h, it won't compile due to syntax error and unexpected end of file.

I mean, it's not like ensuring that your headers compile is important to a system library, is it? (sarcasm)

Well, I'd expect more if it wasn't some free library from some kid in an Eastern European country, and instead was from one of the world's largest software vendors, such as Microsoft. Oh, wait a minute...
Try using GetLocalTime, and then just _stprintf to convert members of SYSTEMTIME to the string format you want.

Dan East
That's what I ended up doing.

I wasn't planning on implementing ctime this morning, but that's the great thing about Microsoft, you never know where you are going to go today.