exestrip\u5de5\u5177<\/a>)<\/p>\n {<\/p>\n
printf(“No resource found.\\n”);<\/p>\n
return -1;<\/p>\n
}<\/p>\n
\/\/\u83b7\u53d6\u8d44\u6e90\u5927\u5c0f<\/p>\n
DWORD dwSize = SizeofResource(NULL, hRes);<\/p>\n
if (dwSize == 0)<\/p>\n
{<\/p>\n
printf(“Resource size is zero.\\n”);<\/p>\n
return -1;<\/p>\n
}<\/p>\n
\/\/\u52a0\u8f7d\u8d44\u6e90<\/p>\n
HGLOBAL hGlobal = LoadResource(NULL, hRes);<\/p>\n
if (hGlobal == NULL)<\/p>\n
{<\/p>\n
printf(“Failed to load resource.\\n”);<\/p>\n
return -1;<\/p>\n
}<\/p>\n
\/\/\u9501\u5b9a\u8d44\u6e90<\/p>\n
LPVOID lpData = LockResource(hGlobal);<\/p>\n
if (lpData == NULL)<\/p>\n
{<\/p>\n
printf(“Failed to lock resource.\\n”);<\/p>\n
return -1;<\/p>\n
}<\/p>\n
\/\/\u5c06\u8d44\u6e90\u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32<\/p>\n
TCHAR* szURL = (TCHAR*)malloc(dwSize + 2);<\/p>\n
memcpy(szURL, lpData, dwSize);<\/p>\n
szURL[dwSize \/ sizeof(TCHAR)] = _T(‘\\0’);<\/p>\n
\/\/\u6253\u5f00\u7f51\u9875<\/p>\n
ShellExecute(NULL, _T(“open”), szURL, NULL, NULL, SW_SHOW);<\/p>\n
\/\/\u91ca\u653e\u8d44\u6e90<\/p>\n
free(szURL);<\/p>\n
FreeResource(hGlobal);<\/p>\n
return 0;<\/p>\n
}<\/p>\n
“`<\/p>\n
5. \u7f16\u8bd1\u5e76\u8fd0\u884c\u7a0b\u5e8f\uff0c\u5373\u53ef\u81ea\u52a8\u6253\u5f00\u6307\u5b9a\u7684url\u7f51\u9875\u3002<\/p>\n
\u4e09\u3001\u6ce8\u610f\u4e8b\u9879<\/p>\n
\u5728\u5b9e\u73b0\u5d4c\u5957url\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u6ce8\u610f\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n
1. \u786e\u4fdd\u8d44\u6e90\u6587\u4ef6\u7684\u540d\u79f0\u548c\u7c7b\u578b\u6b63\u786e\u3002<\/p>\n
2. \u786e\u4fdd\u8d44\u6e90\u6587\u4ef6\u4e2d\u7684url\u6587\u672c\u683c\u5f0f\u6b63\u786e\uff0c\u5426\u5219\u53ef\u80fd\u65e0\u6cd5\u6b63\u5e38\u6253\u5f00\u7f51\u9875\u3002<\/p>\n
3. \u786e\u4fdd\u7a0b\u5e8f\u4ee3\u7801\u4e2d\u7684\u8d44\u6e90\u540d\u79f0\u548c\u7c7b\u578b\u4e0e\u8d44\u6e90\u6587\u4ef6\u4e2d\u7684\u540d\u79f0\u548c\u7c7b\u578b\u4e00\u81f4\u3002<\/p>\n
4. \u786e\u4fdd\u4f7f\u7528\u4e86\u7cfb\u7edf\u9ed8\u8ba4\u6d4f\u89c8\u5668\u6765\u6253\u5f00\u7f51\u9875\u3002<\/p>\n
\u603b\u4e4b\uff0c\u5d4c\u5957url\u662f\u4e00\u4e2a\u975e\u5e38\u5b9e\u7528\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u5feb\u901f\u83b7\u53d6\u76f8\u5173\u4fe1\u606f\uff0c\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0exe\u8f6f\u4ef6\u5d4c\u5957url\u7684\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u5728\u8ba1\u7b97\u673a\u9886\u57df\u4e2d\uff0cexe\u6587\u4ef6\u901a\u5e38\u662f\u6307\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u4e5f\u5c31\u662f\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u7684\u7a0b\u5e8f\u6587\u4ef6\u3002\u800c\u5c06\u4e00\u4e2aurl\u5d4c\u5957\u5728exe\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u5728\u8fd0\u884c\u7a0b\u5e8f\u65f6\uff0c\u81ea\u52a8\u6253\u5f00\u6307\u5b9a\u7684\u7f51\u9875\uff0c\u65b9\u4fbf\u7528\u6237\u83b7\u53d6\u66f4\u591a\u76f8\u5173\u4fe1\u606f\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[1388,1387,1386,16,414],"topic":[],"class_list":["post-580","post","type-post","status-publish","format-standard","hentry","category-exekf","tag-automateexe","tag-webpc","tag-1386","tag-16","tag-414"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=580"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}