unit AS_Functions;

interface
uses Classes, SysUtils, Windows;

procedure ExecETCommand(Command : String);

implementation

procedure ExecETCommand(Command : String);
var
  buffer : array[0..4096] of char;
  F : THandle;
  written : Cardinal;
begin
  StrPCopy(buffer,Command);
  if (not WaitNamedPipe(PChar('\\.\pipe\ETCommands'),25)) then
    exit;
  F:=CreateFile(PChar('\\.\pipe\ETCommands'),
                      GENERIC_WRITE,
                      0,
                      nil,
                      OPEN_EXISTING,
                      0,
                      0);
  if (f<>INVALID_HANDLE_VALUE) then
    WriteFile(F,buffer,length(Command),written,nil);
  CloseHandle(F);
end;



end.