#winapi
4 posts tagged winapi. All posts
Querying, starting and stopping Windows services from Rust with the Windows APICall the Service Control Manager (OpenSCManagerW, OpenServiceW, QueryServiceStatus, StartServiceW, ControlService) from Rust using the windows-sys crate.
Creating and terminating Windows processes from Rust with winapiCall CreateProcessW, TerminateProcess and WaitForSingleObject from Rust with the winapi crate, plus the equivalent code using Microsoft's windows-sys crate.
Read and write Windows clipboard text from Rust with WinAPICopy and paste Unicode text through the Win32 clipboard API in Rust: OpenClipboard, GlobalAlloc, SetClipboardData and GetClipboardData, with correct error handling.
Reading and writing files with the Windows API in Rust (CreateFileW, ReadFile, WriteFile)Create, write, and read a file in Rust by calling CreateFileW, WriteFile, and ReadFile through windows-sys, with correct error handling.
© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)