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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,d4d10419e687b087 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-23 00:46:05 PST Message-ID: <3A962135.BD790A6@maths.unine.ch> Date: Fri, 23 Feb 2001 09:37:08 +0100 From: Stephane Perret Reply-To: Stephane.Perret@maths.unine.ch Organization: Universite de Neuchatel X-Mailer: Mozilla 4.74 (Macintosh; U; PPC) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: About lauching files on Win98 References: <3A87F584.76B2A962@maths.unine.ch> <96o913$m1loc$1@ID-76083.news.dfncis.de> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: mac13-29.unine.ch X-Trace: 23 Feb 2001 09:44:52 +0100, mac13-29.unine.ch Path: supernews.google.com!sn-xit-03!supernews.com!news-feed.riddles.org.uk!freenix!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!sitelnet.unine.ch!mac13-29.unine.ch Xref: supernews.google.com comp.lang.ada:5460 Date: 2001-02-23T09:37:08+01:00 List-Id: Good, it works perfectly. Thank you. Stephane. Joachim Schroeer wrote: > > Hello, > > I have this procedure for launching an exe from a windows program (gui, not > console). > > with Win32.Windef, Win32.Shellapi, Win32.Winuser, Interfaces.C; > ... > package ... > > procedure Start_Application(Executable : in String; > Parameter : in String := "") is > > C_Operation : aliased Interfaces.C.Char_Array := > Interfaces.C.To_C("open"); > C_Executable : aliased Interfaces.C.Char_Array := > Interfaces.C.To_C(Executable); > C_Parameter : aliased Interfaces.C.Char_Array := > Interfaces.C.To_C(Parameter); > Exe : Win32.Windef.Hinstance; > begin > Exe := Win32.Shellapi.Shellexecute > (Hwnd => Win32.Winuser.Getfocus, > Lpoperation => C_Operation (C_Operation'First)'Unchecked_Access, > Lpfile => C_Executable(C_Executable'First)'Unchecked_Access, > Lpparameters => C_Parameter (C_Parameter'First)'Unchecked_Access, > Lpdirectory => null, > Nshowcmd => Win32.Winuser.Sw_Shownormal); > end Start_Application; > > Best regards > J. Schr�er -- _________________________________ http://members.xoom.com/s_perret/ "Unless you're prepared to care for something, you don't deserve to have it."