Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "connect" in [All]

secur32

.

        public const int ISC_REQ_CONNECTION     =    0x00000800;

.

        public const int STANDARD_CONTEXT_ATTRIBUTES = ISC_REQ_CONFIDENTIALITY | ISC_REQ_REPLAY_DETECT | ISC_REQ_SEQUENCE_DETECT | ISC_REQ_CONNECTION;

.

    /// <param name="LsaHandle">[in] Handle obtained from a previous call to LsaRegisterLogonProcess or LsaConnectUntrusted.</param>

.
Summary
The LsaConnectUntrusted function establishes an untrusted connection to the LSA server.
.

public static extern WinStatusCodes LsaConnectUntrusted([Out] out IntPtr LsaHandle);

.

Declare Function LsaConnectUntrusted Lib "secur32.dll" (TODO) As TODO

.
Documentation
[LsaConnectUntrusted] on MSDN
.
Summary
The LsaDeregisterLogonProcess function deletes the caller's logon application context and closes the connection to the LSA server.
.

    NewCredentials,     // Allows the caller to clone its current token and specify new credentials for outbound connections.

.

                public static extern WinStatusCodes LsaConnectUntrusted([Out] out IntPtr LsaHandle);

.

                        OSCalls.WinStatusCodes status = OSCalls.LsaConnectUntrusted(out lsaHandle);

Interfaces

.

    ,BINDSTATUS_CONNECTING

.

        // IConnectionPoint errors

.

        CONNECT_E_FIRST = 0x80040200,

.

        CONNECT_E_NOCONNECTION,  // there is no connection for this connection id

.

        CONNECT_E_ADVISELIMIT,   // this implementation's limit for advisory connections has been reached

.

        CONNECT_E_CANNOTCONNECT, // connection attempt failed

.

        CONNECT_E_OVERRIDDEN,    // must use a derived interface to connect

.

        INET_E_CANNOT_CONNECT = 0x800C0004,

.

        INET_E_CONNECTION_TIMEOUT = 0x800C000B,

.

                case HRESULTS.INET_E_CANNOT_CONNECT:

.

                    Description = "Cannot Connect";break;

.

                case HRESULTS.INET_E_CONNECTION_TIMEOUT:

.

                    Description = "Connection Timeout.";break;

.

    public interface IConnector

.

    int GetType(out ConnectorType pType);

.

    int ConnectTo([In] IConnector connector);

.

    int Disconnect();

.

    int IsConnected(out bool pbConnected);

.

    int GetConnectedTo([Out, MarshalAs(UnmanagedType.LPArray)] out IConnector ppConTo);

.

    int GetConnectorIdConnectedTo(out string ppwstrConnectorId);

.

    int GetDeviceIdConnectedTo(out string ppwstrDeviceId);

.

Interface IConnector

.
Documentation
[IConnector] on MSDN
.

    int DAdvise([In] ref FORMATETC pFormatetc, ADVF advf, IAdviseSink adviseSink, out int connection);

.

    void DUnadvise(int connection);

.

    int GetConnectorCount([Out] out int pConnectorCount);

.

    int GetConnector(int nIndex, out IConnector ppConnector);

.

Starting point only - I only got as far as making getconnectorcount and getconnector return valid information on my machine. The other functions may or may not work!

.

     void Advise(object pAdvSink, uint pdwConnection);

.

     void Unadvise(uint dwConnection);

.

    TASK_FLAG_RUN_IF_CONNECTED_TO_INTERNET = 0x400,

.

// Connection Sink for listening to collection changes

.

     // Connects the framework and the application

kernel32

.
Summary
.

static extern bool ConnectNamedPipe(IntPtr hNamedPipe,

.

Good example of named pipes using ConnectNamedPipe() can be found at http://wyday.com/blog/2010/multi-process-c-sharp-application-like-google-chrome-using-named-pipes/

.
Documentation
[ConnectNamedPipe] on MSDN
.

    ///         2. Call Listen().  This will block until a client connects.  Sorry, the alternatives

.

    ///         3. Call DataAvailable() in a loop with Read(), Write, ReadLine(), etc. until IsConnected turns false.

.

    private static extern bool DisconnectNamedPipe(

.

    private static extern bool ConnectNamedPipe(

.

    /// Waits indefinitely when connecting to a pipe.

.

    private const ulong ERROR_PIPE_CONNECTED = 535;

.

    /// Server only: block until client connects

.

        DisconnectNamedPipe(_handle);

.

        if (ConnectNamedPipe(_handle, IntPtr.Zero) != true)

.

        if (lastErr == ERROR_PIPE_CONNECTED)

.

    /// Server only: disconnect the pipe.  For most applications, you should just call Listen()

.

    /// instead, which automatically does a disconnect of any old connection.

.

    public void Disconnect()

.

        throw new Exception("Disconnect() is only for server-side streams");

.

        DisconnectNamedPipe(_handle);

.

    /// Returns true if client is connected.  Should only be called after Listen() succeeds.

.

    public bool IsConnected

.

            throw new Exception("IsConnected() is only for server-side streams");

.

        if (ConnectNamedPipe(_handle, IntPtr.Zero) == false)

.

            if ((uint)Marshal.GetLastWin32Error() == ERROR_PIPE_CONNECTED)

.

            } while (stream.IsConnected);

.
Summary
.

static extern bool DisconnectNamedPipe(IntPtr hNamedPipe);

.
Documentation
[DisconnectNamedPipe] on MSDN

winscard

. . .
Summary
The SCardConnect function establishes a connection (using a specific resource manager context) between the calling application and a smart card contained by a specific reader. If no card exists in the specified reader, an error is returned.
.

[DllImport("winscard.dll", EntryPoint="SCardConnect", CharSet=CharSet.Auto)]

.

static extern int SCardConnect(

.

rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED,

.

error CS1502: The best overloaded method match for 'PCSC_ContactlessNet.SmartCard.SCardConnect(System.IntPtr, string, uint, uint, out int, out uint)' has some invalid arguments

.
Documentation
[SCardConnect] on MSDN
. . .
Summary
The SCardDisconnect function terminates a connection previously opened between the calling application and a smart card in the target reader.
.

static extern int SCardDisconnect(int hCard, int dwDisposition);

.
Documentation
[SCardDisconnect] on MSDN
.

    static extern int SCardConnect(IntPtr hContext,

.

    static extern int SCardDisconnect(IntPtr hCard, int Disposition);

.

            result = SCardConnect(hContext, readerName, 2, 3, ref phCard, ref ActiveProtocol);

.

            SCardDisconnect(phCard, 0);

.

   IntPtr hCard,            // Reference value returned from SCardConnect

.

  // Copy code to connect to the card here

.
Summary
The SCardStatus function provides the current status of a smart card in a reader. You can call it any time after a successful call to SCardConnect and before a successful call to SCardDisconnect. It does not affect the state of the reader or reader driver.
.

updated to better working signature (VS2010)...still need to establish context, and connect the card like in sample area, but this is an example of code that will read an iClass UID

.

// Paste here code for SCardEstablishContext, SCardConnect

.

// Paste here code for SCardDisconnect, pbRecvBuffer contains Answer as Byte[]

Enums

24: CSIDL
.

    CSIDL_CONNECTIONS           = 0x0031,

.

    CSIDL_CONNECTIONS = &H31

.

    Disconnect = 0x2000000

.

    Disconnect = &H2000000

.

     DS_REPL_INFO_KCC_DSA_CONNECT_FAILURES = 3,

.

    /// Don't operate on connected elements.

.

    FOF_NO_CONNECTED_ELEMENTS  = 0x2000,

.

    ''' Don't operate on connected elements.

.

    FOF_NO_CONNECTED_ELEMENTS  = &H2000

.

    FOF_NO_CONNECTED_ELEMENTS  As Integer = &H2000

.

    ///The connection terminated or is in a bogus state and cannot be used any more. Other connections are still valid.

.

    [Description("The connection terminated or is in a bogus state and cannot be used any more. Other connections are still valid.")]

.

    public const int RPC_E_CONNECTION_TERMINATED = unchecked((int)0x80010006);

.

    ///The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.

.

    [Description("The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.")]

.

    ///The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.

.

    [Description("The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.")]

.

    ///The object invoked has disconnected from its clients.

.

    [Description("The object invoked has disconnected from its clients.")]

.

    public const int RPC_E_DISCONNECTED = unchecked((int)0x80010108);

.

    ///There is no connection for this connection ID

.

    [Description("There is no connection for this connection ID")]

.

    public const int OLE_E_NOCONNECTION = unchecked((int)0x80040004);

.

    ///Moniker needs to be connected manually

.

    [Description("Moniker needs to be connected manually")]

.

    public const int MK_E_CONNECTMANUALLY = unchecked((int)0x800401E0);

.

    ///Object is not connected to server

.

    [Description("Object is not connected to server")]

.

    public const int CO_E_OBJNOTCONNECTED = unchecked((int)0x800401FD);

.

    ///A connection with the transaction manager was lost.

.

    [Description("A connection with the transaction manager was lost.")]

.

    public const int XACT_E_CONNECTION_DOWN = unchecked((int)0x8004D01C);

.

    ///A request to establish a connection with the transaction manager was denied.

.

    [Description("A request to establish a connection with the transaction manager was denied.")]

.

    public const int XACT_E_CONNECTION_DENIED = unchecked((int)0x8004D01D);

.

    ///This transaction manager failed to establish a connection with another TIP transaction manager.

.

    [Description("This transaction manager failed to establish a connection with another TIP transaction manager.")]

.

    public const int XACT_E_TIP_CONNECT_FAILED = unchecked((int)0x8004D01F);

.

    ///The smart card cannot be accessed because of other connections outstanding.

.

    [Description("The smart card cannot be accessed because of other connections outstanding.")]

.

    '''The connection terminated or is in a bogus state and cannot be used any more. Other connections are still valid.

.

    <Description("The connection terminated or is in a bogus state and cannot be used any more. Other connections are still valid.")> _

.

    Public Const RPC_E_CONNECTION_TERMINATED As Integer = CInt(&H80010006UI)

.

    '''The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.

.

    <Description("The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call may have executed.")> _

.

    '''The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.

.

    <Description("The callee (server [not server application]) is not available and disappeared; all connections are invalid. The call did not execute.")> _

.

    '''The object invoked has disconnected from its clients.

.

    <Description("The object invoked has disconnected from its clients.")> _

.

    Public Const RPC_E_DISCONNECTED As Integer = CInt(&H80010108UI)

.

    '''There is no connection for this connection ID

.

    <Description("There is no connection for this connection ID")> _

.

    Public Const OLE_E_NOCONNECTION As Integer = CInt(&H80040004UI)

.

    '''Moniker needs to be connected manually

.

    <Description("Moniker needs to be connected manually")> _

.

    Public Const MK_E_CONNECTMANUALLY As Integer = CInt(&H800401e0UI)

.

    '''Object is not connected to server

.

    <Description("Object is not connected to server")> _

.

    Public Const CO_E_OBJNOTCONNECTED As Integer = CInt(&H800401fdUI)

.

    '''A connection with the transaction manager was lost.

.

    <Description("A connection with the transaction manager was lost.")> _

.

    Public Const XACT_E_CONNECTION_DOWN As Integer = CInt(&H8004d01cUI)

.

    '''A request to establish a connection with the transaction manager was denied.

.

    <Description("A request to establish a connection with the transaction manager was denied.")> _

.

    Public Const XACT_E_CONNECTION_DENIED As Integer = CInt(&H8004d01dUI)

.

    '''This transaction manager failed to establish a connection with another TIP transaction manager.

.

    <Description("This transaction manager failed to establish a connection with another TIP transaction manager.")> _

.

    Public Const XACT_E_TIP_CONNECT_FAILED As Integer = CInt(&H8004d01fUI)

.

    '''The smart card cannot be accessed because of other connections outstanding.

.

    <Description("The smart card cannot be accessed because of other connections outstanding.")> _

.

enum InternetGetConnectedStateFlags

.

   INTERNET_CONNECTION_MODEM = 0x01,

.

   INTERNET_CONNECTION_LAN = 0x02,

.

   INTERNET_CONNECTION_PROXY = 0x04,

.

   INTERNET_CONNECTION_RAS_INSTALLED = 0x10,

.

   INTERNET_CONNECTION_OFFLINE = 0x20,

.

   INTERNET_CONNECTION_CONFIGURED = 0x40

.

Enum InternetGetConnectedStateFlags

.

   INTERNET_CONNECTION_MODEM = &H01

.

   INTERNET_CONNECTION_LAN = &H02

.

   INTERNET_CONNECTION_PROXY = &H04

.

   INTERNET_CONNECTION_RAS_INSTALLED = &H10

.

   INTERNET_CONNECTION_OFFLINE = &H20

.

   INTERNET_CONNECTION_CONFIGURED = &H40

.
Documentation
[InternetGetConnectedStateFlags] on MSDN
.
Summary
The state of the TCP connection.
.

     /// The specified drive is a network drive that is properly connected.

.

     NetDriveConnected = 1,

.

     /// The specified drive is a network drive that is disconnected or in an error state.

.

     ''' The specified drive is a network drive that is properly connected.

.

     NetDriveConnected = 1

.

     ''' The specified drive is a network drive that is disconnected or in an error state.

.

     NetDriveConnected As Long = 1

.

    PrimaryTransportConnectFailed = 0x0000010e,

.

    PortConnectionRefused = 0xc0000041,

.

    PipeDisconnected = 0xc00000b0,

.

    PipeConnected = 0xc00000b2,

.

    LpcInvalidConnectionUsage = 0xc0000706,

.

    RmDisconnected = 0xc0190032,

.

    PRINTER_ENUM_CONNECTIONS = 0x00000004,

.

    PRINTER_ENUM_CONNECTIONS = &H4

.

   /// Printer is a network printer connection.

.

   /// Indicates the printer is currently connected through a terminal server.

.

   /// The printer was installed by using the Push Printer Connections

.

   /// The printer was installed by using the Push Printer Connections

.

   /// Printer is a per-machine connection.

.

   /// A computer has connected to this printer and given it a friendly name.

.

  RASCS_ConnectDevice,

.

  RASCS_DeviceConnected,

.

  RASCS_AllDevicesConnected,

.

  RASCS_SubEntryConnected,

.

  RASCS_SubEntryDisconnected,

.

  RASCS_Connected = 0x2000,

.

  RASCS_Disconnected

.

     /// <summary>Indicates that the credentials are default credentials for an all-user connection.</summary>

.

        /// <summary>606. The specified port is not connected. </summary>

.

        ERROR_PORT_NOT_CONNECTED,

.

        /// <summary>617. The modem (or other connecting device) is already disconnecting. </summary>

.

        ERROR_ALREADY_DISCONNECTING,

.

        /// <summary>619. The specified port is not connected. </summary>

.

        ERROR_PORT_DISCONNECTED,

.

        /// <summary>623. The system could not find the phone book entry for this connection. </summary>

.

        /// <summary>628. The connection was closed. </summary>

.

        ERROR_DISCONNECTION,

.

        /// <summary>629. The connection was closed by the remote computer. </summary>

.

        ERROR_REMOTE_DISCONNECTION,

.

        /// <summary>630 The modem (or other connecting device) was disconnected due to hardware failure. </summary>

.

        /// <summary>631. The user disconnected the modem (or other connecting device). </summary>

.

        ERROR_USER_DISCONNECTION,

.

        /// <summary>633. The modem (or other connecting device) is already in use or is not configured properly.  </summary>

.

        /// <summary>651. The modem (or other connecting device) has reported an error. </summary>

.

        /// <summary>652. There was an unrecognized response from the modem (or other connecting device). </summary>

.

        /// <summary>653. A macro required by the modem (or other connecting device) was not found in the device.INF file. </summary>

.

        /// <summary>665. The modem (or other connecting device) is not properly configured. </summary>

.

        /// <summary>666. The modem (or other connecting device) is not functioning. </summary>

.

        /// <summary>668. The connection was terminated. </summary>

.

        ERROR_NO_CONNECTION,

.

        /// <summary>674. The system was unable to read the maximum connection BPS rate from the media.INI file. </summary>

.

        ERROR_READING_MAXCONNECTBPS,

.

        /// <summary>675. The system was unable to read the maximum carrier connection speed from the media.INI file. </summary>

.

        /// <summary>677. A person answered instead of a modem (or other connecting device). </summary>

.

        /// <summary>681. The modem (or other connecting device) reported a general error. </summary>

.

        /// <summary>685. There was an error in writing the maximum connection speed. </summary>

.

        ERROR_WRITING_MAXCONNECTBPS,

.

        /// <summary>692. There was a hardware failure in the modem (or other connecting device). </summary>

.

        /// <summary>699. The modem (or other connecting device) response caused a buffer overflow. </summary>

.

        /// <summary>701. The modem moved to a connection speed not supported by the COM driver. </summary>

.

        /// <summary>703. The connection needs information from you, but the application does not allow user interaction. </summary>

.

        /// <summary>718. The connection timed out waiting for a valid response from the remote computer. </summary>

.

        /// <summary>719. The connection was terminated by the remote computer. </summary>

.

        /// <summary>720. The connection attempt failed because your computer and the remote computer could not agree on PPP control protocols. </summary>

.

        /// <summary>724. The IPX protocol cannot dial out on the modem (or other connecting device) because this computer is not configured for dialing out (it is an IPX router). </summary>

.

        /// <summary>725. The IPX protocol cannot dial in on the modem (or other connecting device) because this computer is not configured for dialing in (the IPX router is not installed). </summary>

.

        /// <summary>726. The IPX protocol cannot be used for dialing out on more than one modem (or other connecting device) at a time. </summary>

.

        /// <summary>753. The connection could not be disconnected because it was created by the multi-protocol router. </summary>

.

        /// <summary>755. The system cannot perform automated dial because this connection has a custom dialer specified. </summary>

.

        /// <summary>756. This connection is already being dialed. </summary>

.

        /// <summary>758. Internet Connection Sharing (ICS) is already enabled on the connection. </summary>

.

        ERROR_CONNECTION_ALREADY_SHARED,

.

        /// <summary>759. An error occurred while the existing Internet Connection Sharing settings were being changed. </summary>

.

        /// <summary>761. An error occurred while Internet Connection Sharing was being enabled for the connection. </summary>

.

        ERROR_SHARE_CONNECTION_FAILED,

.

        /// <summary>763. Internet Connection Sharing cannot be enabled. There is more than one LAN connection other than the connection to be shared. </summary>

.

        ERROR_CANNOT_SHARE_CONNECTION,

.

        /// <summary>765. Internet Connection Sharing cannot be enabled. A LAN connection is already configured with the IP address that is required for automatic IP addressing.  </summary>

.

        /// <summary>766. A certificate could not be found. Connections that use the L2TP protocol over IPSec require the installation of a machine certificate, also known as a computer certificate.  </summary>

.

        /// <summary>767. Internet Connection Sharing cannot be enabled. The LAN connection selected as the private network has more than one IP address configured. Please reconfigure the LAN connection with a single IP address before enabling Internet Connection Sharing.  </summary>

.

        /// <summary>768. The connection attempt failed because of failure to encrypt data.  </summary>

.

        /// <summary>770. The remote computer rejected the connection attempt.  </summary>

.

        ERROR_CONNECTION_REJECT,

.

        /// <summary>771. The connection attempt failed because the network is busy.  </summary>

.

        /// <summary>773. The connection attempt failed because the destination number has changed.  </summary>

.

        /// <summary>774. The connection attempt failed because of a temporary failure. Try connecting again. </summary>

.

        /// <summary>776. The call could not be connected because the remote computer has invoked the Do Not Disturb feature.  </summary>

.

        /// <summary>777. The connection attempt failed because the modem or other connection device on the remote computer is out of order.  </summary>

.

        /// <summary>779. To dial out using this connection you must use a smart card. </summary>

.

        /// <summary>780. An attempted function is not valid for this connection.  </summary>

.

        /// <summary>782. Connection Sharing (NAT) is currently installed as a routing protocol, and must be removed before enabling Internet Connection Sharing. </summary>

.

        /// <summary>783. Internet Connection Sharing cannot be enabled. The LAN connection selected as the private network is either not present, or is disconnected from the network. Please ensure that the LAN adapter is connected before enabling Internet Connection Sharing.  </summary>

.

        /// <summary>784. You cannot dial using this connection at login time because it is configured to use a user name different than the one on the smart card. If you want to use this connection at login time, you must configure it to use the user name on the smart card.  </summary>

.

        /// <summary>785. You cannot dial using this connection at login time because it is not configured to use a smart card. If you want to use it at login time, you must edit the properties of this connection so that it uses a smart card.  </summary>

.

        /// <summary>786. The L2TP connection attempt failed because there is no valid machine certificate on your computer for security authentication.  </summary>

.

        /// <summary>787. The L2TP connection attempt failed because the security layer could not authenticate the remote computer.  </summary>

.

        /// <summary>788. The L2TP connection attempt failed because the security layer could not negotiate compatible parameters with the remote computer.  </summary>

.

        /// <summary>789. The L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer.  </summary>

.

        /// <summary>790. The L2TP connection attempt failed because certificate validation on the remote computer failed.  </summary>

.

        /// <summary>791. The L2TP connection attempt failed because security policy for the connection was not found.  </summary>

.

        /// <summary>792. The L2TP connection attempt failed because security negotiation timed out.  </summary>

.

        /// <summary>793. The L2TP connection attempt failed because an error occurred while negotiating security.  </summary>

.

        /// <summary>797. A connection to the remote computer could not be established because the modem was not found or was busy.  </summary>

.

        ERROR_CONNECTING_DEVICE_NOT_FOUND,

.

        /// <summary>799. Internet Connection Sharing (ICS) cannot be enabled due to an IP address conflict on the network. ICS requires the host be configured to use 192.168.0.1. Ensure that no other client on the network is configured to use 192.168.0.1.  </summary>

.

        /// <summary>800. Unable to establish the VPN connection. The VPN server may be unreachable, or security parameters may not be configured properly for this connection.  </summary>

.

        /// <summary>801. This connection is configured to validate the identity of the access server, but Windows cannot verify the digital certificate sent by the server. </summary>

.

        /// <summary>805. You cannot dial using this connection at login time because it is configured to use the currently-logged-in user's credentials. </summary>

.

        /// <summary>806. A connection between your computer and the VPN server has been started, but the VPN connection cannot be completed. The most common cause for this is that at least one Internet device (for example, a firewall or a router) between your computer and the VPN server is not configured to allow Generic Routing Encapsulation (GRE) protocol packets. </summary>

.

        /// <summary>807. The network connection between your computer and the VPN server was interrupted. This can be caused by a problem in the VPN transmission and is commonly the result of internet latency or simply that your VPN server has reached capacity. Try to reconnect to the VPN server. </summary>

.

        ERROR_VPN_DISCONNECT,

.

        /// <summary>808. The network connection between your computer and the VPN server could not be established because the remote server refused the connection. This is typically caused by a mismatch between the server's configuration and your connection settings. </summary>

.

        /// <summary>809. The network connection between your computer and the VPN server could not be established because the remote server is not responding. This could be because one of the network devices (for example, firewalls, NAT, routers) between your computer and the remote server is not configured to allow VPN connections. </summary>

.

        /// <summary>810. A network connection between your computer and the VPN server was started, but the VPN connection was not completed. This is typically caused by the use of an incorrect or expired certificate for authentication between the client and the server. </summary>

.

        /// <summary>811. The network connection between your computer and the VPN server could not be established because the remote server is not responding. This is typically caused by a pre-shared key problem between the client and server. A pre-shared key is used to guarantee you are who you say you are in an IP Security (IPSec) communication cycle. </summary>

.

        /// <summary>812. The connection was prevented because of a policy configured on your RAS/VPN server. Specifically, the authentication method used by the server to verify your username and password may not match the authentication method configured in your connection profile. </summary>

.

        /// <summary>813. You have attempted to establish a second broadband connection while a previous broadband connection is already established using the same device or port. </summary>

.

        /// <summary>814. The underlying Ethernet connectivity required for the broadband connection was not found. </summary>

.

        /// <summary>815. The broadband network connection could not be established on your computer because the remote server is not responding. This could be caused by an invalid value for the 'Service Name' field for this connection. </summary>

.

        /// <summary>817. Cannot delete a connection while it is connected. </summary>

.

        /// <summary>818. The Network Access Protection (NAP) enforcement client could not create system resources for remote access connections. Some network services or resources might not be available. </summary>

.

        ERROR_RASQEC_NAPAGENT_NOT_CONNECTED,

.

        /// <summary>821. The Network Access Protection (NAP) enforcement client was unable to process the request because the remote access connection does not exist. </summary>

.

        /// <summary>827. The L2TP/IPsec connection cannot be completed because the IKE and AuthIP IPSec Keying Modules service and/or the Base Filtering Engine service is not running. These services are required to establish an L2TP/IPSec connection. </summary>

.

        /// <summary>828. The connection was terminated because of idle timeout. </summary>

.

        /// <summary>829. The modem (or other connecting device) was disconnected due to link failure. </summary>

.

        /// <summary>830. The connection was terminated because user logged off. </summary>

.

        /// <summary>831. The connection was terminated because user switch happened. </summary>

.

        /// <summary>832. The connection was terminated because of hibernation. </summary>

.

        /// <summary>833. The connection was terminated because the system got suspended. </summary>

.

        /// <summary>834. The connection was terminated because Remote Access Connection manager stopped. </summary>

.

        /// <summary>835. The L2TP connection attempt failed because the security layer could not authenticate the remote computer. This could be because one or more fields of the certificate presented by the remote server could not be validated as belonging to the target destination. </summary>

38: REGCLS
.
Summary
Controls the type of connections to a class object.
.

    Connected = 0x1,

.

    Connected = &H1

.

    Connectable = 0x1,

.

    All = Connectable | Container | Attached,

.

    Connectable = &H1

.

    All = Connectable Or Container Or Attached

.

     SC_MANAGER_CONNECT         = 0x00001,

.

                      SC_MANAGER_CONNECT |

.

    SC_MANAGER_CONNECT = &H1

.

    SC_MANAGER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED And SC_MANAGER_CONNECT And SC_MANAGER_CREATE_SERVICE And SC_MANAGER_ENUMERATE_SERVICE And SC_MANAGER_LOCK And SC_MANAGER_QUERY_LOCK_STATUS And SC_MANAGER_MODIFY_BOOT_CONFIG

.

    Connect            = 0x00001,

.

    Connect = &H1

.

    SHCNE_SERVERDISCONNECT    = 0x00004000L,

.

    SHCNE_SERVERDISCONNECT = &H4000L

44: SHCNE
.

    SHCNE_SERVERDISCONNECT    = 0x00004000,

.

    SHCNE_SERVERDISCONNECT = &H4000

.

    SIID_NETWORKCONNECT = 103,

.

    SIID_NETWORKCONNECT = 103

.

    NETWORKCONNECT = 103

.

    MinorNetworkConnectivity = 0x00000014,

.

     MinorNetworkConnectivity = &H14

.

    TCP_TABLE_BASIC_CONNECTIONS,

.

    TCP_TABLE_OWNER_PID_CONNECTIONS,

.

    TCP_TABLE_OWNER_MODULE_CONNECTIONS,

.
Summary
Used in USB_NODE_CONNECTION_INFORMATION_EX structure to retrieve the status of a port on a USB Hub
.

enum USB_CONNECTION_STATUS

.

   NoDeviceConnected,

.

   DeviceConnected,

.

Enum USB_CONNECTION_STATUS

.

typedef enum _USB_CONNECTION_STATUS {

.

   NoDeviceConnected,

.

   DeviceConnected,

.

} USB_CONNECTION_STATUS, *PUSB_CONNECTION_STATUS;

.
Documentation
[USB_CONNECTION_STATUS] on MSDN
.
Summary
Used in USB_NODE_CONNECTION_INFORMATION_EX to get the speed of the connection of a device on a USB Hub
.
Summary
Defines the mode of connection.
.

        public enum WLAN_CONNECTION_MODE

.

        wlan_connection_mode_profile,

.

        wlan_connection_mode_temporary_profile,

.

        wlan_connection_mode_discovery_secure,

.

        wlan_connection_mode_discovery_unsecure,

.

        wlan_connection_mode_auto,

.

        wlan_connection_mode_invalid,

.

     Public Enum WLAN_CONNECTION_MODE

.

     wlan_connection_mode_profile

.

     wlan_connection_mode_temporary_profile

.

     wlan_connection_mode_discovery_secure

.

     wlan_connection_mode_discovery_unsecure

.

     wlan_connection_mode_auto

.

     wlan_connection_mode_invalid

.

Windows XP with SP3 and Wireless LAN API for Windows XP with SP2: Only the wlan_connection_mode_profile value is supported.

.
Documentation
[WLAN_CONNECTION_MODE] on MSDN
.

    wlan_hosted_network_reason_incompatible_connection_started,

.

    wlan_hosted_network_reason_incompatible_connection_stopped,

.

        /// Defines the state of the interface. e.g. connected, disconnected.

.

        /// wlan_interface_state_connected -> 1

.

        wlan_interface_state_connected = 1,

.

        /// wlan_interface_state_disconnecting -> 3

.

        wlan_interface_state_disconnecting = 3,

.

        /// wlan_interface_state_disconnected -> 4

.

        wlan_interface_state_disconnected = 4,

.

     ''' wlan_interface_state_connected -> 1

.

     wlan_interface_state_connected = 1

.

     ''' wlan_interface_state_disconnecting -> 3

.

     wlan_interface_state_disconnecting = 3

.

     ''' wlan_interface_state_disconnected -> 4

.

     wlan_interface_state_disconnected = 4

.

        wlan_intf_opcode_current_connection,

.

     wlan_intf_opcode_current_connection

.

     /// The session's current connection state. For more information, see <see cref="WTS_CONNECTSTATE_CLASS"/>.

.

     WTSConnectState,

.

     /// Information about a Remote Desktop Connection (RDC) client. For more information, see <see cref="WTSCLIENT"/>.

.

    WTSConnectState

.

     WTSConnectState,

.

    WTSConnectState

winfax

.
Summary
Connects a fax client application to the local fax server.
.

static extern bool FaxConnectFaxServer (string MachineName, out IntPtr FaxHandle);

.

Declare Function FaxConnectFaxServer Lib "winfax.dll" (TODO) As TODO

.
Documentation
[FaxConnectFaxServer] on MSDN
.
Summary
Enumerates all queued and active fax jobs on the fax server to which the client has connected.
.
Summary
Enumerates all fax devices currently attached to the fax server to which the client has connected.

wtsapi32

.
Summary
The WTSDisconnectSession function disconnects the logged-on user from the specified Terminal Services session without closing the session. If the user subsequently logs on to the same terminal server, the user is reconnected to the same session.
.

     static extern bool WTSDisconnectSession(IntPtr hServer, int sessionId, bool bWait);

.

     Private Shared Function WTSDisconnectSession(ByVal hServer As IntPtr, ByVal SessionId As Integer, ByVal bWait As Boolean) As Boolean

.

Note that you cannot disconnect the console session.

.

To be able to disconnect another user's session, you need to have the Disconnect permission.

.

    Friend Function DissconnectSession(ByVal ServerName As String, ByVal SessionID As Integer) As Boolean

.

        RetVal = WTSDisconnectSession(ptrOpenedServer, SessionID, False)

.
Documentation
[WTSDisconnectSession] on MSDN
.
Summary
This Terminal Services API call lists all local and remote sessions for a given server, including their state (e.g. connected, disconnected) and type (local, RDP). It is the basis for the output of qwinsta.exe.
.

        public WTS_CONNECTSTATE_CLASS State;

.

    public enum WTS_CONNECTSTATE_CLASS

.

        WTSConnected,

.

        WTSConnectQuery,

.

        WTSDisconnected,

.

     public WTS_CONNECTSTATE_CLASS State;

.

     public enum WTS_CONNECTSTATE_CLASS

.

     WTSConnected,

.

     WTSConnectQuery,

.

     WTSDisconnected,

.

    Private Enum WTS_CONNECTSTATE_CLASS

.

    WTSConnected

.

    WTSConnectQuery

.

    WTSDisconnected

.

    Dim State As WTS_CONNECTSTATE_CLASS

.

    Private Enum WTS_CONNECTSTATE_CLASS

.

    WTSConnected

.

    WTSConnectQuery

.

    WTSDisconnected

.

    Dim State As WTS_CONNECTSTATE_CLASS

.

    Dim ConnectionState As String

.

            tmpArr(i).ConnectionState = GetConnectionState(sessionInfo(i).State)

.

    Private Function GetConnectionState(ByVal State As WTS_CONNECTSTATE_CLASS) As String

.

        Case WTS_CONNECTSTATE_CLASS.WTSActive

.

        Case WTS_CONNECTSTATE_CLASS.WTSConnected

.

        RetVal = "Connected"

.

        Case WTS_CONNECTSTATE_CLASS.WTSConnectQuery

.

        Case WTS_CONNECTSTATE_CLASS.WTSDisconnected

.

        RetVal = "Disconnected"

.

        Case WTS_CONNECTSTATE_CLASS.WTSDown

.

        Case WTS_CONNECTSTATE_CLASS.WTSIdle

.

        Case WTS_CONNECTSTATE_CLASS.WTSInit

.

        Case WTS_CONNECTSTATE_CLASS.WTSListen

.

        Case WTS_CONNECTSTATE_CLASS.WTSReset

.

        Case WTS_CONNECTSTATE_CLASS.WTSShadow

.

        RetVal = "Unknown connect state"

Cut off search results after 60. Please refine your search.


 
Access PInvoke.net directly from VS: