Skip to content

C++ wrappers to simplify native Windows API calls

License

Notifications You must be signed in to change notification settings

m4x1m1l14n/Win32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Win32 library

Build status

C++ wrappers to simplify native Windows API calls

Table of contents

Basic usage

TODO

Win32 namespace

All implemented wrappers in this library are scoped under Win32 namespace.

User namespace

  • Win32::User::GetWindowText

    GetWindowText API wrapper

    Function definition

    std::wstring Win32::User::GetWindowText(HWND hWnd)

    Usage

    #include <Win32/User.hpp>
    
    using namespace Win32;
    
    const auto& windowText = User::GetWindowText(hWindow);

SysInfoAPI namespace

  • Win32::SysInfoAPI::GetComputerNameEx

    GetComputerNameEx API wrapper

    Function definition

    std::wstring Win32::SysInfoAPI::GetComputerNameEx(COMPUTER_NAME_FORMAT format)

    Usage

    #include <Win32/SysInfoAPI.hpp>
    
    using namespace Win32;
    
    const auto& computerName = SysInfoAPI::GetComputerNameEx(ComputerNameNetBIOS);

DataProtection namespace

  • Win32::DataProtection::ProtectData

    CryptProtectData API wrapper

    Function definition

    std::string
    Win32::DataProtection::ProtectData(
      const std::string& unprotectedData,
      const std::string& optionalEntropy = std::string(),
      ProtectDataFlags flags = ProtectDataFlags::LocalMachine
    )

    Usage

    #include <Win32/DataProtection.hpp>
    
    using namespace Win32;
    
    const auto& protectedData = DataProtection::ProtectData("Some secret data to protect");
  • Win32::DataProtection::UnprotectData

    CryptUnprotectData API wrapper

    Function definition

    std::string
    Win32::DataProtection::UnprotectData(
      const std::string& protectedData, 
      const std::string& optionalEntropy = std::string(), 
      ProtectDataFlags flags = ProtectDataFlags::LocalMachine
    )

    Usage

    #include <Win32/DataProtection.hpp>
    
    using namespace Win32;
    
    const auto& unprotectedData = DataProtection::UnprotectData(previouslyProtectedData);

License

Releases

No releases published

Packages

No packages published

Languages