摘要:
IOCP简单例子 阅读全文
摘要:
通过TEB结构获取主线程ID,XP系统下测试通过,不同系统的TEB结构可能有所不同。View Code function GetThreadID:DWORD;asm xor esi,esi mov eax,fs:[esi+$18] mov eax,[eax+$24]end;procedure TForm1.Button1Click(Sender: TObject);var thid: DWORD;begin thid := GetThreadID; ShowMessageFmt('%d',[thid]);end; 阅读全文
摘要:
Tcp Server:View Code #include <stdio.h>#include <Winsock2.h>#pragma comment(lib,"ws2_32.lib")void main(){WORD wVersionRequested;WSADATA wsaData;int err;wVersionRequested = MAKEWORD(2,2);err = WSAStartup(wVersionRequested,&wsaData);if (err!=0){return;}if ((LOBYTE(wsaData.wVe 阅读全文
摘要:
1.下载以下两个文件,放入php ext目录及system32php_sqlsrv_52_ts_vc6.dll (线程安全)php_sqlsrv_52_nts_vc6.dll (非线程安全)vc6用于Apache,vc9用于IIS2.修改php.iniextension=php_sqlsrv_52_ts_vc6.dll3.下载sqlncli.msi,微软官方可以下安装的时候提示是sql server 2008的,不过2005也是可以用的。4.测试代码代码 阅读全文