CWebView::GetHeaderCount Method  
 
BOOL GetHeaderCount(
  DWORD dwHeaderType,  
  LONG *lpnCount  
);

The GetHeaderCount method returns the number of headers defined for the specified header type.

Parameters

dwHeaderType
An unsigned integer which specifies the type of header being checked. It may be one of the following values.
Name Description
WEBVIEW_HEADERS_REQUEST The number of custom headers submitted with a request.
WEBVIEW_HEADERS_RESPONSE The number of headers returned by the server.
lpnCount
A pointer to an integer which will contain the number of headers when the method returns. This parameter cannot be NULL.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This method can be used to determine the number of custom request headers which have been set, or the number of headers returned by the server in response to a navigation. To enumerate the available response headers, use the GetFirstHeader and GetNextHeader methods.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cshtmv12.lib

See Also