LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to export dll from cvi with RuntimeEngineer for VC?

I want to export functions with inp(), outp() from CVI, and my VC project will call these functions to read/write IO. I think I wrote the code according to the instructions in help files.
But when I added those generated files, including cvirt.lib & cvisupp.lib, to my vc project, the program failed to startup. Actually no code was executed. And the error message is:
"The program failed to initialize properly(0xc0000005). Click on OK to terminate the application.";
"Unhandled exception in MyProgram.exe (NTDLL.DLL): 0xC0000005: Access Violation.".
It seems like the dll wasn't loaded properly.

Can anybody tell me why?
I've attached my code.
Download All
0 Kudos
Message 1 of 8
(3,217 Views)
For using the inp() and outp() functions from CVI it's necessary to install the Low-Level I/O driver together with the cvirte.dll on the target system (please see LabWindows/CVI online help, "Build >> Create Distribution Kit", "Install Low-Level Support Driver").
Regards,
Heinrich Illig
National Instruments
Message 2 of 8
(3,217 Views)
Thanks, Heinrich Illig.

But what I need is DLL, not EXE.
I need CVI to generate DLLs with Low-Level Support.

"Create Distribution Kit" is EXE-oriented. It doesn't install Low-Level Support Driver for DLL.

Echo
0 Kudos
Message 3 of 8
(3,217 Views)
It doesn't matter if you do have an EXE or a DLL. Just try out the following:
1. Start with an empty CVI project file and save that into a temporary directory
2. Choose "Create Distribution Kit" from the Build menue and ignore the message popup which tells you that you havn't build an EXE by clicking on the "NO" button.
3. Now the "Create Distribution Kit" popup comes up and here choose the "Full Runtime Engine" for the Run-Time-Engine Support and checkmark the "Install Low-Level Support Driver" box.
4. doubleclick the file group under the "File Groups" section below and remove the EXE file and add here the files you want to distribute (e.g. your DLL).
5. hit the "Build" button and you will see, that CVI will generate a Distribution Kit wh
ich contains your DLL and all necessary CVI DLLs and the Low-Level Support Driver
Regards,
Heinrich Illig
National Instruments
0 Kudos
Message 4 of 8
(3,217 Views)
Thanks, Heinrich Illig.

But the problem still exists.

I've followed those steps and created a Distribution Kit, and installed it, although I only need a dll that can be included into my project, anyway, I installed it, I thought that may also install the RunTime Engineer that I need.
After the installation, I again added those files(.lib,.dll,.h) to my project, but the problem still exists.

And I also found BEFORE the installation the dll only failed myProject when loaded, it worked fine on other projects. Since myProject is too big & complicated, and has component of CVI5.0, I'm removing its code little by little to sort it out.

And I'm still wondering what exactly caused the conflict?
0 Kudos
Message 5 of 8
(3,217 Views)
The problem is solved in a very strange way!

I just removed all suspect DLLs, then added them again, in a different sequence, and the problem solved!!!

Anyway, it's solved. If anybody knows the reason, pls let me know.

Thanks,
Echo
0 Kudos
Message 6 of 8
(3,217 Views)
Actually the DLLs generated by different versions of CVI caused all these troubles...
0 Kudos
Message 7 of 8
(3,217 Views)
Suddenly I understand what you mean in an incident.:-)
That is the only correct way to install RunTime engineer and Low-Level Support Driver. I got it.

Thank you very much!!!

Echo
0 Kudos
Message 8 of 8
(3,217 Views)