{"id":1292,"date":"2016-11-24T17:15:28","date_gmt":"2016-11-24T17:15:28","guid":{"rendered":"http:\/\/ninecrows.com\/career\/?p=1292"},"modified":"2016-11-24T17:15:28","modified_gmt":"2016-11-24T17:15:28","slug":"a-bit-unhappy-with-net-interop-dynamic-loading","status":"publish","type":"post","link":"https:\/\/ninecrows.com\/career\/2016\/11\/24\/a-bit-unhappy-with-net-interop-dynamic-loading\/","title":{"rendered":"A Bit Unhappy with .NET Interop Dynamic Loading."},"content":{"rendered":"<p>I am a bit unhappy with what I see of .NET interop, particularly on the COM side. I expect to be able to load an arbitrary COM object that supports an interface. Since the interface is the contract, I shouldn&#8217;t need to know where the object came from (it may even have been created after my code was compiled) and the interface is the contract.<\/p>\n<p>The same should apply to native code loaded at runtime. I expect to be able to pick an arbitrary DLL by name, load that code into my process and as long as there&#8217;s a named entry-point and a (often implied) contract about the signature of the function behind that entry-point everything should work.<\/p>\n<p>The most obvious interop mechanisms I&#8217;m seeing take the name of the DLL that is being loaded as part of the binding. There may be a way to opt out on that (aside from the obvious one of writing the load-up code in C++ or COM and handling the runtime \u00a0load from there) and I will keep looking. So far I&#8217;m a bit underwhelmed though.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am a bit unhappy with what I see of .NET interop, particularly on the COM side. I expect to be able to load an arbitrary COM object that supports an interface. Since the interface is the contract, I shouldn&#8217;t need to know where the object came from (it may even have been created after &hellip; <a href=\"https:\/\/ninecrows.com\/career\/2016\/11\/24\/a-bit-unhappy-with-net-interop-dynamic-loading\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">A Bit Unhappy with .NET Interop Dynamic Loading.<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-1292","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7F2Qc-kQ","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/1292"}],"collection":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/comments?post=1292"}],"version-history":[{"count":1,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/1292\/revisions"}],"predecessor-version":[{"id":1293,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/1292\/revisions\/1293"}],"wp:attachment":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/media?parent=1292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/categories?post=1292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/tags?post=1292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}