ich habe heute per Zufall diesen Soruce Code gefunden:
http://code.google.com/p/flabbyboxx/...nk/flabbybox.c
leider in C++ oder c. Aber genau für meine Fernbediegung.
Delphi-Quellcode:
var
dev : pusbdevice;
ret:Integer;
buf:PChar;
r,r2:Integer;
driver:Pchar;
s2:Longint;
e:Integer;
begin
dev:=FindDevice;
if dev <> NIL then begin
writeln('GEFUNDEN');
FusbDevHandle:=usb_open(dev);
if FUsbDevHandle<>nil then begin
driver:=' ';
e:= usb_get_driver_np(FUsbDevHandle, 0, driver, 20);
// writeln(usb_detach_kernel_driver_np(FUsbDevHandle, 0));
// writeln(usb_detach_kernel_driver_np(FUsbDevHandle, ));
writeln(usb_set_configuration(FusbDevHandle, 1));
// s:=usb_get_driver_np(FUsbDevHandle,0,driver,20);
//s:=usb_detach_kernel_driver_np(FUsbDevHandle, s2);
// writeln(usb_set_altinterface(FUsbDevHandle, 1));
//writeln(s,'\',s2);
// usb_reset(FUsbDevHandle);
// r:=usb_claim_interface(FusbDevHandle, 0);
// r2:=usb_set_configuration(FusbDevHandle,3);
// s:='';
// dev^.dev:=@s;
// writelN(assigned(dev^.dev));
writeln(usb_strerror);
ed:=dev^.config[0].theInterface^.altsetting^.endpoint[0].bEndpointAddress;
end;
// Timer1.Enabled:=True;
end
else
ShowMessage('nicht gefunden')
end;
doch leider bekomme ich fehler Meldungen:
Zitat:
could not set config 1: Device or resource busy