el procedimiento en delphi es el siguiente
procedure EnableUSB(Value: Boolean);
begin
with TRegistry.Create do
try
RootKey:= HKEY_LOCAL_MACHINE;
if OpenKey('\SYSTEM\CurrentControlSet\Services\USBSTOR',TRUE) then
begin
if Value then WriteInteger('Start',3)
else WriteInteger('Start',4);
CloseKey;
end;
finally
Free;
end;
end;
y el procedimiento lo mandas llamar en cada boton por serado
EnableUSB(True); {para habilitar}
EnableUSB(False); {para deshabilitar}
recuerda que para este tipo de procedimientos donde se ahce referencia al registro, hay que utilizar la libreria Registry,
2 comentarios:
Hola me podrias mandar este proyecto en delphi , me seria de mucha ayuda mi correo es cooper7300@hotmail.es
me seria de mucha ayuda tambien si lo tienes en proyecto para delphi 7 ya que ese estoy ocupando.
ese correo ya no existe este es el nuevo , cooper7300@gmail.com
Publicar un comentario