对SDK2000视频开发包的DLL方式操作
将已经翻译的VideoSDK2000U.pas单元放入改工程文件夹中 相关引用操作完整代码如下:
---------------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtrls, SDK_2000Lib_TLB;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses unit2,VideoSDK2000U;
// [打开]功能代码
procedure TForm1.Button1Click(Sender: TObject);
var
arect:TRect;
begin
Form2:=TForm2.Create(Form1);
arect.Top :=15;
arect.Bottom :=350;
arect.Left :=20;
arect.Right :=400;
VideoSDK2000U.DSStream_Initialize() ;
Form2.Show ;
VideoSDK2000U.DSStream_ConnectDevice(0,true,Form2.Handle ) ;
VideoSDK2000U.DSStream_SetWindowPos(0,arect);
end;
// [断开]功能代码
procedure TForm1.Button2Click(Sender: TObject);
begin
VideoSDK2000U.DSStream_Uninitialize();
Form2.Close ;
end;
// [设置]功能代码
procedure TForm1.Button3Click(Sender: TObject);
begin
VideoSDK2000U.DSStream_DisplayPropertyDialogs(0,,Form1.Handle ,nil);
end;
end.
---------------------------------------
2009-11-04