• Stars
    star
    374
  • Rank 114,346 (Top 3 %)
  • Language
    C
  • License
    The Unlicense
  • Created over 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A modular Windows.h Header. Licensed under Public Domain & MIT.

Modular Windows.h Header File

The Windows.h header file for the Win32 API is a behemoth of include file, adding hundreds of thousands of new macros, structs and functions.

This project aims to modularize the Windows.h file, to only include what you require.

Contribution

All contributions are welcome, if we make this a crowdsourced effort, this can be completed a lot quicker. If any functions are missing, please feel free to add them and submit a pull request. I'll merge them as soon as possible

Usage

The only directory of interest is include, copy the contents of the directory over to your project, set the include path to point to the directory containing the win32 directory.

Due to very generic naming and danger of naming collisions, it's recommended to always keep them in the win32 directory and keep it explicit in the include directives: #include <win32/file.h>.

The win32 directory contains the following:

  • Modular include files:
    • windows_base.h
    • atomic.h
    • dbghelp.h
    • dds.h
    • file.h
    • gdi.h
    • io.h
    • misc.h
    • process.h
    • sysinfo.h
    • threads.h
    • window.h
  • Amalgamated include file (#include'ing the files above):
    • windows_modular.h
  • Full windows include (inlining the files above):
    • windows.h

windows_base.h is included by each of the modular include files, it contains the required types, macros and structures used by multiple modules.

Differences to Microsofts Windows.h

We try to provide a full replacement to Microsofts own headers, while keeping a reasonable amount of compatability and to not break any existing code.

However, there are a few breaking changes you should be aware off:

  1. Functions which exist in two variants, unicode and ascii are missing the generic macro. You have to manually specify if you wish to call the unicode or ascii variant by appending either A or W, for example CreateFileA and CreateFileW.
  2. MIN/MAX macros are not provided, equivalent to #define NOMINMAX.
  3. Many, many functions are still missing. Please provide us with what you need and we try to integrate them as soon as possible.

Testing

The test directory contains a simple test case.

The test case consists of compiling each module file with full warnings turned on, this will make sure all dependencies are met and no warnings are emitted.

It can be executed by calling:

$ nmake

Requires CL.EXE and NMAKE.EXE in your path.

License

This project contains parts of the Microsoft Windows SDK. They're licensed under Microsofts EULA. To use it you must read and agree to it.

The rest is dual-licensed under the "MIT" & "Unlicense" license.

More Repositories

1

metareflect

Metareflect is a lightweight reflection system for C++, based on LLVM and Clangs libtooling.
C++
234
star
2

VisualStudioStandalone

Make your Visual Studio Portable
Batchfile
201
star
3

ownDrop

Your One-Click upload client for ownCloud
Objective-C
53
star
4

ClangOnWindows

Source code for my blog post:
Batchfile
43
star
5

ActionBar-with-Tabs

Example for ActionBar with Tabs
Java
36
star
6

ScreenRecorder-for-Android

Use the new Android 4.4 screen recording feature, to record your screen. Requires root access!
Shell
30
star
7

PackCC

PackCC is a packrat parser generator for C.
C
22
star
8

gpulib

C++
16
star
9

Generic-Makefile

Generic Makefile for your C / C++ projects
Makefile
15
star
10

p4fs

Perforce as Filesystem in Userspace (FUSE)
C
11
star
11

dotfiles

My dotfiles
Vim Script
10
star
12

TinyAnalytics

A lightweight library for Google Analytics.
Objective-C
10
star
13

SteamBMC

*Working* fork of the original SteamBMC
Python
9
star
14

fastbuild-example

Example Repository for my Meeting C++ Lightning Talk
C++
9
star
15

thor

C
9
star
16

BashBuild

Replace CMake with less than 100 lines of Bash
Shell
8
star
17

std-sort-in-c

C
5
star
18

SignatureView

SignatureView for iOS / Android
Java
4
star
19

Ultimate-Blackwatch

Ultimate Blackwatch for iOS
Objective-C
4
star
20

Line-Counter-For-Android

C++
4
star
21

tinyprofiler

Json generator for about:tracing / chrome://tracing profiler
C
4
star
22

bob

C
3
star
23

fbxconvert

3
star
24

compile-multiarch-ios

Simple bash script to compile a static library for multiple architectures
Shell
3
star
25

meta

An exercise in exploring compile time code generation in C++
C++
3
star
26

AOKP-Easy-Compile

Shell
2
star
27

gccbug

C
2
star
28

MoneyTracker-Strings

String Resources for Money Tracker, available for Translation.
2
star
29

Color-Schemes

My personal color schemes for the applications I use
2
star
30

flycamera

C
2
star
31

advent_of_code_2020

Yet another Advent of Code. This time, it's in rust.
Rust
1
star
32

golang-devops-test

Go
1
star
33

XBMC-Repository

Leandros' Repository for all XBMC Stuff
Python
1
star
34

peg-leg

Recursive-descent parser generator for C.
C
1
star
35

rust-node-napi

Trying to trick Nodejs
Rust
1
star
36

breakpad-mirror

C++
1
star
37

convertPlistToJson

Convert PLIST files to JSON
Objective-C
1
star
38

cheatsheets

Various cheatsheets for software I use
1
star
39

AdventOfCode

The answers to the Advent of Code
C
1
star
40

dyld-bug

Objective-C
1
star
41

resize

Resize script for Mac OS X command line
Shell
1
star
42

Sketch-AndroidStudio

Automatically export assets from Sketch into Android Studio
Java
1
star
43

vim-misc

My miscellaneous vim syntaxes and other stuff
Vim Script
1
star
44

python-devops-test

Python
1
star