LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LoadLibrary error from dll

I have created a dll in Labwindows CVI. In this dll I dynamically call another dll using LoadLibrary function. This dll works fine when I call in labwindows cvi but using labview I can't load dll using LoadLibrary function. Any idea why?
 
for example;
 
I have created mydll.dll in cvi.
In mydll.dll I have code like this
 
    dll_handle = LoadLibrary ("LIB2.dll");
    if(dll_handle == NULL)
    {
     MessagePopup ("ERROR", "LIB2.DLL Load Error");
     return -49;
    }
using labwindows I can call mydll.dll and it successfully loads LIB2.dll.
 
When I call mydll.dll in labview  dll_handle is null. another words it couldn't load LIB2.dll using SDK LoadLibrary function.
 
 


Message Edited by test_man on 08-06-2008 01:41 PM
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 1 of 5
(1,048 Views)
Is Lib2.dll in the same folder as mydll.dll?
0 Kudos
Message 2 of 5
(1,042 Views)
yes, all dlls, cvi project and labview project are in same dir.

Message Edited by test_man on 08-06-2008 02:18 PM

Message Edited by test_man on 08-06-2008 02:19 PM
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 3 of 5
(1,040 Views)

Hi test_man

   I run into the same problem with you.

   Have you found the way to solve this, if so could you share the way to fix the problem.

   Thanks.

 

Topkinschen.

0 Kudos
Message 4 of 5
(116 Views)

Hi Topkinschen,

 

Since this post is very old, you may need to post a new thread in the LabWindows/CVI forum to get a faster answer.  I would recommend posting there rather than the LabVIEW forum, if your DLL reference is null in the LabWindows/CVI code as in the original question.  The users there will be more familiar with troubleshooting dynamically loading a DLL in C.

 

It would also be helpful to see the code that loads your DLL, and details about how the DLLs are installed on your system.

 

Thanks,

Michael B.
Technical Support Engineer
National Instruments
0 Kudos
Message 5 of 5
(104 Views)