WinHttpOpen (winhttp)
Last changed: -194.146.189.103

.
Summary
TODO - a short description

C# Signature:

[DllImport("Winhttp.dll", SetLastError = true)]
static extern IntPtr WinHttpOpen(
        String pszAgent,
        UInt32 dwAccessType,
        [MarshalAs(UnmanagedType.LPWStr)] String pszProxyW,
        [MarshalAs(UnmanagedType.LPWStr)] String pszProxyBypass,
        UInt32 dwFlags);

[DllImport("winhttp.dll", SetLastError=true)]
static extern IntPtr WinHttpOpenRequest(
            IntPtr hConnect,
            [MarshalAs(UnmanagedType.LPWStr)] string pwszVerb,
            [MarshalAs(UnmanagedType.LPWStr)] string pwszObjectName,
            [MarshalAs(UnmanagedType.LPWStr)] string pwszVersion,
            [MarshalAs(UnmanagedType.LPWStr)] string pwszReferrer,
            ref byte[] ppwszAcceptTypes,
            int dwFlags);

or

[DllImport("winhttp.dll", SetLastError=true)]
static extern IntPtr WinHttpOpenRequest(
            IntPtr hConnect,
            [MarshalAs(UnmanagedType.LPWStr)] string pwszVerb,
            [MarshalAs(UnmanagedType.LPWStr)] string pwszObjectName,
            [MarshalAs(UnmanagedType.LPWStr)] string pwszVersion,
            [MarshalAs(UnmanagedType.LPWStr)] string pwszReferrer,
            ref byte[] ppwszAcceptTypes,
            InternetFlags dwFlags);

User-Defined Types:

[Flags]
public enum InternetFlags : uint
{
     ESCAPE_PERCENT = 0x00000004,
     NULL_CODEPAGE = 0x00000008,
     ESCAPE_DISABLE = 0x00000040,
     ESCAPE_DISABLE_QUERY = 0x00000080,
     BYPASS_PROXY_CACHE = 0x00000100,
     REFRESH = BYPASS_PROXY_CACHE,
     SECURE = 0x00800000,
     ASYNC = 0x10000000
}

VB Signature:

Declare Function WinHttpOpenRequest Lib "winhttp.dll" (ByVal hConnect As IntPtr, ByVal pwszVerb As String, ByVal pwszObjectName As String, ByVal pwszVersion As String, ByVal pwszReferrer As String, ByRef ppwszAcceptTypes As Byte(), ByVal dwFlags As Integer) As IntPtr

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation