pszName (PSZ) - input

      An ASCIIZ string that contains the file name of the executable file for which the flags are to be returned.

      If the string appears to be a fully qualified path (that is, it contains a " : " in the second position, or it contains a " \ ", or both), then the file is located in the indicated drive:directory. If neither of these is true, and this file name is not found in the current directory, each drive:directory specification in the path defined in the current program's environment is searched for this file. Note that any extension (.xxx) is acceptable for the executable file name. If no extension is specified, a default extension of ".exe" is used.

    pFlags (PULONG) - output

      A doubleword that will contain flags denoting the application type, as determined by reading the executable file header specified by pszName. Note that the call sequence passes a pointer to a location in application memory to return the application type flags.

      pFlags is defined as follows:

      Bit

        Description
      2-0
        Indicate the application type as specified in the header:

        000

          FAPPTYP_NOTSPEC (0x00000000) Application type is not specified in the executable header.
        001
          FAPPTYP_NOTWINDOWCOMPAT (0x00000001)
          Application type is not-window-compatible.
        010
          FAPPTYP_WINDOWCOMPAT (0x00000002)
          Application type is window-compatible.
        011
          FAPPTYP_WINDOWAPI (0x00000003)
          Application type is window-API.
        3
          FAPPTYP_BOUND (0x00000008)
          Set to 1 if the executable file has been "bound" (by the BIND command) as a Family API application. Bits 0, 1, and 2 still apply.
        4
          FAPPTYP_DLL (0x00000010)
          Set to 1 if the executable file is a dynamic link library (DLL) module. Bits 0, 1, 2, 3, and 5 will be set to 0.
        5
          FAPPTYP_DOS (0x00000020)
          Set to 1 if the executable file is in PC/DOS format. Bits 0, 1, 2, 3, and 4 will be set to 0.
        6
          FAPPTYP_PHYSDRV (0x00000040)
          Set to 1 if the executable file is a physical device driver.
        7
          FAPPTYP_VIRTDRV (0x00000080)
          Set to 1 if the executable file is a virtual device driver.
        8
          FAPPTYP_PROTDLL (0x00000100)
          Set to 1 if the executable file is a protected-memory dynamic link library module.
        9-13
          Reserved.
        14
          FAPPTYP_32BIT (0x00004000)
          Set to 1 for 32-bit executable files.
        15
          Reserved.

        ulrc (APIRET) - returns

          Return Code.

          DosQueryAppType returns one of the following values:

        • NO_ERROR 2
            ERROR_FILE_NOT_FOUND
          3
            ERROR_PATH_NOT_FOUND
          4
            ERROR_TOO_MANY_OPEN_FILES
          11
            ERROR_BAD_FORMAT
          15
            ERROR_INVALID_DRIVE
          32
            ERROR_SHARING_VIOLATION
          108
            ERROR_DRIVE_LOCKED
          110
            ERROR_OPEN_FAILED
          191
            ERROR_INVALID_EXE_SIGNATURE
          192
            ERROR_EXE_MARKED_INVALID
          For a full list of error codes, see Errors.


        [Back] [Next]