A
Andrew Falanga
Hi,
I have a C# class library that has to draw upon an unmanaged, C++,
library that is itself a project in this solution. So, because of how
this library is to be used, the C++ dll is built and placed in C:\temp
(I figure it's a directory everyone should have).
This strategy worked just fine until I re-imaged my box (a work place
requirement), yesterday. My solution builds just fine but when I run
the test driver program for the class library, I get this error,
"Unable to load DLL 'C:\\temp\\UnManaged.dll': The specified module
could not be found. (Exception from HRESULT: 0x8007007E)."
I've checked the c:\temp directory and the file *is* there. In the
code, I reference the dll thusly,
using System.Runtime.InteropServices;
[DllImport("C:\\temp\\UnManaged.dll", CharSet = CharSet.Ansi)]
private static extern <return_struct> CheckImage(<args>);
Everything is great until the test driver program makes a call to
CheckImage and then, I get the above error. (Yes, the two functions I
need are declared using the appropriate declspec. This was working
prior to the re-image.) So, what may be causing this?
Thanks,
Andy
I have a C# class library that has to draw upon an unmanaged, C++,
library that is itself a project in this solution. So, because of how
this library is to be used, the C++ dll is built and placed in C:\temp
(I figure it's a directory everyone should have).
This strategy worked just fine until I re-imaged my box (a work place
requirement), yesterday. My solution builds just fine but when I run
the test driver program for the class library, I get this error,
"Unable to load DLL 'C:\\temp\\UnManaged.dll': The specified module
could not be found. (Exception from HRESULT: 0x8007007E)."
I've checked the c:\temp directory and the file *is* there. In the
code, I reference the dll thusly,
using System.Runtime.InteropServices;
[DllImport("C:\\temp\\UnManaged.dll", CharSet = CharSet.Ansi)]
private static extern <return_struct> CheckImage(<args>);
Everything is great until the test driver program makes a call to
CheckImage and then, I get the above error. (Yes, the two functions I
need are declared using the appropriate declspec. This was working
prior to the re-image.) So, what may be causing this?
Thanks,
Andy