W
wsm
Unregistered / Unconfirmed
GUEST, unregistred user!
错误'标记没有引用存储'如何解决?
raised exception class EOleSysError with message '标记没有引用存储'
procedure TForm1.TCPServerExecute(AThread: TIdPeerThread);
var
do
MDocument1:TDOMDocument;
SRequest: string;
SOutline: string;
AStream: TStringStream;
Len:Integer;
i:Integer;
begin
with AThread.Connection do
begin
AThread.Synchronize(IncrConnectionCount);
WriteLn('Hello from Indy TCP Stream Server.');
try
UILock.Acquire;
SRequest := UpperCase(ReadLn);
if SRequest = 'OUTLINE' then
begin
AStream := TStringStream.Create(SOutline);
ReadStream(AStream, -1, True);
AStream.Seek(0, soFrombegin
ning);
do
MDocument1:=TDOMDocument.Create(nil);
do
MDocument1.loadXML(AStream.DataString);
[red] Len := do
MDocument1.documentElement.childNodes.Get_length;[/red]
for i := 0 to Len - 1 do
begin
Request.Lines.Add(' '+DOMDocument1.documentElement.childNodes.item.Get_nodeName+':'+DOMDocument1.documentElement.childNodes.item.Text);
end;
do
MDocument1.Free;
AStream.Free;
end;
finally
Disconnect;
UILock.Release;
AThread.Synchronize(DecrConnectionCount);
end;
end;
end;
raised exception class EOleSysError with message '标记没有引用存储'
procedure TForm1.TCPServerExecute(AThread: TIdPeerThread);
var
do
MDocument1:TDOMDocument;
SRequest: string;
SOutline: string;
AStream: TStringStream;
Len:Integer;
i:Integer;
begin
with AThread.Connection do
begin
AThread.Synchronize(IncrConnectionCount);
WriteLn('Hello from Indy TCP Stream Server.');
try
UILock.Acquire;
SRequest := UpperCase(ReadLn);
if SRequest = 'OUTLINE' then
begin
AStream := TStringStream.Create(SOutline);
ReadStream(AStream, -1, True);
AStream.Seek(0, soFrombegin
ning);
do
MDocument1:=TDOMDocument.Create(nil);
do
MDocument1.loadXML(AStream.DataString);
[red] Len := do
MDocument1.documentElement.childNodes.Get_length;[/red]
for i := 0 to Len - 1 do
begin
Request.Lines.Add(' '+DOMDocument1.documentElement.childNodes.item.Get_nodeName+':'+DOMDocument1.documentElement.childNodes.item.Text);
end;
do
MDocument1.Free;
AStream.Free;
end;
finally
Disconnect;
UILock.Release;
AThread.Synchronize(DecrConnectionCount);
end;
end;
end;