| 1 |
|
|---|
| 2 | /*
|
|---|
| 3 | *@@sourcefile apps.h:
|
|---|
| 4 | * header file for apps.c. See remarks there.
|
|---|
| 5 | *
|
|---|
| 6 | * Note: Version numbering in this file relates to XWorkplace version
|
|---|
| 7 | * numbering.
|
|---|
| 8 | *
|
|---|
| 9 | *@@include #define INCL_WINPROGRAMLIST
|
|---|
| 10 | *@@include #include <os2.h>
|
|---|
| 11 | *@@include #include "apps.h"
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 | /* This file Copyright (C) 1997-2001 Ulrich Mller.
|
|---|
| 15 | * This file is part of the "XWorkplace helpers" source package.
|
|---|
| 16 | * This is free software; you can redistribute it and/or modify
|
|---|
| 17 | * it under the terms of the GNU General Public License as published
|
|---|
| 18 | * by the Free Software Foundation, in version 2 as it comes in the
|
|---|
| 19 | * "COPYING" file of the XWorkplace main distribution.
|
|---|
| 20 | * This program is distributed in the hope that it will be useful,
|
|---|
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 23 | * GNU General Public License for more details.
|
|---|
| 24 | */
|
|---|
| 25 |
|
|---|
| 26 | #if __cplusplus
|
|---|
| 27 | extern "C" {
|
|---|
| 28 | #endif
|
|---|
| 29 |
|
|---|
| 30 | #ifndef APPS_HEADER_INCLUDED
|
|---|
| 31 | #define APPS_HEADER_INCLUDED
|
|---|
| 32 |
|
|---|
| 33 | /* ******************************************************************
|
|---|
| 34 | *
|
|---|
| 35 | * Environment helpers
|
|---|
| 36 | *
|
|---|
| 37 | ********************************************************************/
|
|---|
| 38 |
|
|---|
| 39 | /*
|
|---|
| 40 | *@@ DOSENVIRONMENT:
|
|---|
| 41 | * structure holding an array of environment
|
|---|
| 42 | * variables (papszVars). This is initialized
|
|---|
| 43 | * appGetEnvironment,
|
|---|
| 44 | *
|
|---|
| 45 | *@@added V0.9.4 (2000-07-19) [umoeller]
|
|---|
| 46 | */
|
|---|
| 47 |
|
|---|
| 48 | typedef struct _DOSENVIRONMENT
|
|---|
| 49 | {
|
|---|
| 50 | ULONG cVars; // count of vars in papzVars
|
|---|
| 51 | PSZ *papszVars; // array of PSZ's to environment strings (VAR=VALUE)
|
|---|
| 52 | } DOSENVIRONMENT, *PDOSENVIRONMENT;
|
|---|
| 53 |
|
|---|
| 54 | APIRET appParseEnvironment(const char *pcszEnv,
|
|---|
| 55 | PDOSENVIRONMENT pEnv);
|
|---|
| 56 |
|
|---|
| 57 | APIRET appGetEnvironment(PDOSENVIRONMENT pEnv);
|
|---|
| 58 |
|
|---|
| 59 | PSZ* appFindEnvironmentVar(PDOSENVIRONMENT pEnv,
|
|---|
| 60 | PSZ pszVarName);
|
|---|
| 61 |
|
|---|
| 62 | APIRET appSetEnvironmentVar(PDOSENVIRONMENT pEnv,
|
|---|
| 63 | PSZ pszNewEnv,
|
|---|
| 64 | BOOL fAddFirst);
|
|---|
| 65 |
|
|---|
| 66 | APIRET appConvertEnvironment(PDOSENVIRONMENT pEnv,
|
|---|
| 67 | PSZ *ppszEnv,
|
|---|
| 68 | PULONG pulSize);
|
|---|
| 69 |
|
|---|
| 70 | APIRET appFreeEnvironment(PDOSENVIRONMENT pEnv);
|
|---|
| 71 |
|
|---|
| 72 | /* ******************************************************************
|
|---|
| 73 | *
|
|---|
| 74 | * Application start
|
|---|
| 75 | *
|
|---|
| 76 | ********************************************************************/
|
|---|
| 77 |
|
|---|
| 78 | #ifdef INCL_WINPROGRAMLIST
|
|---|
| 79 | // additional PROG_* flags for appQueryAppType
|
|---|
| 80 | #define PROG_XWP_DLL 998 // dynamic link library
|
|---|
| 81 |
|
|---|
| 82 | APIRET appQueryAppType(const char *pcszExecutable,
|
|---|
| 83 | PULONG pulDosAppType,
|
|---|
| 84 | PULONG pulWinAppType);
|
|---|
| 85 |
|
|---|
| 86 | ULONG appIsWindowsApp(ULONG ulProgCategory);
|
|---|
| 87 |
|
|---|
| 88 | PSZ appQueryDefaultWin31Environment(VOID);
|
|---|
| 89 |
|
|---|
| 90 | HAPP XWPENTRY appStartApp(HWND hwndNotify, const PROGDETAILS *pcProgDetails);
|
|---|
| 91 | #endif
|
|---|
| 92 |
|
|---|
| 93 | #endif
|
|---|
| 94 |
|
|---|
| 95 | #if __cplusplus
|
|---|
| 96 | }
|
|---|
| 97 | #endif
|
|---|
| 98 |
|
|---|