摘要:
新的datasnap使用INDY10的线程池。不管你知不知道,DATASNAP都是使用线程池了,这和MIDAS不同,MIDAS默认是没有线程池的。跟踪INDY10线程池类TIdSchedulerOfThreadPool的代码:procedure TIdSchedulerOfThreadPool.Init;begin inherited Init; Assert(FThreadPool<>nil); if not IsDesignTime then begin if PoolSize > 0 then begin with FThreadPool.LockList do try 阅读全文
posted @ 2012-03-03 22:52
delphi中间件
阅读(3773)
评论(0)
推荐(0)
摘要:
其实不论什么方法,归根揭底都是通过传递对象的指针来达到效果的。方法一:procedure SendString(strMSG: string);var Data: tagCOPYDATASTRUCT; pBuf: PChar;begin GetMem(pBuf, Length(strMSG) + 1); try ZeroMemory(pBuf, Length(strMSG) + 1); StrPCopy(pBuf, strMSG); Data.cbData:= Length(strMSG); Data.dwData:= Length(strMSG); Data.lpData:= pBuf; S 阅读全文
posted @ 2012-03-03 08:41
delphi中间件
阅读(904)
评论(0)
推荐(0)

浙公网安备 33010602011771号