歌舞程序

导航

2012年7月12日

获取文件版本号信息

摘要: //版本号信息 string FileName = "C:\\Program Files\\Thunder Network\\Xlacc\\bin\\XLacc.exe"; int iVerInfoSize; char *pBuf; string asVer=""; VS_FIXEDFILEINFO *pVsInfo; unsigned int iFileInfoSize = sizeof( VS_FIXEDFILEINFO ); iVerInfoSize = GetFileVersionInfoSize(FileName.c_str(), NULL); 阅读全文

posted @ 2012-07-12 18:27 歌舞程序 阅读(241) 评论(0) 推荐(0) 编辑

获取CPU使用率信息

摘要: 第一种:#define _WIN32_WINNT 0x0501 //使用GetSystemTimes需要定义该变量值大于等于0x0501,详看MSDN__int64 CompareFileTime ( FILETIME time1, FILETIME time2 ){ __int64 a = time1.dwHighDateTime << 32 | time1.dwLowDateTime ; __int64 b = time2.dwHighDateTime << 32 | time2.dwLowDateTime ; return (b - a);}//获取CPU利用率i 阅读全文

posted @ 2012-07-12 18:26 歌舞程序 阅读(698) 评论(0) 推荐(0) 编辑

获得可执行文件中的数字签名的相关信息

摘要: http://support.microsoft.com/kb/323809/zh-cn用于获取exe文件的数字签名的相关信息#include <windows.h>#include <wincrypt.h>#include <wintrust.h>#include <stdio.h>#include <tchar.h>#pragma comment(lib, "crypt32.lib")#define ENCODING (X509_ASN_ENCODING | PKCS_7_ASN_ENCODING)typede 阅读全文

posted @ 2012-07-12 18:26 歌舞程序 阅读(726) 评论(0) 推荐(0) 编辑