LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write PNG file failed when build exe, but run normally on the development platform

Solved!
Go to solution
Highlighted

 

refer to below picture, it is used to call WinAPI for screen shot, and then save to PNG file. This Vi run normally on the development flatform, but it is failed when build .exe application file. The error dialog pop-up "illegal path string, OS", but it is clear that the path is correct. Note: run the same PC with Win XP.

 

 

screen shot.png

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net




iTestGroup

0 Kudos
Message 1 of 10
(3,089 Views)
Highlighted

Can you attach the screenshot of error dialog that pops up...!!


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 10
(3,075 Views)
Highlighted

Thanks for your reply. Yes, but it is Chinese. I also put the dialog location here. 

 

Error.PNG   Dialog.PNG

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net




iTestGroup

0 Kudos
Message 3 of 10
(3,073 Views)
Highlighted

When i put the dialog before Write PNG File, no error output. 

 

dialog1.PNG

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net




iTestGroup

0 Kudos
Message 4 of 10
(3,071 Views)
Highlighted
Solution
Accepted by topic author colinzhang

Update:

i have found the reason but no solution. In fact, the Clipboard.Get Image is not working when build exe application. But this is the private Invoke Node, can't get any support from NI.

It seems to become to the public Invoke Node on LabVIEW 2012 version, who can help to verify it on LV2012 version? Thanks very much.

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net




iTestGroup

0 Kudos
Message 5 of 10
(3,032 Views)
Highlighted

I have lv2012 and it does not work here either.

Has anyone found a solution?

0 Kudos
Message 6 of 10
(2,918 Views)
Highlighted

No, it seems a bug that has reported to NI R&D. 

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net




iTestGroup

0 Kudos
Message 7 of 10
(2,911 Views)
Highlighted

oooh, Yes, I change to use .Net reference to copy the screenshot. Please visit my blog site for solution.

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net




iTestGroup

0 Kudos
Message 8 of 10
(2,909 Views)
Highlighted

Thx man 😃

0 Kudos
Message 9 of 10
(2,906 Views)
Highlighted

 

I find another solution that get the clipboard image. Hope it is helpful for next follower.

 

Use the IMAQ ClipboardToImage.vi under vision module, it can get the image successfully, but not verify it after build executable file.

 

Refer to below code, 

 

Copy the clipboard to image.png

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net




iTestGroup

0 Kudos
Message 10 of 10
(2,816 Views)