Note: This website is archived. For up-to-date information about D projects and development, please visit

Welcome to Core32

Core32 is an attempt to gather together the efforts of the people who are porting Win32 headers into D.

For information on other projects with similar goals, see DocComments/Phobos/StdCWindows.

core32 now builds with dsss (2009 May 15)

What was the future of Core32?

It was pretty bleak. The guy who originally ported the Windows API headers disappeared quite a while ago. The current maintainer has lost interest in updating Core32, too. Everyone else just wants to complain about it. No one seems to be really using it. Its freckles turned out to be carcinoma. There are a few known problems, but there doesn't seem to be any point in fixing them.

A new Windows API project seems to be gaining momentum. If it continues to be productive, it makes more sense to join efforts with the new project than continue to spend time with Core32.

If you'd prefer to use Core32, you might want to use qiezi/yidabu's work from new version of core32 (running in DMD 1.013) (see also topic 2694).

and now …

I (L8Night) have returned and got the files to compile under DMD 2.0

This has been for personal reasons, 'cos there is enough working to solve the problems I wish to solve. however the biggest single problem with this port is that parts are in phobos (see below for how we resolved it) and not all the win32 headers where ported as I had assumed that I would start and others would follow or use what I'd demonstrated and write a good automatic tool.

Legal issues

As I posted the port was of the files that are distributed with dmc (not dmd) but I have no idea about the legality of using there "abused" files, again it was to solve a personal issue, that I believe might help others ...

What does version(STANDALONE) do?

Core32 is meant to complement Phobos.

If someone doesn't want to import, they would compile with the version=STANDALONE set.

The default (compiling without the STANDALONE version set) has many of the conflicts with Phobos versioned out.

We've tried to add "version(STANDALONE)" to all of the statements that are also in Phobos. DMD doesn't complain about conflicts until they are actually mentioned in code that uses both. Some of the conflicts were found by tediously comparing to the Core32 files, and other conflicts were found by "blah conflicts with blah" error statements from DMD. I guess if I were smart I'd come up with some sort of automated tool to find all of the conflicts once and for all, but for now I just version out the conflicts when I become aware of them.

Obtaining the code

The latest code is always in the SVN, but .zip archives have been created occassionally and stored in the downloads folder. The latest .zip is Trac will also create a .zip on-the-fly for a given changeset: Changeset 29 (trunk) - 2006/01/08

If you just want to use the set of Win32 headers, you can download the .zip archive or use the SVN repository.

If you want to suggest additions or changes to Core32, it's best to work off of the SVN repository.


For general Win32 symbols, import win32.api;

For common controls (such as TreeView), import win32.commctrl;


To build the library, run win32/makelib.bat.


Add win32.lib to the DMD command when you're compiling the executable. Either copy win32.lib to your default lib path or add the path of win32.lib in the command sent to DMD.


Quick Start Guide

(by saivert)

  1. Unzip ZIP in \dmd\src\core32
  2. Open command prompt (cmd.exe=DOX Box).
  3. Type PATH \dmd\bin;%PATH%
  4. CD to the core32\win32 directory.
  5. Exeute makelib.bat
  6. Copy make32.lib to \dmd\lib directory. This directory is alread in compilers search path.
  7. CD to \dmd\bin
  8. Open sc.ini
  9. Add "%@P%\..\src\core32" to compiler include search path

Resulting sc.ini should look something like this:

version=7.51 Build 020

10. Add "import win32.api" to your source files to use it and link with win32.lib

Project Information

Status3 - Alpha
Short Descriptionport of of Microsoft Windows header files: windows, gdi, user, and com
Long Description
Home Page


  • core32.png (12.7 kB) -added graphic, added by jcc7 on 01/09/06 18:04:27.
  • core32.svg (6.9 kB) -Added the SVG for the graphic, added by jcc7 on 01/09/06 18:06:57.