IBindStatusCallbackEx::GetBindInfoEx method
Provides information about how the bind operation is handled when called by an asynchronous moniker.
Syntax
HRESULT GetBindInfoEx(
[out] DWORD *grfBINDF,
[in, out] BINDINFO *pbindinfo,
[out] DWORD *grfBINDF2,
[out] DWORD *pdwReserved
);
Parameters
grfBINDF [out]
A bitwise combination of BINDF enumeration values that indicates how the bind process is handled.pbindinfo [in, out]
A BINDINFO structure that describes the binding requirements of the client application.grfBINDF2 [out]
A BINDF2 enumeration value that specifies additional information for the bind.pdwReserved [out]
Reserved. Must be set to NULL.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This method exists because the grfBINDF parameter in GetBindInfo can contain no additional flags. This method inherits all behaviors of GetBindInfo and adds some of its own. Therefore, the Remarks section of GetBindInfo applies to this method in full.
Relative to the GetBindInfo method, the IBindStatusCallbackEx::GetBindInfoEx method provides the additional parameters grfBINDF2 and pdwReserved. The data in grfBINDF2 is an extension of the data in the grfBINDF parameter.
Examples
Internet Explorer 8 and later can download files greater than 4 GB in size by using a new BINDF2 flag for that purpose. The following code example shows how this can be done.
IBindStatusCallbackEx* pBSCB = NULL;
MyBindCallbackEx::CreateInstance(&pBSCB); // MyBindCallbackEx is IBindStatusCallbackEx.
IMoniker* pMoniker = NULL;
CreateURLMonikerEx(NULL, wszFileUrlPath, &pMoniker, URL_MK_UNIFORM);
IBindCtx* pBindCtx = NULL;
CreateAsyncBindCtx(0, pBSCB, NULL, &pBindCtx);
IStorage* pStorage = NULL;
pMoniker->BindToStorage(pBindCtx, NULL, IID_IStorage, (void**)&pStorage);
// MyBindCallbackEx class implementation
STDMETHODIMP MyBindCallbackEx::GetBindInfoEx (DWORD *pgrfBINDF,
BINDINFO* pbindinfo,
DWORD* pgrfBINDF2,
DWORD* pdwReserved)
{
*pgrfBINDF2 = BINDF2_READ_DATA_GREATER_THAN_4GB; // Enable 4 GB download flag.
hr = GetBindInfo(pgrfBINDF, pbindinfo);
}
Requirements
Minimum supported client |
Windows XP with SP2 |
Minimum supported server |
Windows Server 2003 |
Product |
Internet Explorer 8 |
Header |
Urlmon.h |
IDL |
Urlmon.idl |
DLL |
Urlmon.dll |
See also
Reference