Exemplo n.º 1
0
        public ClientConnection(
            IntPtr remoteProcessHandle, 
            string hookServerChannelName, 
            IIpcServerChannel sendCallbackChannel, 
            IIpcServerChannel receiveCallbackChannel, 
            IReadProcessMemory readProcessMemory)
        {
            Contract.Requires<ArgumentException>(string.IsNullOrWhiteSpace(hookServerChannelName) == false);
            Contract.Requires<ArgumentNullException>(sendCallbackChannel != null);
            Contract.Requires<ArgumentNullException>(receiveCallbackChannel != null);
            Contract.Requires<ArgumentNullException>(readProcessMemory != null);

            this.remoteProcessHandle = remoteProcessHandle;
            this.hookServerChannelName = hookServerChannelName;
            this.sendCallbackChannel = sendCallbackChannel;
            this.receiveCallbackChannel = receiveCallbackChannel;
            this.readProcessMemory = readProcessMemory;
        }
Exemplo n.º 2
0
        public ClientConnection(
            IntPtr remoteProcessHandle,
            string hookServerChannelName,
            IIpcServerChannel sendCallbackChannel,
            IIpcServerChannel receiveCallbackChannel,
            IReadProcessMemory readProcessMemory)
        {
            Contract.Requires <ArgumentException>(string.IsNullOrWhiteSpace(hookServerChannelName) == false);
            Contract.Requires <ArgumentNullException>(sendCallbackChannel != null);
            Contract.Requires <ArgumentNullException>(receiveCallbackChannel != null);
            Contract.Requires <ArgumentNullException>(readProcessMemory != null);

            this.remoteProcessHandle    = remoteProcessHandle;
            this.hookServerChannelName  = hookServerChannelName;
            this.sendCallbackChannel    = sendCallbackChannel;
            this.receiveCallbackChannel = receiveCallbackChannel;
            this.readProcessMemory      = readProcessMemory;
        }