dnswin init must be called from lcoreinit to support NT service
authorbeware <beware@bircd.org>
Thu, 4 Jul 2013 00:25:32 +0000 (00:25 +0000)
committerbeware <beware@bircd.org>
Thu, 4 Jul 2013 00:25:32 +0000 (00:25 +0000)
git-svn-id: file:///svnroot/lcore/trunk@125 b1de8a11-f9be-4011-bde0-cc7ace90066a

dnswin.pas
lcorewsaasyncselect.pas

index 567ea68f04424b720616f36070a62106b0779d0a..17a8a97a02830ad4e4468465bfb14316aeb60092 100644 (file)
@@ -39,6 +39,8 @@ type
 \r
   end;\r
 \r
 \r
   end;\r
 \r
+procedure init;\r
+\r
 implementation\r
 uses\r
   { zipplet: moved pgtypes to interface because it's needed for the string definitions }\r
 implementation\r
 uses\r
   { zipplet: moved pgtypes to interface because it's needed for the string definitions }\r
@@ -330,6 +332,7 @@ var
                                  hbrBackground : 0;\r
                                  lpszMenuName  : nil;\r
                                  lpszClassName : 'dnswinClass');\r
                                  hbrBackground : 0;\r
                                  lpszMenuName  : nil;\r
                                  lpszClassName : 'dnswinClass');\r
+procedure init;\r
 begin\r
 \r
     if Windows.RegisterClass(MyWindowClass) = 0 then halt;\r
 begin\r
 \r
     if Windows.RegisterClass(MyWindowClass) = 0 then halt;\r
@@ -346,4 +349,7 @@ begin
                                nil);      { CreateParam   }\r
   //writeln('dnswin hwnd is ',hwnddnswin);\r
   //writeln('last error is ',GetLastError);\r
                                nil);      { CreateParam   }\r
   //writeln('dnswin hwnd is ',hwnddnswin);\r
   //writeln('last error is ',GetLastError);\r
+end;\r
+\r
+\r
 end.\r
 end.\r
index cde709bcd58c4cf2e1ccf9edd9fc55d4af2600d6..075d5587622d40177d71ec9bc23bceff58784716 100755 (executable)
@@ -6,7 +6,10 @@ procedure lcoreinit;
 \r
 implementation\r
 \r
 \r
 implementation\r
 \r
-uses wcore,lcore,bsearchtree,sysutils,windows,winsock,pgtypes,messages,classes,lsocket;\r
+uses\r
+  dnswin, //to call init\r
+  wcore,lcore,bsearchtree,sysutils,windows,winsock,pgtypes,messages,classes,lsocket;\r
+\r
 type\r
   twineventcore=class(teventcore)\r
   public\r
 type\r
   twineventcore=class(teventcore)\r
   public\r
@@ -205,6 +208,8 @@ procedure lcoreinit;
 begin\r
   if (inited) then exit;\r
 \r
 begin\r
   if (inited) then exit;\r
 \r
+  dnswin.init;\r
+\r
   eventcore := twineventcore.create;\r
   if Windows.RegisterClass(MyWindowClass) = 0 then halt;\r
   //writeln('about to create lcore handle, hinstance=',hinstance);\r
   eventcore := twineventcore.create;\r
   if Windows.RegisterClass(MyWindowClass) = 0 then halt;\r
   //writeln('about to create lcore handle, hinstance=',hinstance);\r