Click to return to the Reusing Browser Technology home page    
IHTMLDocument2::get_desig...     IHTMLDocument2::get_embed...     IHTMLDocument2 Interface    
Web Workshop  |  Reusing Browser Technology

IHTMLDocument2::get_domain Method


Retrieves the security domain of the document.

Syntax

HRESULT get_domain(
    BSTR *p
);

Parameters

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

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

The domain property initially returns the host name 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.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

IHTMLDocument2::put_domain Method


Sets the security domain of the document.

Syntax

HRESULT put_domain(
    BSTR v
);

Parameters

v
String that specifies the security domain.

Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

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.

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.