LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ClipboardGetBitmap LabWindows/CVI 4.0.1 crash

Hello out there,
i am having trouble with this CVI-library-function.

I have written a program to store screenshots. My Programm is a standalone executable. If you run it you see a small screen and can make a screenshot. After pressing the refresh button you see the screenshot on the gui.
To do this i am using the function ClipboardGetBitmap. If i run the program on my computer it just crashes.
On the mashine (IC-Testhandler) it works fine. I gave the program to a co-worker of mine and it also crashes on his pc.

Can anybody explain this or give me a useful hint to solving this probelm
0 Kudos
Message 1 of 5
(3,290 Views)
My guess is that you might need to use DiscardBitmap when you are done with each bitmap.
0 Kudos
Message 2 of 5
(3,284 Views)
Thanks for your reply !

I am still using this function before I call ClipboardGetBitmap. Therefore I am checking weather the bitmapID is 0 or not and call the DiscardBitmap function.

Even on the first call of the ClipboardGetBitmap function it crashes. ??
0 Kudos
Message 3 of 5
(3,268 Views)

I'm not sure if I can help you, but more specifics might help me (or others!) give a better answer.

Questions that come to mind are:
Does it crash only as a standalone .exe, or does it crash in the development environment too? Can you step through it in debug mode up to the crash? Can you create the crash in a very pared-down version of your program? What happens when it crashes? Do the target machines have the CVI Run Time Engine properly installed? Have you tried an up-to-date version of the RTE from here?

Good luck!
-Ian

0 Kudos
Message 4 of 5
(3,256 Views)
OK thanks again for your replay. I am trying to explain my problem a little bit more exacly.

The crash appears if I am using the standalone .exe and it also appears if I run it from the development environment. I can step through it in debug mode up to the crash. The crash exactly appears on the call of the function mentioned above (ClipboardGetBitmap).
If this function is called the program just close end the RTE – process ends, too (observed in the task manager). If I am running the program from development environment it close, too.

I think the installation of the Run Time Engine have to be proper because I never had any problems und many programs run without any problem. I have no choice to install an up-to-date version because I am running it on an RMOS / Windows 3.11 for Wioperating system. I have to use this version.

As I wrote in my first post the crash only appears on an personal computer. I tried different ones (PC’s). On the target machine it just works fine. (Siemens CPU 070, RMOS and Windows 3.11 for Workgroups with an CVI Run Time Engine installed)
0 Kudos
Message 5 of 5
(3,247 Views)