C++
文章平均质量分 59
Beck_Dai
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
以特定用户createservice并且openservice过程
最近做项目碰到这个问题,要以某个特定额用户建立一个service并启动起来,service是建好了,但是启动的时候出现logon错误。看起来像是密码不对,其实是用户没有拿到logon的权限,没有很具体看,在stackoverflow上找到解决方案,希望对别人有所帮助。 #define UNICODE #include #include #include #pragma comment原创 2012-04-01 16:59:10 · 1067 阅读 · 0 评论 -
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 · 1493 阅读 · 0 评论 -
Curl 静态库使用
HttpWebRequest.obj : error LNK2001: 无法解析的外部符号 __imp__curl_slist_free_all 1>HttpWebRequest.obj : error LNK2001: 无法解析的外部符号 __imp__curl_easy_cleanup 1>HttpWebRequest.obj : error LNK2001: 无法解析的外部符号 __im转载 2012-04-17 19:22:33 · 1592 阅读 · 0 评论 -
删除文件夹
#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 · 386 阅读 · 0 评论 -
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 · 2548 阅读 · 1 评论
分享