223{
225 BINDINFO bindinfo;
233
235
238
241 return INET_E_USE_DEFAULT_PROTOCOLHANDLER;
242
243 memset(&bindinfo, 0,
sizeof(bindinfo));
244 bindinfo.cbSize = sizeof(BINDINFO);
245 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &
bindf, &bindinfo);
247 WARN(
"GetBindInfo failed: %08x\n",
hres);
249 }
250
252
258 WARN(
"UrlUnescape failed: %08x\n",
hres);
261 }
262
265 WARN(
"invalid url\n");
268 }
269
272 if(!chm_file) {
273 WARN(
"Could not open chm file\n");
276 }
277
280
281 if(*object_name != '/' && *object_name != '\\') {
283 *object_name = '/';
285 }
286
287 if(object_name[
len-1] ==
'/')
288 object_name[--
len] = 0;
289
290 for(
p=object_name; *
p;
p++) {
293 }
294
296
298
299 memset(&chm_object, 0,
sizeof(chm_object));
302 WARN(
"Could not resolve chm object\n");
306 }
307
308 IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST,
310
311
315 IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE,
mime);
317 }
318
320 This->chm_file = chm_file;
321 This->chm_object = chm_object;
322
323 hres = IInternetProtocolSink_ReportData(pOIProtSink,
324 BSCF_FIRSTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE,
325 chm_object.length, chm_object.length);
327 WARN(
"ReportData failed: %08x\n",
hres);
330 }
331
332 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA,
NULL);
333
335}
int chm_resolve_object(struct chmFile *h, const WCHAR *objPath, struct chmUnitInfo *ui)
struct chmFile * chm_openW(const WCHAR *filename)
void chm_close(struct chmFile *h)
#define CHM_RESOLVE_SUCCESS
static const WCHAR separator[]
static HRESULT report_result(MimeHtmlProtocol *protocol, HRESULT result)
static void remove_dot_segments(WCHAR *path)
static LPCWSTR skip_schema(LPCWSTR url)
HRESULT WINAPI UrlUnescapeW(LPWSTR pszUrl, LPWSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer, DWORD cbSize, LPCWSTR pwzMimeProposed, DWORD dwMimeFlags, LPWSTR *ppwzMimeOut, DWORD dwReserved)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define URL_UNESCAPE_INPLACE
void WINAPI ReleaseBindInfo(BINDINFO *pbindinfo)
#define STG_E_FILENOTFOUND