LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

App Builder dll in C++ MFC

Has anyone been able to get LV7's app builder to compile a vi into a dll for
use in Microsoft's Visual Studio .NET's C++ MFC Applications? I know this
is a fairly specific question, but I cant check other versions (6, 6i) of
app builder and I only have Vis Studio .NET. I can compile vi's just fine
for console applications and for forms app's, but when I compile for a MFC
app, I get an error 998 - basically cant load labview runtime engine.
Weird.

Anyone else have this problem? Know of any solutions?

Thanks,
John
0 Kudos
Message 1 of 3
(2,938 Views)
Heh, its late, let me append this to say that I use the same compiled dll in
console apps and forms apps and they work fine. But, when I attempt to use
the same dll in an MFC app, it bombs.

"John Camin" wrote in message
news:109e896heoneia4@corp.supernews.com...
> Has anyone been able to get LV7's app builder to compile a vi into a dll
for
> use in Microsoft's Visual Studio .NET's C++ MFC Applications? I know this
> is a fairly specific question, but I cant check other versions (6, 6i) of
> app builder and I only have Vis Studio .NET. I can compile vi's just fine
> for console applications and for forms app's, but when I compile for a MFC
> app, I get an error 998 - basically cant load labview runtime engine.
> Weird.
>
> Anyone else have
this problem? Know of any solutions?
>
> Thanks,
> John
>
>
0 Kudos
Message 2 of 3
(2,938 Views)
John,

I am not sure if this will help but I found a discussion on this type of behavior when you try to statically link to the MFC, however it was not for LabVIEW 7.0. You may be able to get around the error by linking to the MFC dynamically rather than statically. Another option may be to use LoadLibrary and GetProcAddress to dynamically load and call the function. Lastly you could use the VC delayload feature to make the LV DLL not get loaded until the first call is made into it. See VC help on "delayload" for information on setting this up.

If none of these help I would suggest seeing if you can get the same behavior with a very simple LabVIEW DLL and MFC project. If that works I would start looking at where you are calling the LabVIEW DLL, to see if you ca
n narrow it down.

Evan
National Instruments
0 Kudos
Message 3 of 3
(2,938 Views)