\r
interface\r
\r
+procedure lcoreinit;\r
\r
implementation\r
+\r
uses wcore,lcore,bsearchtree,sysutils,windows,winsock,pgtypes,messages,classes,lsocket;\r
type\r
twineventcore=class(teventcore)\r
lpszClassName : 'lcoreClass');\r
GInitData: TWSAData;\r
\r
+var\r
+ inited:boolean;\r
+procedure lcoreinit;\r
begin\r
+ if (inited) then exit;\r
+\r
eventcore := twineventcore.create;\r
if Windows.RegisterClass(MyWindowClass) = 0 then halt;\r
//writeln('about to create lcore handle, hinstance=',hinstance);\r
onaddtask := winaddtask;\r
timerwrapperinterface := twintimerwrapperinterface.create(nil);\r
\r
- WSAStartup($200, GInitData);\r
+ WSAStartup(2, GInitData);\r
absoloutemaxs := maxlongint;\r
+\r
+\r
+ inited := true;\r
+end;\r
+\r
end.\r