IHTMLDocument2::get_linkColor
IHTMLDocument2

IHTMLDocument2::get_linkColor


HRESULT get_linkColor(
    VARIANT *p
);

Retrieves the color of the document links.

p
Address of a VARIANT structure that receives the color. The color can be one of the color names or values given in the Color Table reference documentation.

See also put_linkColor

IHTMLDocument2::put_vlinkColor

HRESULT put_vlinkColor(
    VARIANT v
);

Sets the color of links that have already been visited.

v
VARIANT structure that contains a string or value specifying the color. The color can be one of the color names or values given in the Color Table reference documentation.

See also get_vlinkColor

IHTMLDocument2::get_vlinkColor

HRESULT get_vlinkColor(
    VARIANT *p
);

Retrieves the color of links that have already been visited.

p
Address of a VARIANT structure that receives the color. The color can be one of the color names or values given in the Color Table reference documentation.

See also put_vlinkColor

IHTMLDocument2::get_referrer

HRESULT get_referrer(
    BSTR *p
);

Retrieves the URL of the previous location.

p
Address of a string variable that receives the URL.

IHTMLDocument2::get_location

HRESULT get_location(
    IHTMLLocation **p
);

Retrieves an interface pointer to a location object. The object contains information about the current location (full URL) of the document.

p
Address of a pointer to the IHTMLLocation interface of the location object.

IHTMLDocument2::get_lastModified

HRESULT get_lastModified(
    BSTR *p
);

Retrieves a string containing the last-modified date of the page (if the page provides one).

p
Address of a string variable that receives the last-modified date.

IHTMLDocument2::put_URL

HRESULT put_URL(
    BSTR v
);

Sets the URL for the current document. This function causes the browser to browse to the location specified by the URL.

v
String specifying the URL.

This function performs the same action as the IHTMLLocation::put_href function.

See also get_URL

IHTMLDocument2::get_URL

HRESULT get_URL(
    BSTR *p
);

Retrieves the URL for the current document.

p
Address of a string variable that receives the URL.

This function performs the same action as the IHTMLLocation::get_href function.

See also put_URL

IHTMLDocument2::put_domain

HRESULT put_domain(
    BSTR v
);

Sets or returns the security domain of the document.

v
String specifying the security domain.

The domain property initially returns the host name of the server the page is from. This property can be assigned the domain suffix to allow sharing of pages across frames. For example, a page in one frame from home.microsoft.com and a page from www.microsoft.com would initially not be able to communicate with each other. However, by setting the domain property of both pages to the suffix, microsoft.com, both pages would be considered secure and now code can be shared between the pages.

See also get_domain

IHTMLDocument2::get_domain

HRESULT get_domain(
    BSTR *p
);

Retrieves or the security domain of the document.

p
Address of a string variable that receives the security domain.

The domain property initially returns the hostname of the server that the page is from. This property can be assigned the domain suffix to allow sharing of pages across frames. For example, a page in one frame from home.microsoft.com and a page from www.microsoft.com would initially not be able to communicate with each other. However, by setting the domain property of both pages to the suffix, microsoft.com, both pages would be considered secure and now code can access between the pages.

See also put_domain

IHTMLDocument2::put_cookie

HRESULT put_cookie(
    BSTR v
);

Sets the string value of a cookie, which is a small piece of information stored by the browser.

v
String specifying the cookie.

See also get_cookie

IHTMLDocument2::get_cookie

HRESULT get_cookie(
    BSTR *p
);

Retrieves the string value of a cookie, which is a small piece of information stored by the browser.

p
Address of a string variable that receives the cookie.

See also put_cookie

IHTMLDocument2::put_expando

HRESULT put_expando(
    VARIANT_BOOL v
);

Specifies whether the document supports the use of expando properties.

v
Boolean value. If TRUE, the document supports expando properties; if FALSE, it does not.

See also get_expando

IHTMLDocument2::get_expando

HRESULT get_expando(
    VARIANT_BOOL *p
);

Determines whether the document supports the use of expando properties.

p
Address of a Boolean variable that receives TRUE if the document supports expando properties, or FALSE otherwise.

See also put_expando

IHTMLDocument2::put_charset

HRESULT put_charset(
    BSTR v
);

Specifies the character set used to encode the document.

v
String value specifying the character set.

See also get_charset

IHTMLDocument2::get_charset

HRESULT get_charset(
    BSTR *p
);

Retrieves the character set used to encode the document.

p
Address of a string variable that receives the current character set.

See also put_charset

IHTMLDocument2::put_defaultCharset

HRESULT put_defaultCharset(
    BSTR v
);

Specifies the default character set of the document.

v
String value specifying the default character set.

See also get_defaultCharset

IHTMLDocument2::get_defaultCharset

HRESULT get_defaultCharset(
    BSTR *p
);

Retrieves the default character set of the document.

p
Address of a string variable that receives the name of the default character set.

See also put_defaultCharset

IHTMLDocument2::get_mimeType

HRESULT get_mimeType(
    BSTR *p
);

Retrieves the MIME type for the document file.

p
Address of a string variable that receives the MIME type.

IHTMLDocument2::get_fileSize

HRESULT get_fileSize(
    BSTR *p
);

Retrieves the size, in bytes, of the document file.

p
Address of a string variable that receives the size of the document file.

IHTMLDocument2::get_fileCreatedDate

HRESULT get_fileCreatedDate(
    BSTR *p
);

Retrieves the date when the document file was created.

p
Address of a string variable that receives the creation date. The date consists of the weekday, month, date, and year.

IHTMLDocument2::get_fileModifiedDate

HRESULT get_fileModifiedDate(
    BSTR *p
);

Retrieves the date when the document file was most recently modified.

p
Address of a string variable that receives the modification date. The date consists of the weekday, month, date, and year.

See also get_fileUpdatedDate

IHTMLDocument2::get_fileUpdatedDate

HRESULT get_fileUpdatedDate(
    BSTR *p
);

Retrieves the date when the document file was last updated.

p
Address of a string variable that receives the date. The date consists of the weekday, month, date, and year.

See also get_fileModifiedDate

IHTMLDocument2::get_security

HRESULT get_security(
    BSTR *p
);

Retrieves security information for the document.

p
Address of a string variable that receives the security information.

IHTMLDocument2::get_protocol

HRESULT get_protocol(
    BSTR *p
);

Retrieves the protocol portion of the URL that the browser uses to locate the document file. The protocol portion, which indicates the access method, includes the initial substring of the URL up to and including the first colon.

p
Address of a string variable that receives the protocol.

IHTMLDocument2::get_nameProp

HRESULT get_nameProp(
    BSTR *p
);

Retrieves the file name from the URL that the browser uses to locate the document file.

p
Address of a string variable that receives the file name.

IHTMLDocument2::write

HRESULT write(
    SAFEARRAY *psarray
);

Writes one or more HTML expressions to a document in the specified window.

psarray
Address of a safe array containing the text and HTML tags to write.

See also writeln

IHTMLDocument2::writeln

HRESULT writeln(
    SAFEARRAY *psarray
);

Writes one or more HTML expressions to a document in the specified window, followed by a carriage return.

psarray
Address of a safe array containing the text and HTML tags to write.

In HTML, the carriage return is ignored unless within preformatted text.

See also write

IHTMLDocument2::open

HRESULT open(
    BSTR url, 
    VARIANT name,
    VARIANT features,
    VARIANT replace ,
    IDispatch **pomWindowResult
);

Opens a stream to collect the output of the write or writeln method.

url
String value containing the URL of the resource.
name
VARIANT structure that contains the name.
features
VARIANT structure that contains the features.
replace
VARIANT structure.
pomWindowResult
Address of a pointer to the IDispatch interface.

See also close

IHTMLDocument2::close

HRESULT close(void);

Closes an output stream and forces data sent to layout to display.

See also open

IHTMLDocument2::clear

HRESULT clear(void);

This is a no-op.

IHTMLDocument2::queryCommandSupported

HRESULT queryCommandSupported(
    BSTR cmdID,
    VARIANT_BOOL *pfRet
);

Determines whether the given command is supported.

cmdID
String value containing the identifier of a command.
pfRet
Address of a Boolean variable that receives TRUE if the command is supported, or FALSE otherwise.

IHTMLDocument2::queryCommandEnabled

HRESULT queryCommandEnabled(
    BSTR cmdID,
    VARIANT_BOOL *pfRet
);

Determines whether the given command is currently available.

cmdID
String value containing the identifier of a command. Can be any command identifier given in the list of Command Identifiers.
pfRet
Address of a Boolean variable that receives TRUE if the command is available, or FALSE otherwise.

IHTMLDocument2::queryCommandState

HRESULT queryCommandState(
    BSTR cmdID,
    VARIANT_BOOL *pfRet
);

Retrieves the current status of the given command. The status indicates whether the command has been carried out on the object.

cmdID
String value that contains the identifier of a command. Can be any command identifier given in the list of Command Identifiers.
pfRet
Address of a Boolean variable that receives TRUE if the given command has been carried out, FALSE if it has not, or NULL if the function cannot determine the status of the command.

IHTMLDocument2::queryCommandIndeterm

HRESULT queryCommandIndeterm(
    BSTR cmdID,
    VARIANT_BOOL *pfRet
);

Determines whether the given command is in the indeterminate state.

cmdID
String value that contains the identifier of a command. Can be any command identifier given in the list of Command Identifiers.
pfRet
Address of a Boolean variable that receives TRUE if the given command is in the indeterminate state, or FALSE otherwise.

IHTMLDocument2::queryCommandText

HRESULT queryCommandText(
    BSTR cmdID,
    BSTR *pcmdText
);

Returns the string associated with a command.

cmdID
String value that contains the identifier of a command. Can be any command identifier given in the list of Command Identifiers.
pcmdText
Address of a string variable where the text associated with the command will be stored.

IHTMLDocument2::queryCommandValue

HRESULT queryCommandValue(
    BSTR cmdID,
    VARIANT *pcmdValue
);

Retrieves the current value of the given command.

cmdID
String value that contains the identifier of a command. Can be any command identifier given in the list of Command Identifiers.
pcmdValue
Address of a VARIANT structure that receives a string representing the command value. If the command is not supported, this variable receives NULL.

IHTMLDocument2::execCommand

HRESULT execCommand(
    BSTR cmdID,
    VARIANT_BOOL showUI,
    VARIANT value,
    VARIANT_BOOL *pfRet
);

Executes the given command over the current selection or text range.

cmdID
String value containing the identifier of a command. Can be any command identifier given in the list of Command Identifiers.
showUI
Boolean value specifying whether to display a user interface if the command supports one. If TRUE, the command displays a user interface, if applicable; otherwise, it doesn't.
value
VARIANT structure to pass to the command. Possible values depend on the value of cmdID.
pfRet
Address of a Boolean variable that receives TRUE if the function is successful, or FALSE otherwise.

IHTMLDocument2::execCommandShowHelp

HRESULT execCommandShowHelp(
    BSTR cmdID,
    VARIANT_BOOL *pfRet
);

Displays help information for the given command identifier.

cmdID
String value that contains the identifier of a command. Can be any command identifier given in the list of Command Identifiers.
pfRet
Address of a Boolean variable that receives TRUE if successful, or FALSE otherwise.

IHTMLDocument2::createElement

HRESULT createElement(
    BSTR eTag,
    IHTMLElement **newElem
);

Creates an instance of the element object for the specified tag. Only new IMG and OPTION objects can be created. Before they can be used, new objects must be explicitly added to their respective collections.

eTag
String value specifiying the type of element to create.
newElem
Address of a pointer to the IHTMLElement interface of the new element.

IHTMLDocument2::put_onhelp

HRESULT put_onhelp(
    VARIANT v
);

Sets the inline script associated with the onhelp event on the object.

v
VARIANT structure containing the inline script.

See also get_onhelp

IHTMLDocument2::get_onhelp

HRESULT get_onhelp(
    VARIANT *p
);

Retrieves the inline script associated with the onhelp event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onhelp

IHTMLDocument2::put_onclick

HRESULT put_onclick(
    VARIANT v
);

Sets the inline script associated with the onclick event on the object.

v
VARIANT structure that contains the inline script.

See also get_onclick

IHTMLDocument2::get_onclick

HRESULT get_onclick(
    VARIANT *p
);

Retrieves the inline script associated with the onclick event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onclick

IHTMLDocument2::put_ondblclick

HRESULT put_ondblclick(
    VARIANT v
);

Sets the inline script associated with the ondblclick event on the object.

v
VARIANT structure that contains the script.

See also get_ondblclick

IHTMLDocument2::get_ondblclick

HRESULT get_ondblclick(
    VARIANT *p
);

Retrieves the inline script associated with the ondblclick event on the object.

p
Address of a VARIANT structure to store the script.

See also put_ondblclick

IHTMLDocument2::put_onkeyup

HRESULT put_onkeyup(
    VARIANT v
);

Sets the inline script associated with the onkeyup event on the object.

v
VARIANT structure containing the script to set.

See also get_onkeyup

IHTMLDocument2::get_onkeyup

HRESULT get_onkeyup(
    VARIANT *p
);

Retrieves the inline script associated with the onkeyup event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onkeyup

IHTMLDocument2::put_onkeydown

HRESULT put_onkeydown(
    VARIANT v
);

Sets the inline script associated with the onkeydown event on the object.

v
VARIANT structure containing the script to set.

See also get_onkeydown

IHTMLDocument2::get_onkeydown

HRESULT get_onkeydown(
    VARIANT *p
);

Retrieves the inline script associated with the onkeydown event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onkeydown

IHTMLDocument2::put_onkeypress

HRESULT put_onkeypress(
    VARIANT v
);

Sets the inline script associated with the onkeypress event on the object.

v
VARIANT structure that contains the script to set.

See also get_onkeypress

IHTMLDocument2::get_onkeypress

HRESULT get_onkeypress(
    VARIANT *p
);

Retrieves the inline script associated with the onkeypress event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onkeypress

IHTMLDocument2::put_onmouseup

HRESULT put_onmouseup(
    VARIANT v
);

Sets the inline script associated with the onmouseup event on the object.

v
VARIANT structure containing the script to set.

See also get_onmouseup

IHTMLDocument2::get_onmouseup

HRESULT get_onmouseup(
    VARIANT *p
);

Retrieves the inline script associated with the onmouseup event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onmouseup

IHTMLDocument2::put_onmousedown

HRESULT put_onmousedown(
    VARIANT v
);

Sets the inline script associated with the onmousedown event on the object.

v
VARIANT structure that contains the script to be set.

See also get_onmousedown

IHTMLDocument2::get_onmousedown

HRESULT get_onmousedown(
    VARIANT *p
);

Retrieves the inline script associated with the onmousedown event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onmousedown

IHTMLDocument2::put_onmousemove

HRESULT put_onmousemove(
    VARIANT v
);

Sets the inline script associated with the onmousemove event on the object.

v
VARIANT structure containing the script to set.

See also get_onmousemove

IHTMLDocument2::get_onmousemove

HRESULT get_onmousemove(
    VARIANT *p
);

Retrieves the inline script associated with the onmousemove event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onmousemove

IHTMLDocument2::put_onmouseout

HRESULT put_onmouseout(
    VARIANT v
);

Sets the inline script associated with the onmouseout event on the object.

v
VARIANT structure that contains the script to set.

See also get_onmouseout

IHTMLDocument2::get_onmouseout

HRESULT get_onmouseout(
    VARIANT *p
);

Retrieves the inline script associated with the onmouseout event on the object.

p
Address of a VARIANT structure to store the script.

See also put_onmouseout

IHTMLDocument2::put_onmouseover

HRESULT put_onmouseover(
    VARIANT v
);

Sets the inline script associated with the onmouseover event on the object.

v
VARIANT structure containing the script to set.

See also get_onmouseover

IHTMLDocument2::get_onmouseover

HRESULT get_onmouseover(
    VARIANT *p
);

Retrieves the inline script associated with the onmouseover event on the object.

p
Address of a VARIANT structure to store the data.

See also put_onmouseover

IHTMLDocument2::put_onreadystatechange

HRESULT put_onreadystatechange(
    VARIANT v
);

Sets the inline script associated with the onreadystatechange event on the object.

v
VARIANT structure that contains the script to set.

See also get_onreadystatechange

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.