<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/228331/is-there-any-example-of-a-shared-library-dll-no-ma-file</link><description>I have a shared library (stand alone .dll file. No .ma file.) Is there any example of this in the CONNECT SDK?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706736?ContentTypeID=1</link><pubDate>Thu, 14 Apr 2022 19:02:19 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4158ceba-5975-4f92-b09e-cd23d60f0f9d</guid><dc:creator>Ken Adams</dc:creator><description>&lt;p&gt;Thank you Jon! At least this gets me to the .cpp compiler errors.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706681?ContentTypeID=1</link><pubDate>Thu, 14 Apr 2022 14:31:43 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:8e251ffd-01dd-416f-b823-327942f101d5</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="338809" url="~/products/programming/microstation_programming/f/microstation-programming---forum/228331/is-there-any-example-of-a-shared-library-dll-no-ma-file/706549"]my knowledge of the intracacies of how make files work is limited[/quote]
&lt;p&gt;I know how you feel.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an updated version of your &lt;em&gt;bmake&lt;/em&gt; file.&amp;nbsp; Keep in mind that I can&amp;#39;t test it because I have none of your source code.&amp;nbsp; It&amp;#39;s a shot in the dark...&lt;/p&gt;
&lt;p&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/343173/KenAdams.zip"&gt;communities.bentley.com/.../KenAdams.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706549?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 20:22:17 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:213d1923-3910-4c99-b864-825db71b60fd</guid><dc:creator>Ken Adams</dc:creator><description>&lt;p&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/343173/fplcommon.txt"&gt;communities.bentley.com/.../fplcommon.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I confess my knowledge of the intracacies of how make files work is limited. But this attached file does work in producing a usable DLL for my other V8 SS3 applications with no apparent errors.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/343173/results.txt"&gt;communities.bentley.com/.../results.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706547?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 20:01:01 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:04238a27-94f0-45ec-b8b3-74e9fbbc86d7</guid><dc:creator>Robert Hook</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/e6ebdcf5_2d00_5d05_2d00_4c8c_2d00_8b5a_2d00_69d54e5fbe9b"&gt;Ken Adams&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Back around the 2000 BDN developer conferences Bentley made recommendations to 3rd party developers to &lt;a href="/products/microstation/w/microstation__wiki/8802/migrating-mdl-applications-to-native-code" rel="noopener noreferrer" target="_blank"&gt;Migrate Interpreted MDL code to Native code&lt;/a&gt; where that article provides the initial process and steps recommended in the migration chain you are likely need to exercise (now); being:&lt;/p&gt;
&lt;p&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/41184/developers-migrating-to-microstation-connect" rel="noopener noreferrer" target="_blank"&gt;Migrating to CONNECT&lt;/a&gt;&amp;nbsp;(parent topic and below list of migration actions needed between each major release)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/41855/workflows#MigrateV7Code" rel="noopener noreferrer" target="_blank"&gt;Migrate V7 Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/microstation/w/microstation__wiki/8802/migrating-mdl-applications-to-native-code" rel="noopener noreferrer" target="_blank"&gt;Porting MDL Applications To MicroStation V8&lt;/a&gt;&amp;nbsp;(V8 to XM)&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/microstation/w/microstation__wiki/8781/microstation-v8-xm-edition-view-code-updates" rel="noopener noreferrer" target="_blank"&gt;MicroStation V8 XM Edition View Code Updates&lt;/a&gt;&amp;nbsp;(XM to V8i)&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/microstation/w/microstation__wiki/8802/migrating-mdl-applications-to-native-code" rel="noopener noreferrer" target="_blank"&gt;Migrating MDL Applications To Native Code&lt;/a&gt;&amp;nbsp;(V8i to CONNECT)&lt;/li&gt;
&lt;li&gt;[Recommended] Become familiar and productive with the new CONNECT APIs.
&lt;ol&gt;
&lt;li&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/52090/training" rel="noopener noreferrer" target="_blank"&gt;Developer Training&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&amp;gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/50638/microstation-connect-developer-training" rel="noopener noreferrer" target="_blank"&gt;CONNECT API Training&lt;/a&gt;&lt;/strong&gt;,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/42961/connect-apis" rel="noopener noreferrer" target="_blank"&gt;CONNECT APIs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/51976/docs" rel="noopener noreferrer" target="_blank"&gt;SDK Docs&lt;/a&gt; &amp;gt; &lt;strong&gt;&lt;a href="/products/programming/microstation_programming/m/mediagallery/275468" rel="noopener noreferrer" target="_blank"&gt;SDK Help&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/39880/visual-studio-extensions" rel="noopener noreferrer" target="_blank"&gt;Visual Studio Extensions&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;[Optional] Due to limited effectiveness in a 1:1 source code migration.
&lt;ol&gt;
&lt;li&gt;&lt;a href="/products/programming/microstation_programming/w/wiki/39882/microstation-connect-sdk---introduction" rel="noopener noreferrer" target="_blank"&gt;MicroStation CONNECT SDK - Introduction&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;(&lt;a href="/products/programming/microstation_programming/w/wiki/39882/microstation-connect-sdk---introduction#MigrationTools" rel="noopener noreferrer" target="_blank"&gt;MigrationTools&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;HTH,&lt;br /&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706485?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 14:40:44 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d9f209e4-7a35-418b-a4bd-8d8b2f2fead8</guid><dc:creator>Jan Šlegr</dc:creator><description>&lt;p&gt;Hi Ken,&lt;/p&gt;
&lt;p&gt;Jon wrote it already: Please attach the file (use &lt;em&gt;Insert &amp;gt; Insert image/video/file&lt;/em&gt; tool). Or when you decide to share its content, use &lt;em&gt;Insert &amp;gt; Insert code&lt;/em&gt; to ensure it will be readable and not displayed as plain not formatted text.&lt;/p&gt;
[quote userid="338809" url="~/products/programming/microstation_programming/f/microstation-programming---forum/228331/is-there-any-example-of-a-shared-library-dll-no-ma-file/706292"]I am simply trying to convert the make file at this point.[/quote]
&lt;p&gt;In the first step, you should remove all macros that makes no sense:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;As Jon wrote, they are some definitions, that were used in MicroStation/J era and were not valid even in V8: MSJ_SKIP_SIGNRSCS&lt;/li&gt;
&lt;li&gt;Other macros are valid for old MDL (pseudocode) development, not supported in CE: MLINK_STDLIB and everything targeting &amp;quot;MDL shard libraries&amp;quot; with dlo and ml extensions&lt;/li&gt;
&lt;li&gt;Check mki files (both in V8 and CE SDK) what is defined as obsolete and remove it or replaced it: E.g. dlmcomp.mki is obsolete from V8 time&lt;/li&gt;
&lt;li&gt;Migrate from C to C++, so there are no files with .c extension.&lt;/li&gt;
&lt;/ul&gt;
[quote userid="338809" url="~/products/programming/microstation_programming/f/microstation-programming---forum/228331/is-there-any-example-of-a-shared-library-dll-no-ma-file/706292"]It is not as obvious how to use &amp;#39;myapp&amp;#39; as a template&amp;nbsp;to update this for CONNECT.[/quote]
&lt;p&gt;My knowledge of using shared dll files in MicroStation native apps is limited, but I guess there is no big difference between &amp;quot;main dll&amp;quot; and &amp;quot;shared dll&amp;quot;: When dll is to be loaded by MicroStation as &amp;quot;MicroStation application&amp;quot;, there must be MdlMain method exported and .ma loader compiled, whereas shared .dll does not contain these definitions.&lt;/p&gt;
&lt;p&gt;I recommend also to check dlmlink.mki for overview of DLM_ definitions, that can be used to configure different aspects of build process.&lt;/p&gt;
&lt;p&gt;With regards,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706403?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2022 07:00:51 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:c1f6625a-4311-4ff6-8509-f3777e05ab13</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="338809" url="~/products/programming/microstation_programming/f/microstation-programming---forum/228331/is-there-any-example-of-a-shared-library-dll-no-ma-file/706292"]I was not more clear about my goal. I have a SS3 DLL I am trying to upgrade to CONNECT[/quote]
&lt;p&gt;OK, that&amp;#39;s make sense!&lt;/p&gt;
&lt;p&gt;Please &lt;em&gt;insert&lt;/em&gt; your entire &lt;em&gt;bmake&lt;/em&gt; file rather than a copy.&amp;nbsp; There are a few things in there that are a hangover from MicroStation V7 days.&amp;nbsp; There are some things in there that would not have built correctly in V8.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706293?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 18:49:45 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9b224ec4-d03c-4eae-adc5-2eadb10c5582</guid><dc:creator>Ken Adams</dc:creator><description>&lt;p&gt;appName = fplcommon&lt;/p&gt;
&lt;p&gt;MSJ_SKIP_SIGNRSCS = 0&lt;/p&gt;
&lt;p&gt;DLM_NO_SIGN = 0&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;privateInc = $(baseDir)&lt;/p&gt;
&lt;p&gt;%include mdl.mki&lt;/p&gt;
&lt;p&gt;%if defined (_MakeFilePath) &lt;br /&gt; baseDir = $(_MakeFilePath)&lt;br /&gt;%else&lt;br /&gt; %if defined (powerc) || (m68k)&lt;br /&gt; baseDir = /&lt;br /&gt; %else&lt;br /&gt; baseDir = ./&lt;br /&gt; %endif&lt;br /&gt;%endif&lt;/p&gt;
&lt;p&gt;#---------------------------------------------&lt;br /&gt;# mdl.mki contains the default rules for creating .rsc, .mo, etc files&lt;br /&gt;#---------------------------------------------&lt;br /&gt;%if defined (MLINK_STDLIB)&lt;br /&gt; libraryExt = dlo&lt;br /&gt;%else&lt;br /&gt; libraryExt = ml&lt;br /&gt;%endif&lt;/p&gt;
&lt;p&gt;# Display compile warning in MS/J&lt;br /&gt;moreMdlCompileOpts + -b&lt;br /&gt;#------------------------------------------------&lt;br /&gt;# Set up to use dlmcomp.mki and dlmlink.mki&lt;br /&gt;#------------------------------------------------&lt;/p&gt;
&lt;p&gt;DLM_OBJECT_DEST = $(o)&lt;br /&gt;DLM_LIBDEF_SRC = $(baseDir)&lt;br /&gt;DLM_NAME = fplcommon&lt;br /&gt;DLM_OBJECT_FILES = $(o)$(DLM_NAME)$(oext) &lt;br /&gt;DLM_LIBRARY_FILES = $(mdlLibs)dgnfileio.lib $(mdlLibs)toolsubs.lib&lt;br /&gt;dlm_special_linkopt=-Fixed:no&lt;/p&gt;
&lt;p&gt;#------------------------------------------------&lt;br /&gt;# Compile the source files for the DLM&lt;br /&gt;#------------------------------------------------&lt;br /&gt;%include dlmcomp.mki&lt;/p&gt;
&lt;p&gt;$(o)$(DLM_NAME)$(oext): $(baseDir)$(DLM_NAME).c&lt;/p&gt;
&lt;p&gt;#------------------------------------------------&lt;br /&gt;# Use dlmlink.mki to compile the Dynamic &lt;br /&gt;# Load Specification (.dls) file and link&lt;br /&gt;# the DLM.&lt;br /&gt;#------------------------------------------------&lt;/p&gt;
&lt;p&gt;%include dlmlink.mki&lt;/p&gt;
&lt;p&gt;#---------------------------------------------&lt;br /&gt;# Compile the Dynamic Link Specification&lt;br /&gt;#---------------------------------------------&lt;/p&gt;
&lt;p&gt;$(o)fplcommon.dlo : $(baseDir)fplcommon.dls&lt;/p&gt;
&lt;p&gt;$(mdlapps)$(appName).dll : $(mdlapps)$(appName).dll&lt;br /&gt; $(msg)&lt;br /&gt; -copy $(mdlapps)$(appName).dll ..\bin\$(appName).dll&lt;br /&gt; ~time&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706292?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 18:48:50 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:27dcb30b-f661-4581-983e-e035d13ef7e2</guid><dc:creator>Ken Adams</dc:creator><description>&lt;p&gt;Sorry I was not more clear about my goal. I have a SS3 DLL I am trying to upgrade to CONNECT. It is a set of common functions that several other MDLs call. It&amp;nbsp; has no .ma file itself.&lt;/p&gt;
&lt;p&gt;I am simply trying to convert the make file at this point.&lt;/p&gt;
&lt;p&gt;My SS3 make file looks a little different than my other make files. It has no cmd or typ resources or mki file. It is not as obvious how to use &amp;#39;myapp&amp;#39; as a template&amp;nbsp;to update this for CONNECT.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706290?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 18:21:34 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:d3dc6bdc-c6fd-4448-ad09-a21d1573ca57</guid><dc:creator>Robert Hook</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/e6ebdcf5_2d00_5d05_2d00_4c8c_2d00_8b5a_2d00_69d54e5fbe9b"&gt;Ken Adams&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;As Mike requests, if you can provide some brief information related to your workflow or needs it may help provide better recommendations early on.&lt;/p&gt;
&lt;p&gt;As Jon suggests, for MDL (.cpp Native Code) both a .DLL + .MA are required &amp;quot;to load&amp;quot; an application and access functionality defined in the .DLL library file - and - common Microsoft DLL library dependencies and common address space interactions are possible w/o need for Inter-Process Communication (a.k.a. IPC named pipes and queues preferred).&lt;/p&gt;
&lt;p&gt;For MDL (.cs Managed Code) only a .DLL (standalone) file is generated as output; however behind the scenes the MicroStation .NET loader will create a temporary .MA image if not present &amp;quot;to load&amp;quot; a MDL .NET Addin application.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706280?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 17:22:41 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b5b777f0-c94e-420a-8fa9-77b8d3d3148a</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="338809" url="~/products/programming/microstation_programming/f/microstation-programming---forum/228331/is-there-any-example-of-a-shared-library-dll-no-ma-file"]I have a shared library (stand alone .dll file. No .ma file.) [/quote]
&lt;p&gt;A DLL is intended to be loaded into the address space of a running process.&amp;nbsp; Presumably, that running process wants to access functions implemented in the DLL.&amp;nbsp; One DLL can call functions in another.&amp;nbsp; You can build a DLL using standard tools for Windows.&amp;nbsp; Nothing to do with MicroStation.&lt;/p&gt;
&lt;p&gt;When you build an app for MicroStation, the implementation is stored in a DLL.&amp;nbsp; The above rules apply.&amp;nbsp; The running process will be MicroStation.&amp;nbsp; In addition to the DLL rules, MicroStation requires a resource (&lt;code&gt;.ma&lt;/code&gt;) file usually of the same name as the DLL.&amp;nbsp; The data contained in that &lt;code&gt;.ma&lt;/code&gt; file tells MicroStation what to look for when you key-in &lt;code&gt;mdl load KenAdamsApp&lt;/code&gt;.&lt;/p&gt;
[quote userid="338809" url="~/products/programming/microstation_programming/f/microstation-programming---forum/228331/is-there-any-example-of-a-shared-library-dll-no-ma-file"]Is there any example of this in the CONNECT SDK?[/quote]
&lt;p&gt;The SDK helps build an app for MicroStation.&amp;nbsp; Why would you build a DLL that is unable to be loaded?&amp;nbsp; One reason might be to have a DLL that stores code common to many of your apps, that each app&amp;#39;s DLL can call.&amp;nbsp; That common DLL might want to link with the SDK libraries to provide that common functionality, and it would never be loaded with key-in &lt;code&gt;mdl load KensCommonDll&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t need a &lt;code&gt;.ma&lt;/code&gt; file, simply omit the part of your &lt;em&gt;bmake&lt;/em&gt; file that generates that resource.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is there any example of a shared library (.dll)? No .ma file.</title><link>https://communities.bentley.com/thread/706274?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2022 16:29:16 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0b5e3d91-9bc3-45a3-9bdd-c732546f85d6</guid><dc:creator>Mike Robertson</dc:creator><description>&lt;p&gt;Please be more specific for what functionality you are looking for, what version of MicroStation you are using, and what programming language.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>