Having trouble refreshing the Windows aero preview in C#
See the question and my original answer on StackOverflowThe documentation clearly stipulates this:
hwnd
A handle to the window or tab whose bitmaps are being invalidated through this call. This window must belong to the calling process.
If this is not the case, you'll get an E_INVALIDARG error.