Skip to main content

Hi,

I am trying to get a C# app to call a Netexpress Cobol DLL.  I have changed the dir in the C# to point at where the DLL is, but still when I run the C#, I and get the point that it calls the cobol, I get:

Unable to load DLL 'C:\\MPIUADEV\\MPIUA\\DEV\\COBOL\\mbaprate.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

which I take to mean that the DLL can't be found.  I also added C:\\MPIUADEV\\MPIUA\\DEV\\COBOL to the path.

I am wondering if I created the DLL incorrectly.


#load
#DLL
#C
#c

Hi,

I am trying to get a C# app to call a Netexpress Cobol DLL.  I have changed the dir in the C# to point at where the DLL is, but still when I run the C#, I and get the point that it calls the cobol, I get:

Unable to load DLL 'C:\\MPIUADEV\\MPIUA\\DEV\\COBOL\\mbaprate.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

which I take to mean that the DLL can't be found.  I also added C:\\MPIUADEV\\MPIUA\\DEV\\COBOL to the path.

I am wondering if I created the DLL incorrectly.


#load
#DLL
#C
#c

The error you are receiving could mean that it cannot find one of the dependencies of the NX .dll like the run-time system.

If you are trying to P/Invoke this native .dll from a C# program then you should make sure that the .dll is linked with the dynamic option so that it can find the required run-time system cblrtss.dll, if you have the Server for COBOL product installed on the system. If you do not have Server for COBOL installed then you will need to ensure that cblrtss.dll and other dependencies are available within the PATH.

Thanks.


Hi,

I am trying to get a C# app to call a Netexpress Cobol DLL.  I have changed the dir in the C# to point at where the DLL is, but still when I run the C#, I and get the point that it calls the cobol, I get:

Unable to load DLL 'C:\\MPIUADEV\\MPIUA\\DEV\\COBOL\\mbaprate.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

which I take to mean that the DLL can't be found.  I also added C:\\MPIUADEV\\MPIUA\\DEV\\COBOL to the path.

I am wondering if I created the DLL incorrectly.


#load
#DLL
#C
#c

Hi Chris,

This is some of what I have set:

set aslmfnet=\\\\orcl\\I-drive\\Micro Focus\\mfaslmf

set COBDIR = \\\\orcl\\I-drive\\Micro Focus\\Server 5.1\\Bin;

set path=\\\\orcl\\I-drive\\Micro Focus\\Server 5.1\\Bin;%path%;


Hi,

I am trying to get a C# app to call a Netexpress Cobol DLL.  I have changed the dir in the C# to point at where the DLL is, but still when I run the C#, I and get the point that it calls the cobol, I get:

Unable to load DLL 'C:\\MPIUADEV\\MPIUA\\DEV\\COBOL\\mbaprate.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

which I take to mean that the DLL can't be found.  I also added C:\\MPIUADEV\\MPIUA\\DEV\\COBOL to the path.

I am wondering if I created the DLL incorrectly.


#load
#DLL
#C
#c

Hello,

I'm not sure if this is the cause of the problem, but there are spaces in your PATH. You might want to quote the UNC.

Regards,


Hi,

I am trying to get a C# app to call a Netexpress Cobol DLL.  I have changed the dir in the C# to point at where the DLL is, but still when I run the C#, I and get the point that it calls the cobol, I get:

Unable to load DLL 'C:\\MPIUADEV\\MPIUA\\DEV\\COBOL\\mbaprate.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

which I take to mean that the DLL can't be found.  I also added C:\\MPIUADEV\\MPIUA\\DEV\\COBOL to the path.

I am wondering if I created the DLL incorrectly.


#load
#DLL
#C
#c

There may be a permissions problem trying to load the .dlls from a network drive. To test this, move the run-time file, either cblrtss.dll or cblrtsm.dll if multi-threaded to your local drive in the same location as your unmanaged dll and see if it can then load.