RemoteDesktop and WinHttp

Apr 9, 2013 at 9:12 AM
Edited Apr 9, 2013 at 9:12 AM
I try to hook WinHttp to insert a basic proxy-authorization header into connections from mstsc.exe to a TerminalGateway. In the moment i am only logging Connect,OpenRequest and SendRequest without changing anything, but have a strange error:
The first connection with the Verb RPC_IN_DATA works without problems, but the second connection with the Verb RPC_OUT_DATA fails at OpenRequest with Error 87 Wrong Parameter, when i am hooking the dll.

Does someone have a idea,what goes wrong?