
{"id":341,"date":"2009-11-15T11:35:20","date_gmt":"2009-11-15T16:35:20","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=341"},"modified":"2009-11-15T11:35:20","modified_gmt":"2009-11-15T16:35:20","slug":"automating-net-executables-using-com","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=341","title":{"rendered":"Automating .NET Executables Using COM"},"content":{"rendered":"<p>In one of my projects I needed to script a class inside a .NET executable.<\/p>\n<p>.NET has <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/zsfww439%28VS.71%29.aspx\">very good support for in-proc COM components<\/a>: you create a class library, add a class, put <code>[ComVisible]<\/code> attribute on it, and voila &#8211; you&#8217;ve got  yourself a COM object. Scripts would instantiate this component via a <code>CreateObject<\/code> call, which would locate the DLL and load it into the client&#8217;s address space.<\/p>\n<p>My scenario, however, was slightly different. I did not want a new instance of my component to be created inside the client process. I already had an instance in my own process, and I wanted to script it.<\/p>\n<p><a href=\"http:\/\/www.ikriv.com\/en\/prog\/info\/dotnet\/ExeAutomation\/index.html\">To full article&#8230;<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In one of my projects I needed to script a class inside a .NET executable. .NET has very good support for in-proc COM components: you create a class library, add <a href=\"https:\/\/ikriv.com\/blog\/?p=341\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[3],"tags":[],"class_list":["entry","author-ikriv","post-341","post","type-post","status-publish","format-standard","category-dotnet"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=341"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/341\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}