LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL build error (-2147221458)

Hi All,

I am trying to build an incredibly simple VI into a DLL.

One input, wired directly to output.

Everything works fine (DLL builds, have tested it in another LV app) if my input/output is of type double. However, if I change the I/O type to be I16, the DLL builder crashes (at the end of the build) with the error code -2147221458 (undefined error). Yet when I change it to I32 all is well, but U16 crashes again. Using I8 is fine, but U8 crashes Smiley Sad

I have checked, and double checked the function prototype in the Builder, everything is as it should be. Changing the calling convention has no affect.

I have searched this forum, but have not come accross any similar problem, so I assume its something silly I am doing wrong?

Any help on this would be much appreciated.

I have tried to attach both the VI and build script to this post, but they seem to disappear when I click Preview!

Many thanks!
Neil

ps: Using LV 7.0 on Win2k (SP4)

0 Kudos
Message 1 of 7
(3,342 Views)
Hi nrp,

I really need to see a DLL, your base VI and your script to give you any meaningful answers, However for proof that this should work, here is a couple of very simple VIs I made and tested in LV 7.1, but saved for LV 7.0 for you to try.

It could be you have not updated the VI Function Prototype in your build script for the different representations you are using.
Anyway have a look at the included files, and please try again to send your files

Regards
JamesC
NIUK
0 Kudos
Message 2 of 7
(3,326 Views)
Hi James,

Thanks for your help. Unfortunately I cannot open the build script as it says it is a version which "cannot be read by this tool". Is there a way to save the build script in 7.0 format?

I would love to post my, I have no idea how to include my source in this forum. I click the browse button, select my VI, click Preview Post and its not there.

I have uploaded the build and VI file elsewhere:

http://www.freefileupload.net/file.php?file=files/160106/1137430393/step1_U8.bld
http://www.freefileupload.net/file.php?file=files/160106/1137430432/step1_U8.vi

Cheers
Neil




0 Kudos
Message 3 of 7
(3,318 Views)
Hi nrp,

Unfortunatly I can not save the build scripts for previous versions.
I have been able to build your VI and it works, but I did modify your build script.

You did not define a separate output type, you used the return function.

I have attached two zip files, one contains a void return, but defines an output, the other uses the return type, both of these work.

Regards
JamesC
NIUK
Download All
0 Kudos
Message 4 of 7
(3,312 Views)
Hello James,

OK, so after some head scratching I figured out what you mean. I was under the impression that I could use one of my indicators as the function return, which seems to work under various circumstances. Is there some other use for the return parameter?

So I added the extra output as a (pointer) parameter, but my build still fails with the same error message. Smiley Sad

Any more ideas? Thanks for your help so far!



0 Kudos
Message 5 of 7
(3,305 Views)
Hi nrp,

I can find no more detailed information on the error code in relation to building DLLs.
The only other options I can come up with are:
1) Make sure when you build the VI that creates the DLL that the presition of the datatype is the same as what you pass to it in the calling VI.
2) If possible try this in LV 7.1, as I do not see the error you are seeing and I can not replicate it.

Regards
JamesC
NIUK
0 Kudos
Message 6 of 7
(3,300 Views)
James,

Thanks for your help. I do not have access to LV7.1 so I cannot try it. At the moment its not terribly urgent, so I will just put it aside as a quirk for now. Maybe I just have a dirty installation or something.

Neil

0 Kudos
Message 7 of 7
(3,287 Views)