Problem loading DLL
Posted on 2007-03-29
I have a C# program that loads another DLL:
[DllImport("Test.dll", EntryPoint = "Start")]
public unsafe static extern void TestStart();
Test.dll is written in C++ and contains an "empty" function that does nothing:
extern "C" __declspec(dllexport) void Start();
The program runs fine on multiple Windows machines, including a Windows 2000 desktop. However, when I tried executing this program on this Windows 2000 laptop, it throws the following exception:
Unable to load DLL 'Test.dll': The specified module
could not be found. (Exception from HRESULT: 0x8007007E)
- .NET Framework 1.1/2.0 are installed on the Windows 2000 laptop.
- All executables are run from local hard disk.
- The C# program is compiled with Visual Studio 2005.
- Test.dll is compiled with Visual Studio 2003.
Anyone knows why this program wouldn't run on the laptop?