LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI and DLL creation including libxml2

Good afternoon,

 

I am using CVI 2017 ,and especially i do build a specific DLL (lets call is DLL_A). This DLL includes some fucntions from the library libXML2.

 

And when i am loading and calling my DLL_A, i have an issue (error -25) which is due to the fact that this DLL_A, includes some codes that needs some function defined in the LIB/DLL provided by LibXML2. And it s not possible to load 2 dll in the same time.

So is there a way to fix this kind of issue whithout having to refactor the code?

 

 

Thanky ou

0 Kudos
Message 1 of 4
(1,220 Views)

What do you mean with this?

 


@AAAAAAAAAAAAAAAAAAAAAA wrote:

And it s not possible to load 2 dll in the same time.


If a DLL could not depend on other DLLs, no Windows application could work ever since the entire Windows API is one huge collection of DLLs that depend on each other.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(1,181 Views)

Yes , indeed, it looks strange.

But i am trying to find why this DLL is failing to initialize when i use GetExternalModuleAddr .., since it returns a status error=-25.

And when i comment the calls to the libxml2 library, the error disappear...

So i am trying to guess why this libmxl2.lib is giving me issue..

 

 

 

0 Kudos
Message 3 of 4
(1,173 Views)

Try to use the Windows APIs LoadLibraryA() and GetProcAddress() instead. The GetExternalModuleAddr() is a legacy function that does add nothing to the loading of DLLs under Windows.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(1,136 Views)