From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll recalls another dll

I'm a new Labview user. I have a problem with my program!!!!! I have programmed in c++, a DLL,what recalls another DLL! It's better just to show you a part of this program:

 


__declspec(dllexport) short int __cdecl GetPosition( double *Xpos, double *Ypos, double *Zpos, char *errorp)

//provide the point coordinates

//load wrapper DLL

{

HMODULE hArmLib = LoadLibrary("FaroArmUsbWrapper.dll"); if(NULL == hArmLib)
{

return 0;
}

 

My question is:Is it possible to recall a DLL from labview,recalling another DLL?

These two DLL share the same memory space.......in the first DLL i have a puncter variable that head for same memory space to second DLL!!!!!!

0 Kudos
Message 1 of 2
(2,264 Views)

vicon wrote:

I'm a new Labview user. I have a problem with my program!!!!! I have programmed in c++, a DLL,what recalls another DLL! It's better just to show you a part of this program:

 


__declspec(dllexport) short int __cdecl GetPosition( double *Xpos, double *Ypos, double *Zpos, char *errorp)

//provide the point coordinates

//load wrapper DLL

{

HMODULE hArmLib = LoadLibrary("FaroArmUsbWrapper.dll"); if(NULL == hArmLib)
{

return 0;
}

 

My question is:Is it possible to recall a DLL from labview,recalling another DLL?

These two DLL share the same memory space.......in the first DLL i have a puncter variable that head for same memory space to second DLL!!!!!!


What do you mean by recall? If you mean call the only problem is that the second DLL will not be searched by LabVIEW at all but only by Windows. So you need to have that DLL in one of the search locations that Windows will search for DLL load requests without absolute path argument. There is really no difference with other applications written in C/C++ or whatever, except that in those you usually use a link library to reference the primary DLL so the same rules apply there for both DLLs. LabVIEWs Call Library Node attempts to load a DLL with the last known absolute path so that this DLL can be anywhere on disk as long as it does not move. For secondary DLLs however LabVIEW has no such control, so the standard Windows search paths for DLL loading apply.

 

Rolf Kalbermatter

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(2,249 Views)