Error 193 loading custom application

I created an .MA application and corresponding dll using Visual Studio 14.0.

When launching MicroStation CE version 10.16.00.80, I specify a specific configuration (-wu<config>) on the command line which contains the entry MS_DGNAPPS indicating that my application should be loaded at startup.

Works great.

So far, so good.

On a different PC, I have the very same version of MicroStation but at startup it gives me error 193 (the OS could not load myappl.dll).

I did some googling and this error should indicate that I'm trying to load a 32 bit DLL, which is not true (I checked it with DUMPBIN /HEADERS).

Within MicroStation I tried to load the MDL manually (Ribbon Design/Utilities/MDL applications). It does show me my custom applications but when trying to load one of them, I get the very same error.

I'm quite sure I'm missing something stupid but I can't figure out what it is.

Thanks,

Robert

Parents Reply
  • I'm not sure if it may help, but I hereby attach the output of DUMPBIN /HEADERS /DEPENDENTS of the DLL.

    So far, I've always referred to the DLL as "myappl" while its actual name is "SHD_LIBRARY". It is loaded at startup and exports tons of functions used by other customer applications.

    Its MdlMain, after some general initialization, launches a second application that executes the login procedure.

    6457.dumpbin.txt
    Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    Dump of file C:\Develop\SIREN-INP\CAD_CE\rilascio\SIGRA-IT\so_nt\wind\apps\italiano\shd_library.dll
    
    PE signature found
    
    File Type: DLL
    
    FILE HEADER VALUES
                8664 machine (x64)
                   6 number of sections
            61250C25 time date stamp Tue Aug 24 17:11:33 2021
                   0 file pointer to symbol table
                   0 number of symbols
                  F0 size of optional header
                2022 characteristics
                       Executable
                       Application can handle large (>2GB) addresses
                       DLL
    
    OPTIONAL HEADER VALUES
                 20B magic # (PE32+)
               14.16 linker version
              1C1000 size of code
             43FFA00 size of initialized data
                   0 size of uninitialized data
              1BB67C entry point (00000001801BB67C) _DllMainCRTStartup
                1000 base of code
           180000000 image base (0000000180000000 to 00000001845C4FFF)
                1000 section alignment
                 200 file alignment
                6.00 operating system version
                0.00 image version
                6.00 subsystem version
                   0 Win32 version
             45C5000 size of image
                 400 size of headers
                   0 checksum
                   2 subsystem (Windows GUI)
                 160 DLL characteristics
                       High Entropy Virtual Addresses
                       Dynamic base
                       NX compatible
              100000 size of stack reserve
                1000 size of stack commit
              100000 size of heap reserve
                1000 size of heap commit
                   0 loader flags
                  10 number of directories
              244830 [    5FA4] RVA [size] of Export Directory
              24A7D4 [     190] RVA [size] of Import Directory
             45C3000 [      F8] RVA [size] of Resource Directory
             45B7000 [    B1E4] RVA [size] of Exception Directory
                   0 [       0] RVA [size] of Certificates Directory
             45C4000 [     7B0] RVA [size] of Base Relocation Directory
              22A770 [      70] RVA [size] of Debug Directory
                   0 [       0] RVA [size] of Architecture Directory
                   0 [       0] RVA [size] of Global Pointer Directory
              22A8E0 [      28] RVA [size] of Thread Storage Directory
              22A7E0 [     100] RVA [size] of Load Configuration Directory
                   0 [       0] RVA [size] of Bound Import Directory
              1C2000 [    1360] RVA [size] of Import Address Table Directory
                   0 [       0] RVA [size] of Delay Import Directory
                   0 [       0] RVA [size] of COM Descriptor Directory
                   0 [       0] RVA [size] of Reserved Directory
    
    
    SECTION HEADER #1
       .text name
      1C0F0D virtual size
        1000 virtual address (0000000180001000 to 00000001801C1F0C)
      1C1000 size of raw data
         400 file pointer to raw data (00000400 to 001C13FF)
           0 file pointer to relocation table
           0 file pointer to line numbers
           0 number of relocations
           0 number of line numbers
    60000020 flags
             Code
             Execute Read
    
    SECTION HEADER #2
      .rdata name
       8E02C virtual size
      1C2000 virtual address (00000001801C2000 to 000000018025002B)
       8E200 size of raw data
      1C1400 file pointer to raw data (001C1400 to 0024F5FF)
           0 file pointer to relocation table
           0 file pointer to line numbers
           0 number of relocations
           0 number of line numbers
    40000040 flags
             Initialized Data
             Read Only
    
      Debug Directories
    
            Time Type        Size      RVA  Pointer
        -------- ------- -------- -------- --------
        61250C25 cv            6F 0022C3BC   22B7BC    Format: RSDS, {E84A2B0D-BB33-4FC4-B598-252FFC915B9B}, 1, C:\Develop\SIREN-INP\cad_ce\rilascio\SIGRA-IT\so_nt\wind\apps\italiano\shd_library.pdb
        61250C25 feat          14 0022C42C   22B82C    Counts: Pre-VC++ 11.00=0, C/C++=118, /GS=118, /sdl=85, guardN=33
        61250C25 coffgrp      338 0022C440   22B840    4C544347 (LTCG)
        61250C25 iltcg          0 00000000        0
    
      Image has the following dependencies:
    
        KERNEL32.dll
        USER32.dll
        OCI.dll
        USTATION.dll
        Bentley5.dll
        BentleyAllocator.dll
        DgnPlatform5.dll
        RmgrTools3.dll
        BentleyGeom5.dll
        MSVCP140.dll
        VCRUNTIME140.dll
        api-ms-win-crt-string-l1-1-0.dll
        api-ms-win-crt-convert-l1-1-0.dll
        api-ms-win-crt-stdio-l1-1-0.dll
        api-ms-win-crt-heap-l1-1-0.dll
        api-ms-win-crt-runtime-l1-1-0.dll
        api-ms-win-crt-time-l1-1-0.dll
        api-ms-win-crt-environment-l1-1-0.dll
        api-ms-win-crt-math-l1-1-0.dll
    
    SECTION HEADER #3
       .data name
     4365B38 virtual size
      251000 virtual address (0000000180251000 to 00000001845B6B37)
        2800 size of raw data
      24F600 file pointer to raw data (0024F600 to 00251DFF)
           0 file pointer to relocation table
           0 file pointer to line numbers
           0 number of relocations
           0 number of line numbers
    C0000040 flags
             Initialized Data
             Read Write
    
    SECTION HEADER #4
      .pdata name
        B1E4 virtual size
     45B7000 virtual address (00000001845B7000 to 00000001845C21E3)
        B200 size of raw data
      251E00 file pointer to raw data (00251E00 to 0025CFFF)
           0 file pointer to relocation table
           0 file pointer to line numbers
           0 number of relocations
           0 number of line numbers
    40000040 flags
             Initialized Data
             Read Only
    
    SECTION HEADER #5
       .rsrc name
          F8 virtual size
     45C3000 virtual address (00000001845C3000 to 00000001845C30F7)
         200 size of raw data
      25D000 file pointer to raw data (0025D000 to 0025D1FF)
           0 file pointer to relocation table
           0 file pointer to line numbers
           0 number of relocations
           0 number of line numbers
    40000040 flags
             Initialized Data
             Read Only
    
    SECTION HEADER #6
      .reloc name
         7B0 virtual size
     45C4000 virtual address (00000001845C4000 to 00000001845C47AF)
         800 size of raw data
      25D200 file pointer to raw data (0025D200 to 0025D9FF)
           0 file pointer to relocation table
           0 file pointer to line numbers
           0 number of relocations
           0 number of line numbers
    42000040 flags
             Initialized Data
             Discardable
             Read Only
    
      Summary
    
         4366000 .data
            C000 .pdata
           8F000 .rdata
            1000 .reloc
            1000 .rsrc
          1C1000 .text
    

Children