Im trying to sendkeys to an remotedesktop using the interface IMsRdpClientNonScriptable (more info here
But somehow the AXIMP.exe fails to make the correct SendKeys method as defined by microsoft (see link above).
microsoft states that the sendkeys method should be native like this:
[in] LONG numKeys,
[in] VARIANT_BOOL *pbArrayKeyUp,
[in] LONG *plKeyData
I would argue that this correctly translated to C# would be like this:
int SendKeys(int numKeys, ref bool pbArrayKeyUp, ref int plKeyData)
But the AXIMP.EXE translates this into this:
void SendKeys(int numKeys, ref bool pbArrayKeyUp, ref int plKeyData);
I cant seem to get this to work. so I've been searing the web for a solution without success!!
I found that another guy had the same issue
aximp.exe generates incorrect wrapper method for IMsRdpClientNonScriptable::SendKeys but no solution was found here either. hmmm
OK so here ones and for all; "Does anyone have a working C# or VB.Net code that can send key strokes to the remote desktop. ???"
This code fails with the following (HRESULT E_FAIL at MSTSCLib.IMsRdpClientNonScriptable.SendKeys(Int32 numKeys, Boolean& pbArrayKeyUp, Int32& plKeyData)):
public void SendKeys(IMsRdpClientNonScriptable rdpNonScript, Keys keys)
if (null != rdp
View Complete Post