int IIsolationHost.ProcessCmdKey(ref NiMessage message, Keys keyData) { try { Message msg = message; bool result = ProcessCmdKey(ref msg, keyData); message = msg; return(result ? 0 : 1); } catch (Exception ex) { return(ErrorUtil.GetHResult(ex)); } }
public int SetHost(IIsolationHost host) { try { if (host == null) { throw new ArgumentNullException("host"); } _host = host; _sponsor.Register((MarshalByRefObject)host); return(0); } catch (Exception ex) { return(ErrorUtil.GetHResult(ex)); } }
int IIsolationClient.PreviewKeyDown(Keys keyData) { try { int result = 1; var target = FindTarget(NativeMethods.GetFocus()); if (target != null) { var e = new PreviewKeyDownEventArgs(keyData); Stubs.ControlOnPreviewKeyDown(target, e); result = e.IsInputKey ? 0 : 1; } return(result); } catch (Exception ex) { return(ErrorUtil.GetHResult(ex)); } }