---
name: "GetBinaryTypeW"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/GetBinaryTypeW"
---

# GetBinaryTypeW(3w)

## NAME

**GetBinaryTypeW** (KERNEL32.@)

## SYNOPSIS

BOOL GetBinaryTypeW\
  (\
   LPCWSTR *lpApplicationName*,\
   LPDWORD *lpBinaryType*\
  )

## DESCRIPTION

Determine whether a file is executable, and if so, what kind.

## PARAMS

*lpApplicationName* **\[In\]**  Path of the file to check.

*lpBinaryType* **\[Out\]**  Destination for the binary type.

## RETURNS

**TRUE**, if the file is an executable, in which case *lpBinaryType* is set. **FALSE**, if the file is not an executable or if the function fails.

## NOTES

The type of executable is a property that determines which subsystem an executable file runs under. *lpBinaryType* can be set to one of the following

**values:** SCS\_32BIT\_BINARY: A Win32 based application SCS\_64BIT\_BINARY: A Win64 based application SCS\_DOS\_BINARY: An MS-Dos based application SCS\_WOW\_BINARY: A Win16 based application SCS\_PIF\_BINARY: A **PIF** file that executes an MS-Dos based app SCS\_POSIX\_BINARY: A **POSIX** based application ( Not implemented ) SCS\_OS216\_BINARY: A 16bit OS/2 based application.

To find the binary type, this function reads in the files header information. If extended header information is not present it will assume that the file is a MS-DOS(tm) executable. If extended header information is present it will determine if the file is a **16**, **32** or **64** bit Windows(tm) executable by checking the flags in the header.

**".com"** and **".pif"** files are only recognized by their file name extension, as per native Windows(tm).

## IMPLEMENTATION

Declared in **"winbase.h"**.

Implemented in **"dlls/kernel32/module.c"**.

Debug channel **"module"**.
