{"id":5454,"date":"2015-03-28T20:39:36","date_gmt":"2015-03-28T11:39:36","guid":{"rendered":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=5454"},"modified":"2015-03-29T09:44:15","modified_gmt":"2015-03-29T00:44:15","slug":"windows-%e3%81%ab%e3%81%8a%e3%81%91%e3%82%8b%e5%a4%89%e6%95%b0%e3%81%ae%e3%82%a8%e3%82%af%e3%82%b9%e3%83%9d%e3%83%bc%e3%83%88%ef%bc%88%e6%ad%a3%e7%a2%ba%e3%81%ab%e3%81%af%e3%82%a4%e3%83%b3%e3%83%9d","status":"publish","type":"post","link":"http:\/\/umezawa.dyndns.info\/wordpress\/?p=5454","title":{"rendered":"Windows \u306b\u304a\u3051\u308b\u5909\u6570\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\uff08\u6b63\u78ba\u306b\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\uff09"},"content":{"rendered":"<p>Windows (Win32\/Win64) \u306e DLL \u306b\u304a\u3044\u3066\u5909\u6570\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5834\u5408\u3001<code>__declspec(dllimport)<\/code> \u3092\u6b63\u3057\u304f\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u95a2\u6570\u306e\u5834\u5408\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5074\u3067\u3082 <code>__declspec(dllexport)<\/code> \u3068\u66f8\u3044\u3066\u3082\u6b63\u3057\u304f\u52d5\u3044\u3066\u3057\u307e\u3044\u307e\u3059\uff08\u4e0d\u9069\u5207\u3067\u306f\u3042\u308a\u307e\u3059\u304c\uff09\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3059\u308b\u5074 (DLL)<\/p>\n<blockquote>\n<pre>\r\nint __declspec(dllexport) int1 = 0;\r\nint __declspec(dllexport) int2 = 0;\r\n\r\nint __declspec(dllexport) func1() { return int1; }\r\nint __declspec(dllexport) func2() { return int2; }\r\n<\/pre>\n<\/blockquote>\n<p>\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5074 (EXE)<\/p>\n<blockquote>\n<pre>\r\nextern int __declspec(dllexport) int1; \/\/ \u30ea\u30f3\u30af\u30a8\u30e9\u30fc\r\nextern int __declspec(<strong>dllimport<\/strong>) int2; \/\/ OK\r\n\r\nint __declspec(dllexport) func1(); \/\/ \u30ea\u30f3\u30af\u30a8\u30e9\u30fc<strong>\u306b\u306f\u306a\u3089\u306a\u3044<\/strong>\u3057\u6b63\u3057\u304f\u52d5\u304f\r\nint __declspec(<strong>dllimport<\/strong>) func2(); \/\/ OK\r\n\r\nint main(void)\r\n{\r\n    int1 = 10;\r\n    int2 = 10;\r\n\r\n    printf(\"%d %d\\n\", func1(), func2());\r\n\r\n    return 0;\r\n}\r\n<\/pre>\n<\/blockquote>\n<p>\u306a\u3093\u30672015\u5e74\u306b\u3082\u306a\u3063\u3066\u4eca\u66f4\u3053\u3093\u306a\u8a18\u4e8b\u66f8\u3044\u3066\u308b\u304b\u3068\u3044\u3046\u3068\u3001Win32 \u3067\u4eca\u307e\u3067\u5909\u6570\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u3088\u3046\u3068\u3057\u305f\u3053\u3068\u304c\u7121\u3044\u3093\u3067\u3059\u3088\u3048\u3048\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows (Win32\/Win64) \u306e DLL \u306b\u304a\u3044\u3066\u5909\u6570\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5834\u5408\u3001__declspec(dllimport) \u3092\u6b63\u3057\u304f\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u95a2\u6570\u306e\u5834\u5408\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5074\u3067\u3082 __declspec(d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-5454","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5454"}],"version-history":[{"count":12,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5454\/revisions"}],"predecessor-version":[{"id":5466,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/5454\/revisions\/5466"}],"wp:attachment":[{"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5454"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/umezawa.dyndns.info\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}