InternetConnect

  • Returns a valid handle to the FTP, Gopher, or HTTP session if the connection is successful, or NULL otherwise. To get extended error information, call GetLastError. An application can also use InternetGetLastResponseInfo to determine why access to the service was denied.

C# Signature:

[DllImport("wininet.dll", SetLastError=true, CharSet=CharSet.Auto)]
static extern IntPtr InternetConnect(
   IntPtr hInternet, string lpszServerName, short nServerPort,
   string lpszUsername, string lpszPassword, int dwService,
   int dwFlags, IntPtr dwContext);

VB Signature:

Declare Auto Function InternetConnect Lib "wininet.dll" (
    ByVal hInternetSession As System.IntPtr, 
    ByVal sServerName As String, 
    ByVal nServerPort As Integer, 
    ByVal sUsername As String, 
    ByVal sPassword As String, 
    ByVal lService As Int32, 
    ByVal lFlags As Int32,
    ByVal lContext As System.IntPtr) As System.IntPtr

User-Defined Types:

User-Defined Types:

User-Defined Types:

User-Defined Types:

User-Defined Types:

User-Defined Types:

User-Defined Types:

User-Defined Types:

Última actualización