Home COM GDI+ WebBrowser Data Access 

WebBrowser Control

 

 

This section contains reference information on WebBrowser Control.

 

 

Interfaces

 

IDocHostUIHandler (deprecated)

IDocHostUIHandler2

IWebBrowserApp (obsolete)

IWebBrowser (obsolete)

 

 

IWebBrowser2

DWebBrowserEvents (deprecated)

DWebBrowserEvents2

 

Enumerations

 

BrowserNavConstants

 

Contains values used by the IWebBrowser2::Navigate and IWebBrowser2::Navigate2 methods.

%navOpenInNewWindow = &H1
' Open the resource or file in a new window.
%navNoHistory = &H2
' Do not add the resource or file to the history list. The new page replaces the current page in the list.
%navNoReadFromCache = &H4
' Not currently supported.
%navNoWriteToCache = &H8
' Not currently supported.
%navAllowAutosearch = &H10
' If the navigation fails, the autosearch functionality attempts to navigate common root domains (.com, .edu, and so on). If this also fails, the URL is passed to a search engine.
%navBrowserBar = &H20
' Causes the current Explorer Bar to navigate to the given item, if possible.
%navHyperlink = &H40
' If the navigation fails when a hyperlink is being followed, this constant specifies that the resource should then be bound to the moniker using the BINDF_HYPERLINK flag.
 

 

CommandStateChangeConstants

 

Contains values used by the DWebBrowserEvents2::CommandStateChange event.

%CSC_UPDATECOMMANDS = &HFFFFFFFF
' Enabled state of a toolbar button might have changed.
%CSC_NAVIGATEFORWARD = &H00000001
' Enabled state of the Forward button has changed.
%CSC_NAVIGATEBACK = &H00000002
' Enabled state of the Back button has changed.
 

 

READYSTATE


Contains values that indicate what state an object is in.

%READYSTATE_UNINITIALIZED = 0
' Default initialization state.
%READYSTATE_LOADING = 1
' Object is currently loading its properties.
%READYSTATE_LOADED = 2
' Object has been initialized.
%READYSTATE_INTERACTIVE = 3
' Object is interactive, but not all of its data is available.
%READYSTATE_COMPLETE = 4
' Object has received all of its data.

Remarks

This is used with the ReadyState property and the IWebBrowser2::get_ReadyState method.
 

 

RefreshConstants

 

Contains values used with the Refresh2 and IWebBrowser2::Refresh2 methods.

%REFRESH_NORMAL = 0
' Refresh that does not include sending the HTTP "pragma:nocache" header to the server.
%REFRESH_IFEXPIRED = 1
' Refresh that occurs if the page has expired.
%REFRESH_CONTINUE = 2
' For internal use only; do not use.
%REFRESH_COMPLETELY = 3
' Refresh that includes sending a "pragma:nocache" header to the server (HTTP URLs only).

Remarks

The "pragma:nocache" header tells the server not to return a cached copy but to ensure that the information is as fresh as possible. Browsers typically send this header when the user selects Refresh, but the header can cause problems for some servers.
 

 

SecureLockIconConstants

 

Contains values used by the DWebBrowserEvents2::SetSecureLockIcon event.

%secureLockIconUnsecure = 0
' There is no security encryption present.
%secureLockIconMixed = &H1
' There are multiple security encryption methods present.
%secureLockIconUnknownBits = &H2
' The security encryption level is not known.
%secureLockIcon40Bit = &H3
' There is 40-bit security encryption present.
%secureLockIcon56Bit = &H4
' There is 56-bit security encryption present.
%secureLockIconFortezza = &H5
' There is Fortezza security encryption present.
%secureLockIcon128Bit = &H6
' There is 128-bit security encryption present.
 

 

Constants

 

NavigateError Event Status Codes

 

The following tables list the possible errors returned by the StatusCode parameter of the DWebBrowserEvents2::NavigateError event handler. For more information on HTTP status codes, see HTTP Status Codes.

 

HTTP Status Codes

 

Status code string

C++ value

Visual Basic value

Description

HTTP_STATUS_BAD_REQUEST

400

400

Invalid syntax.

HTTP_STATUS_DENIED

401

401

Access denied.

HTTP_STATUS_PAYMENT_REQ

402

402

Payment required.

HTTP_STATUS_FORBIDDEN

403

403

Request forbidden.

HTTP_STATUS_NOT_FOUND

404

404

Object not found.

HTTP_STATUS_BAD_METHOD

405

405

Method is not allowed.

HTTP_STATUS_NONE_ACCEPTABLE

406

406

No response acceptable to client found.

HTTP_STATUS_PROXY_AUTH_REQ

407

407

Proxy authentication required.

HTTP_STATUS_REQUEST_TIMEOUT

408

408

Server timed out waiting for request.

HTTP_STATUS_CONFLICT

409

409

User should resubmit with more info.

HTTP_STATUS_GONE

410

410

Resource is no longer available.

HTTP_STATUS_LENGTH_REQUIRED

411

411

Server refused to accept request without a length.

HTTP_STATUS_PRECOND_FAILED

412

412

Precondition given in request failed.

HTTP_STATUS_REQUEST_TOO_LARGE

413

413

Request entity was too large.

HTTP_STATUS_URI_TOO_LONG

414

414

Request Uniform Resource Identifier (URI) too long.

HTTP_STATUS_UNSUPPORTED_MEDIA

415

415

Unsupported media type.

HTTP_STATUS_RETRY_WITH

449

449

Retry after doing the appropriate action.

HTTP_STATUS_SERVER_ERROR

500

500

Internal server error.

HTTP_STATUS_NOT_SUPPORTED

501

501

Server does not support the functionality required to fulfill the request.

HTTP_STATUS_BAD_GATEWAY

502

502

Error response received from gateway.

HTTP_STATUS_SERVICE_UNAVAIL

503

503

Temporarily overloaded.

HTTP_STATUS_GATEWAY_TIMEOUT

504

504

Timed out waiting for gateway.

HTTP_STATUS_VERSION_NOT_SUP

505

505

HTTP version not supported.

 

HRESULT Status Codes

 

Status code string

C++ value

Visual Basic value

Description

INET_E_INVALID_URL

(0x800C0002L)

-2,146,697,214

URL string is not valid.

INET_E_NO_SESSION

(0x800C0003L)

-2,146,697,213

No session found.

INET_E_CANNOT_CONNECT

(0x800C0004L)

-2,146,697,212

Unable to connect to server.

INET_E_RESOURCE_NOT_FOUND

(0x800C0005L)

-2,146,697,211

Requested resource is not found.

INET_E_OBJECT_NOT_FOUND

(0x800C0006L)

-2,146,697,210

Requested object is not found.

INET_E_DATA_NOT_AVAILABLE

(0x800C0007L)

-2,146,697,209

Requested data is not available.

INET_E_DOWNLOAD_FAILURE

(0x800C0008L)

-2,146,697,208

Failure occurred during download.

INET_E_AUTHENTICATION_REQUIRED

(0x800C0009L)

-2,146,697,207

Requested navigation requires authentication.

INET_E_NO_VALID_MEDIA

(0x800C000AL)

-2,146,697,206

Required media not available or valid.

INET_E_CONNECTION_TIMEOUT

(0x800C000BL)

-2,146,697,205

Connection timed out.

INET_E_INVALID_REQUEST

(0x800C000CL)

-2,146,697,204

Request is invalid.

INET_E_UNKNOWN_PROTOCOL

(0x800C000DL)

-2,146,697,203

Protocol is not recognized.

INET_E_SECURITY_PROBLEM

(0x800C000EL)

-2,146,697,202

Navigation request has encountered a security issue.

INET_E_CANNOT_LOAD_DATA

(0x800C000FL)

-2,146,697,201

Unable to load data from the server.

INET_E_CANNOT_INSTANTIATE_OBJECT

(0x800C0010L)

-2,146,697,200

Unable to create an instance of the object.

INET_E_REDIRECT_FAILED

(0x800C0014L)

-2,146,697,196

Attempt to redirect the navigation failed.

INET_E_REDIRECT_TO_DIR

(0x800C0015L)

-2,146,697,195

Navigation redirected to a directory.

INET_E_CANNOT_LOCK_REQUEST

(0x800C0016L)

-2,146,697,194

Unable to lock request with the server.

INET_E_USE_EXTEND_BINDING

(0x800C0017L)

-2,146,697,193

Reissue request with extended binding.

INET_E_TERMINATED_BIND

(0x800C0018L)

-2,146,697,192

Binding is terminated.

INET_E_CODE_DOWNLOAD_DECLINED

(0x800C0100L)

-2,146,697,960

Permission to download is declined.

INET_E_RESULT_DISPATCHED

(0x800C0200L)

-2,146,696,704

Result is dispatched.

INET_E_CANNOT_REPLACE_SFP_FILE

(0x800C0300L)

-2,146,696,448

Cannot replace a protected System File Protection (SFP) file.

 

Page last updated on Saturday, 14 January 2006 15:13:32 +0100