随笔分类 -  VC++/QT

摘要:vista与2008的大小版本都是一样的6.0,要区分就要通过wProductType来识别! if( VerInfoEx.dwMajorVersion == 6 ) { if (VerInfoEx.wProductType == VER_NT_SERVER || VerInfoEx.wProductType == VER_NT_DOMAIN_CONTROLLER) retur... 阅读全文
posted @ 2009-03-09 10:41 ahuo 阅读(489) 评论(0) 推荐(0)
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->chartemp[1024]={0};ZeroMemory(temp,sizeof(temp));intlen=WideCharToMultiByte(CP_ACP,0,vtProp.bstrVal,-1,temp,sizeof(temp),NULL,NULL);Code highlighting produced by Actipro CodeHighlighter (freeware)htt 阅读全文
posted @ 2008-11-19 09:56 ahuo 阅读(1550) 评论(0) 推荐(0)
摘要:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include #include int main(int argc, char* argv[]){ printf("Hello World!\n"); time_t t=time(... 阅读全文
posted @ 2008-10-29 15:20 ahuo 阅读(1439) 评论(0) 推荐(0)
摘要:int GetProcessIDByName(char* pname) { HANDLE SnapShot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); SHFILEINFO shSmall; BOOL Status=FALSE; PROCESSENTRY32 ProcessInfo;//声明进程信息变量 DWORD pid=0; if... 阅读全文
posted @ 2008-09-27 14:34 ahuo 阅读(1233) 评论(0) 推荐(0)
摘要:该api的可以实现windows的无线客户端的网络参数配置(WlanSetProfile),连接指定的ap,断开连接和获得其他关于无线网络的信息(ssid,rssi等)。 WLAN_NOTIFICATION_CALLBACK WlanAllocateMemory WlanCloseHandle WlanConnect WlanDeleteProfile WlanDisconnect W... 阅读全文
posted @ 2008-09-11 10:38 ahuo 阅读(4548) 评论(1) 推荐(0)
摘要:获得本地的帐户密码的md4值,同时可以修改其用户密码! http://www.rayfile.com/files/81693863-7e0e-11dd-aa34-0019d11a795f/ 阅读全文
posted @ 2008-09-09 09:33 ahuo 阅读(828) 评论(0) 推荐(0)
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1/**//* su切换用户 2* 2004/12/28 1.0,发现Bingle的wsu是假冒令牌,权限并没有真正设置. 3* 2004/12/29 2.0,真正实现模拟用户令牌... 阅读全文
posted @ 2008-09-04 14:20 ahuo 阅读(1490) 评论(0) 推荐(0)
摘要:本示例用多线程实现了一个ssl服务端和一个客户端。 服务端代码如下: #include #include #include #include #ifndef _WIN32 #include #include #include #include #include #include #else #include #include #endif #include "pthr... 阅读全文
posted @ 2008-09-03 11:21 ahuo 阅读(4240) 评论(0) 推荐(0)
摘要:#include "stdafx.h" #include #include int main(int argc, char* argv[]) { printf("Hello World!\n"); char buf[]="123456"; unsigned char md[50]={0}; SHA_CTX ctx; SHA_Init(&ctx); SHA_Update(&ctx,b... 阅读全文
posted @ 2008-08-20 10:00 ahuo 阅读(721) 评论(0) 推荐(0)
摘要:在编译源文件时,C编译器和C++编译器都会对符号(函数或变量)名作某些修正,但两者采用的修正方法不同,所以两者生成的目标文件不能互相链接。在C++中使用extern "C"可以让C++符号获得C链接特性。由于C++编译器会自动定义__cplusplus宏,所以在C语言头文件中采用这种结构可以保证无论使用何种编译器,生成的目标文件都具有C链接特性,能够与标准C编译器所生成的目标文件相链接。 通常c/... 阅读全文
posted @ 2008-08-12 09:30 ahuo 阅读(1640) 评论(0) 推荐(0)
摘要:OpenSSL 使用指南 http://www.fs2you.com/files/5b43b3b0-5e3d-11dd-9b38-0019d11a795f/ 目录 • 介绍 • 编译 • 运行 OpenSSL.exe • 算法编程 API 4.1 对称算法 4.1.1 DES 4.1.2 A ES 4.1.3 RC4 4.1.4 EVP_ 4.2 公钥算法 ... 阅读全文
posted @ 2008-07-30 21:51 ahuo 阅读(13306) 评论(1) 推荐(0)
摘要:#include void OnButton3() { USES_CONVERSION; DATE m_dt; _bstr_t bstrDate=__DATE__; VarDateFromStr(bstrDate, LANG_USER_DEFAULT, 0, &m_dt); _variant_t vTime; vTime=m_dt; SYSTEMTIME stTmp; ... 阅读全文
posted @ 2008-07-18 15:53 ahuo 阅读(1813) 评论(0) 推荐(0)
摘要:【Pascal保留字/关键字列表】 关键字 作用 关键字 作用 ... 阅读全文
posted @ 2008-06-05 15:39 ahuo 阅读(1574) 评论(0) 推荐(0)
摘要:UpdateData(FALSE)与UpdateData(TRUE)是相反的过程 UpdateData(FALSE)是把程序中改变的值更新到控件中去 UpdateData(TRUE)是把在控件中输入的值更新到你的变量中去 这个只能够影响所有控件 要指定控件就必须用 GetDlgItem(IDC_EDIT)->SetWindowText(m_txt); GetDlgItem(IDC... 阅读全文
posted @ 2008-06-02 20:58 ahuo 阅读(1722) 评论(0) 推荐(0)
摘要:// Replace.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #pragma comment(lib,"shlwapi.lib") int StrReplaceI(char* src,char* oldstr,char* newstr) { ... 阅读全文
posted @ 2008-05-30 14:24 ahuo 阅读(849) 评论(0) 推荐(0)
摘要:1.创建dll工程 2.删除cpp,h文件 3.添加连接选项/noentry dll部分完成 app部分 1.添加成员变量 HINSTANCE m_hLangDLL; 2.InitInstance()内添加 AfxEnableControlContainer(); m_hLangDLL=::LoadLibrary("chinese.dll"); AfxSetResourceHandle(... 阅读全文
posted @ 2008-05-08 16:22 ahuo 阅读(902) 评论(0) 推荐(0)
摘要:#include "stdafx.h" #include #include "RSACrypto.h" int main(int argc, char* argv[]) { printf("Hello World!\n"); CTomCryptoRSAWrapper Wra; //const unsigned char* seed; unsigned char strseed[]... 阅读全文
posted @ 2008-04-29 11:23 ahuo 阅读(1623) 评论(0) 推荐(0)
摘要:密码库LibTomcrypt的内容介绍及分析 2.1 密码知识简介 2.1.1专业术语 发送者和接收者 假设发送者想发送消息给接收者,且想安全地发送信息:她想确信偷听者不能阅读发送的消息。 2.1.2消息和加密 消息被称为明文。用某种方法伪装消息以隐藏它的内容的过程称为加密,加了密的消息称为密文,而把密文转变为明文的过程称为解密。图1.1表明了这个过程。 (如果你遵循ISO 7... 阅读全文
posted @ 2008-04-29 09:53 ahuo 阅读(3831) 评论(0) 推荐(0)
摘要:#pragma data_seg("flag_data") int count=0; #pragma data_seg() #pragma comment(linker,"/SECTION:flag_data,RWS") 这种方法只能在没有def文件时使用,如果通过def文件进行导出的话,那么设置就要在def文件内设置而不能 在代码里设置了。 SETCTIONS flag_data REA... 阅读全文
posted @ 2008-04-08 23:56 ahuo 阅读(3908) 评论(2) 推荐(0)
摘要:VC项目文件说明 .opt 工程关于开发环境的参数文件。如工具条位置等信息; ... 阅读全文
posted @ 2008-04-08 23:38 ahuo 阅读(637) 评论(0) 推荐(0)