- 博客(5)
- 收藏
- 关注
原创 删除文件夹
#include "stdafx.h"#include #include BOOL IsExist(const std::wstring& strFilePath){ DWORD dwAttributes; dwAttributes = ::GetFileAttributes(strFilePath.c_str()); if (dwAttributes == INV
2012-05-02 13:59:06
353
原创 C++判断当前用户所属组
情景:A用B用户安装某服务。B用户必须有本地管理员和exchange 管理员权限。解决方案:比较笨的方法,用CLR和。net的函数,上代码。 bool bRet = false; HANDLE hToken = NULL; bool bNeedRevertToSelf = false; String^ currentUser; WindowsIdentity^ currentIde
2012-04-25 11:20:27
1440
原创 C++本地化得到语言代号,例如zh-cn,en-us
C++ 得到系统的时间主要用到函数GetLocaleInfo. 详细定义可以查MSDN。还有http://blog.youkuaiyun.com/li_guotao/article/details/4306460介绍了一些基本用法,但是只提到怎么得到类似ENU这样的缩写,没有讲怎么得到zh-cn这种格式。今天有要求把ENU改成en-us这种形式,首先想到的是做个map,这样只能把国家限死,想加新的国家不好加。
2012-04-18 14:05:03
2489
转载 Curl 静态库使用
HttpWebRequest.obj : error LNK2001: 无法解析的外部符号 __imp__curl_slist_free_all1>HttpWebRequest.obj : error LNK2001: 无法解析的外部符号 __imp__curl_easy_cleanup1>HttpWebRequest.obj : error LNK2001: 无法解析的外部符号 __im
2012-04-17 19:22:33
1502
原创 以特定用户createservice并且openservice过程
最近做项目碰到这个问题,要以某个特定额用户建立一个service并启动起来,service是建好了,但是启动的时候出现logon错误。看起来像是密码不对,其实是用户没有拿到logon的权限,没有很具体看,在stackoverflow上找到解决方案,希望对别人有所帮助。#define UNICODE#include #include #include #pragma comment
2012-04-01 16:59:10
1008
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人