10-05-2012 08:49 AM - edited 10-05-2012 08:50 AM
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
10-08-2012 04:50 AM
Anyone?
10-08-2012 08:11 AM
Hi!
Give a look here, may be helpful:
http://digital.ni.com/public.nsf/allkb/77594203D78D12278625729100758BE5
Regards,
Marco