Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
filetime.cpp
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 1k
Category:
Windows Kernel
Development Platform:
Visual C++
- #include "pch.h"
- #pragma hdrstop
- #include "filetime.h"
- //-----------------------------------------------------------------------------
- // class FileTime
- //-----------------------------------------------------------------------------
- //
- // Format the filetime numeric value to a text string.
- // Uses the same format as the shell's defview.
- //
- void FileTime::GetString(
- CString *pstr
- ) const
- {
- DBGASSERT((NULL != pstr));
- SYSTEMTIME st;
- //
- // This code matches the shell's date/time display format.
- //
- if (FileTimeToSystemTime(&m_time, &st))
- {
- int cchBuf = 40;
- LPTSTR pszBuf = pstr->GetBuffer(40);
- int cch = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &st, NULL, pszBuf, cchBuf);
- cchBuf -= cch;
- pszBuf += cch - 1;
- *pszBuf++ = TEXT(' ');
- *pszBuf = 0; // (in case GetTimeFormat doesn't add anything)
- cchBuf--;
- GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, pszBuf, cchBuf);
- pstr->ReleaseBuffer();
- }
- else
- {
- DBGERROR((TEXT("FileTimeToSystemTime failed with error 0x%08X.ntLODWORD: 0x%08X, HIDWORD: 0x%08X"),
- GetLastError(), m_time.dwLowDateTime, m_time.dwHighDateTime));
- }
- }