From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd23039a1d740a56 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-01 06:44:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Ada binding to redirect standard output in Win32 Date: Mon, 1 Oct 2001 09:25:41 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9p9qsn$64f$1@nh.pace.co.uk> References: <3bb82d8e$1@pull.gecm.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1001942743 6287 136.170.200.133 (1 Oct 2001 13:25:43 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 1 Oct 2001 13:25:43 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:13572 Date: 2001-10-01T13:25:43+00:00 List-Id: I don't know if it works on MS-DOS, but its something that comes with Gnat & may be half-way portable. Perform a system command doing something like the following: (You may need to modify this for MS-DOS-isms rather than Unix-isms, but IIRC, there is a "system" C call that works for MS-DOS.) with Interfaces.C; procedure UTIL.Perform_System_Command ( Command : in String ; Wait : in Boolean := True ; Success : out Boolean) is -- Return_Code : Integer ; -- function Sys ( Item : in Interfaces.C.Char_Array) return Integer ; pragma Import (C, Sys, "system") ; -- package C renames Interfaces.C ; -- begin -- if (Wait) then Return_Code := Sys ( Item => C.To_C ("ksh -c " & '"' & Command & '"')); else Return_Code := Sys ( Item => C.To_C ("ksh -c " & '"' & Command & " &" & '"')); end if ; -- if (Return_Code /= 0) then Success := False ; else Success := True ; end if; -- end UTIL.Perform_System_Command ; MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Martin Dowie" wrote in message news:3bb82d8e$1@pull.gecm.com... > I have a Win32 (non-GUI) program which requires the user > to type in their password but, for obvious reasons, I > don't want it to appear on the screen/DOS window as > they type. > > Does anyone have an Ada binding to a routine similar in > effect to 'ECHO OFF' that I could call before the > 'Get_Line'? or, something similar to redirecting the > standard output to a UNIX null device. > > I've exhausted my search engine enough on this! :-) > > Thanks in advance... > > >