INewWindowManager::EvaluateNewWindow method (shobjidl_core.h)

Accepts data about a new window that is attempting to display and determines whether that window should be allowed to open based on the user's preferences.

Syntax

HRESULT EvaluateNewWindow(
  [in] LPCWSTR pszUrl,
  [in] LPCWSTR pszName,
  [in] LPCWSTR pszUrlContext,
  [in] LPCWSTR pszFeatures,
  [in] BOOL    fReplace,
  [in] DWORD   dwFlags,
  [in] DWORD   dwUserActionTime
);

Parameters

[in] pszUrl

Type: LPCWSTR

A pointer to a buffer that contains the URL of the content that will be displayed in the new window.

[in] pszName

Type: LPCWSTR

A pointer to a buffer that contains the name of the new window. This parameter can be NULL.

[in] pszUrlContext

Type: LPCWSTR

A pointer to a buffer that contains the URL that has issued the command to open the new window.

[in] pszFeatures

Type: LPCWSTR

A pointer to a buffer that contains the feature string for the new window. This value can be NULL.

[in] fReplace

Type: BOOL

A boolean value used when the new content specified in pszUrl is loaded into the existing window instead of creating a new one. TRUE if the new document should replace the current document in the history list; FALSE if the new document should be given a new entry.

[in] dwFlags

Type: DWORD

A flag or flags from the NWMF enumeration that provide situational information about the call to open the new window. This value can be 0 if no flags are needed.

[in] dwUserActionTime

Type: DWORD

The tick count when the last user action occurred. To find out how long ago the action occurred, call GetTickCount and compare the result with the value in this parameter.

Return value

Type: HRESULT

Returns standard error codes, including the following:

Return code Description
S_OK
Allow display of the window.
S_FALSE
Block display of the window.
E_FAIL
When you implement INewWindowManager for a hosted WebBrowser control, this value instructs the WebBrowser control to use the default implementation.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll