Win32 API Experimental(or Extension) features.
It is a library that helps to more easily implement tasks such as service program creation and process creation for each user account in Windows environment.
It is implemented with outdated syntax and features because it is also designed for use in legacy development environments (Visual Studio 2008 SP1).
- Windows 8 or later
- Visual Studio 2008 SP1 or later
- MSYS2
- MSYS
- MinGW 32-bit
- MinGW 64-bit
- MinGW Clang 32-bit
- MinGW Clang 64-bit
- MinGW UCRT 64-bit
- Windows 10
- MSYS2
- MSYS
- MinGW 32-bit
- MinGW 64-bit
- MinGW Clang 32-bit
- MinGW Clang 64-bit
- MinGW UCRT 64-bit
- Visual Studio
- 2008 SP1
- 2010, 2012, 2017, 2019, 2022
- Headers : Win32Ex.h
- Headers : Win32Ex/System.h
- More
- Headers : Win32Ex/System/Process.h, Win32Ex/System/Process.hpp
- More
- Headers : Win32Ex/System/Session.hpp
- More
- Headers : Win32Ex/System/Service.hpp
- More
- Headers : Win32Ex/System/Object.h
- More
- Headers : Win32Ex/Security.h
- More
- Headers : Win32Ex/Security/Privilege.h, Win32Ex/Security/Privilege.hpp
- More
- Headers : Win32Ex/Security/Token.h, Win32Ex/Security/Token.hpp
- More
- Headers : Win32Ex/Security/Descriptor.h
- More
- Headers : Security\Sid.h
- More
- Headers : Win32Ex/Optional.hpp
- More
- Headers : Win32Ex/Result.hpp
- More
-
With MSYS2
cd test mkdir build && cd build if [ "$MSYSTEM" = "MSYS" ]; then cmake .. else cmake -G "MinGW Makefiles" .. fi cmake --build . if [ "$?" -eq 0 ]; then export LC_ALL=C; unset LANGUAGE ctest . --verbose fi
-
With Visual Studio
cd test mkdir build cd build cmake .. cmake --build . -- /p:CharacterSet=Unicode if errorlevel 0 ctest . --verbose -C Debug
We usually recommend using CMake. However, if you are using Visual Studio directly, add {This repository}/include to the 'Additional Include Directories property'.
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
# create project
project(MyProject)
# add executable
add_executable(tests tests.cpp)
# add dependencies
include(cmake/CPM.cmake)
CPMAddPackage("gh:ntoskrnl7/[email protected]")
# link dependencies
target_link_libraries(tests win32ex)
#include <iostream>
#include <Win32Ex/System/Process.hpp>
#include <Win32Ex/System/Service.hpp>
// or #include <Win32Ex.h>
// or #include <Win32Ex/System.h>
Win32Ex::System::Service SimpleService("SimpleSvc");
int main()
{
std::cout << Win32Ex::System::Process::All().size();
Win32Ex::System::Service::Instance<SimpleService>::Get()
.OnStart([]() {
// TODO
})
.OnStop([]() {
// TODO
})
.OnPause([]() {
// TODO
})
.OnContinue([]() {
// TODO
})
.OnError([](DWORD ErrorCode, PCSTR Message) {
// TODO
})
.Run();
return 0;
}