Lista kamer z biblioteki dll

0

procedura ma na celu wyświetlenie listy kamerek w comboboxie:

procedure TFormaUst.FormCreate(Sender: TObject);
var FolderName : string ;
    i : integer ;
    Interval, Tolerance, Ray, Percent : Word ;
    CameraName : String ;
begin
  reg := TRegIniFile.Create('\Software\RafalRutkowski\'+NAZWA_PROGRAMU);
  ActComp := reg.ReadString('Program','ActualComponent','') ;
  MonitName := reg.ReadString('Program', 'MonitName','') ;
  if not FileExists(MonitName)
   then exit ;
  //reg.WriteString('LogWriter', 'FileName', String(nazwa));
  ini := TINIFile.Create(MonitName);

  FolderName := ini.ReadString(ActComp,'Folder', '');
  drl.Directory := FolderName ;

  Interval := ini.ReadInteger(ActComp, 'Interval', 2) ;
  seInt.Value := Interval ;

  Tolerance := ini.ReadInteger(ActComp, 'Tolerance', 10) ;
  seTol.Value := Tolerance ;

  Ray := ini.ReadInteger(ActComp, 'Ray', 2) ;
  sePromien.Value := Ray ;

  Percent := ini.ReadInteger(ActComp, 'Percent', 8 ) ;
  seProc.Value := Percent ;

  CameraName := ini.ReadString(ActComp, 'CameraName','') ;

  Caption := 'Ustawienia - '+ ActComp ;

  fcbKamera.Clear ;

  SysDev:= TSysDevEnum.Create{(CLSID_VideoInputDeviceCategory)};

  //sysdev.SelectGUIDCategory(CLSID_VideoInputDeviceCategory);
  if SysDev.CountFilters > 0 then
    for i := 0 to SysDev.CountFilters - 1 do
    begin
      fcbKamera.Items.Add(SysDev.Filters[i].FriendlyName)

      {Device := TMenuItem.Create(Devices);
      Device.Caption := SysDev.Filters[i].FriendlyName;
      Device.Tag := i;
      Device.OnClick := OnSelectDevice;
      Devices.Add(Device);  }
    end;
  fcbKamera.ItemIndex := 0 ;

end;

i działa. ale jak ładuje z dllki, to TSysDevEnu.create powoduje accessviolation. jak do listy modułów dorzucę dspack, to wyświetla notkę, że 'The SampleGrabber Filter is not available on this system.'. (dspack.pas linia 3212)

0

Po co było przyklejać ten watek, hę?

1 użytkowników online, w tym zalogowanych: 0, gości: 1, botów: 0