LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetExternalModuleAddr Library Function Error -10 CVI 2010SP1

Solved!
Go to solution

Utility library function GetExternalModuleAddr (admittedly marked as obsolete - but key to one of our oldish but much cherished bits of software) fails with error code in CVI 2010SP1 (W7)

The suggested alternative Win32 API GetProcAddress doesn't work with source or obj files (so isn't an alternative at all)

 

Also tried CVI 8.1.1 on XP - code works fine

I think it worked fine on CVI 9.1.0 with W7 (before I upgraded) - but can't be sure

 

Any suggestions (code compiles OK in all cases) ?

 

Two C modules (in this stripped down version of real code) project as follows:

File "Main.c"

 

#include <utility.h>

 

int main(void)
{
void (*funcPtr) (void); 
int moduleID;
int status;
 
 moduleID = LoadExternalModule ("Test.c");

 funcPtr = GetExternalModuleAddr (moduleID, "test_function", &status);

 (*funcPtr) ();

return 0;
}
______________________________

 

File "Test.c"

void test_function(void)
{
 
 
}

0 Kudos
Message 1 of 3
(3,293 Views)
Solution
Accepted by topic author Can'tFindAnAlias

Make sure you have Enable LoadExternalModule checked in your Target Settings.

 

LoadExternalModule.png

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

Joe M

 

Yes that's the answer

 

I checked the Environment and Build Options but not the Target Settings. Our own build doumcntaiotn tells me to make sure this option is checked. Embarassing but at least  now I know why !

 

Thanks

 

0 Kudos
Message 3 of 3
(3,277 Views)