urlmon: Store file size in FileProtocol object.

This commit is contained in:
Jacek Caban 2010-09-02 00:24:19 +02:00 committed by Alexandre Julliard
parent d442442e3e
commit c320a06e15
1 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,7 @@ typedef struct {
const IInternetPriorityVtbl *lpInternetPriorityVtbl; const IInternetPriorityVtbl *lpInternetPriorityVtbl;
HANDLE file; HANDLE file;
ULONG size;
LONG priority; LONG priority;
LONG ref; LONG ref;
@ -184,10 +185,12 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
heap_free(url); heap_free(url);
if(GetFileSizeEx(This->file, &size)) if(GetFileSizeEx(This->file, &size)) {
This->size = size.u.LowPart;
IInternetProtocolSink_ReportData(pOIProtSink, IInternetProtocolSink_ReportData(pOIProtSink,
BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION, BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION,
size.u.LowPart, size.u.LowPart); This->size, This->size);
}
if(first_call) if(first_call)
IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL); IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL);