Home

Win32Inc - MASM include files for Win32

1. About Win32Inc

Win32Inc is a set of include files for Masm, JWasm or PoAsm created by h2incx. It contains all includes required to build Win32 applications or dlls. If you also have got Open Watcom or PellesC (see the links page where to get it), there's everything available to create Win32-PE binaries in Assembler. Be aware that Win32Inc is intended for people being familiar with the command line interface and experienced in programming (not necessarily Assembler, however). There is also no installer supplied, just a compressed package of directories and files together with a simple README.TXT trying to explain things.
 
Win32Inc is mostly compatible with the include files supplied with MASM32. The main differences are:
  • In MASM32 there is one big include, WINDOWS.INC, which contains the Win32 declarations, and a bunch of other includes which contain the function prototypes. The include files of Win32Inc match 1:1 the header files contained in MSVC or MS PSDK, with extension .H replaced by .INC of course.
  • unlike MASM32 the prototype parameters of the Win32Inc include files are "typed". They usually have the same type as their C counterparts. In MASM32 all parameter types are "DWORD". Having typed parameters may be advantageous if the target has to be debugged and the debugger knows how to handle the MASM debug type information.
  • The few name conflicts are resolved differently. In Win32Inc, a name which is used in the Win32 API and is also a MASM reserved word (for example, "mask"), is changed by adding a "_" suffix. In MASM32 the kind of the name modifications isn't consistent.
  • the Win32Inc includes are far more up-to-date than the ones coming with MASM32. All declarations for the Win32 API extensions added to Windows 2000 and Windows XP are there.
  • for some reason MASM32 doesn't allow to develop Open Source software with it. Furthermore none of its parts are redistributable. Win32Inc does not have such restrictions, it is Public Domain.
Other issues in which Win32Inc differs from MASM32:
  • No assembler, linker or resource compiler is included in Win32Inc.
  • No library of helper functions (M32LIB in MASM32) is included, instead it is recommended (and supported) to use functions contained in C runtime libraries like libc, crtdll, msvcrt, ....
  • No IDE/editor is included.
As already mentioned, the Win32Inc include files were generated by h2incx. As source the C header files from the Microsoft Platform SDK were used. Since the conversion done by h2incx is not perfect, some of the created files had to be slightly adjusted afterwards.
 
Some simple source samples are included in Win32Inc, showing the usage:

Win32Inc GUI Hello World Source:


;--- this is a sample using win32inc includes

    .386
    .model flat
    option casemap:none

    .nolist
    .nocref
WIN32_LEAN_AND_MEAN equ 1    
    include windows.inc
    .list
    .cref

    .data

szText db "Hello world, created with win32inc include files",0
szCaption db "About",0

    .code

_start:
    invoke MessageBox, 0, offset szText, offset szCaption, MB_OK
    invoke ExitProcess, 0

    end _start

 

2. Upcoming Win32Inc Version 2

The next release of Win32Inc, version 2, will support creating 32-bit and 64-bit Windows binaries. A preliminary package is available for testing purposes.
 

3. Win32Inc Extension: SDL Include Files

This extension adds SDL (Simple DirectMedia Layer) support to Win32Inc.
 
SDL samples:

4. Downloads

Win32Inc v1.3.5, 09/02/2009 Download 1.1 MB Readme incl. Changelog
Win32Inc v2.0rc, 12/14/2009 Download 1.1 MB Changelog

Additional tools
Include files for SDL SDLInc.zip, 15 kB