{"id":3198,"date":"2019-03-25T17:43:10","date_gmt":"2019-03-25T20:43:10","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/kb59914-calling-a-net-dll-assembly-from-vbscript\/"},"modified":"2019-07-02T14:45:33","modified_gmt":"2019-07-02T17:45:33","slug":"kb59914-calling-a-net-dll-assembly-from-vbscript","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/","title":{"rendered":"KB-59914: Calling a.NET DLL assembly from VBScript."},"content":{"rendered":"<div align=\"justify\">\n<p><b>Question:<\/b><\/p>\n<p>Can a.NET DLL assembly be called from VBScript? Can different methods from the DLL be called, and different parameters be sent directly via E3 scripts?<\/p>\n<p><b>Solution: <\/b><\/p>\n<p>Yes, this is possible. To do so, follow these procedures:<\/p>\n<p>1) Create a.NET assembly (collection of files that appear as a single DLL for the programmers) according to the item 2 in the article <a href=\"http:\/\/kb.elipse.com.br\/pt-br\/questions\/3250\/Creating+.NET+assemblies+and+instancing+them+by+using+the+VBScript+Driver\" target=\"_blank\" rel=\"noopener noreferrer\">Creating .NET assemblies and instancing them by using the VBScript Driver<\/a>.<\/p>\n<p>2) Once the class library&#8217;s project has been created, you will need to register it in the system. This can be accomplished in one of the following ways:<br \/>\na) With an Assembly Registration Tool (Regasm.exe): <span style=\"font-family: Courier New;\">&#8220;regasm\u00a0 \/codebase C:\\TestAssembly.dll&#8221;<\/span>\u00a0 or<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4883\/register-assembly-manually.png\" alt=\"\" width=\"500\" height=\"110\" align=\"baseline\" border=\"0\" \/><br \/>\n<span style=\"font-size: xx-small;\">Figure 1<\/span><\/div>\n<p>b) By accessing the project&#8217;s properties directly at Visual Studio, via <i><b>Register for COM interop<\/b><\/i> option:<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4883\/register-assemblyVS.png\" alt=\"\" width=\"500\" height=\"245\" align=\"baseline\" border=\"0\" \/><br \/>\n<span style=\"font-size: xx-small;\">Figure 2<\/span><\/p>\n<\/div>\n<p>3) When the DLL is ready and registered for the access, insert the script that will call the newly developed assembly&#8217;s <i>ShowMessage <\/i>method:<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4883\/ScriptVB.png\" alt=\"\" width=\"471\" height=\"174\" align=\"baseline\" border=\"0\" \/><br \/>\n<span style=\"font-size: xx-small;\">Figure 3<\/span><\/div>\n<p>If these procedures were executed correctly, the message box with <b><i>&#8220;Hello World!&#8221;<\/i><\/b> will be displayed when the script is executed.<\/p>\n<div align=\"center\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4883\/final.png\" alt=\"\" width=\"158\" height=\"156\" align=\"baseline\" border=\"0\" \/><br \/>\n<span style=\"font-size: xx-small;\">Figura 4<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Question: Can a.NET DLL assembly be called from VBScript? Can different methods from the DLL be called, and different parameters be sent directly via E3 scripts? Solution: Yes, this is&hellip;<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[763],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>KB-59914: Calling a.NET DLL assembly from VBScript. - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"KB-59914: Calling a.NET DLL assembly from VBScript.\" \/>\n<meta property=\"og:description\" content=\"Question: Can a.NET DLL assembly be called from VBScript? Can different methods from the DLL be called, and different parameters be sent directly via E3 scripts? Solution: Yes, this is&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:43:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-07-02T17:45:33+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4883\/register-assembly-manually.png\" \/>\n<meta name=\"author\" content=\"D\u00e9lio Damin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"D\u00e9lio Damin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/\"},\"author\":{\"name\":\"D\u00e9lio Damin\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778\"},\"headline\":\"KB-59914: Calling a.NET DLL assembly from VBScript.\",\"datePublished\":\"2019-03-25T20:43:10+00:00\",\"dateModified\":\"2019-07-02T17:45:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/\"},\"wordCount\":185,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/\",\"url\":\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/\",\"name\":\"[:pt]KB-59914: Calling a.NET DLL assembly from VBScript.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:43:10+00:00\",\"dateModified\":\"2019-07-02T17:45:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"KB-59914: Calling a.NET DLL assembly from VBScript.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778\",\"name\":\"D\u00e9lio Damin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g\",\"caption\":\"D\u00e9lio Damin\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/delio\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"KB-59914: Calling a.NET DLL assembly from VBScript. - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]KB-59914: Calling a.NET DLL assembly from VBScript.[:] - Elipse Knowledgebase","og_description":"Question: Can a.NET DLL assembly be called from VBScript? Can different methods from the DLL be called, and different parameters be sent directly via E3 scripts? Solution: Yes, this is&hellip;","og_url":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:43:10+00:00","article_modified_time":"2019-07-02T17:45:33+00:00","og_image":[{"url":"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID4883\/register-assembly-manually.png"}],"author":"D\u00e9lio Damin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"D\u00e9lio Damin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/"},"author":{"name":"D\u00e9lio Damin","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778"},"headline":"KB-59914: Calling a.NET DLL assembly from VBScript.","datePublished":"2019-03-25T20:43:10+00:00","dateModified":"2019-07-02T17:45:33+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/"},"wordCount":185,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/","url":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/","name":"[:pt]KB-59914: Calling a.NET DLL assembly from VBScript.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:43:10+00:00","dateModified":"2019-07-02T17:45:33+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/en\/kb59914-calling-a-net-dll-assembly-from-vbscript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"KB-59914: Calling a.NET DLL assembly from VBScript."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/be597eff34b5f24af940a55332870778","name":"D\u00e9lio Damin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fdf251d36430f8dd22144c3f1bc53376?s=96&d=mm&r=g","caption":"D\u00e9lio Damin"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/delio\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3198"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=3198"}],"version-history":[{"count":1,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3198\/revisions"}],"predecessor-version":[{"id":7362,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/3198\/revisions\/7362"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=3198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=3198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=3198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}