Re: Launching separate Windows app from Forms 4.5 for DDE

From: (wrong string) ård <rune_at_lis.pitt.edu>
Date: 1996/03/23
Message-ID: <4j0v96$rr4_at_oslo-nntp.eunet.no>#1/1


kirsten konopaski (kkonopa_at_symantec.com) wrote:
: Hi,
 

: I need to launch a separate Windows application upon loading of my Forms 4.5
: application. I attempt to use HOST with NO_SCREEN and NO_PROMPT, however, the
: Windows application does have a window and display.
 

: It isn't working, ie: the control to Forms never returns until the separate
: Windows executable is closed.

We are using ORA_FFI to call the windows api function winexec, in that way you can continue your work in FOrms while your launched application is running. Good luck.

  • Rune

PACKAGE BODY WINRUN IS
  lh ORA_FFI.LIBHANDLETYPE := ORA_FFI.Register_Library('','KRNL386.EXE');   f1 ORA_FFI.FUNCHANDLETYPE :=
ORA_FFI.Register_Function(lh,'WinExec',ORA_FFI.PASCAL_STD);

  FUNCTION icd_WinExec(fh IN ORA_FFI.FUNCHANDLETYPE,

                                       lpszCmdLine      IN OUT VARCHAR2,
                                       fnCmdShow 	IN PLS_INTEGER)
    RETURN PLS_INTEGER;
  PRAGMA interface (c, icd_WinExec, 11265);

  FUNCTION WinExec(program IN VARCHAR2) RETURN BOOLEAN IS     lpszCmdLine VARCHAR2(255) := program;     retlen NUMBER ;
  BEGIN
    retlen := icd_WinExec(f1,lpszCmdLine,1);     IF retlen < 32 THEN

      Message('Feil oppstått ved kjøring av programmet '||program );
      RAISE Form_Trigger_Failure;

    END IF;
    RETURN(TRUE);
  END; /* WinExe */

BEGIN

  ORA_FFI.Register_Return(f1,ORA_FFI.C_INT);
  ORA_FFI.Register_Parameter(f1,ORA_FFI.C_CHAR_PTR);
  ORA_FFI.Register_Parameter(f1,ORA_FFI.C_INT);
END;
--
      ^^^
     (. .)
__ooO-(_)-Ooo________________________________________________________________
                                       |
Rune Nygaard, M.Sc. Telecommunication  | Phone:  +47 66 98 25 18
System Consultant,                     | Fax:    +47 66 98 25 28
Telox A/S, Stasjonsveien 20            | E-mail: rune_at_telox.no
N-1361 Billingstad, Norway             | WWW:    http://oslonett.no/~telox/
__________Oooo.________________________|______________________________________
 .oooO    (   )
 (   )     ) /
  \ (     (_/
   \_)
Received on Sat Mar 23 1996 - 00:00:00 CET

Original text of this message