From 760ed2701024aa42efa10b714288e642a8e10982 Mon Sep 17 00:00:00 2001 From: Daniel Reimer Date: Sun, 20 Apr 2008 15:38:34 +0000 Subject: [PATCH] Synced Winhelp Updated README.WINE - Added atl.dll, pdh.dll, rasapi32, rasdlg, stdole2.tlb, tapi32, usp10, winhttp All of these are from wine. I called them Out of sync now. Change the way you want. svn path=/trunk/; revision=33061 --- reactos/base/applications/winhelp/callback.c | 8 ++-- reactos/base/applications/winhelp/hlpfile.c | 26 +++++----- reactos/base/applications/winhelp/lex.yy.c | 2 +- reactos/base/applications/winhelp/macro.lex.l | 2 +- reactos/base/applications/winhelp/winhelp.c | 48 +++++++++---------- reactos/media/doc/README.WINE | 12 ++++- 6 files changed, 53 insertions(+), 45 deletions(-) diff --git a/reactos/base/applications/winhelp/callback.c b/reactos/base/applications/winhelp/callback.c index 510bd704864..4d56b0c46fc 100644 --- a/reactos/base/applications/winhelp/callback.c +++ b/reactos/base/applications/winhelp/callback.c @@ -127,16 +127,16 @@ static void CALLBACK WHD_ErrorString(LPSTR err) WINE_FIXME("()\n"); } -static LONG CALLBACK WHD_GetInfo(WORD what, HWND hnd) +static ULONG_PTR CALLBACK WHD_GetInfo(WORD what, HWND hnd) { - LONG ret = 0; + ULONG_PTR ret = 0; WINE_TRACE("(%x %p)\n", what, hnd); switch (what) { case 0: break; - case 1: /* instance */ ret = (LONG)Globals.hInstance; break; - case 3: /* current window */ ret = (LONG)Globals.active_win->hMainWnd; break; + case 1: /* instance */ ret = (ULONG_PTR)Globals.hInstance; break; + case 3: /* current window */ ret = (ULONG_PTR)Globals.active_win->hMainWnd; break; case 2: /* main window */ case 4: /* handle to opened file */ case 5: /* foreground color */ diff --git a/reactos/base/applications/winhelp/hlpfile.c b/reactos/base/applications/winhelp/hlpfile.c index ba4f6f09ce9..b82615ead58 100644 --- a/reactos/base/applications/winhelp/hlpfile.c +++ b/reactos/base/applications/winhelp/hlpfile.c @@ -158,11 +158,11 @@ HLPFILE_PAGE *HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset) static int comp_PageByHash(void *p, const void *key, int leaf, void** next) { - LONG lKey = (LONG)key; - LONG lTest = GET_UINT(p, 0); + LONG lKey = (LONG_PTR)key; + LONG lTest = (INT)GET_UINT(p, 0); *next = (char *)p+(leaf?8:6); - WINE_TRACE("Comparing '%u' with '%u'\n", lKey, lTest); + WINE_TRACE("Comparing '%d' with '%d'\n", lKey, lTest); if (lTest < lKey) return -1; if (lTest > lKey) return 1; return 0; @@ -184,7 +184,7 @@ HLPFILE_PAGE *HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash) if (hlpfile->version <= 16) return HLPFILE_PageByNumber(hlpfile, lHash); - ptr = HLPFILE_BPTreeSearch(hlpfile->Context, (void*)lHash, comp_PageByHash); + ptr = HLPFILE_BPTreeSearch(hlpfile->Context, LongToPtr(lHash), comp_PageByHash); if (!ptr) { WINE_ERR("Page of hash %x not found in file %s\n", lHash, hlpfile->lpszPath); @@ -587,7 +587,7 @@ static BYTE* HLPFILE_DecompressGfx(BYTE* src, unsigned csz, unsigned sz, BYTE if (!dst) return NULL; HLPFILE_UncompressRLE(src, src + csz, &tmp, sz); if (tmp - dst != sz) - WINE_WARN("Bogus gfx sizes (RunLen): %u/%u\n", tmp - dst, sz); + WINE_WARN("Bogus gfx sizes (RunLen): %lu/%u\n", (SIZE_T)(tmp - dst), sz); break; case 2: /* LZ77 */ sz77 = HLPFILE_UncompressedLZ77_Size(src, src + csz); @@ -610,7 +610,7 @@ static BYTE* HLPFILE_DecompressGfx(BYTE* src, unsigned csz, unsigned sz, BYTE } HLPFILE_UncompressRLE(tmp, tmp + sz77, &tmp2, sz); if (tmp2 - dst != sz) - WINE_WARN("Bogus gfx sizes (LZ77+RunLen): %u / %u\n", tmp2 - dst, sz); + WINE_WARN("Bogus gfx sizes (LZ77+RunLen): %lu / %u\n", (SIZE_T)(tmp2 - dst), sz); HeapFree(GetProcessHeap(), 0, tmp); break; default: @@ -729,8 +729,8 @@ static BOOL HLPFILE_LoadMetaFile(BYTE* beg, BYTE pack, HLPFILE_PARAGRAPH* pa hsoff = GET_UINT(ptr, 4); ptr += 8; - WINE_TRACE("sz=%lu csz=%lu (%d,%d) offs=%lu/%u,%lu\n", - size, csize, lpmfp->xExt, lpmfp->yExt, off, ptr - beg, hsoff); + WINE_TRACE("sz=%lu csz=%lu (%d,%d) offs=%lu/%lu,%lu\n", + size, csize, lpmfp->xExt, lpmfp->yExt, off, (SIZE_T)(ptr - beg), hsoff); bits = HLPFILE_DecompressGfx(beg + off, csize, size, pack); if (!bits) return FALSE; @@ -944,7 +944,7 @@ static BOOL HLPFILE_AddParagraph(HLPFILE *hlpfile, BYTE *buf, BYTE *end, unsigne for (nc = 0; nc < ncol; nc++) { - WINE_TRACE("looking for format at offset %u for column %d\n", format - (buf + 0x15), nc); + WINE_TRACE("looking for format at offset %lu for column %d\n", (SIZE_T)(format - (buf + 0x15)), nc); if (buf[0x14] == 0x23) format += 5; if (buf[0x14] == 0x01) @@ -1796,8 +1796,8 @@ static void HLPFILE_Uncompress2(const BYTE *ptr, const BYTE *end, BYTE *newptr, if (newptr + (phend - phptr) > newend) { - WINE_FIXME("buffer overflow %p > %p for %d bytes\n", - newptr, newend, phend - phptr); + WINE_FIXME("buffer overflow %p > %p for %lu bytes\n", + newptr, newend, (SIZE_T)(phend - phptr)); return; } memcpy(newptr, phptr, phend - phptr); @@ -1902,8 +1902,8 @@ static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE** dst, *dst += ch; } if (*dst != sdst) - WINE_WARN("Buffer X-flow: d(%u) instead of d(%u)\n", - *dst - (sdst - dstsz), dstsz); + WINE_WARN("Buffer X-flow: d(%lu) instead of d(%u)\n", + (SIZE_T)(*dst - (sdst - dstsz)), dstsz); } /************************************************************************** diff --git a/reactos/base/applications/winhelp/lex.yy.c b/reactos/base/applications/winhelp/lex.yy.c index 8f542332777..c96c7b7ba42 100644 --- a/reactos/base/applications/winhelp/lex.yy.c +++ b/reactos/base/applications/winhelp/lex.yy.c @@ -1721,7 +1721,7 @@ static int MACRO_CheckArgs(void* pa[], unsigned max, const char* args) case 'I': if (t != INTEGER) {WINE_WARN("missing U\n");return -1;} - pa[idx] = (void*)yylval.integer; + pa[idx] = LongToPtr(yylval.integer); break; case 'B': if (t != BOOL_FUNCTION) diff --git a/reactos/base/applications/winhelp/macro.lex.l b/reactos/base/applications/winhelp/macro.lex.l index b1b3b2a8615..3d16b38c19e 100644 --- a/reactos/base/applications/winhelp/macro.lex.l +++ b/reactos/base/applications/winhelp/macro.lex.l @@ -175,7 +175,7 @@ static int MACRO_CheckArgs(void* pa[], unsigned max, const char* args) case 'I': if (t != INTEGER) {WINE_WARN("missing U\n");return -1;} - pa[idx] = (void*)yylval.integer; + pa[idx] = LongToPtr(yylval.integer); break; case 'B': if (t != BOOL_FUNCTION) diff --git a/reactos/base/applications/winhelp/winhelp.c b/reactos/base/applications/winhelp/winhelp.c index c9bf8597a6b..72d3b3a3cfb 100644 --- a/reactos/base/applications/winhelp/winhelp.c +++ b/reactos/base/applications/winhelp/winhelp.c @@ -466,10 +466,10 @@ static BOOL WINHELP_ReuseWindow(WINHELP_WINDOW* win, WINHELP_WINDOW* oldwin, oldwin->hMainWnd = oldwin->hButtonBoxWnd = oldwin->hTextWnd = oldwin->hHistoryWnd = 0; win->hBrush = CreateSolidBrush(win->info->sr_color); - SetWindowLong(win->hMainWnd, 0, (LONG)win); - SetWindowLong(win->hButtonBoxWnd, 0, (LONG)win); - SetWindowLong(win->hTextWnd, 0, (LONG)win); - SetWindowLong(win->hHistoryWnd, 0, (LONG)win); + SetWindowLongPtr(win->hMainWnd, 0, (ULONG_PTR)win); + SetWindowLongPtr(win->hButtonBoxWnd, 0, (ULONG_PTR)win); + SetWindowLongPtr(win->hTextWnd, 0, (ULONG_PTR)win); + SetWindowLongPtr(win->hHistoryWnd, 0, (ULONG_PTR)win); WINHELP_InitFonts(win->hMainWnd); @@ -701,12 +701,12 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, { case WM_NCCREATE: win = (WINHELP_WINDOW*) ((LPCREATESTRUCT) lParam)->lpCreateParams; - SetWindowLong(hWnd, 0, (LONG) win); + SetWindowLongPtr(hWnd, 0, (ULONG_PTR) win); win->hMainWnd = hWnd; break; case WM_CREATE: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); /* Create button box and text Window */ CreateWindow(BUTTON_BOX_WIN_CLASS_NAME, "", WS_CHILD | WS_VISIBLE, @@ -718,7 +718,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, /* Fall through */ case WM_USER: case WM_WINDOWPOSCHANGED: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); GetClientRect(hWnd, &rect); /* Update button box and text Window */ @@ -738,7 +738,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, break; case WM_COMMAND: - Globals.active_win = win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + Globals.active_win = win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); switch (wParam) { /* Menu FILE */ @@ -790,7 +790,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, case VK_PRIOR: case VK_NEXT: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); curPos = GetScrollPos(win->hTextWnd, SB_VERT); GetScrollRange(win->hTextWnd, SB_VERT, &min, &max); @@ -841,13 +841,13 @@ static LRESULT CALLBACK WINHELP_ButtonBoxWndProc(HWND hWnd, UINT msg, WPARAM wPa { case WM_NCCREATE: win = (WINHELP_WINDOW*) ((LPCREATESTRUCT) lParam)->lpCreateParams; - SetWindowLong(hWnd, 0, (LONG) win); + SetWindowLongPtr(hWnd, 0, (ULONG_PTR) win); win->hButtonBoxWnd = hWnd; break; case WM_WINDOWPOSCHANGING: winpos = (WINDOWPOS*) lParam; - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); /* Update buttons */ button_size.cx = 0; @@ -958,7 +958,7 @@ static LRESULT CALLBACK WINHELP_TextWndProc(HWND hWnd, UINT msg, WPARAM wParam, { case WM_NCCREATE: win = (WINHELP_WINDOW*) ((LPCREATESTRUCT) lParam)->lpCreateParams; - SetWindowLong(hWnd, 0, (LONG) win); + SetWindowLongPtr(hWnd, 0, (ULONG_PTR) win); win->hTextWnd = hWnd; win->hBrush = CreateSolidBrush(win->info->sr_color); if (win->info->win_style & WS_POPUP) Globals.hPopupWnd = win->hMainWnd = hWnd; @@ -966,7 +966,7 @@ static LRESULT CALLBACK WINHELP_TextWndProc(HWND hWnd, UINT msg, WPARAM wParam, break; case WM_CREATE: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); /* Calculate vertical size and position of a popup window */ if (win->info->win_style & WS_POPUP) @@ -1090,7 +1090,7 @@ static LRESULT CALLBACK WINHELP_TextWndProc(HWND hWnd, UINT msg, WPARAM wParam, case WM_PAINT: hDc = BeginPaint(hWnd, &ps); - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); scroll_pos = GetScrollPos(hWnd, SB_VERT); /* No DPtoLP needed - MM_TEXT map mode */ @@ -1189,7 +1189,7 @@ static LRESULT CALLBACK WINHELP_TextWndProc(HWND hWnd, UINT msg, WPARAM wParam, break; case WM_MOUSEMOVE: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); if (WINHELP_IsOverLink(win, wParam, lParam)) SetCursor(win->hHandCur); /* set to hand pointer cursor to indicate a link */ @@ -1199,7 +1199,7 @@ static LRESULT CALLBACK WINHELP_TextWndProc(HWND hWnd, UINT msg, WPARAM wParam, break; case WM_LBUTTONDOWN: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); hPopupWnd = Globals.hPopupWnd; Globals.hPopupWnd = 0; @@ -1248,7 +1248,7 @@ static LRESULT CALLBACK WINHELP_TextWndProc(HWND hWnd, UINT msg, WPARAM wParam, break; case WM_NCDESTROY: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); if (hWnd == Globals.hPopupWnd) Globals.hPopupWnd = 0; @@ -1284,11 +1284,11 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara { case WM_NCCREATE: win = (WINHELP_WINDOW*)((LPCREATESTRUCT)lParam)->lpCreateParams; - SetWindowLong(hWnd, 0, (LONG)win); + SetWindowLongPtr(hWnd, 0, (ULONG_PTR)win); win->hHistoryWnd = hWnd; break; case WM_CREATE: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); hDc = GetDC(hWnd); GetTextMetrics(hDc, &tm); GetWindowRect(hWnd, &r); @@ -1303,7 +1303,7 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara ReleaseDC(hWnd, hDc); break; case WM_LBUTTONDOWN: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); hDc = GetDC(hWnd); GetTextMetrics(hDc, &tm); i = HIWORD(lParam) / tm.tmHeight; @@ -1313,7 +1313,7 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara break; case WM_PAINT: hDc = BeginPaint(hWnd, &ps); - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); GetTextMetrics(hDc, &tm); for (i = 0; i < win->histIndex; i++) @@ -1324,7 +1324,7 @@ static LRESULT CALLBACK WINHELP_HistoryWndProc(HWND hWnd, UINT msg, WPARAM wPara EndPaint(hWnd, &ps); break; case WM_DESTROY: - win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); if (hWnd == win->hHistoryWnd) win->hHistoryWnd = 0; break; @@ -1532,7 +1532,7 @@ static WINHELP_LINE_PART* WINHELP_AppendGfxObject(WINHELP_LINE ***linep, WINHELP */ static BOOL WINHELP_SplitLines(HWND hWnd, LPSIZE newsize) { - WINHELP_WINDOW *win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + WINHELP_WINDOW *win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); HLPFILE_PARAGRAPH *p; WINHELP_LINE **line = &win->first_line; WINHELP_LINE_PART **part = 0; @@ -1854,7 +1854,7 @@ static void WINHELP_DeleteWindow(WINHELP_WINDOW* win) */ static void WINHELP_InitFonts(HWND hWnd) { - WINHELP_WINDOW *win = (WINHELP_WINDOW*) GetWindowLong(hWnd, 0); + WINHELP_WINDOW *win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); LOGFONT logfontlist[] = { {-10, 0, 0, 0, 400, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 32, "Helv"}, {-12, 0, 0, 0, 700, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 32, "Helv"}, diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 78dcd063de0..8417b21d08d 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -31,6 +31,7 @@ reactos/tools/widl # Synced to Wine-0_9_55 The following libraries are shared with Wine. reactos/dll/win32/advpack # Autosync +reactos/dll/win32/atl # Out of sync reactos/dll/win32/avifil32 # Autosync reactos/dll/win32/browseui # Out of sync reactos/dll/win32/cabinet # Autosync @@ -43,13 +44,13 @@ reactos/dll/win32/crypt32 # Out of sync reactos/dll/win32/cryptdll # Autosync reactos/dll/win32/cryptnet # Autosync reactos/dll/win32/dbghelp # Synced to Wine-20080106 +reactos/dll/win32/gdiplus # Autosync reactos/dll/win32/hhctrl.ocx # Autosync reactos/dll/win32/hlink # Autosync reactos/dll/win32/icmp # Synced to Wine-0_9_10 reactos/dll/win32/imm32 # Autosync -reactos/dll/win32/iphlpapi # Out of sync reactos/dll/win32/imagehlp # Patches for BindImage need review and submission to winehq. -reactos/dll/win32/gdiplus # Autosync +reactos/dll/win32/iphlpapi # Out of sync reactos/dll/win32/lz32 # Autosync reactos/dll/win32/mapi32 # Autosync reactos/dll/win32/mlang # Autosync @@ -71,8 +72,11 @@ reactos/dll/win32/oleacc # Autosync reactos/dll/win32/oleaut32 # Autosync reactos/dll/win32/oledlg # Autosync reactos/dll/win32/olepro32 # Autosync +reactos/dll/win32/pdh # Out of sync reactos/dll/win32/powrprof # Autosync reactos/dll/win32/printui # Autosync +reactos/dll/win32/rasapi32 # Out of sync +reactos/dll/win32/rasdlg # Out of sync reactos/dll/win32/riched20 # Autosync reactos/dll/win32/riched32 # Autosync reactos/dll/win32/rpcrt4 # Synced to Wine-0_9_55 @@ -85,11 +89,15 @@ reactos/dll/win32/shell32 # Forked at Wine-20071011 reactos/dll/win32/shdocvw # Synced to Wine-0_9_5 reactos/dll/win32/shfolder # Autosync reactos/dll/win32/shlwapi # Autosync +reactos/dll/win32/stdole2.tlb # Out of Sync +reactos/dll/win32/tapi32 # Out of sync reactos/dll/win32/twain_32 # Out of sync reactos/dll/win32/urlmon # Autosync +reactos/dll/win32/usp10 # Out of sync reactos/dll/win32/uxtheme # Autosync reactos/dll/win32/version # Autosync reactos/dll/win32/wininet # Autosync +reactos/dll/win32/winhttp # Out of Sync reactos/dll/win32/wintrust # Out of sync reactos/dll/win32/winmm # Forked at Wine-20050628 reactos/dll/win32/winmm/midimap # Forked at Wine-20050628