摘要://版本号信息 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);
阅读全文
摘要: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
阅读全文
摘要:第一种:#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
阅读全文