This is not C++ - its either C# or JScript, most likely JScript

> I came across the followling C++ Code which uses Windoze shell extenstions
> to embed a command prompt...... In attempting to convert this to Delphi I
> discovered that I have no idea what the Delphi equivalent for
> "ActiveXObject" is? Anybody help me out?
>
> TIA

this should work, not tested tho:

procedure DosPrompt;
var
  cmdText : string;
  obj : olevariant;
begin
  cmdText := textbox.value;
  obj := CreateOLEObject("ShellUtils.Exec");
  if cmdText = "" then begin
    obj.DosFromHere(curPath);
    exit;
  end;
  buf = obj.ExecCommand(curPath, cmdText);
  ShowResults(buf);
end;

N

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to