Jump to content

WinStartApp: Difference between revisions

From EDM2
m corrected SAF constant links and WM constant link.
m add link for PROGDETAILS data type
Line 7: Line 7:
The window notification handle or [[OS2 API:DataType:NULLHANDLE|NULLHANDLE]].  If a window handle is passed, the system passes the [[OS2_API:Constant:WM#WM_APPTERMINATENOTIFY|WM_APPTERMINATENOTIFY]] message upon program exit.
The window notification handle or [[OS2 API:DataType:NULLHANDLE|NULLHANDLE]].  If a window handle is passed, the system passes the [[OS2_API:Constant:WM#WM_APPTERMINATENOTIFY|WM_APPTERMINATENOTIFY]] message upon program exit.


; progDetails - PROGDETAILS - input :
; progDetails - [[OS2 API:DataType:PROGDETAILS|PROGDETAILS]] - input :
The program list structure.
The program list structure.


Line 46: Line 46:


=== Example Code ===
=== Example Code ===
  [[OS2 API:DataType:HWND|HWND]] notifyHndl;
  [[OS2 API:DataType:HWND|HWND]]       notifyHndl;
  PROGDETAILS progDetails;
  [[OS2 API:DataType:PROGDETAILS|PROGDETAILS]] progDetails;
  [[OS2 API:DataType:PSZ|PSZ]] progParams;
  [[OS2 API:DataType:PSZ|PSZ]]         progParams;
  [[OS2 API:DataType:PVOID|PVOID]] reserved;
  [[OS2 API:DataType:PVOID|PVOID]]       reserved = [[OS2_API:Constant:NULL|NULL]];
  [[OS2 API:DataType:ULONG|ULONG]] flags;
  [[OS2 API:DataType:ULONG|ULONG]]       flags;
  [[OS2 API:DataType:HAPP|HAPP]] invokedHndl;
  [[OS2 API:DataType:HAPP|HAPP]]       invokedHndl;
  ...
  ...
  invokedHndl = WinStartApp(notifyHndl, progDetails, progParams, reserved, flags);
  invokedHndl = WinStartApp(notifyHndl, progDetails, progParams, reserved, flags);

Revision as of 08:36, 6 February 2006

WinStartApp

WinStartApp(notifyHndl, progDetails, progParams, reserved, flags)

Execute a program.

Parameters

notifyHndl - HWND - input

The window notification handle or NULLHANDLE. If a window handle is passed, the system passes the WM_APPTERMINATENOTIFY message upon program exit.

progDetails - PROGDETAILS - input

The program list structure.

progParams - PSZ - input

NULL or the parameters for the program to be started. The layout is first, the program's exe name; the second, the space separated arguments.

reserved - PVOID - input

Start data. Reserved - pass NULL.

flags - ULONG - input

Zero for no flags or:

Constants

None

Returns

The invoked applications handle of type HAPP, or NULLHANDLE if an error occurred. Possible returns from WinGetLastError:

Module

Define (C/C++)

INCL_WINWINDOWMGR or INCL_WIN or INCL_PM

Export name/Ordinal

Calling conversion

Cdecl32

Example Code

HWND        notifyHndl;
PROGDETAILS progDetails;
PSZ         progParams;
PVOID       reserved = NULL;
ULONG       flags;
HAPP        invokedHndl;
...
invokedHndl = WinStartApp(notifyHndl, progDetails, progParams, reserved, flags);
...

Related Functions

WinTerminateApp

Notes

OS Version Introduced