LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI2013: Linking to Mixed-Mode DLLs Crash

Hi

 

I need to call a mixed mode C++/CLI dll from C/CVI. I've already tried calling the dll from a standard Visual C project which works perfectly fine. However if i try to call the dll from CVI i get this weird general protection fault when starting my application. I've already asked google about this and apparently this is a known issue.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9oGSAS&l=en-US

 

However, the proposed solution doesn't work in my case, except from manually calling LoadLibrary and GetProcAddress of course. Also, the article doesn't really state whether the issue has been resolved.

Is still a problem with CVI2013?

 

Thanks in advance

 

 

0 Kudos
Message 1 of 5
(4,138 Views)

Hi,

 

do you use a 64 bit OS?

 

In this case the path in the registry is different and HKCU\Software\Wow6432Node\National Instruments\CVI... should be the correct one.

 

Best regards,

Melanie Eisfeld

Staff Applications Engineer

National Instruments

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 2 of 5
(4,109 Views)

Actually im still running on Windows7 32 bit so this can't really be the source of the problem.

0 Kudos
Message 3 of 5
(4,089 Views)

Hi,

 

do you have all the components mentioned under the following links steps for implicit linking?

 

Calling a DLL in CVI: Explicit Linking vs. Implicit Linking (Dynamic vs. Static) - National Instrume...

 

If so, can you please describe the DLL you are using a bit further?

In which language was it build?

Is it a self built or bought DLL?

Do you see this behavior with other DLLs, e.g. Windows DLLs?

 

Best regards,

Melanie Eisfeld

Staff Applications Engineer

National Instruments

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 4 of 5
(4,084 Views)

Hi,

 

As far as I can tell I have all the componentsfor static linking.

 

The library I'm trying to use is a self-built mixed C++/CLI library, built with VisualStudio 2013 Express. I also created a sample C client in Visual Studio which uses the same library, which works fine. I also tried exporting the dll functions with different calling standards (__cdecl, __stdcall) without any difference.

 

Thanks!

 

 

0 Kudos
Message 5 of 5
(4,079 Views)