System.DllNotFoundException when I call API from DLL

  • Thread starter Thread starter Zhihong Yu
  • Start date Start date
Z

Zhihong Yu

Hi,
I declare an API as following:
Public Declare Function IsFirstInstance Lib "WPLink.dll" () As Integer
When I call this function in Main(), I got System.DllNotFoundException
even though WPLink.dll is copied alongside .Net program or under
<system32>.

Your help is appreciated.
 
Hi,
I declare an API as following:
Public Declare Function IsFirstInstance Lib "WPLink.dll" () As Integer
When I call this function in Main(), I got System.DllNotFoundException
even though WPLink.dll is copied alongside .Net program or under
<system32>.

Your help is appreciated.

Zhihong Yu,

I'm not sure I have much to offer here... You say that WPLink.dll is
copied into the application directory? That should be part of the
search path... What kind of dll is WPlink.dll? Is it a standard dll
written in C/C++? Have you used it from VB6?
 
Back
Top