HttpInitialize function

The HttpInitialize function initializes the HTTP Server 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 Server API.

Syntax


ULONG HttpInitialize(
  _In_        HTTPAPI_VERSION Version,
  _In_        ULONG Flags,
  _Reserved_  PVOID pReserved
);

Parameters

Version [in]

HTTP version. This parameter is an HTTPAPI_VERSION structure. For the current version, declare an instance of the structure and set it to the pre-defined value HTTPAPI_VERSION_1 before passing it to HttpInitialize.

Flags [in]

Initialization options, which can include one or both of the following values.

ValueMeaning
HTTP_INITIALIZE_CONFIG

Perform initialization for applications that use the HTTP configuration functions, HttpSetServiceConfiguration, HttpQueryServiceConfiguration and HttpDeleteServiceConfiguration.

HTTP_INITIALIZE_SERVER

Perform initialization for applications that use the HTTP Server API.

 

pReserved [in, out]

This parameter is reserved and must be NULL.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

ValueMeaning
ERROR_INVALID_PARAMETER

The Flags parameter contains an unsupported value.

Other

A system error code defined in WinError.h.

 

Remarks

Call HttpTerminate when the application completes. All the same flags that were passed to HttpInitialize in the Flags parameter must also be passed to HttpTerminate. An application can call HttpInitialize repeatedly, provided that each call to HttpInitialize is later matched by a corresponding call to HttpTerminate.

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Http.h

Library

Httpapi.lib

DLL

Httpapi.dll

See also

HTTP Server API Version 1.0 Functions
HttpTerminate

 

 

Community Additions

ADD
Show:
© 2014 Microsoft