Transferred the project from computer to laptop, after which there was a problem when starting the project.

Visual studio 2017

I try to call the library on c ++ from the wrapper on c # and get the error "System.DllNotFoundException:" Unable to load the DLL "GRD_MBA.dll": The specified module could not be found. (Exception from HRESULT: 0x8007007E) ""

With ++ the library lies in the same directory as exe wrappers. I also tried to copy this c ++ library into the system32 folder, but I still get the same error. Why doesn't the environment see the dll?

The code from c # project is as follows:

[DllImport("GRD_MBA.dll")] private static extern unsafe void init(void** ppGrdMba); 

so calling the method itself:

 unsafe { fixed (void* ppGrdMba = &_pGrdMba) { init((void**) ppGrdMba); } } 

Help. What could be the problem?

  • Does this library have dependencies? - VTT
  • @VTT, the library does not depend on other projects, but the wrapper depends on it. - Naf
  • Installed ? Microsoft Visual C++ 2017 Redistributable (x64) - Digital Core
  • @DigitalCore, yes - Naf
  • 3
    "that c ++ library causes others to c ++ dll" and say there are no dependencies ... dll are not used at all and no problems with their absence appear at this stage. - VTT

0