码迷,mamicode.com
首页 > 编程语言 > 详细

Windows实用系统工具类--C++

时间:2015-11-01 00:19:21      阅读:312      评论:0      收藏:0      [点我收藏+]

标签:

场景:

1. Windows软件开发时总是需要格式化时间, 获取软件的copyright时间,获取临时目录, 获取下载目录和AppData目录, 这些方法部分如果不搜索的话MSDN真的很难找.

2. 可跨产品移植.

#ifndef __BAS_UTILITY_SYS_H
#define	__BAS_UTILITY_SYS_H

#include "bas_exp.h"

#include <Windows.h>
#include <stdio.h>
#include <time.h>

class LIB_BASIC BASUtilitySys
{

public:
	//"%Y-%m-%d %H:%M:%S"
	static void TimeFormat( time_t nTime, char *szDst,const char* format );

	static void GetNowDateTime(char *szDst,const char* format);

	static wchar_t* GetCompileYear();

	static wchar_t* GetTempDir();

	static wchar_t* GetDownloadDir();

	static wchar_t* GetAppDataDir();
};

#endif

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

Windows实用系统工具类--C++

标签:

原文地址:http://www.cnblogs.com/ftchen/p/4926423.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!