In Microstation V8i, is it possible to use a native MDL program (.ma + .dll) as a shared library and how?


Hi,

In pure MDL, dls file specification (see below) allows to call functions in MDL program (used as Shared library) from another pure MDL program.
How may this be done between two "native" MDL programs?


Thanks for help

Best regards,

Jean-Claude

/*----------------------------------------------------------------------+
| |
| Function - |
| |
| MDL Shared Library Example Application Dynamic Link |
| Specification File |
| |
+----------------------------------------------------------------------*/
/* Specify the version number. */

%Version 0x551

%InterfaceType Mdllib

%ModuleName pixdted

%Functions

GetPointAltitudeFromDtedUsingDisplayedRaster (dtTools_GetPointAltitudeFromDtedUsingDisplayedRaster)
GetPointAltitudeFromDted (dtTools_GetPointAltitudeFromCurrentSousLotDted)

%EndFunctions

%Variables

%EndVariables


%End

Parents
  • How may this be done between two "native" MDL programs?

    A native MDL program usually builds as a DLL.  It follows the rules of Windows DLLs and publishes an interface that conforms to the C calling protocol.  Another app. loaded into the same MicroStation address space can call that public interface.

    That's the dynamic (DLL) approach.  You can alternatively build a static (*.lib) library.  Like a DLL, that library must have a public interface.   Much of the MicroStation API is delivered in the *.lib files that you are familiar with when using bmake.

    The 'public interface' of a DLL or library is the list of class and function declarations that you put in a header (*.h) file.

    Visual Studio makes it easy to build either a DLL or a static library.  Consult a Microsoft MSDN site for more information.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • How may this be done between two "native" MDL programs?

    A native MDL program usually builds as a DLL.  It follows the rules of Windows DLLs and publishes an interface that conforms to the C calling protocol.  Another app. loaded into the same MicroStation address space can call that public interface.

    That's the dynamic (DLL) approach.  You can alternatively build a static (*.lib) library.  Like a DLL, that library must have a public interface.   Much of the MicroStation API is delivered in the *.lib files that you are familiar with when using bmake.

    The 'public interface' of a DLL or library is the list of class and function declarations that you put in a header (*.h) file.

    Visual Studio makes it easy to build either a DLL or a static library.  Consult a Microsoft MSDN site for more information.

     
    Regards, Jon Summers
    LA Solutions

Children
No Data