I'm developing a RPC client and a local RPC server using Windows RPC. I need the server to be able to manipulate a window created by the client.
As described here and here, HWND are cross-process handles (system-wise) and can be used by another process as long as they are being duplicated properly (by using DuplicateHandle).
I'm trying to send the client's HWND to the server but i'm getting the following error when trying to make the RPC call:
0x000006C5: The tag is invalid
I defined the HWND parameter in the IDL file as follows:
HRESULT MyRpcFunction ([in, out] HWND hwnd);
Any suggestions on how I can properly send the handle to the server?