wintypes 0.1.3

A rust library that exports windows functions as types
docs.rs failed to build wintypes-0.1.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: wintypes-0.1.0

wintypes

A rust library that exports windows functions as types

Usage

Once this library is downloaded you can just use a function as a type by DLL:

use wintypes::user32::FnMessageBoxA;

Build

Get DLLs exported functions

The first step is to get the exported functions of the DLLs:

$ scripts/parse_dll_exports.py ~/SharedFolder/dlls/advapi32.dll ~/SharedFolder/dlls/crypt32.dll ~/SharedFolder/dlls/kernel32.dll ~/SharedFolder/dlls/kernelbase.dll ~/SharedFolder/dlls/winhttp.dll ~/SharedFolder/dlls/ntdll.dll | jq . > exports.json

Generate the types

$ ./scripts/parse_doc_crates.py exports.json

Credits

  • ntapi and winapi for implementing windows functions as functions. This project scrapes prototypes from those crates.