Ignore:
Timestamp:
Mar 7, 2001, 10:41:07 PM (24 years ago)
Author:
umoeller
Message:

Misc. changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/winh.c

    r35 r43  
    4141#define INCL_DOSDEVICES
    4242#define INCL_DOSDEVIOCTL
     43#define INCL_DOSSESMGR
    4344#define INCL_DOSERRORS
    4445
     
    25572558
    25582559/*
     2560 *@@ winhQueryAppType:
     2561 *      returns the Control Program (Dos) and
     2562 *      Win* PROG_* application types for the
     2563 *      specified executable. Essentially, this
     2564 *      is a wrapper around DosQueryAppType.
     2565 *
     2566 *      pcszExecutable must be fully qualified.
     2567 *      You can use doshFindExecutable to qualify
     2568 *      it.
     2569 *
     2570 *      This returns the APIRET of DosQueryAppType.
     2571 *      If this is NO_ERROR; *pulDosAppType receives
     2572 *      the app type of DosQueryAppType. In addition,
     2573 *      *pulWinAppType is set to one of the following:
     2574 *
     2575 *      --  PROG_FULLSCREEN
     2576 *
     2577 *      --  PROG_PDD
     2578 *
     2579 *      --  PROG_VDD
     2580 *
     2581 *      --  PROG_XWP_DLL: new apptype defined in winh.h for
     2582 *          dynamic link libraries.
     2583 *
     2584 *      --  PROG_WINDOWEDVDM
     2585 *
     2586 *      --  PROG_PM
     2587 *
     2588 *      --  PROG_31_ENH
     2589 *
     2590 *      --  PROG_WINDOWABLEVIO
     2591 *
     2592 *@@added V0.9.9 (2001-03-07) [umoeller]
     2593 */
     2594
     2595APIRET winhQueryAppType(const char *pcszExecutable,
     2596                        PULONG pulDosAppType,
     2597                        PULONG pulWinAppType)
     2598{
     2599    APIRET arc = DosQueryAppType((PSZ)pcszExecutable, pulDosAppType);
     2600    if (arc == NO_ERROR)
     2601    {
     2602        ULONG _ulDosAppType = *pulDosAppType;
     2603
     2604        if (_ulDosAppType == 0)
     2605            *pulWinAppType = PROG_FULLSCREEN;
     2606        else if (_ulDosAppType & 0x40)
     2607            *pulWinAppType = PROG_PDD;
     2608        else if (_ulDosAppType & 0x80)
     2609            *pulWinAppType = PROG_VDD;
     2610        else if ((_ulDosAppType & 0xF0) == 0x10)
     2611            // DLL bit set
     2612            *pulWinAppType = PROG_XWP_DLL;
     2613        else if (_ulDosAppType & 0x20)
     2614            // DOS bit set?
     2615            *pulWinAppType = PROG_WINDOWEDVDM;
     2616        else if ((_ulDosAppType & 0x0003) == 0x0003) // "Window-API" == PM
     2617            *pulWinAppType = PROG_PM;
     2618        else if (   ((_ulDosAppType & 0xFFFF) == 0x1000) // windows program (?!?)
     2619                 || ((_ulDosAppType & 0xFFFF) == 0x0400) // windows program (?!?)
     2620                )
     2621            *pulWinAppType = PROG_31_ENH;
     2622        else if ((_ulDosAppType & 0x03) == 0x02)
     2623            *pulWinAppType = PROG_WINDOWABLEVIO;
     2624        else if ((_ulDosAppType & 0x03) == 0x01)
     2625            *pulWinAppType = PROG_FULLSCREEN;
     2626    }
     2627
     2628    return (arc);
     2629}
     2630
     2631/*
    25592632 *@@ winhStartApp:
    25602633 *      wrapper around WinStartApp which fixes the
     
    25692642 *      -- starting ".CMD" and ".BAT" files as
    25702643 *         PROGDETAILS.pszExecutable.
     2644 *
     2645 *      Unless it is "*", PROGDETAILS.pszExecutable must
     2646 *      be a proper file name. The full path may be omitted
     2647 *      if it is on the PATH, but the extension (.EXE etc.)
     2648 *      must be given. You can use doshFindExecutable to
     2649 *      find executables if you don't know the extension.
    25712650 *
    25722651 *      This also handles and merges special and default
     
    28022881            }
    28032882        }
    2804 
    2805         // _Pmpf((__FUNCTION__ ": calling WinStartApp"));
    2806         // _Pmpf(("    exec: %s",
    2807         //             (ProgDetails.pszExecutable)
    2808                         // ? ProgDetails.pszExecutable
    2809                     // : "NULL"));
    2810         // _Pmpf(("    startupDir: %s",
    2811            //      (ProgDetails.pszStartupDir)
    2812               //       ? ProgDetails.pszStartupDir
    2813                  //    : "NULL"));
    2814         // _Pmpf(("    params: %s",
    2815            //      (pszParamsPatched)
    2816               //       ? pszParamsPatched
    2817                  //    : "NULL"));
    2818         // _Pmpf(("    new progc: 0x%lX", ProgDetails.progt.progc));
    28192883
    28202884        ProgDetails.pszParameters = strParamsPatched.psz;
     
    32823346                         ULONG flFrameCreateFlags,  // in: FCF_* flags
    32833347                         ULONG ulFrameStyle,        // in: WS_* flags (e.g. WS_VISIBLE, WS_ANIMATE)
    3284                          const char *pcszFrameTitle,
     3348                         const char *pcszFrameTitle, // in: frame title (title bar)
    32853349                         ULONG ulResourcesID,       // in: according to FCF_* flags
    3286                          const char *pcszClassClient,
    3287                          ULONG flStyleClient,
     3350                         const char *pcszClassClient, // in: client class name
     3351                         ULONG flStyleClient,       // in: client style
    32883352                         ULONG ulID,                // in: frame window ID
    32893353                         PVOID pClientCtlData,      // in: pCtlData structure pointer for client
Note: See TracChangeset for help on using the changeset viewer.