核心提示:代码中需要引用SKYPE4COMLib_TLB.pas单元,运行前需要注册COM组件Skype4COM.dll代码示例,列举机器上活动的Skype列表:procedure TForm1.Button1...
代码中需要引用SKYPE4COMLib_TLB.pas单元,运行前需要注册COM组件Skype4COM.dll
代码示例,列举机器上活动的Skype列表:
procedure TForm1.Button1Click(Sender: TObject);
var
Skype:TSkype;
i:integer;
begin
try
ActiveX.CoInitialize(nil);
Skype:=SKYPE4COMLib_TLB.TSkype.Create(nil);
try
Skype.Attach(6,True);
ListView1.Items.Add.Caption:='Version';
ListView1.Items.Item[0].SubItems.Add(Skype.Version);
ListView1.Items.Add.Caption:='Name';
ListView1.Items.Item[1].SubItems.Add(Skype.CurrentUserHandle);
ListView1.Items.Add.Caption:='Location';
ListView1.Items.Item[2].SubItems.Add(Skype.PredictiveDialerCountry);
finally
FreeAndNil(Skype);
end;
except on e:Exception do
ShowMessage(e.Message);
end;
end;
部分代码已经打包下载
迅雷专用高速下载