Why "Could not load .Net interface library" code 0x0000007e?

The Dyalog "Knowledgebase". This forum is read-only
Forum rules
The FAQ is a read-only forum which is in general updated only by employees of Dyalog Ltd. It replaces the FAQ page which existed under http://www.dyalog.com. Rather than rejecting other posts to this forum, such posts will be put in a moderation queue, and moved to a more appropriate forum.

Why "Could not load .Net interface library" code 0x0000007e?

Postby Vince|Dyalog on Fri Aug 20, 2010 9:52 am

The error message "Could not load .Net interface library bridgennn.dll. (Error 0x0000007e)" means that the DLL cannot be loaded. We use the Windows API LoadLibrary call to load DLLs.

There are two possible reasons why LoadLibrary cannot load the Bridge DLL.

To solve this problem, first test to see if it is a system path issue. Modify the following code so that it reflects the path and bridge DLL filename of the version of Dyalog that you are using:

Code: Select all
r←dll_test;LoadLibrary;GetLastError;GetEnvironmentVariable
 r←⍬
 'LoadLibrary'⎕NA'u kernel32|LoadLibrary* <0T'
 ⎕NA'u kernel32|GetLastError'
 'GetEnvironmentVariable'⎕NA'u kernel32|GetEnvironmentVariable* <0T >0T U'

 r,←LoadLibrary⊂'bridge121_unicode.dll'
 r,←GetLastError
 r,←LoadLibrary⊂'C:\Program Files\Dyalog\Dyalog APL 12.1\bin\bridge121_unicode.dll'
 r,←GetLastError                         

  'GetEnvironmentVariable'⎕NA'u kernel32|GetEnvironmentVariable* <0T >0T U'
 r,←GetEnvironmentVariable'PATH' 4096 4096


If LoadLibrary works in both cases, the first 4 numbers of the result r look like this:
192806912 0 192806912 0
If the second and fourth numbers are not 0, they are the error codes that GetLastError gave.

To solve the system path issue:

    Find the bridge DLL in the bin subdirectory of your install location.
    Change the system path so that this directory is part of it.
    Run the dll_test function again.

If you have followed the above steps, and the bridge DLL still does not load, your operating system may be missing DLLs that the bridge DLL requires. To find out which DLLs are missing, use the Dependency Walker on it. You can download Dependency Walker from http://www.dependencywalker.com.
Vince|Dyalog
 
Posts: 432
Joined: Wed Oct 01, 2008 9:39 am

Re: Why "Could not load .Net interface library" code 0x00000

Postby Vince|Dyalog on Thu Oct 12, 2017 9:59 am

This is an update to this topic for Dyalog 15.0 onwards:

You can test if the Dyalog .NET interface is working with this code:
      ⎕USING←''
System.Environment.Version


You may see this message in the Status Window: Could not load bridge interface library bridge150-64_unicode.dll. (Error 0x0000007e: "The specified module could not be found.")

From 15.0 onwards, the Dyalog .NET interface has 3 requirements:

1) Visual Studio 2015 runtimes must be installed.

Do you have the following DLLs on your computer?
C:\windows\system32\ucrtbase.dll
C:\windows\system32\vcruntime140.dll

Our Dyalog installer can install the "Microsoft Visual Studio 2015 runtime support" DLLs if you tick that checkbox. This runs an installer from Microsoft.

Our installer zip file also contains the installer for this. You could either extract it from our installer zip file, or download it from Microsoft (https://www.microsoft.com/en-gb/download/details.aspx?id=48145).

The installer file is vc_redist.x64.exe (for 64-bit Windows) or vc_redist.x86.exe (for 32-bit Windows).


2) Microsoft .NET framework 4.0 must be installed/enabled.

3) If your Windows version is earlier than Windows 10, you will also need the UCRT (Universal C Runtime). It is described here: https://blogs.msdn.microsoft.com/vcblog ... ersal-crt/ and you can download it here: https://www.microsoft.com/en-us/downloa ... x?id=48234
Vince|Dyalog
 
Posts: 432
Joined: Wed Oct 01, 2008 9:39 am


Return to Frequently Asked Questions (FAQ)

Who is online

Users browsing this forum: No registered users and 1 guest