{"id":6313,"date":"2013-12-14T09:07:47","date_gmt":"2013-12-14T00:07:47","guid":{"rendered":"http:\/\/www.gesource.jp\/weblog\/?p=6313"},"modified":"2017-07-16T09:16:01","modified_gmt":"2017-07-16T00:16:01","slug":"getbinarytype%e9%96%a2%e6%95%b0%e3%81%a7%e3%80%81%e5%ae%9f%e8%a1%8c%e5%8f%af%e8%83%bd%e3%81%aa%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%81%ae%e7%a8%ae%e9%a1%9e%e3%82%92%e8%aa%bf%e3%81%b9%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.gesource.jp\/weblog\/?p=6313","title":{"rendered":"GetBinaryType\u95a2\u6570\u3067\u3001\u5b9f\u884c\u53ef\u80fd\u306a\u30d5\u30a1\u30a4\u30eb\u306e\u7a2e\u985e\u3092\u8abf\u3079\u308b"},"content":{"rendered":"<p><a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/cc429268.aspx\" title=\"GetBinaryType \u95a2\u6570\">GetBinaryType\u95a2\u6570<\/a>\u3092\u4f7f\u3046\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u5b9f\u884c\u53ef\u80fd\u304b\u3069\u3046\u304b\u3001\u5b9f\u884c\u53ef\u80fd\u306a\u5834\u5408\u306f\u30d5\u30a1\u30a4\u30eb\u306e\u7a2e\u985e\u3092\u8abf\u3079\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/msdn.microsoft.com\/ja-jp\/library\/cc429268.aspx\" title=\"GetBinaryType \u95a2\u6570\">GetBinaryType\u95a2\u6570<\/a>\u306f\u5f15\u6570FileName\u304c\u5b9f\u884c\u53ef\u80fd\u306a\u30d5\u30a1\u30a4\u30eb\u306a\u3089True\u3092\u3057\u307e\u3059\u3002<\/p>\n<pre><code>if GetBinaryType(PChar(FileName), BinaryType) then\nbegin\n  \/\/\u30d5\u30a1\u30a4\u30eb\u304c\u5b9f\u884c\u53ef\u80fd\u306a\u3068\u304d\nend;\n<\/code><\/pre>\n<p>\u5f15\u6570BinaryType\u306b\u306f\u30d5\u30a1\u30a4\u30eb\u306e\u7a2e\u985e\u304c\u683c\u7d0d\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><code>case BinaryType of\n  SCS_32BIT_BINARY:\n    ShowMessage('Win32 \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n  SCS_DOS_BINARY:\n    ShowMessage('MS-DOS \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n  SCS_OS216_BINARY:\n    ShowMessage('6 \u30d3\u30c3\u30c8\u7248 OS\/2 \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n  SCS_PIF_BINARY:\n    ShowMessage('MS-DOS \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b PIF \u30d5\u30a1\u30a4\u30eb');\n  SCS_POSIX_BINARY:\n    ShowMessage('POSIX \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n  SCS_WOW_BINARY:\n    ShowMessage('16 \u30d3\u30c3\u30c8\u7248 Windows \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n  SCS_64BIT_BINARY:\n    ShowMessage('Win64 \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\nend;\n<\/code><\/pre>\n<p>\u6b21\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u5909\u6570FileName\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u304c\u5b9f\u884c\u53ef\u80fd\u306a\u30d5\u30a1\u30a4\u30eb\u306a\u3089\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u7a2e\u985e\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre><code>var\n  BinaryType: DWORD;\nbegin\n  if GetBinaryType(PChar(FileName), BinaryType) then\n  begin\n    case BinaryType of\n      SCS_32BIT_BINARY:\n        ShowMessage('Win32 \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n      SCS_DOS_BINARY:\n        ShowMessage('MS-DOS \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n      SCS_OS216_BINARY:\n        ShowMessage('6 \u30d3\u30c3\u30c8\u7248 OS\/2 \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n      SCS_PIF_BINARY:\n        ShowMessage('MS-DOS \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b PIF \u30d5\u30a1\u30a4\u30eb');\n      SCS_POSIX_BINARY:\n        ShowMessage('POSIX \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n      SCS_WOW_BINARY:\n        ShowMessage('16 \u30d3\u30c3\u30c8\u7248 Windows \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n      SCS_64BIT_BINARY:\n        ShowMessage('Win64 \u30d9\u30fc\u30b9\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3');\n    end;\n  end;\nend;\n<\/code><\/pre>\n<div class=\"booklink-box\" style=\"text-align:left;padding-bottom:20px;font-size:small;\/zoom: 1;overflow: hidden;\">\n<div class=\"booklink-image\" style=\"float:left;margin:0 15px 10px 0;\"><a href=\"http:\/\/www.amazon.co.jp\/exec\/obidos\/asin\/4822228495\/gesource-22\/\" name=\"booklink\" rel=\"nofollow\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/ecx.images-amazon.com\/images\/I\/51Nd4rAFwIL._SL160_.jpg?w=730\" style=\"border: none;\" \/><\/a><\/div>\n<div class=\"booklink-info\" style=\"line-height:120%;\/zoom: 1;overflow: hidden;\">\n<div class=\"booklink-name\" style=\"margin-bottom:10px;line-height:120%\"><a href=\"http:\/\/www.amazon.co.jp\/exec\/obidos\/asin\/4822228495\/gesource-22\/\" name=\"booklink\" rel=\"nofollow\" target=\"_blank\">API\u3067\u5b66\u3076Windows\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 (\u65e5\u7d4cBP\u30d1\u30bd\u30b3\u30f3\u30d9\u30b9\u30c8\u30e0\u30c3\u30af)<\/a><\/p>\n<div class=\"booklink-powered-date\" style=\"font-size:8pt;margin-top:5px;font-family:verdana;line-height:120%\">posted with <a href=\"http:\/\/yomereba.com\" rel=\"nofollow\" target=\"_blank\">\u30e8\u30e1\u30ec\u30d0<\/a><\/div>\n<\/div>\n<div class=\"booklink-detail\" style=\"margin-bottom:5px;\">\u5b89\u5ba4 \u6d69\u548c \u65e5\u7d4cBP\u793e 2010-06-15    <\/div>\n<div class=\"booklink-link2\" style=\"margin-top:10px;\">\n<div class=\"shoplinkamazon\" style=\"margin-right:5px;background: url('http:\/\/img.yomereba.com\/yl.gif') 0 0 no-repeat;padding: 2px 0 2px 18px;white-space: nowrap;\"><a href=\"http:\/\/www.amazon.co.jp\/exec\/obidos\/asin\/4822228495\/gesource-22\/\" rel=\"nofollow\" target=\"_blank\" title=\"\u30a2\u30de\u30be\u30f3\" >Amazon\u3067\u8abf\u3079\u308b<\/a><\/div>\n<div class=\"shoplinkrakuten\" style=\"margin-right:5px;background: url('http:\/\/img.yomereba.com\/yl.gif') 0 -50px no-repeat;padding: 2px 0 2px 18px;white-space: nowrap;\"><a href=\"http:\/\/hb.afl.rakuten.co.jp\/hgc\/0af377a7.99a9bff8.0af377a8.a2853367\/?pc=http%3A%2F%2Fbooks.rakuten.co.jp%2Frb%2F6514770%2F%3Fscid%3Daf_ich_link_urltxt%26m%3Dhttp%3A%2F%2Fm.rakuten.co.jp%2Fev%2Fbook%2F\" rel=\"nofollow\" target=\"_blank\" title=\"\u697d\u5929\u30d6\u30c3\u30af\u30b9\" >\u697d\u5929\u30d6\u30c3\u30af\u30b9\u3067\u8abf\u3079\u308b<\/a><\/div>\n<\/p><\/div>\n<\/div>\n<div class=\"booklink-footer\" style=\"clear: left\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>GetBinaryType\u95a2\u6570\u3092\u4f7f\u3046\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u304c\u5b9f\u884c\u53ef\u80fd\u304b\u3069\u3046\u304b\u3001\u5b9f\u884c\u53ef\u80fd\u306a\u5834\u5408\u306f\u30d5\u30a1\u30a4\u30eb\u306e\u7a2e\u985e\u3092\u8abf\u3079\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 GetBinaryType\u95a2\u6570\u306f\u5f15\u6570FileName\u304c\u5b9f\u884c\u53ef\u80fd\u306a\u30d5\u30a1\u30a4\u30eb\u306a\u3089True\u3092\u3057\u307e\u3059\u3002  &#8230;<\/p>\n<p><a href=\"https:\/\/www.gesource.jp\/weblog\/?p=6313\" class=\"more-link\">Continue reading &lsquo;GetBinaryType\u95a2\u6570\u3067\u3001\u5b9f\u884c\u53ef\u80fd\u306a\u30d5\u30a1\u30a4\u30eb\u306e\u7a2e\u985e\u3092\u8abf\u3079\u308b&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[48],"tags":[156],"class_list":["post-6313","post","type-post","status-publish","format-standard","hentry","category-delphi","tag-delphi"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/6313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6313"}],"version-history":[{"count":0,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=\/wp\/v2\/posts\/6313\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gesource.jp\/weblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}