bcm\u8f6cexe<\/a>exe\u6587\u4ef6\uff1a\u5c06\u53ef\u6267\u884c\u6587\u4ef6\u548c\u8d44\u6e90\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2aexe\u6587\u4ef6\u3002<\/p>\n\u4e8c\u3001exe\u5305\u5236\u4f5c\u7684\u8fc7\u7a0b<\/p>\n
\u4e0b\u9762\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecdexe\u5305\u5236\u4f5c\u7684\u8fc7\u7a0b\u3002<\/p>\n
1. \u7f16\u5199\u7a0b\u5e8f\u4ee3\u7801<\/p>\n
\u9996\u5148\u9700\u8981\u7f16\u5199\u7a0b\u5e8f\u7684\u6e90\u4ee3\u7801\uff0c\u5728\u8fd9\u91cc\u6211\u4eec\u4ee5C++\u8bed\u8a00\u4e3a\u4f8b\u3002\u7f16\u5199\u7a0b\u5e8f\u4ee3\u7801\u65f6\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n
\uff081\uff09\u7a0b\u5e8f\u9700\u8981\u5305\u542b\u4e00\u4e2a\u4e3b\u51fd\u6570\uff08main\u51fd\u6570\uff09\uff0c\u4f5c\u4e3a\u7a0b\u5e8f\u7684\u5165\u53e3\u70b9\uff1b<\/p>\n
\uff082\uff09\u7a0b\u5e8f\u9700\u8981\u4f7f\u7528Windows API\u8fdb\u884c\u64cd\u4f5c\uff0c\u5305\u62ec\u7a97\u53e3\u521b\u5efa\u3001\u6d88\u606f\u5904\u7406\u7b49\uff1b<\/p>\n
\uff083\uff09\u7a0b\u5e8f\u9700\u8981\u4f7f\u7528\u8d44\u6e90\u6587\u4ef6\uff0c\u5982\u56fe\u6807\u6587\u4ef6\u3001\u4f4d\u56fe\u6587\u4ef6\u7b49\u3002<\/p>\n
2. \u7f16\u8bd1\u6e90\u4ee3\u7801<\/p>\n
\u4f7f\u7528\u7f16\u8bd1\u5668\u5c06\u6e90\u4ee3\u7801\u7f16\u8bd1\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u5e38\u7528\u7684\u7f16\u8bd1\u5668\u6709Microsoft Visual C++\u3001Borland C++\u7b49\u3002<\/p>\n
\u7f16\u8bd1\u6e90\u4ee3\u7801\u65f6\uff0c\u9700\u8981\u5c06\u6e90\u6587\u4ef6\u7f16\u8bd1\u6210\u76ee\u6807\u6587\u4ef6\uff08Object File\uff09\uff0c\u7136\u540e\u5c06\u76ee\u6807\u6587\u4ef6\u94fe\u63a5\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002\u7f16\u8bd1\u5668\u4f1a\u5c06\u6e90\u4ee3\u7801\u8f6c\u6362\u6210\u673a\u5668\u8bed\u8a00\uff0c\u5e76\u751f\u6210\u76ee\u6807\u6587\u4ef6\u3002\u94fe\u63a5\u5668\u4f1a\u5c06\u76ee\u6807\u6587\u4ef6\u548c\u5e93\u6587\u4ef6\u94fe\u63a5\u8d77\u6765\uff0c\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5728\u94fe\u63a5\u65f6\uff0c\u9700\u8981\u6307\u5b9aWindows API\u7684\u5e93\u6587\u4ef6\uff0c\u5982kernel32.lib\u3001user32.lib\u7b49\u3002<\/p>\n
3. \u6253\u5305\u8d44\u6e90\u6587\u4ef6<\/p>\n
\u4f7f\u7528\u8d44\u6e90\u7f16\u8f91\u5668\u5c06\u7a0b\u5e8f\u6240\u9700\u8981\u7684\u8d44\u6e90\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u8d44\u6e90\u6587\u4ef6\u5e93\uff08Resource Library\uff09\uff0c\u901a\u5e38\u4f7f\u7528Visual Studio\u4e2d\u7684\u8d44\u6e90\u7f16\u8f91\u5668\u8fdb\u884c\u64cd\u4f5c\u3002\u8d44\u6e90\u6587\u4ef6\u53ef\u4ee5\u5305\u62ec\u56fe\u6807\u6587\u4ef6\u3001\u4f4d\u56fe\u6587\u4ef6\u3001\u5b57\u7b26\u4e32\u3001\u5bf9\u8bdd\u6846\u7b49\u3002<\/p>\n
\u6253\u5f00Visual Studio\uff0c\u9009\u62e9\u201c\u65b0\u5efa\u9879\u76ee\u201d->\u201cWin32\u63a7\u5236\u53f0\u5e94\u7528\u7a0b\u5e8f\u201d<\/p>\n
<\/figure>\n<\/p>\n\uff0c\u7136\u540e\u9009\u62e9\u201c\u7a7a\u9879\u76ee\u201d\u3002\u5728\u9879\u76ee\u4e2d\u6dfb\u52a0\u8d44\u6e90\u6587\u4ef6\uff0c\u53f3\u952e\u70b9\u51fb\u9879\u76ee\u540d\u79f0\uff0c\u9009\u62e9\u201c\u6dfb\u52a0\u201d->\u201c\u65b0\u5efa\u9879\u201d->\u201c\u8d44\u6e90\u6587\u4ef6\u201d\u3002<\/p>\n
\u5728\u8d44\u6e90\u7f16\u8f91\u5668\u4e2d\uff0c\u53ef\u4ee5\u6dfb\u52a0\u3001\u5220\u9664\u3001\u4fee\u6539\u8d44\u6e90\u9879\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u6dfb\u52a0\u56fe\u6807\u6587\u4ef6\uff0c\u53f3\u952e\u70b9\u51fb\u201c\u56fe\u6807\u201d\u6587\u4ef6\u5939\uff0c\u9009\u62e9\u201c\u6dfb\u52a0\u8d44\u6e90\u201d->\u201c\u56fe\u6807\u201d\uff0c\u7136\u540e\u9009\u62e9\u56fe\u6807\u6587\u4ef6\u3002\u53ef\u4ee5\u4fee\u6539\u5b57\u7b26\u4e32\u8d44\u6e90\uff0c\u53f3\u952e\u70b9\u51fb\u201c\u5b57\u7b26\u4e32\u8868\u201d\u6587\u4ef6\u5939\uff0c\u9009\u62e9\u201c\u6dfb\u52a0\u8d44\u6e90\u201d->\u201c\u5b57\u7b26\u4e32\u8868\u201d\uff0c\u7136\u540e\u8f93\u5165\u5b57\u7b26\u4e32\u3002<\/p>\n
4. \u94fe\u63a5\u8d44\u6e90\u6587\u4ef6<\/p>\n
\u5728\u7a0b\u5e8f\u4e2d\u4f7f\u7528\u8d44\u6e90\u6587\u4ef6\u65f6\uff0c\u9700\u8981\u5c06\u8d44\u6e90\u6587\u4ef6\u94fe\u63a5\u5230\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u3002\u53ef\u4ee5\u4f7f\u7528Visual Studio\u4e2d\u7684\u8d44\u6e90\u7f16\u8f91\u5668\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n
\u6253\u5f00\u8d44\u6e90\u7f16\u8f91\u5668\uff0c\u9009\u62e9\u201c\u8d44\u6e90\u7c7b\u578b\u201d->\u201c\u65b0\u5efa\u8d44\u6e90\u7c7b\u578b\u201d\uff0c\u7136\u540e\u9009\u62e9\u201c\u81ea\u5b9a\u4e49\u201d\uff0c\u8f93\u5165\u8d44\u6e90\u7c7b\u578b\u540d\u79f0\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cMY_ICON\u201d\u7684\u8d44\u6e90\u7c7b\u578b\uff0c\u7528\u4e8e\u5b58\u653e\u56fe\u6807\u6587\u4ef6\u3002<\/p>\n
\u7136\u540e\u5728\u8d44\u6e90\u7c7b\u578b\u4e0b\u6dfb\u52a0\u8d44\u6e90\u9879\uff0c\u9009\u62e9\u201c\u8d44\u6e90\u7c7b\u578b\u201d->\u201c\u65b0\u5efa\u8d44\u6e90\u9879\u201d\uff0c\u9009\u62e9\u8d44\u6e90\u7c7b\u578b\uff0c\u7136\u540e\u9009\u62e9\u8981\u6dfb\u52a0\u7684\u8d44\u6e90\u6587\u4ef6\u3002<\/p>\n
5. \u751f\u6210exe\u6587\u4ef6<\/p>\n
\u4f7f\u7528\u7f16\u8bd1\u5668\u5c06\u53ef\u6267\u884c\u6587\u4ef6\u548c\u8d44\u6e90\u6587\u4ef6\u94fe\u63a5\u8d77\u6765\uff0c\u751f\u6210exe\u6587\u4ef6\u3002\u5728Visual Studio\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u201c\u751f\u6210\u201d->\u201c\u751f\u6210\u89e3\u51b3\u65b9\u6848\u201d\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n
\u5c06\u751f\u6210\u7684exe\u6587\u4ef6\u590d\u5236\u5230\u5176\u4ed6Windows\u7cfb\u7edf\u4e2d\uff0c\u53cc\u51fb\u6253\u5f00\u5373\u53ef\u8fd0\u884c\u7a0b\u5e8f\u3002<\/p>\n
\u603b\u7ed3\uff1a<\/p>\n
exe\u5305\u5236\u4f5c\u662f\u5c06\u7a0b\u5e8f\u6253\u5305\u6210exe\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8fc7\u7a0b\u3002exe\u53ef\u6267\u884c\u6587\u4ef6\u662fWindows\u64cd\u4f5c\u7cfb\u7edf\u4e0b\u7684\u4e00\u79cd\u5e38\u89c1\u7684\u7a0b\u5e8f\u6587\u4ef6\u683c\u5f0f\uff0c\u5b83\u53ef\u4ee5\u76f4\u63a5\u5728Windows\u7cfb\u7edf\u4e2d\u8fd0\u884c\uff0c\u800c\u4e0d\u9700\u8981\u5b89\u88c5\u5176\u4ed6\u7684\u4f9d\u8d56\u5e93\u6216\u8f6f\u4ef6\u3002exe\u5305\u5236\u4f5c\u7684\u8fc7\u7a0b\u5305\u62ec\u7f16\u5199\u7a0b\u5e8f\u4ee3\u7801\u3001\u7f16\u8bd1\u6e90\u4ee3\u7801\u3001\u6253\u5305\u8d44\u6e90\u6587\u4ef6\u3001\u94fe\u63a5\u8d44\u6e90\u6587\u4ef6\u548c\u751f\u6210exe\u6587\u4ef6\u7b49\u6b65\u9aa4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
exe\u5305\u5236\u4f5c\u662f\u6307\u5c06\u7a0b\u5e8f\u6253\u5305\u6210exe\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8fc7\u7a0b\u3002exe\u53ef\u6267\u884c\u6587\u4ef6\u662fWindows\u64cd\u4f5c\u7cfb\u7edf\u4e0b\u7684\u4e00\u79cd\u5e38\u89c1\u7684\u7a0b\u5e8f\u6587\u4ef6\u683c\u5f0f\uff0c\u5b83\u53ef\u4ee5\u76f4\u63a5\u5728Windows\u7cfb\u7edf\u4e2d\u8fd0\u884c\uff0c\u800c\u4e0d\u9700\u8981\u5b89\u88c5\u5176\u4ed6\u7684\u4f9d\u8d56\u5e93\u6216\u8f6f\u4ef6\u3002\u5728\u672c\u6587\u4e2d<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[2138,2137,171,398,616],"class_list":["post-952","post","type-post","status-publish","format-standard","hentry","category-zuoexe","tag-windows10exe","tag-exe","tag-171","tag-398","tag-616"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/comments?post=952"}],"version-history":[{"count":0,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/posts\/952\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/media?parent=952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/categories?post=952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.com\/zhidian\/wp-json\/wp\/v2\/tags?post=952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}