@@ -909,7 +909,7 @@ LRESULT CALLBACK Hook_IHWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
909
909
{
910
910
IUnknown* pUnknown = NULL ;
911
911
IMsRdpClient9* pMsRdpClient9 = NULL ;
912
- IMsRdpClientSecuredSettings * pMsRdpClientSecuredSettings = NULL ;
912
+ IMsRdpClientSecuredSettings2 * pMsRdpClientSecuredSettings = NULL ;
913
913
914
914
if (instance)
915
915
instance->GetRdpClient ((LPVOID*)&pUnknown);
@@ -918,7 +918,7 @@ LRESULT CALLBACK Hook_IHWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
918
918
pUnknown->QueryInterface (IID_IMsRdpClient9, (LPVOID*)&pMsRdpClient9);
919
919
920
920
if (pMsRdpClient9)
921
- pMsRdpClient9->get_SecuredSettings2 (&pMsRdpClientSecuredSettings);
921
+ pMsRdpClient9->get_SecuredSettings3 (&pMsRdpClientSecuredSettings);
922
922
923
923
LONG keyboardHookMode = 0 ;
924
924
pMsRdpClientSecuredSettings->get_KeyboardHookMode (&keyboardHookMode);
@@ -941,6 +941,13 @@ LRESULT CALLBACK Hook_IHWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
941
941
MsRdpEx_LogPrint (DEBUG, " New KeyboardHookMode: %d" , keyboardHookMode);
942
942
pMsRdpClientSecuredSettings->put_KeyboardHookMode (keyboardHookMode);
943
943
944
+ VARIANT propValue;
945
+ VariantInit (&propValue);
946
+ propValue.vt = VT_I4;
947
+ propValue.intVal = keyboardHookMode;
948
+ bstr_t propName = _com_util::ConvertStringToBSTR (" KeyboardHookMode" );
949
+ pExtendedSettings->put_BaseProperty (propName, &propValue);
950
+
944
951
if (pMsRdpClient9)
945
952
pMsRdpClient9->Release ();
946
953
0 commit comments