예제 #1
0
 public AD7Process(AD7Port port, PSOutputParser.Process psProcess)
 {
     _port = port;
     _processId = psProcess.Id;
     _commandLine = psProcess.CommandLine;
     _userName = psProcess.UserName;
     _isSameUser = psProcess.IsSameUser;
 }
예제 #2
0
 public AD7Process(AD7Port port, Process psProcess)
 {
     _port        = port;
     _processId   = psProcess.Id;
     _commandLine = psProcess.CommandLine;
     _userName    = psProcess.UserName;
     _isSameUser  = psProcess.IsSameUser;
 }
예제 #3
0
        public AD7Process(AD7Port port, Process psProcess)
        {
            _port        = port;
            _processId   = psProcess.Id;
            _commandLine = psProcess.CommandLine;
            _userName    = psProcess.UserName;
            _isSameUser  = psProcess.IsSameUser;
            _systemArch  = psProcess.SystemArch;

            _flags = psProcess.Flags;
        }
예제 #4
0
        public int EnumPorts(out IEnumDebugPorts2 ppEnum)
        {
            ConnectionInfoStore store = new ConnectionInfoStore();
            IDebugPort2[] ports = new IDebugPort2[store.Connections.Count];

            for (int i = 0; i < store.Connections.Count; i++)
            {
                ConnectionInfo connectionInfo = (ConnectionInfo)store.Connections[i];
                ports[i] = new AD7Port(this, ConnectionManager.GetFormattedConnectionName(connectionInfo), isInAddPort: false);
            }

            ppEnum = new AD7PortEnum(ports);
            return HR.S_OK;
        }
예제 #5
0
        public unsafe int EnumPersistedPorts(BSTR_ARRAY portNames, out IEnumDebugPorts2 portEnum)
        {
            IDebugPort2[] ports = new IDebugPort2[portNames.dwCount];
            for (int c = 0; c < portNames.dwCount; c++)
            {
                char * bstrPortName = ((char **)portNames.Members)[c];
                string name         = new string(bstrPortName);

                ports[c] = new AD7Port(this, name, isInAddPort: false);
            }

            portEnum = new AD7PortEnum(ports);
            return(HR.S_OK);
        }
예제 #6
0
        public int EnumPorts(out IEnumDebugPorts2 ppEnum)
        {
            ConnectionInfoStore store = new ConnectionInfoStore();

            IDebugPort2[] ports = new IDebugPort2[store.Connections.Count];

            for (int i = 0; i < store.Connections.Count; i++)
            {
                ConnectionInfo connectionInfo = (ConnectionInfo)store.Connections[i];
                ports[i] = new AD7Port(this, ConnectionManager.GetFormattedConnectionName(connectionInfo), isInAddPort: false);
            }

            ppEnum = new AD7PortEnum(ports);
            return(HR.S_OK);
        }
예제 #7
0
        public int AddPort(IDebugPortRequest2 request, out IDebugPort2 port)
        {
            string name;
            HR.Check(request.GetPortName(out name));

            AD7Port newPort = new AD7Port(this, name, isInAddPort: true);

            if (newPort.IsConnected)
            {
                port = newPort;
                return HR.S_OK;
            }

            port = null;
            return HR.E_REMOTE_CONNECT_USER_CANCELED;
        }
예제 #8
0
        public int AddPort(IDebugPortRequest2 request, out IDebugPort2 port)
        {
            string name;

            HR.Check(request.GetPortName(out name));

            AD7Port newPort = new AD7Port(this, name, isInAddPort: true);

            if (newPort.IsConnected)
            {
                port = newPort;
                return(HR.S_OK);
            }

            port = null;
            return(HR.E_REMOTE_CONNECT_USER_CANCELED);
        }
예제 #9
0
        void IPlatformAppLauncher.SetupForDebugging(out LaunchOptions debuggerLaunchOptions)
        {
            if (_launchOptions == null)
            {
                Debug.Fail("Why is SetupForDebugging being called before ParseLaunchOptions?");
                throw new InvalidOperationException();
            }

            string targetMachineName = LaunchOptions.RequireAttribute(_launchOptions.TargetMachine, "TargetMachine");

            var port = new AD7Port(new AD7PortSupplier(), targetMachineName, isInAddPort: false);

            // NOTE: this may put up a dialog and/or throw an AD7ConnectCanceledException
            port.EnsureConnected();

            debuggerLaunchOptions = new UnixShellPortLaunchOptions(_launchOptions.StartRemoteDebuggerCommand,
                                                                   port,
                                                                   LaunchOptions.ConvertMIModeAttribute(_launchOptions.MIMode),
                                                                   _launchOptions);
        }
예제 #10
0
        void IPlatformAppLauncher.SetupForDebugging(out LaunchOptions debuggerLaunchOptions)
        {
            if (_launchOptions == null)
            {
                Debug.Fail("Why is SetupForDebugging being called before ParseLaunchOptions?");
                throw new InvalidOperationException();
            }

            string targetMachineName = LaunchOptions.RequireAttribute(_launchOptions.TargetMachine, "TargetMachine");

            var port = new AD7Port(new AD7PortSupplier(), targetMachineName, isInAddPort: false);

            // NOTE: this may put up a dialog and/or throw an AD7ConnectCanceledException
            port.EnsureConnected();

            debuggerLaunchOptions = new UnixShellPortLaunchOptions(_launchOptions.StartRemoteDebuggerCommand,
                                                                    port,
                                                                    LaunchOptions.ConvertMIModeAttribute(_launchOptions.MIMode),
                                                                    _launchOptions);
        }
예제 #11
0
        public unsafe int EnumPersistedPorts(BSTR_ARRAY portNames, out IEnumDebugPorts2 portEnum)
        {
            IDebugPort2[] ports = new IDebugPort2[portNames.dwCount];
            for (int c = 0; c < portNames.dwCount; c++)
            {
                char* bstrPortName = ((char**)portNames.Members)[c];
                string name = new string(bstrPortName);

                ports[c] = new AD7Port(this, name, isInAddPort: false);
            }

            portEnum = new AD7PortEnum(ports);
            return HR.S_OK;
        }