uLib  C/C++ extended API library for Win32 programmers.

uLib stands for utilityLib or userLib, and is intended for Windows user mode,
though some parts are platform independent, e.g. DLinkList which can even be used in kernel mode,
provided that C++ is permitted.

The library contains tons of powerful and fast functions and classes for Windows applications.
It is primarily intended for C++, but most of it is implemented as C functions, not classes.

The purpose of the lib is to add functions "missing" in Win32,
simplify tasks that are tedious in plain Win32,
and generally make Your, and my, development process easier and faster.

This lib has been the staple of my x86/x64 development for decades, and is now open sourced for the benefit of the community.
It is actively maintained, as I keep adding new features when needed in my own projects, or fix flaws.
uLib is designed as a static library, and can be built in x86/x64, ANSI/Multibyte/Unicode, and Debug/Release versions.
I hope uLib will make Your life as a Windows programmer easier, as it has mine.

Feel free to browse the full documentation..

uLib is kindly hosted by the one and only SourceForge.
An SVN source repository is being prepared, and will be available when ready.
In the mean time, zipped headers, source, and prebuilt binaries are available.

Download uLib files

uLib is licensed under the NNOSL open source license, a descendant of BSD
which adds a degree of developer protection from shameless profiteering.

  Some notable features

Classes

Functions

Useful and powerful tricks

.. And lots more, to make Your coding easier, cleaner, and faster.

  Acknowledgements

uLib (optionally) uses slightly modified headers from the Native Development Kit,
to provide declarations for Windows Native data types (used by e.g. NTDLL).
However, uLib is not derived from NDK, and can be built without it.

The NDK is Copyright (c) 2005-2012 Alex Ionescu.
A well deserved Thank You go out to all contributing NDK authors.
The NDK is distributed under it's own licence, not the NNOSL governing uLib.
(See ndk.txt and readme.txt in the uLib/ndk include directory for details.)

Acknowledgements for other, smaller, contributions can be found
in the respective source modules where they occur.

  Prepare

First, fetch the source if you haven't already.
You need the 'uLib_headers.zip' and 'uLib_source.zip' files.
(If You won't rebuild uLib, You only need the headers and relevant libs).

Put the headers in <basedir>/inc/uLib,
and the implementation in <basedir>/uLib.

Add the 'inc' directory to your include path,
and the implementation directory to your source path.
This organisation invites usage to be e.g. #include <uLib/Debug.h>,
which makes your include statements crystal clear.
All uLib sources use this style internally.

Then add the 'uLib/<compiler>/<x86|x64>' directory to your lib path.
Preferentially, when using MSVC, add the 'uLib/<compiler>/uLib.vcproj
to your "solution", so you can set the dependency and get automatic
link resolution and automatic uLib rebuild on source updates.

Of course you can modify this scheme if you want to.
F.ex, if You plan to just use the headers and pre-built libs,
just put the headers as described, and the libs in suitable x86 and x64 folders.

The zipped source file 'uLib_source.zip' contains, apart from the source itself, project files
for Visual Studio 2oo8 (in the 'VS2oo8' subdir) and CodeBlocks 20 (in the 'cb' subdir),
and, for C::B, pre-assembled object files from the .asm sources.

  Build

In order to build all versions of uLib, You need an x86/x64 capable
C/C++ compiler, and both x86 and x64 MASM compatible assemblers.
Your mileage may vary if you don't need all variants.

Currently I build uLib (x86/x64) in a VS2oo8 (yes, really!) setup with
both ML and ML64, and CodeBlocks 20 (MinGW x86/x64),
but it is intended to be buildable with any C/C++ compiler for Windows.
If You have something else, e.g. Borland or Intel, You could contribute !

You can build uLib for x86 and x64, with ANSI, MultiByte, or Unicode char sets.
Some parts of uLib, f.ex. DLinkList, does not use any Windows APIs,
and those can of course be separately compiled for any platform.

When building the GCC libs (with C::B/MinGW), due to difficulties in
setting up dual bitness assemblers, the project uses pre-assembled
.obj files from the MSVC project, and link them to the library (.a) files
instead of assembling them with AS.

uLib is built as a static library, to take advantage of the linker's
ability to exclude unused parts from the final executable, which
would not be possible if it was built as a dynamic library (.dll).

Remember to set WINVER to 0x502 (in Common.h)
when building uLib for use on ReactOS.

  Compatibility

uLib has a good track record on Windows, and shows no obvious quirks
on ReactOS, due to judicious self constraint in it's API usage.
However, it's possible that some parts of uLib might uncover
unimplemented ReactOS or WinE features. Surely that's for the better.

  Documentation

uLib's documentation is sometimes a bit terse, due to the fact that it was,
until now, a proprietary library, and I only needed some brief comments
in the headers and source to remind me of the non-obvious...

The documenation is now generated with doxyGen and the commentary is located in the headers.
If in doubt, consult the headers and source, or ask me by email if it's non-trivial or confidential.
Fleshing out the documentation with doxyGen comments is ongoing.

The library is extensive, so expect to spend some initial time
browsing the doc and the headers, to get a sense of what's available...

  Bug Reports

Submit bug reports to the SourceForge ticket tracker, or directly to me by email if it's confidential.
Please remember to keep a civil tone in Your communications.

  Contributions

Please respect my code formatting style,
at least the three minimum requirements:

Good luck on the path...

 Last updated 2023-05-02.