comp.lang.ada
 help / color / mirror / Atom feed
From: Stephane Perret <Stephane.Perret@maths.unine.ch>
Subject: Re: About lauching files on Win98
Date: Fri, 23 Feb 2001 09:37:08 +0100
Date: 2001-02-23T09:37:08+01:00	[thread overview]
Message-ID: <3A962135.BD790A6@maths.unine.ch> (raw)
In-Reply-To: 96o913$m1loc$1@ID-76083.news.dfncis.de

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."



  parent reply	other threads:[~2001-02-23  8:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-12 14:39 About lauching files on Win98 Stéphane Perret
     [not found] ` <96o913$m1loc$1@ID-76083.news.dfncis.de>
2001-02-23  8:37   ` Stephane Perret [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-12 22:21 Beard, Frank
2001-02-13 11:33 ` John English
2001-02-16  0:17 Beard, Frank
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox