HttpInitialize (httpapi)
Last changed: -83.79.56.198

.
Summary
The HttpInitialize function initializes the HTTP API driver, starts it, if it has not already been started, and allocates data structures for the calling application to support response-queue creation and other operations. Call this function before calling any other functions in the HTTP API.

C# Signature:

[DllImport("httpapi.dll", SetLastError = true)]
static extern uint HttpInitialize(
     HTTPAPI_VERSION Version,
     uint Flags,
     IntPtr pReserved);

VB Signature:

<DllImport("httpapi.dll", SetLastError := True)> _
Private Shared Function HttpInitialize(ByVal Version As HTTPAPI_VERSION, ByVal Flags As UInteger, ByVal pReserved As IntPtr) As UInteger
End Function

User-Defined Types:

HTTPAPI_VERSION

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

    uint retVal = (uint) ErrorCodes.NOERROR;

    retVal = HttpApi.HttpInitialize(HttpApi.HTTPAPI_VERSION, HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
    if ((uint) ErrorCodes.NOERROR == retVal)
    {
    // Do some work...

    HttpApi.HttpTerminate(HttpApi.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
    }

Alternative Managed API:

Do you know one? Please contribute it!

Documentation