LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Load dll during runtime

Hi All,

 

I have a dll which needs to be loaded & unloaded dynamically during runtime. My 'c' isn't great, so several tries later, I am left with no other option but to ask for help.

 

Can someone please do a LabVIEW or a teststand version of the c code below please?

 

HINSTANCE gLibMyDLL2 = NULL;

 

void unload_library()

{    if (gLibMyDLL2 != NULL)

{       close_port();      

FreeLibrary(gLibMyDLL2);      

gLibMyDLL2 = NULL;   

}

}

bool load_library(char* library_filename)

{

unload_library();

if ((gLibMyDLL2 != NULL) && (previous_load==true))  

{  

return true;  

}

gLibMyDLL2 = LoadLibrary(library_filename);

if (gLibMyDLL2 == NULL)  

{  

return false;  

}

previous_load = true;

return true;

}

 

Thanks in advance.

 

SS


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 1 of 3
(2,221 Views)

Anyone?


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 3
(2,193 Views)

Hi!

 

Give a look here, may be helpful:

http://digital.ni.com/public.nsf/allkb/77594203D78D12278625729100758BE5

 

Regards,

Marco

0 Kudos
Message 3 of 3
(2,182 Views)