M
Michael
I have an application that makes a Visio IVWindow::Copy() automation call to
copy the contents of a window to the clipboard. I would then like to get the
data object using OleGetClipboard() after the copy returns. This seems to
work in most cases, but we have found that for windows that contain
significant amounts of data running on systems that are somewhat slow and
with less memory that OleGetClipboard() fails with CLIPBRD_E_CANT_OPEN.
Further, OpenClipboard() fails with GetLastError() returning a ZERO!!!
What needs to be done to get this to work? We have noticed that if we add
code that dispatches messages between the Copy() and the OleGetClipboard()
call, the OleGetClipboard() function will work. It appears that multiple
threads are involved here with possible use of RPC (even though we're still
not certain why this doesn't fail on fast systems).
Is there a way to determine when the Copy() has completed so that the
OleGetClipboard() function can be called? I think simply looping infinitely
in a dispatch scenario may be somewhat dangerous and cause the application to
hang if a true failure is present.
copy the contents of a window to the clipboard. I would then like to get the
data object using OleGetClipboard() after the copy returns. This seems to
work in most cases, but we have found that for windows that contain
significant amounts of data running on systems that are somewhat slow and
with less memory that OleGetClipboard() fails with CLIPBRD_E_CANT_OPEN.
Further, OpenClipboard() fails with GetLastError() returning a ZERO!!!
What needs to be done to get this to work? We have noticed that if we add
code that dispatches messages between the Copy() and the OleGetClipboard()
call, the OleGetClipboard() function will work. It appears that multiple
threads are involved here with possible use of RPC (even though we're still
not certain why this doesn't fail on fast systems).
Is there a way to determine when the Copy() has completed so that the
OleGetClipboard() function can be called? I think simply looping infinitely
in a dispatch scenario may be somewhat dangerous and cause the application to
hang if a true failure is present.