Seriously, what happens if you run the console application as a
service with my NT Wrapper http://www.duodata.de/ntwrapper/?

It will surely not work because my code for dual mode will be fooled, thinking it is a service application while it is not.

If that works I guess the problem can be found in your service code,
assuming that you neither use the Delphi service framework nor
my DDService (http://www.duodata.de/misc/delphi/DDService.zip).

I use my own code I wrote years ago. I use it in several applications (but none with UDP until now) with no problem.



I have tryed something new and simple: I derived a new class from TWSocket and overriden TriggerDataAvailable. My idea was to know if it was triggered or not. Here is the code:

type
   TDebugWSocket = class(TWSocket)
   protected
       function    TriggerDataAvailable(Error : Word) : Boolean; override;
   end;

var
   GDisplayProc : procedure (const Msg : String) of object = nil;

function TDebugWSocket.TriggerDataAvailable(Error: Word): Boolean;
begin
   if Assigned(GDisplayProc) then
       GDisplayProc('TriggerDataAvailable');
   Result := inherited TriggerDataAvailable(Error);
end;

GDisplayProc is assigned a routine which output the message to the console window and to the log file and which is used all over the application.

Guess what ? It works !
This is not satisfying since the log file is full of unwanted messages and this probably only hides the real problem.

--
francois.pie...@overbyte.be
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to