{"id":941,"date":"2011-05-27T17:12:16","date_gmt":"2011-05-27T21:12:16","guid":{"rendered":"https:\/\/clarionsharp.com\/blog\/?p=941"},"modified":"2011-05-27T17:12:16","modified_gmt":"2011-05-27T21:12:16","slug":"clarion-net-update-2","status":"publish","type":"post","link":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/","title":{"rendered":"Clarion.Net update"},"content":{"rendered":"<p>An update for Clarion.Net is out today.\u00a0 It has a good number of fixes and delivers the previously described feature that automatically exposes Procedures you select so that they are visible to Clarion Win32 Apps.\u00a0 I wrote about this a while ago, so I&#8217;ll refresh you on it (this is straight from the Help file):<\/p>\n<p>1) In the Clarion# Program&#8217;s GLOBAL MAP, add both the NAME and PUBLIC attributes to the PROCEDURE  prototype<\/p>\n<p>For example in your Clarion# global Map:<\/p>\n<p>MAP<\/p>\n<p>! Procedures exposed for Win32 access must have both the  <span style=\"color: #008000;\">NAME and PUBLIC<\/span> attributes<br \/>\nSayHello \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  PROCEDURE(),<span style=\"color: #008000;\">NAME<\/span>(&#8216;SayHello&#8217;),<span style=\"color: #008000;\">PUBLIC<\/span><br \/>\nSayTheName \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  \u00a0PROCEDURE(string theName),<span style=\"color: #008000;\">NAME<\/span>(&#8216;SayTheName&#8217;),<span style=\"color: #008000;\">PUBLIC<\/span><\/p>\n<p>END<\/p>\n<p>2) On the Clarion# Project properties dialog, turn on the checkbox: <strong>Export Global named procedures and create Clarion  Win32 LIB file<\/strong><\/p>\n<p>This step causes a .LIB file to be created, its location is set according to  your RED file, or you can specify the output path in the Project<\/p>\n<p>3) Copy both the .LIB and the Clarion# DLL to your Win32 project folder. \u00a0You  also must copy any assemblies (DLLs) that your Clarion# DLL references, for the  minimum you need:<\/p>\n<p>SoftVelocity.Clarion.Runtime.Procedures.dll<br \/>\nSoftVelocity.Clarion.FileIO.dll<br \/>\nSoftVelocity.Clarion.Runtime.Classes.dll<br \/>\nClarionDrv.dll<\/p>\n<p>&nbsp;<\/p>\n<p>4) In the Clarion Win32 program prototype the Procedure(s), and add the PASCAL and DLL attributes. If you need to pass a string value by address also add the RAW attribute.<\/p>\n<p>MAP<\/p>\n<p>MODULE(&#8216;ManagedDLL.dll&#8217;)<\/p>\n<p>! Calling  Clarion# Procedures, you must use the <span style=\"color: #008000;\">PASCAL Attribute and set  DLL(true)<\/span><br \/>\nSayHello \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  \u00a0PROCEDURE(),NAME(&#8216;SayHello&#8217;),<span style=\"color: #008000;\">PASCAL,DLL<\/span>(TRUE)<br \/>\nSayTheName \u00a0 PROCEDURE(*cstring  theName),NAME(&#8216;SayTheName&#8217;),<span style=\"color: #008000;\">PASCAL,RAW,DLL<\/span>(TRUE)<\/p>\n<p>END<\/p>\n<p>END<\/p>\n<p>&nbsp;<\/p>\n<p>In the initial implementation (its already changed internally),\u00a0 you might run into a &#8220;gotcha&#8221; when you get to step 2.\u00a0 In order to expose the Procedures for use in a Win32 program the binary Clarion# DLL file has to be disassembled back to IL code, the IL code is then modified, and then the IL code has to be assembled back to a binary (PE format) file.\u00a0 To do this there are two programs from the .Net SDK that have to be found; Ilasm and Ildasm.\u00a0 In the current implementation the location for those files is stored in an external .config file, and if they are not found (Ilasm and Ildasm), you&#8217;ll get an error message telling you to edit the path stored in Dllexport.exe.config.\u00a0 In the next release we&#8217;ll have an improved implementation that finds these automatically on all OS&#8217;s (32 or 64 bit).<\/p>\n<p>You&#8217;ll find an easy to understand example showing how this works in the .SamplesWin32toDotNet folder.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An update for Clarion.Net is out today.\u00a0 It has a good number of fixes and delivers the previously described feature that automatically exposes Procedures you select so that they are visible to Clarion Win32 Apps.\u00a0 I wrote about this a while ago, so I&#8217;ll refresh you on it (this is straight from the Help file): &hellip; <a href=\"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Clarion.Net update<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7],"tags":[],"class_list":["post-941","post","type-post","status-publish","format-standard","hentry","category-clarionnews","category-clarionsharp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Clarion.Net update - Clarion<\/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:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Clarion.Net update - Clarion\" \/>\n<meta property=\"og:description\" content=\"An update for Clarion.Net is out today.\u00a0 It has a good number of fixes and delivers the previously described feature that automatically exposes Procedures you select so that they are visible to Clarion Win32 Apps.\u00a0 I wrote about this a while ago, so I&#8217;ll refresh you on it (this is straight from the Help file): &hellip; Continue reading Clarion.Net update &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Clarion\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/softvelocity\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-05-27T21:12:16+00:00\" \/>\n<meta name=\"author\" content=\"rzaunere\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rzaunere\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/\"},\"author\":{\"name\":\"rzaunere\",\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#\\\/schema\\\/person\\\/b90e860529aea05ad064cf2687697ce3\"},\"headline\":\"Clarion.Net update\",\"datePublished\":\"2011-05-27T21:12:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/\"},\"wordCount\":433,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#organization\"},\"articleSection\":[\"Clarion News\",\"Clarion.Net\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/\",\"url\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/\",\"name\":\"Clarion.Net update - Clarion\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#website\"},\"datePublished\":\"2011-05-27T21:12:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/clarion-net-update-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Clarion.Net update\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/\",\"name\":\"Clarion\",\"description\":\"Deliver your software on time, every time\",\"publisher\":{\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#organization\",\"name\":\"SoftVelocity\",\"url\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/svlogonew57.png\",\"contentUrl\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/svlogonew57.png\",\"width\":221,\"height\":57,\"caption\":\"SoftVelocity\"},\"image\":{\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/softvelocity\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/SoftVelocity\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/#\\\/schema\\\/person\\\/b90e860529aea05ad064cf2687697ce3\",\"name\":\"rzaunere\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/91d95e38759c411d27f646b60da7f4769ce91e87b484669af240e51c729b1e7c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/91d95e38759c411d27f646b60da7f4769ce91e87b484669af240e51c729b1e7c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/91d95e38759c411d27f646b60da7f4769ce91e87b484669af240e51c729b1e7c?s=96&d=mm&r=g\",\"caption\":\"rzaunere\"},\"url\":\"https:\\\/\\\/clarionsharp.com\\\/blog\\\/author\\\/rzaunere\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Clarion.Net update - Clarion","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:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/","og_locale":"en_US","og_type":"article","og_title":"Clarion.Net update - Clarion","og_description":"An update for Clarion.Net is out today.\u00a0 It has a good number of fixes and delivers the previously described feature that automatically exposes Procedures you select so that they are visible to Clarion Win32 Apps.\u00a0 I wrote about this a while ago, so I&#8217;ll refresh you on it (this is straight from the Help file): &hellip; Continue reading Clarion.Net update &rarr;","og_url":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/","og_site_name":"Clarion","article_publisher":"https:\/\/www.facebook.com\/softvelocity\/","article_published_time":"2011-05-27T21:12:16+00:00","author":"rzaunere","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rzaunere","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/#article","isPartOf":{"@id":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/"},"author":{"name":"rzaunere","@id":"https:\/\/clarionsharp.com\/blog\/#\/schema\/person\/b90e860529aea05ad064cf2687697ce3"},"headline":"Clarion.Net update","datePublished":"2011-05-27T21:12:16+00:00","mainEntityOfPage":{"@id":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/"},"wordCount":433,"commentCount":1,"publisher":{"@id":"https:\/\/clarionsharp.com\/blog\/#organization"},"articleSection":["Clarion News","Clarion.Net"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/","url":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/","name":"Clarion.Net update - Clarion","isPartOf":{"@id":"https:\/\/clarionsharp.com\/blog\/#website"},"datePublished":"2011-05-27T21:12:16+00:00","breadcrumb":{"@id":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/clarionsharp.com\/blog\/clarion-net-update-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/clarionsharp.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Clarion.Net update"}]},{"@type":"WebSite","@id":"https:\/\/clarionsharp.com\/blog\/#website","url":"https:\/\/clarionsharp.com\/blog\/","name":"Clarion","description":"Deliver your software on time, every time","publisher":{"@id":"https:\/\/clarionsharp.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/clarionsharp.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/clarionsharp.com\/blog\/#organization","name":"SoftVelocity","url":"https:\/\/clarionsharp.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/clarionsharp.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/clarionsharp.com\/blog\/wp-content\/uploads\/2019\/03\/svlogonew57.png","contentUrl":"https:\/\/clarionsharp.com\/blog\/wp-content\/uploads\/2019\/03\/svlogonew57.png","width":221,"height":57,"caption":"SoftVelocity"},"image":{"@id":"https:\/\/clarionsharp.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/softvelocity\/","https:\/\/www.youtube.com\/user\/SoftVelocity"]},{"@type":"Person","@id":"https:\/\/clarionsharp.com\/blog\/#\/schema\/person\/b90e860529aea05ad064cf2687697ce3","name":"rzaunere","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/91d95e38759c411d27f646b60da7f4769ce91e87b484669af240e51c729b1e7c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/91d95e38759c411d27f646b60da7f4769ce91e87b484669af240e51c729b1e7c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/91d95e38759c411d27f646b60da7f4769ce91e87b484669af240e51c729b1e7c?s=96&d=mm&r=g","caption":"rzaunere"},"url":"https:\/\/clarionsharp.com\/blog\/author\/rzaunere\/"}]}},"_links":{"self":[{"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/posts\/941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/comments?post=941"}],"version-history":[{"count":0,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/posts\/941\/revisions"}],"wp:attachment":[{"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/media?parent=941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/categories?post=941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/tags?post=941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}