{"id":4669,"date":"2018-10-02T11:42:27","date_gmt":"2018-10-02T02:42:27","guid":{"rendered":"https:\/\/elleneast.com\/?p=4669"},"modified":"2018-10-02T19:11:16","modified_gmt":"2018-10-02T10:11:16","slug":"%e3%80%90vb-net%e3%80%91%e5%ae%9f%e8%a1%8c%e4%b8%ad%e3%81%ae%e3%82%a2%e3%82%bb%e3%83%b3%e3%83%96%e3%83%aa%e3%81%8c%e5%8f%82%e7%85%a7%e3%81%97%e3%81%a6%e3%81%84%e3%82%8b-dll-%e3%81%ae%e3%82%a2%e3%82%bb","status":"publish","type":"post","link":"https:\/\/elleneast.com\/?p=4669","title":{"rendered":"\u3010VB.NET\u3011\u5b9f\u884c\u4e2d\u306e\u30a2\u30bb\u30f3\u30d6\u30ea\u304c\u53c2\u7167\u3057\u3066\u3044\u308b DLL \u306e\u30a2\u30bb\u30f3\u30d6\u30ea\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b"},"content":{"rendered":"<p>\u5b9f\u884c\u4e2d\u306e EXE \u304c\u53c2\u7167\u3057\u3066\u3044\u308b\u30af\u30e9\u30b9\u30e9\u30a4\u30d6\u30e9\u30ea\uff08DLL\uff09\u306e\u30a2\u30bb\u30f3\u30d6\u30ea\u60c5\u5831\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u601d\u3063\u305f\u3002<\/p>\n<p>\u7d50\u8ad6\u304b\u3089\u8a00\u3046\u3068\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u3044\u3051\u305f\uff08\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u300c\u8457\u4f5c\u6a29\u300d\u306e\u53d6\u5f97\u4f8b\uff09\u3002<\/p>\n<pre class=\"lang:vbnet decode:true \">'Imports System.Reflection\nDim oExecutingAssembly As Assembly = Assembly.GetExecutingAssembly()\n\nFor Each oReferencedAssembly as AssemblyName In oExecutingAssembly.GetReferencedAssemblies\n\n    Dim oAssembly As Assembly = Assembly.Load(oReferencedAssembly.FullName)\n\n    Dim oAttribute As Attribute = Attribute.GetCustomAttribute(oAssembly, GetType(AssemblyCopyrightAttribute))\n\n    Dim oCopyright As AssemblyCopyrightAttribute = CType(oAttribute, AssemblyCopyrightAttribute)\n\n    MsgBox(oReferencedAssembly.Name &amp; \":\" &amp; oCopyright.Copyright) \n\nNext<\/pre>\n<p>&nbsp;<\/p>\n<p>\u30a2\u30bb\u30f3\u30d6\u30ea\u60c5\u5831\u306e\u9055\u3046\u9805\u76ee\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001AssemblyCopyrightAttribute \u306e\u3068\u3053\u308d\u3092\u5225\u306e Assembly\uff5eAttribute \u306b\u5909\u3048\u3066\u3001\u6700\u5f8c\u306e\u307b\u3046\u306e oCopyright.Copyright \u3092\u9069\u5207\u306a\u5909\u6570\u540d\u3068\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3059\u308c\u3070\u30aa\u30fc\u30b1\u30fc\u3002\uff08\u5225\u306e Assembly\uff5eAttribute \u3068\u306f\u3001AssemblyTitleAttribute\u3001AssemblyDescriptionAttribute\u3001AssemblyCompanyAttribute\u3001AssemblyProductAttribute\u3001AssemblyTrademarkAttribute \u7b49\uff09<\/p>\n<p>\u7279\u5b9a\u306e DLL \u306e\u60c5\u5831\u3060\u3051\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u3042\u304f\u307e\u3067\u3082\u4e00\u4f8b\u3060\u304c\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b\u6761\u4ef6\u5206\u5c90\u3055\u305b\u3066\u3084\u308c\u3070\u3044\u3044\u304b\u306a\uff08dic \u306b\u306f\u3042\u3089\u304b\u3058\u3081 DLL \u540d\u3092\u5165\u308c\u3066\u304a\u304f\uff09\u3002<\/p>\n<pre class=\"lang:vbnet decode:true\">if dic.ContainsKey(oReferencedAssembly.Name) = True Then\n   \uff1a\nEnd If<\/pre>\n<p>Assembly.Load \u306e\u4ed6\u306b Assembly.LoadFile \u3084 Assembly.LoadFrom \u3084 Assembly.LoadWithPartialName \u3067\u3082 Assembly \u3092\u53d6\u5f97\u3067\u304d\u308b\u306e\u3067\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u8a71\u304c\u305a\u308c\u308b\u3051\u3069\u3001\u30a2\u30bb\u30f3\u30d6\u30ea\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u30b3\u30fc\u30c9\u306e\u3068\u3053\u308d\u3092\u3088\u304f\u898b\u3066\u307f\u308b\u3068\u3001\u4e00\u898b\u7121\u99c4\u306a\u3053\u3068\u3092\u3057\u3066\u308b\u3088\u3046\u306b\u3082\u898b\u3048\u307e\u3059\u306d\u3002\u30b3\u30d4\u30fc\u30e9\u30a4\u30c8\u306e\u578b\u3092\u6307\u5b9a\u3057\u3066\u304a\u304d\u306a\u304c\u3089\u3001\u53d6\u5f97\u3059\u308b\u306e\u306f&nbsp;AssemblyCopyrightAttribute \u3067\u306f\u306a\u304f Attribute\u3002\u305d\u3057\u3066\u305d\u306e Attribute \u3092\u3042\u3089\u305f\u3081\u3066\u30b3\u30d4\u30fc\u30e9\u30a4\u30c8\u306e\u578b\u306b\u30ad\u30e3\u30b9\u30c8\u3057\u76f4\u3057\u3066\u308b\u3002\u3046\uff5e\u3080\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9f\u884c\u4e2d\u306e EXE \u304c\u53c2\u7167\u3057\u3066\u3044\u308b\u30af\u30e9\u30b9\u30e9\u30a4\u30d6\u30e9\u30ea\uff08DLL\uff09\u306e\u30a2\u30bb\u30f3\u30d6\u30ea\u60c5\u5831\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u601d\u3063\u305f\u3002 \u7d50\u8ad6\u304b\u3089\u8a00\u3046\u3068\u3001\u3053\u3093\u306a\u611f\u3058\u3067\u3044\u3051\u305f\uff08\u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u300c\u8457\u4f5c\u6a29\u300d\u306e\u53d6\u5f97\u4f8b\uff09\u3002 &#8216;Imports System.Reflecti &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2656,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[57],"tags":[60],"class_list":{"0":"post-4669","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-57","8":"tag-vb-net"},"_links":{"self":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/4669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4669"}],"version-history":[{"count":3,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/4669\/revisions"}],"predecessor-version":[{"id":4688,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/posts\/4669\/revisions\/4688"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=\/wp\/v2\/media\/2656"}],"wp:attachment":[{"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elleneast.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}