08-18-2011 12:30 PM
Hi,
I'm seeing an issue where the ClipboardPutBitmap() is slow when being called from a thread function except the first time it is called. By slow, I'm talking about 5 seconds for the call to complete, whereas it normally takes about 10 ms. If I call it from the main thread it is fast every time. I see this behavior whether I'm running the release executable or a debuggable. Any ideas? It looks to me like something is timing out with a time out value of five seconds. It should be noted that the function does complete with no errors and the bitmap does get put on the clipboard after the function returns.
I've attached a small console project that shows the issue I'm having.
I'm using CVI 2010 SP1 on Windows 7 Professional x64.
Thanks.
08-19-2011 03:30 PM
I've been able to run this and I'm seeing the same behavior that you are. I'll investigate the issue furthter to see why this might be happening.
Jon S
08-29-2011 08:13 AM
Hi. Thanks for looking into this. Right now I'm using PostDeferredCallToThread() so that my calls to ClipboardPutBitmap() run in the main thread. This works but isn't always ideal. Is there any better workarounds? Thanks.