国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

用Rust調(diào)用winapi關(guān)閉顯示器

2022-06-02 23:05 作者:Tuple_元組  | 我要投稿

本文介紹如何在Rust語言中調(diào)用winapi,并發(fā)送關(guān)閉顯示器消息。相關(guān)程序代碼示例如下:

程序中:secound表示程序延時多少秒后,再發(fā)送關(guān)閉顯示的消息。

? ? ? ? ? ? ? 需要使用unself{}來執(zhí)行可能不安全的代碼。

? ? ? ? ? ? ? PostMessageA的解釋是:Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.

該段代碼 使用 cargo build --release 編譯后,生成的二進制可執(zhí)行文件大小為140K,相比用C++寫同樣功能的程序體積還是大的。后者僅為11K。

用Rust調(diào)用winapi關(guān)閉顯示器的評論 (共 條)

分享到微博請遵守國家法律
江源县| 讷河市| 连山| 潍坊市| 田阳县| 普安县| 通渭县| 泽库县| 罗甸县| 花垣县| 清水河县| 双峰县| 东辽县| 原阳县| 于都县| 合作市| 临高县| 荣成市| 洞头县| 临夏县| 吉林市| 辰溪县| 德令哈市| 阳江市| 太仓市| 柯坪县| 全州县| 马鞍山市| 灌阳县| 西安市| 吉水县| 凭祥市| 嫩江县| 涞水县| 兴安县| 清新县| 乐亭县| 洛南县| 新民市| 镇坪县| 安吉县|