{"id":45,"date":"2008-08-09T23:56:23","date_gmt":"2008-08-09T14:56:23","guid":{"rendered":"http:\/\/hmp.lar.jp\/wordpress\/?p=45"},"modified":"2016-09-25T19:44:19","modified_gmt":"2016-09-25T10:44:19","slug":"%e3%81%aa%e3%81%a7%e3%81%97%e3%81%93%e3%81%a7windowsapi%e3%80%90%e3%83%ac%e3%82%b8%e3%82%b9%e3%83%88%e3%83%aa%e3%81%ae%e5%8f%82%e7%85%a7%e3%80%91","status":"publish","type":"post","link":"https:\/\/www.choco.org.uk\/chocodb\/?p=45","title":{"rendered":"\u306a\u3067\u3057\u3053\u3067WindowsAPI\u3010\u30ec\u30b8\u30b9\u30c8\u30ea\u306e\u53c2\u7167\u3011"},"content":{"rendered":"<p>\u3061\u3087\u3063\u3068\u30ec\u30b8\u30b9\u30c8\u30ea\u306e\u578b\u3092\u8abf\u3079\u308b\u306e\u306b\u5fc5\u8981\u3060\u3063\u305f\u306e\u3067\u3001\u3057\u3089\u305f\u307e\u3055\u3093\u306b\u805e\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u25cfRegOpenKeyEx(hKey,lpSubKey,ulOptions,samDesired,phkResult) =DLL(&#8220;advapi32.dll&#8221;,<br \/>\n&#8220;LONG RegOpenKeyExA(<br \/>\nHKEY hKey, \/\/ \u958b\u3044\u3066\u3044\u308b\u89aa\u30ad\u30fc\u306e\u30cf\u30f3\u30c9\u30eb<br \/>\nLPCTSTR lpSubKey, \/\/ \u958b\u304f\u3079\u304d\u30b5\u30d6\u30ad\u30fc\u306e\u540d\u524d<br \/>\nDWORD ulOptions, \/\/ \u4e88\u7d04\u6e08\u307f<br \/>\nDWORD samDesired, \/\/ \u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a2\u30af\u30bb\u30b9\u30de\u30b9\u30af<br \/>\nPHKEY hKeyA \/\/ \u958b\u304f\u3053\u3068\u306b\u6210\u529f\u3057\u305f\u30b5\u30d6\u30ad\u30fc\u306e\u30cf\u30f3\u30c9\u30eb<br \/>\n)&#8221;)<br \/>\n\u25cfRegQueryValueEx(hKey,lpValueName,lpReserved,lpType,{\u53c2\u7167\u6e21\u3057}lpData,lpcbData) =DLL(&#8220;advapi32.dll&#8221;,<br \/>\n&#8220;LONG RegQueryValueExA(<br \/>\nHKEY hKey, \/\/ \u30ad\u30fc\u306e\u30cf\u30f3\u30c9\u30eb<br \/>\nLPCTSTR lpValueName, \/\/ \u30ec\u30b8\u30b9\u30c8\u30ea\u30a8\u30f3\u30c8\u30ea\u540d<br \/>\nLPDWORD lpReserved, \/\/ \u4e88\u7d04\u6e08\u307f<br \/>\nLPDWORD lpType, \/\/ \u30c7\u30fc\u30bf\u578b\u304c\u683c\u7d0d\u3055\u308c\u308b\u30d0\u30c3\u30d5\u30a1<br \/>\nLPBYTE lpData, \/\/ \u30c7\u30fc\u30bf\u304c\u683c\u7d0d\u3055\u308c\u308b\u30d0\u30c3\u30d5\u30a1<br \/>\nLPDWORD lpcbData \/\/ \u30c7\u30fc\u30bf\u30d0\u30c3\u30d5\u30a1\u306e\u30b5\u30a4\u30ba<br \/>\n)&#8221;)<br \/>\n\u25cfRegCloseKey(hKey) =DLL(&#8220;Advapi32.dll&#8221;,<br \/>\n&#8220;LONG RegCloseKey(<br \/>\nHKEY hKey<br \/>\n)&#8221;)<br \/>\n!KEY_ALL_ACCESS = $000F003F<\/p>\n<p>!HKEY_CLASSES_ROOT = $80000000<br \/>\n!HKEY_CURRENT_USER = $80000001<br \/>\n!HKEY_LOCAL_MACHINE = $80000002<br \/>\n!HKEY_USERS = $80000003<br \/>\n!HKEY_CURRENT_CONFIG = $80000005<\/p>\n<p>\u30ec\u30b8\u30b9\u30c8\u30ea\u30cf\u30f3\u30c9\u30eb\u3068\u306f\u6574\u6570<br \/>\nRegOpenKeyEx(HKEY_LOCAL_MACHINE,&#8221;SOFTWARE\\Microsoft\\PCHealth\\ErrorReporting&#8221;,0,KEY_ALL_ACCESS,POINTER(\u30ec\u30b8\u30b9\u30c8\u30ea\u30cf\u30f3\u30c9\u30eb))<\/p>\n<p>\u578b\u3068\u306f\u6574\u6570<br \/>\n\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u3068\u306f\u6574\u6570<br \/>\n\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u306f255<br \/>\n\u30c7\u30fc\u30bf\u3068\u306f\u6587\u5b57\u5217<br \/>\n\u30c7\u30fc\u30bf\u306b\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba\u3092\u78ba\u4fdd<br \/>\nRegQueryValueEx(\u30ec\u30b8\u30b9\u30c8\u30ea\u30cf\u30f3\u30c9\u30eb,\u300cShowUI\u300d,0,POINTER(\u578b),REG_UI_DATA,POINTER(\u30c7\u30fc\u30bf\u30b5\u30a4\u30ba))<br \/>\n\u578b\u3067\u6761\u4ef6\u5206\u5c90<br \/>\n\u30000\u306a\u3089\u3070REGFLG_SU=0#\u300cREG_NONE\u300d\u3068\u3044\u3046<br \/>\n\u30001\u306a\u3089\u3070REGFLG_SU=1#\u300cREG_SZ\u300d\u3068\u3044\u3046<br \/>\n\u30002\u306a\u3089\u3070REGFLG_SU=2#\u300cREG_EXPAND_SZ\u300d\u3068\u3044\u3046<br \/>\n\u30003\u306a\u3089\u3070REGFLG_SU=3#\u300cREG_BINARY\u300d\u3068\u3044\u3046<br \/>\n\u30004\u306a\u3089\u3070REGFLG_SU=4#\u300cREG_DWORD\u300d\u3068\u3044\u3046<br \/>\n\u30005\u306a\u3089\u3070REGFLG_SU=5#\u300cREG_DWORD_BIG_ENDIAN\u300d\u3068\u3044\u3046<br \/>\n\u30006\u306a\u3089\u3070REGFLG_SU=6#\u300cREG_LINK\u300d\u3068\u3044\u3046<br \/>\n\u30007\u306a\u3089\u3070REGFLG_SU=7#\u300cREG_MULTI_SZ\u300d\u3068\u3044\u3046<br \/>\n\u30008\u306a\u3089\u3070REGFLG_SU=8#\u300cREG_RESOURCE_LIST\u300d\u3068\u3044\u3046<br \/>\n\u300011\u306a\u3089\u3070REGFLG_SU=11#\u300cREG_QWORD\u300d\u3068\u3044\u3046<\/p>\n<p>RegCloseKey(\u30ec\u30b8\u30b9\u30c8\u30ea\u30cf\u30f3\u30c9\u30eb)<br \/>\nREGFLG_SU\u3092\u8a00\u3046<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3061\u3087\u3063\u3068\u30ec\u30b8\u30b9\u30c8\u30ea\u306e\u578b\u3092\u8abf\u3079\u308b\u306e\u306b\u5fc5\u8981\u3060\u3063\u305f\u306e\u3067\u3001\u3057\u3089\u305f\u307e\u3055\u3093\u306b\u805e\u304d\u307e\u3057\u305f\u3002 \u25cfRegOpenKeyEx(hKey,lpSubKey,ulOptions,samDesired,phkResult) =DLL(&#038;#8220 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-windowsapi"],"_links":{"self":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":2,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":1189,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions\/1189"}],"wp:attachment":[{"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.choco.org.uk\/chocodb\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}