{"id":4757,"date":"2017-05-08T22:59:47","date_gmt":"2017-05-08T13:59:47","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=4757"},"modified":"2020-05-28T15:35:46","modified_gmt":"2020-05-28T06:35:46","slug":"c-activex-%ea%b0%9d%ec%b2%b4%ea%b0%80-%eb%8b%b4%ea%b8%b4-%ed%8c%8c%ec%9d%bc%ec%9d%98-%ea%b2%bd%eb%a1%9c-%ec%96%bb%ea%b8%b0","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=4757","title":{"rendered":"[C#] ActiveX \uac1d\uccb4\uac00 \ub2f4\uae34 \ud30c\uc77c\uc758 \uacbd\ub85c \uc5bb\uae30"},"content":{"rendered":"<p>ActiveX \uac1d\uccb4\ub294 ocx\ub098 dll \ud30c\uc77c\uc5d0 \ub2f4\uaca8 \uc788\ub294\ub370\uc694. \uc774 ActiveX \uac1d\uccb4\ub97c \ub4f1\ub85d(regsvr32.exe\ub97c \ud1b5\ud574 \uc9c1\uc811 \ub4f1\ub85d\ub418\uac70\ub098 \uc124\uce58 \ud30c\uc77c \ub4f1\uc744 \ud1b5\ud574 \ub4f1\ub85d)\ub420 \uacbd\uc6b0 \uac1d\uccb4 ID\ub97c \ud1b5\ud574 \ud574\ub2f9 ActiveX \ud30c\uc77c\uc758 \uc804\uccb4 \uacbd\ub85c\ub97c \ud30c\uc545\ud574\uc57c \ud560 \ud544\uc694\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub54c \uc0ac\uc6a9\ud558\ub294 \ud568\uc218\uc785\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">\r\nprivate static string GetFilePathOfActiveX(string comName)\r\n{\r\n    RegistryKey comKey = Registry.ClassesRoot.OpenSubKey(comName + \"\\\\CLSID\");\r\n    if (comKey == null) return null;\r\n\r\n    string clsid = (string)comKey.GetValue(\"\");\r\n    RegistryKey subKey = Registry.ClassesRoot.OpenSubKey(\"CLSID\\\\\" + clsid + \"\\\\LocalServer32\");\r\n\r\n    if (subKey == null) {\r\n        subKey = Registry.ClassesRoot.OpenSubKey(\"CLSID\\\\\" + clsid + \"\\\\InprocServer32\");\r\n    }\r\n\r\n    if (subKey == null)\r\n    {\r\n        subKey = Registry.ClassesRoot.OpenSubKey(\"WOW6432Node\\\\CLSID\\\\\" + clsid + \"\\\\InprocServer32\");\r\n    }\r\n\r\n    if (subKey == null) return null;\r\n\r\n    return (string)subKey.GetValue(\"\");\r\n}\r\n<\/pre>\n<p>\uc704\uc758 \ubc29\uc2dd\uc740 \ud604\uc7ac Windows 10 64Bits \ud658\uacbd\uc5d0\uc11c \uc791\ub3d9\ud558\ub294 \uac83\uc744 \ud655\uc778\ud588\uc2b5\ub2c8\ub2e4. \ub2e4\ub978 \ud658\uacbd\uc5d0\uc11c\ub3c4 \uc815\uc0c1\uc801\uc73c\ub85c \uc791\ub3d9\ud558\ub294\uc9c0 \ud655\uc778\uc774 \ud544\uc694\ud55c\ub370\uc694. \ud639 Win10 64Bits \ud658\uacbd \uc774\uc678\uc5d0\uc11c\ub3c4 \uc5b4\ub5bb\uac8c \uc791\ub3d9\ud558\ub294\uc9c0 \ub313\uae00\uc744 \ud1b5\ud574 \uc5b8\uae09\ud574 \uc8fc\uc2dc\uba74 \uc88b\uaca0\uc2b5\ub2c8\ub2e4. <\/p>\n<p>\uc704\uc758 \ud568\uc218\ub294 \uc544\ub798\ucc98\ub7fc \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">\r\nMessageBox.Show(GetFilePathOfActiveX(\"XrMap.XrMapControl\"));\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ActiveX \uac1d\uccb4\ub294 ocx\ub098 dll \ud30c\uc77c\uc5d0 \ub2f4\uaca8 \uc788\ub294\ub370\uc694. \uc774 ActiveX \uac1d\uccb4\ub97c \ub4f1\ub85d(regsvr32.exe\ub97c \ud1b5\ud574 \uc9c1\uc811 \ub4f1\ub85d\ub418\uac70\ub098 \uc124\uce58 \ud30c\uc77c \ub4f1\uc744 \ud1b5\ud574 \ub4f1\ub85d)\ub420 \uacbd\uc6b0 \uac1d\uccb4 ID\ub97c \ud1b5\ud574 \ud574\ub2f9 ActiveX \ud30c\uc77c\uc758 \uc804\uccb4 \uacbd\ub85c\ub97c \ud30c\uc545\ud574\uc57c \ud560 \ud544\uc694\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub54c \uc0ac\uc6a9\ud558\ub294 \ud568\uc218\uc785\ub2c8\ub2e4. private static string GetFilePathOfActiveX(string comName) { RegistryKey comKey = Registry.ClassesRoot.OpenSubKey(comName + &#8220;\\\\CLSID&#8221;); if (comKey == null) return null; string clsid &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=4757\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;[C#] ActiveX \uac1d\uccb4\uac00 \ub2f4\uae34 \ud30c\uc77c\uc758 \uacbd\ub85c \uc5bb\uae30&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[],"class_list":["post-4757","post","type-post","status-publish","format-standard","hentry","category-csharp"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/4757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4757"}],"version-history":[{"count":3,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/4757\/revisions"}],"predecessor-version":[{"id":9674,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/4757\/revisions\/9674"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4757"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}