X
xawangting
Unregistered / Unconfirmed
GUEST, unregistred user!
ShellWindow: IShellWindows;
nCount: integer;
spDisp: IDispatch;
i: integer;
vi: OleVariant;
IE1: IWebBrowser2;
begin
listbox1.clear;
ShellWindow := CoShellWindows.Create;
nCount := ShellWindow.Count;
运行到这里出现“RPC服务器不可用”的错误这是怎么回事??
for i := 0 to nCount - 1 do
begin
vi := i;
try
spDisp := ShellWindow.Item(vi);
except
exit
end;
if (spDisp <> nil) then
begin
try
spDisp.QueryInterface(iWebBrowser2, IE1);
except
on EAccessViolation do
begin
exit;
end;
end;
if (IE1 <> nil) then
begin
listbox1.items.add(IE1.Get_LocationURL());
end;
end;
end;
nCount: integer;
spDisp: IDispatch;
i: integer;
vi: OleVariant;
IE1: IWebBrowser2;
begin
listbox1.clear;
ShellWindow := CoShellWindows.Create;
nCount := ShellWindow.Count;
运行到这里出现“RPC服务器不可用”的错误这是怎么回事??
for i := 0 to nCount - 1 do
begin
vi := i;
try
spDisp := ShellWindow.Item(vi);
except
exit
end;
if (spDisp <> nil) then
begin
try
spDisp.QueryInterface(iWebBrowser2, IE1);
except
on EAccessViolation do
begin
exit;
end;
end;
if (IE1 <> nil) then
begin
listbox1.items.add(IE1.Get_LocationURL());
end;
end;
end;