Commit de6f347b authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

hhctrl.ocx: Enable compilation with long types.

parent 551f97c7
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = hhctrl.ocx MODULE = hhctrl.ocx
IMPORTLIB = htmlhelp IMPORTLIB = htmlhelp
IMPORTS = uuid advapi32 comctl32 shlwapi ole32 oleaut32 user32 gdi32 IMPORTS = uuid advapi32 comctl32 shlwapi ole32 oleaut32 user32 gdi32
......
...@@ -55,7 +55,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset) ...@@ -55,7 +55,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset)
pos.QuadPart = offset & ~BLOCK_MASK; pos.QuadPart = offset & ~BLOCK_MASK;
hres = IStream_Seek(chm->strings_stream, pos, STREAM_SEEK_SET, NULL); hres = IStream_Seek(chm->strings_stream, pos, STREAM_SEEK_SET, NULL);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Seek failed: %08x\n", hres); WARN("Seek failed: %08lx\n", hres);
return NULL; return NULL;
} }
...@@ -64,7 +64,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset) ...@@ -64,7 +64,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset)
hres = IStream_Read(chm->strings_stream, chm->strings[offset >> BLOCK_BITS], hres = IStream_Read(chm->strings_stream, chm->strings[offset >> BLOCK_BITS],
BLOCK_SIZE, &read); BLOCK_SIZE, &read);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Read failed: %08x\n", hres); WARN("Read failed: %08lx\n", hres);
heap_free(chm->strings[offset >> BLOCK_BITS]); heap_free(chm->strings[offset >> BLOCK_BITS]);
chm->strings[offset >> BLOCK_BITS] = NULL; chm->strings[offset >> BLOCK_BITS] = NULL;
return NULL; return NULL;
...@@ -72,7 +72,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset) ...@@ -72,7 +72,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset)
} }
str = chm->strings[offset >> BLOCK_BITS] + (offset & BLOCK_MASK); str = chm->strings[offset >> BLOCK_BITS] + (offset & BLOCK_MASK);
TRACE("offset %#x => %s\n", offset, debugstr_a(str)); TRACE("offset %#lx => %s\n", offset, debugstr_a(str));
return str; return str;
} }
...@@ -92,12 +92,12 @@ static BOOL ReadChmSystem(CHMInfo *chm) ...@@ -92,12 +92,12 @@ static BOOL ReadChmSystem(CHMInfo *chm)
hres = IStorage_OpenStream(chm->pStorage, wszSYSTEM, NULL, STGM_READ, 0, &stream); hres = IStorage_OpenStream(chm->pStorage, wszSYSTEM, NULL, STGM_READ, 0, &stream);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Could not open #SYSTEM stream: %08x\n", hres); WARN("Could not open #SYSTEM stream: %08lx\n", hres);
return FALSE; return FALSE;
} }
IStream_Read(stream, &ver, sizeof(ver), &read); IStream_Read(stream, &ver, sizeof(ver), &read);
TRACE("version is %x\n", ver); TRACE("version is %lx\n", ver);
buf = heap_alloc(8*sizeof(DWORD)); buf = heap_alloc(8*sizeof(DWORD));
buf_size = 8*sizeof(DWORD); buf_size = 8*sizeof(DWORD);
...@@ -132,7 +132,7 @@ static BOOL ReadChmSystem(CHMInfo *chm) ...@@ -132,7 +132,7 @@ static BOOL ReadChmSystem(CHMInfo *chm)
break; break;
case 0x4: case 0x4:
/* TODO: Currently only the Locale ID is loaded from this field */ /* TODO: Currently only the Locale ID is loaded from this field */
TRACE("Locale is: %d\n", *(LCID*)&buf[0]); TRACE("Locale is: %ld\n", *(LCID*)&buf[0]);
if(!GetLocaleInfoW(*(LCID*)&buf[0], LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER, if(!GetLocaleInfoW(*(LCID*)&buf[0], LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER,
(WCHAR *)&chm->codePage, sizeof(chm->codePage)/sizeof(WCHAR))) (WCHAR *)&chm->codePage, sizeof(chm->codePage)/sizeof(WCHAR)))
chm->codePage = CP_ACP; chm->codePage = CP_ACP;
...@@ -150,13 +150,13 @@ static BOOL ReadChmSystem(CHMInfo *chm) ...@@ -150,13 +150,13 @@ static BOOL ReadChmSystem(CHMInfo *chm)
TRACE("Version is %s\n", debugstr_an(buf, entry.len)); TRACE("Version is %s\n", debugstr_an(buf, entry.len));
break; break;
case 0xa: case 0xa:
TRACE("Time is %08x\n", *(DWORD*)buf); TRACE("Time is %08lx\n", *(DWORD*)buf);
break; break;
case 0xc: case 0xc:
TRACE("Number of info types: %d\n", *(DWORD*)buf); TRACE("Number of info types: %ld\n", *(DWORD*)buf);
break; break;
case 0xf: case 0xf:
TRACE("Check sum: %x\n", *(DWORD*)buf); TRACE("Check sum: %lx\n", *(DWORD*)buf);
break; break;
default: default:
TRACE("unhandled code %x, size %x\n", entry.code, entry.len); TRACE("unhandled code %x, size %x\n", entry.code, entry.len);
...@@ -181,13 +181,13 @@ LPWSTR FindContextAlias(CHMInfo *chm, DWORD index) ...@@ -181,13 +181,13 @@ LPWSTR FindContextAlias(CHMInfo *chm, DWORD index)
hres = IStorage_OpenStream(chm->pStorage, wszIVB, NULL, STGM_READ, 0, &ivb_stream); hres = IStorage_OpenStream(chm->pStorage, wszIVB, NULL, STGM_READ, 0, &ivb_stream);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Could not open #IVB stream: %08x\n", hres); WARN("Could not open #IVB stream: %08lx\n", hres);
return NULL; return NULL;
} }
hres = IStream_Read(ivb_stream, &size, sizeof(size), &read); hres = IStream_Read(ivb_stream, &size, sizeof(size), &read);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Read failed: %08x\n", hres); WARN("Read failed: %08lx\n", hres);
IStream_Release(ivb_stream); IStream_Release(ivb_stream);
return NULL; return NULL;
} }
...@@ -196,7 +196,7 @@ LPWSTR FindContextAlias(CHMInfo *chm, DWORD index) ...@@ -196,7 +196,7 @@ LPWSTR FindContextAlias(CHMInfo *chm, DWORD index)
hres = IStream_Read(ivb_stream, buf, size, &read); hres = IStream_Read(ivb_stream, buf, size, &read);
IStream_Release(ivb_stream); IStream_Release(ivb_stream);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Read failed: %08x\n", hres); WARN("Read failed: %08lx\n", hres);
heap_free(buf); heap_free(buf);
return NULL; return NULL;
} }
...@@ -261,7 +261,7 @@ void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info, BOOL override) ...@@ -261,7 +261,7 @@ void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info, BOOL override)
DWORD merge = override ? src->fsValidMembers : src->fsValidMembers & ~dst->fsValidMembers; DWORD merge = override ? src->fsValidMembers : src->fsValidMembers & ~dst->fsValidMembers;
if (unhandled_params) if (unhandled_params)
FIXME("Unsupported fsValidMembers fields: 0x%x\n", unhandled_params); FIXME("Unsupported fsValidMembers fields: 0x%lx\n", unhandled_params);
dst->fsValidMembers |= merge; dst->fsValidMembers |= merge;
if (dst->cbStruct == 0) if (dst->cbStruct == 0)
...@@ -543,7 +543,7 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file) ...@@ -543,7 +543,7 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file)
chm_file->chm_file ? chm_file->chm_file : parent_chm, NULL, chm_file->chm_file ? chm_file->chm_file : parent_chm, NULL,
STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &storage); STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &storage);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Could not open storage: %08x\n", hres); WARN("Could not open storage: %08lx\n", hres);
return NULL; return NULL;
} }
}else { }else {
...@@ -554,7 +554,7 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file) ...@@ -554,7 +554,7 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file)
hres = IStorage_OpenStream(storage, chm_file->chm_index, NULL, STGM_READ, 0, &stream); hres = IStorage_OpenStream(storage, chm_file->chm_index, NULL, STGM_READ, 0, &stream);
IStorage_Release(storage); IStorage_Release(storage);
if(FAILED(hres)) if(FAILED(hres))
WARN("Could not open stream: %08x\n", hres); WARN("Could not open stream: %08lx\n", hres);
return stream; return stream;
} }
...@@ -583,7 +583,7 @@ WCHAR *GetDocumentTitle(CHMInfo *info, LPCWSTR document) ...@@ -583,7 +583,7 @@ WCHAR *GetDocumentTitle(CHMInfo *info, LPCWSTR document)
hres = IStorage_OpenStream(storage, document, NULL, STGM_READ, 0, &str); hres = IStorage_OpenStream(storage, document, NULL, STGM_READ, 0, &str);
IStorage_Release(storage); IStorage_Release(storage);
if(FAILED(hres)) if(FAILED(hres))
WARN("Could not open stream: %08x\n", hres); WARN("Could not open stream: %08lx\n", hres);
stream_init(&stream, str); stream_init(&stream, str);
strbuf_init(&node); strbuf_init(&node);
...@@ -635,20 +635,20 @@ CHMInfo *OpenCHM(LPCWSTR szFile) ...@@ -635,20 +635,20 @@ CHMInfo *OpenCHM(LPCWSTR szFile)
hres = CoCreateInstance(&CLSID_ITStorage, NULL, CLSCTX_INPROC_SERVER, hres = CoCreateInstance(&CLSID_ITStorage, NULL, CLSCTX_INPROC_SERVER,
&IID_IITStorage, (void **) &ret->pITStorage) ; &IID_IITStorage, (void **) &ret->pITStorage) ;
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Could not create ITStorage: %08x\n", hres); WARN("Could not create ITStorage: %08lx\n", hres);
return CloseCHM(ret); return CloseCHM(ret);
} }
hres = IITStorage_StgOpenStorage(ret->pITStorage, szFile, NULL, hres = IITStorage_StgOpenStorage(ret->pITStorage, szFile, NULL,
STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &ret->pStorage); STGM_READ | STGM_SHARE_DENY_WRITE, NULL, 0, &ret->pStorage);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Could not open storage: %08x\n", hres); WARN("Could not open storage: %08lx\n", hres);
return CloseCHM(ret); return CloseCHM(ret);
} }
hres = IStorage_OpenStream(ret->pStorage, wszSTRINGS, NULL, STGM_READ, 0, hres = IStorage_OpenStream(ret->pStorage, wszSTRINGS, NULL, STGM_READ, 0,
&ret->strings_stream); &ret->strings_stream);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("Could not open #STRINGS stream: %08x\n", hres); WARN("Could not open #STRINGS stream: %08lx\n", hres);
/* It's not critical, so we pass */ /* It's not critical, so we pass */
} }
......
...@@ -201,7 +201,7 @@ static HRESULT navigate_url(HHInfo *info, LPCWSTR surl) ...@@ -201,7 +201,7 @@ static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
VariantClear(&url); VariantClear(&url);
if(FAILED(hres)) if(FAILED(hres))
TRACE("Navigation failed: %08x\n", hres); TRACE("Navigation failed: %08lx\n", hres);
return hres; return hres;
} }
...@@ -242,7 +242,7 @@ static BOOL AppendFullPathURL(LPCWSTR file, LPWSTR buf, LPCWSTR index) ...@@ -242,7 +242,7 @@ static BOOL AppendFullPathURL(LPCWSTR file, LPWSTR buf, LPCWSTR index)
TRACE("%s %p %s\n", debugstr_w(file), buf, debugstr_w(index)); TRACE("%s %p %s\n", debugstr_w(file), buf, debugstr_w(index));
if (!GetFullPathNameW(file, ARRAY_SIZE(full_path), full_path, NULL)) { if (!GetFullPathNameW(file, ARRAY_SIZE(full_path), full_path, NULL)) {
WARN("GetFullPathName failed: %u\n", GetLastError()); WARN("GetFullPathName failed: %lu\n", GetLastError());
return FALSE; return FALSE;
} }
...@@ -272,7 +272,7 @@ static void DoSync(HHInfo *info) ...@@ -272,7 +272,7 @@ static void DoSync(HHInfo *info)
if (FAILED(hres)) if (FAILED(hres))
{ {
WARN("get_LocationURL failed: %08x\n", hres); WARN("get_LocationURL failed: %08lx\n", hres);
return; return;
} }
...@@ -954,7 +954,7 @@ static void TB_AddButtonsFromFlags(HHInfo *pHHInfo, TBBUTTON *pButtons, DWORD dw ...@@ -954,7 +954,7 @@ static void TB_AddButtonsFromFlags(HHInfo *pHHInfo, TBBUTTON *pButtons, DWORD dw
HHWIN_BUTTON_FAVORITES | HHWIN_BUTTON_JUMP1 | HHWIN_BUTTON_JUMP2 | HHWIN_BUTTON_FAVORITES | HHWIN_BUTTON_JUMP1 | HHWIN_BUTTON_JUMP2 |
HHWIN_BUTTON_ZOOM | HHWIN_BUTTON_TOC_NEXT | HHWIN_BUTTON_TOC_PREV); HHWIN_BUTTON_ZOOM | HHWIN_BUTTON_TOC_NEXT | HHWIN_BUTTON_TOC_PREV);
if (unsupported) if (unsupported)
FIXME("got asked for unsupported buttons: %06x\n", unsupported); FIXME("got asked for unsupported buttons: %06lx\n", unsupported);
if (dwButtonFlags & HHWIN_BUTTON_EXPAND) if (dwButtonFlags & HHWIN_BUTTON_EXPAND)
{ {
......
...@@ -44,7 +44,7 @@ BOOL hh_process = FALSE; ...@@ -44,7 +44,7 @@ BOOL hh_process = FALSE;
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID lpvReserved)
{ {
TRACE("(%p,%d,%p)\n", hInstance, fdwReason, lpvReserved); TRACE("(%p,%ld,%p)\n", hInstance, fdwReason, lpvReserved);
switch (fdwReason) switch (fdwReason)
{ {
...@@ -158,7 +158,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat ...@@ -158,7 +158,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
{ {
WCHAR fullname[MAX_PATH]; WCHAR fullname[MAX_PATH];
TRACE("(%p, %s, command=%s, data=%lx)\n", TRACE("(%p, %s, command=%s, data=%Ix)\n",
caller, debugstr_w( filename ), caller, debugstr_w( filename ),
command_to_string( command ), data); command_to_string( command ), data);
...@@ -345,7 +345,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat ...@@ -345,7 +345,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
else else
heap_free(window); heap_free(window);
TRACE("Changing WINTYPE, fsValidMembers=0x%x\n", wintype->fsValidMembers); TRACE("Changing WINTYPE, fsValidMembers=0x%lx\n", wintype->fsValidMembers);
MergeChmProperties(wintype, info, TRUE); MergeChmProperties(wintype, info, TRUE);
UpdateHelpWindow(info); UpdateHelpWindow(info);
......
...@@ -83,7 +83,7 @@ static WCHAR *SearchCHM_File(IStorage *pStorage, const WCHAR *file, const char * ...@@ -83,7 +83,7 @@ static WCHAR *SearchCHM_File(IStorage *pStorage, const WCHAR *file, const char *
hres = IStorage_OpenStream(pStorage, file, NULL, STGM_READ, 0, &temp_stream); hres = IStorage_OpenStream(pStorage, file, NULL, STGM_READ, 0, &temp_stream);
if(FAILED(hres)) { if(FAILED(hres)) {
FIXME("Could not open '%s' stream: %08x\n", debugstr_w(file), hres); FIXME("Could not open '%s' stream: %08lx\n", debugstr_w(file), hres);
goto cleanup; goto cleanup;
} }
...@@ -162,7 +162,7 @@ static SearchItem *SearchCHM_Storage(SearchItem *item, IStorage *pStorage, ...@@ -162,7 +162,7 @@ static SearchItem *SearchCHM_Storage(SearchItem *item, IStorage *pStorage,
hres = IStorage_EnumElements(pStorage, 0, NULL, 0, &elem); hres = IStorage_EnumElements(pStorage, 0, NULL, 0, &elem);
if(hres != S_OK) if(hres != S_OK)
{ {
FIXME("Could not enumerate '/' storage elements: %08x\n", hres); FIXME("Could not enumerate '/' storage elements: %08lx\n", hres);
return NULL; return NULL;
} }
while (IEnumSTATSTG_Next(elem, 1, &entries, &retr) == NOERROR) while (IEnumSTATSTG_Next(elem, 1, &entries, &retr) == NOERROR)
...@@ -206,7 +206,7 @@ static SearchItem *SearchCHM_Folder(SearchItem *item, IStorage *pStorage, ...@@ -206,7 +206,7 @@ static SearchItem *SearchCHM_Folder(SearchItem *item, IStorage *pStorage,
hres = IStorage_OpenStorage(pStorage, folder, NULL, STGM_READ, NULL, 0, &temp_storage); hres = IStorage_OpenStorage(pStorage, folder, NULL, STGM_READ, NULL, 0, &temp_storage);
if(FAILED(hres)) if(FAILED(hres))
{ {
FIXME("Could not open '%s' storage object: %08x\n", debugstr_w(folder), hres); FIXME("Could not open '%s' storage object: %08lx\n", debugstr_w(folder), hres);
return NULL; return NULL;
} }
item = SearchCHM_Storage(item, temp_storage, needle); item = SearchCHM_Storage(item, temp_storage, needle);
......
...@@ -64,7 +64,7 @@ static ULONG STDMETHODCALLTYPE Site_AddRef(IOleClientSite *iface) ...@@ -64,7 +64,7 @@ static ULONG STDMETHODCALLTYPE Site_AddRef(IOleClientSite *iface)
WebBrowserContainer *This = impl_from_IOleClientSite(iface); WebBrowserContainer *This = impl_from_IOleClientSite(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
return ref; return ref;
} }
...@@ -74,7 +74,7 @@ static ULONG STDMETHODCALLTYPE Site_Release(IOleClientSite *iface) ...@@ -74,7 +74,7 @@ static ULONG STDMETHODCALLTYPE Site_Release(IOleClientSite *iface)
WebBrowserContainer *This = impl_from_IOleClientSite(iface); WebBrowserContainer *This = impl_from_IOleClientSite(iface);
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) { if(!ref) {
if(This->ole_obj) if(This->ole_obj)
...@@ -164,7 +164,7 @@ static HRESULT STDMETHODCALLTYPE UI_ShowContextMenu(IDocHostUIHandler *iface, DW ...@@ -164,7 +164,7 @@ static HRESULT STDMETHODCALLTYPE UI_ShowContextMenu(IDocHostUIHandler *iface, DW
DWORD cmdid, menu_id = 0; DWORD cmdid, menu_id = 0;
HMENU menu, submenu; HMENU menu, submenu;
TRACE("(%p)->(%d %s)\n", This, dwID, wine_dbgstr_point(ppt)); TRACE("(%p)->(%ld %s)\n", This, dwID, wine_dbgstr_point(ppt));
menu = LoadMenuW(hhctrl_hinstance, MAKEINTRESOURCEW(MENU_WEBBROWSER)); menu = LoadMenuW(hhctrl_hinstance, MAKEINTRESOURCEW(MENU_WEBBROWSER));
if (!menu) if (!menu)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment