Hi,
When new property SocketFamily is set to "sfAny" method
DnsLookup may now return a list containing both IPv4 and IPv6
strings. Looks like Windows always returns IPv6 first.
The top item is also copied to string FDnsResult.
Should I change this order?
BTW.: I wrote some helper classes to emulate the
WSAAsyncGetHostByxx functions.
While I was testing them I got strange AV's upon debugging
and stepping thru the multi-threaded code. Took me several days
to prove that this is not caused by my code but either a
debugger bug (my favorite) or some other condition (driver,
root kit or whatsoever).
I made a very simple test case which triggers the AV on different
hardware and Windows versions in both D7 and D2010 here.
However some German testers were not able to reproduce the issue,
very strange.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
const
WM_TEST = WM_USER + 1;
type
TMyThread = class(TThread)
protected
FWindowHandle: HWND;
procedure Execute; override;
public
constructor Create(AHWnd: HWND); reintroduce;
end;
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
procedure WmTest(var Msg: TMessage); message WM_TEST;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TMyThread }
constructor TMyThread.Create(AHWnd: HWND);
begin
FWindowHandle := AHWnd;
inherited Create(FALSE);
end;
procedure TMyThread.Execute;
var
I : Integer;
begin
I := 0;
while not Terminated do
begin
Sleep(500);
SendMessage(FWindowHandle, WM_TEST, ThreadID, I);
Inc(I);
end;
end;
procedure TForm1.WmTest(var Msg: TMessage);
begin
Memo1.Lines.Add(IntToHex(Msg.WParam, 8) + ' ' + IntToStr(Msg.LParam));
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Thread : TMyThread;
I : Integer;
begin
IsMultiThread := TRUE;
for I := 1 to 4 do // <== Set a break point here and repeat pressing F8
until the AV is raised.
Thread := TMyThread.Create(Handle);
end;
end.
--
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