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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top