From d9484f92e9b81e0c6d6a3aeca7927da368c32d8c Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Thu, 30 Aug 2007 13:34:15 +0200 Subject: [PATCH] push 83f6eeab4f78cf34cba36fe6c2150f9c23ec0aba --- dlls/cards/cards.c | 2 +- dlls/comctl32/tests/monthcal.c | 2 +- dlls/comctl32/tests/toolbar.c | 2 +- dlls/d3d9/tests/visual.c | 2 +- dlls/dpnet/regsvr.c | 79 +++---------------------- dlls/dpnhpast/main.c | 2 +- dlls/dsound/primary.c | 4 +- dlls/gdi32/clipping.c | 1 - dlls/gdi32/dc.c | 1 - dlls/gdiplus/graphics.c | 2 +- dlls/gdiplus/image.c | 2 - dlls/gdiplus/tests/graphics.c | 4 +- dlls/gdiplus/tests/image.c | 2 +- dlls/gphoto2.ds/ui.c | 2 +- dlls/kernel32/actctx.c | 2 +- dlls/kernel32/relay16.c | 2 +- dlls/kernel32/tests/debugger.c | 101 +++++++++++++++++++++++++------- dlls/msvcrt/mbcs.c | 2 +- dlls/msxml3/tests/domdoc.c | 4 +- dlls/ntdll/cdrom.c | 46 ++++++++------- dlls/oleaut32/oleaut.c | 2 +- dlls/olepro32/olepro32stubs.c | 4 +- dlls/quartz/main.c | 2 +- dlls/secur32/Makefile.in | 1 + dlls/secur32/lsa.c | 100 +++++++++++++++++++++++++++++++ dlls/secur32/ntlm.c | 3 + dlls/secur32/secur32.c | 23 -------- dlls/secur32/secur32.spec | 10 ++-- dlls/setupapi/setupx_main.c | 1 - dlls/setupapi/stubs.c | 4 +- dlls/setupapi/tests/parser.c | 2 +- dlls/shdocvw/navigate.c | 8 +-- dlls/shdocvw/shdocvw.h | 2 +- dlls/shell32/shell.c | 1 - dlls/shell32/tests/systray.c | 2 +- dlls/shlwapi/thread.c | 2 +- dlls/user32/message.c | 32 +++------- dlls/user32/static.c | 38 ++++++++++++ dlls/user32/tests/Makefile.in | 1 + dlls/user32/tests/class.c | 2 +- dlls/user32/tests/static.c | 130 +++++++++++++++++++++++++++++++++++++++++ dlls/uxtheme/system.c | 2 +- dlls/version/resource.c | 1 - dlls/wined3d/directx.c | 2 +- dlls/wined3d/drawprim.c | 117 ++++++++++++++++++++++++++++--------- dlls/wined3d/state.c | 18 +++++- dlls/wined3d/surface.c | 51 ++++++++++++++-- dlls/winedos/vga.c | 2 +- dlls/winedos/vxd.c | 1 - dlls/wineps.drv/escape.c | 1 - dlls/wineps.drv/mkagl.c | 6 +- dlls/winex11.drv/window.c | 1 + dlls/winspool.drv/info.c | 2 +- include/gdiplusflat.h | 67 ++++++++++++++++----- include/gdiplusgpstubs.h | 2 +- include/gdiplusimaging.h | 25 +++++++- include/gdiplustypes.h | 1 + include/ntsecapi.h | 15 +++++ include/setupapi.h | 5 ++ include/wine/server_protocol.h | 8 ++- include/wine/wined3d_types.h | 7 +++ programs/taskmgr/De.rc | 2 +- programs/taskmgr/En.rc | 2 +- programs/taskmgr/Ja.rc | 2 +- programs/taskmgr/Ko.rc | 2 +- programs/taskmgr/Nl.rc | 2 +- programs/taskmgr/No.rc | 2 +- programs/taskmgr/Pl.rc | 2 +- programs/taskmgr/Tr.rc | 2 +- programs/taskmgr/graphctl.c | 4 +- programs/winefile/Ru.rc | 2 +- server/protocol.def | 6 +- server/queue.c | 8 ++- server/trace.c | 8 ++- tools/widl/typelib.c | 7 ++- tools/widl/widl.c | 6 +- tools/winapi/msvcmaker | 2 +- tools/wmc/wmc.c | 4 +- tools/wmc/write.c | 2 +- tools/wrc/wrc.c | 4 +- 80 files changed, 741 insertions(+), 296 deletions(-) create mode 100644 dlls/secur32/lsa.c create mode 100644 dlls/user32/tests/static.c diff --git a/dlls/cards/cards.c b/dlls/cards/cards.c index 5baf47a61e7..6a5a95f9a46 100644 --- a/dlls/cards/cards.c +++ b/dlls/cards/cards.c @@ -269,7 +269,7 @@ BOOL WINAPI cdtAnimate(HDC hdc, int cardback, int x, int y, int frame) /*********************************************************************** * Frees resources reserved by cdtInitialize. */ -void WINAPI cdtTerm() +void WINAPI cdtTerm(void) { int i; diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c index 2972aa798be..4f29ac9eb8e 100644 --- a/dlls/comctl32/tests/monthcal.c +++ b/dlls/comctl32/tests/monthcal.c @@ -395,7 +395,7 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP return ret; } -static BOOL register_parent_wnd_class() +static BOOL register_parent_wnd_class(void) { WNDCLASSA cls; diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index 5e619ee3e6a..77d721b47df 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -948,7 +948,7 @@ static void test_getbuttoninfo(void) DestroyWindow(hToolbar); } -static void test_createtoolbarex() +static void test_createtoolbarex(void) { HWND hToolbar; TBBUTTON btns[3]; diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index a2744e5d5ab..2c15d1c1c3a 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -1566,7 +1566,7 @@ static void release_buffer_test(IDirect3DDevice9 *device) }; short indices[] = {3, 4, 5}; - /* Index and vertex buffers should always be createable */ + /* Index and vertex buffers should always be creatable */ hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad), 0, D3DFVF_XYZ | D3DFVF_DIFFUSE, D3DPOOL_MANAGED, &vb, NULL); ok(hr == D3D_OK, "CreateVertexBuffer failed with %s\n", DXGetErrorString9(hr)); diff --git a/dlls/dpnet/regsvr.c b/dlls/dpnet/regsvr.c index 802faad02cf..12b52f82e68 100644 --- a/dlls/dpnet/regsvr.c +++ b/dlls/dpnet/regsvr.c @@ -117,9 +117,6 @@ static LONG register_key_defvalueA(HKEY base, WCHAR const *name, static LONG register_progid(WCHAR const *clsid, char const *progid, char const *curver_progid, char const *name, char const *extra); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); /*********************************************************************** * register_interfaces @@ -208,7 +205,8 @@ static HRESULT unregister_interfaces(struct regsvr_interface const *list) WCHAR buf[39]; StringFromGUID2(list->iid, buf, 39); - res = recursive_delete_keyW(interface_key, buf); + res = RegDeleteTreeW(interface_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; } RegCloseKey(interface_key); @@ -315,16 +313,19 @@ static HRESULT unregister_coclasses(struct regsvr_coclass const *list) WCHAR buf[39]; StringFromGUID2(list->clsid, buf, 39); - res = recursive_delete_keyW(coclass_key, buf); + res = RegDeleteTreeW(coclass_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; if (list->progid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } if (list->viprogid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } } @@ -437,70 +438,6 @@ error_close_progid_key: } /*********************************************************************** - * recursive_delete_key - */ -static LONG recursive_delete_key(HKEY key) -{ - LONG res; - WCHAR subkey_name[MAX_PATH]; - DWORD cName; - HKEY subkey; - - for (;;) { - cName = sizeof(subkey_name) / sizeof(WCHAR); - res = RegEnumKeyExW(key, 0, subkey_name, &cName, - NULL, NULL, NULL, NULL); - if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { - res = ERROR_SUCCESS; /* presumably we're done enumerating */ - break; - } - res = RegOpenKeyExW(key, subkey_name, 0, - KEY_READ | KEY_WRITE, &subkey); - if (res == ERROR_FILE_NOT_FOUND) continue; - if (res != ERROR_SUCCESS) break; - - res = recursive_delete_key(subkey); - RegCloseKey(subkey); - if (res != ERROR_SUCCESS) break; - } - - if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0); - return res; -} - -/*********************************************************************** - * recursive_delete_keyA - */ -static LONG recursive_delete_keyA(HKEY base, char const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * recursive_delete_keyW - */ -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** * coclass list */ static struct regsvr_coclass const coclass_list[] = { diff --git a/dlls/dpnhpast/main.c b/dlls/dpnhpast/main.c index c7eba7f6255..6ec2e6f621d 100644 --- a/dlls/dpnhpast/main.c +++ b/dlls/dpnhpast/main.c @@ -56,7 +56,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) * */ #if 0 -HRESULT WINAPI DPNHPAST_DirectPlayNATHelpCreate() +HRESULT WINAPI DPNHPAST_DirectPlayNATHelpCreate(void) { /* @stub in .spec */ } diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index c3b9d91b874..4c9e12500a5 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -456,9 +456,9 @@ HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex, } if (err == S_FALSE) { - /* ALSA specific: S_FALSE tells that recreation was succesful, + /* ALSA specific: S_FALSE tells that recreation was successful, * but size and location may be changed, and buffer has to be restarted - * I put it here, so if frequency doesn't match error will be changed to DSERR_BUFFERLOST + * I put it here, so if frequency doesn't match the error will be changed to DSERR_BUFFERLOST * and the entire re-initialization will occur anyway */ IDsDriverBuffer_Lock(device->hwbuf, (LPVOID *)&device->buffer, &device->buflen, NULL, NULL, 0, 0, DSBLOCK_ENTIREBUFFER); diff --git a/dlls/gdi32/clipping.c b/dlls/gdi32/clipping.c index 9764d9e2c57..b33543dd1a8 100644 --- a/dlls/gdi32/clipping.c +++ b/dlls/gdi32/clipping.c @@ -24,7 +24,6 @@ #include "winbase.h" #include "wingdi.h" #include "wownt32.h" -#include "wine/winuser16.h" #include "gdi_private.h" #include "wine/debug.h" diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index a3689eb406a..222da2da26c 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -30,7 +30,6 @@ #include "winternl.h" #include "winerror.h" #include "wownt32.h" -#include "wine/winuser16.h" #include "gdi_private.h" #include "wine/unicode.h" #include "wine/debug.h" diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 17d8611e29e..3072b5017a0 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1231,7 +1231,7 @@ GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics *graphics, GpPen *pen, INT x, } GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics *graphics, GpPen *pen, - GpRectF* rects, INT count) + GDIPCONST GpRectF* rects, INT count) { GpPointF *ptf; POINT *pti; diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index d5780bf7f31..e22a2dfb680 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -34,8 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(gdiplus); -typedef void ImageItemData; - #define PIXELFORMATBPP(x) ((x) ? ((x) >> 8) & 255 : 24) static INT ipicture_pixel_height(IPicture *pic) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 17f0f85ea63..de29bfb2516 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -26,7 +26,7 @@ #define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got) #define TABLE_LEN (23) -static void test_constructor_destructor() +static void test_constructor_destructor(void) { GpStatus stat; GpGraphics *graphics = NULL; @@ -91,7 +91,7 @@ end: expect(0, dups); } -static void test_save_restore() +static void test_save_restore(void) { GpStatus stat; GraphicsState state_a, state_b, state_c; diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index d19a14c71e4..70685098dcc 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -24,7 +24,7 @@ #define expect(expected, got) ok(((UINT)got) == ((UINT)expected), "Expected %.8x, got %.8x\n", (UINT)expected, (UINT)got) -static void test_Scan0() +static void test_Scan0(void) { GpBitmap *bm; GpStatus stat; diff --git a/dlls/gphoto2.ds/ui.c b/dlls/gphoto2.ds/ui.c index dd802fd8dee..6e8ecc011aa 100644 --- a/dlls/gphoto2.ds/ui.c +++ b/dlls/gphoto2.ds/ui.c @@ -72,7 +72,7 @@ static void UI_EndDialog(HWND hwnd, INT_PTR rc) EndDialog(hwnd, rc); } -static int GetAllImages() +static int GetAllImages(void) { struct gphoto2_file *file; int has_images = 0; diff --git a/dlls/kernel32/actctx.c b/dlls/kernel32/actctx.c index 4591d8bc22c..c708373a7e5 100644 --- a/dlls/kernel32/actctx.c +++ b/dlls/kernel32/actctx.c @@ -89,7 +89,7 @@ HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx) MultiByteToWideChar(CP_ACP, 0, pActCtx->lpResourceName, -1, resname, len); actw.lpResourceName = resname; } - else actw.lpResourceName = (LPWSTR)pActCtx->lpResourceName; + else actw.lpResourceName = (LPCWSTR)pActCtx->lpResourceName; } if (actw.dwFlags & ACTCTX_FLAG_APPLICATION_NAME_VALID) { diff --git a/dlls/kernel32/relay16.c b/dlls/kernel32/relay16.c index 947ccf6ec93..3712aec04da 100644 --- a/dlls/kernel32/relay16.c +++ b/dlls/kernel32/relay16.c @@ -579,7 +579,7 @@ int relay_call_from_16( void *entry_point, unsigned char *args16, CONTEXT86 *con /*********************************************************************** * __wine_call_from_16_regs (KERNEL32.@) */ -void __wine_call_from_16_regs() +void __wine_call_from_16_regs(void) { assert( FALSE ); } diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index 02e92d492b4..54aae65f279 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -55,7 +55,7 @@ static void get_events(const char* name, HANDLE *start_event, HANDLE *done_event HeapFree(GetProcessHeap(), 0, event_name); } -static void log_pid(const char* logfile, DWORD pid) +static void save_blackbox(const char* logfile, void* blackbox, int size) { HANDLE hFile; DWORD written; @@ -63,14 +63,14 @@ static void log_pid(const char* logfile, DWORD pid) hFile=CreateFileA(logfile, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); if (hFile == INVALID_HANDLE_VALUE) return; - WriteFile(hFile, &pid, sizeof(pid), &written, NULL); + WriteFile(hFile, blackbox, size, &written, NULL); CloseHandle(hFile); } -static DWORD get_logged_pid(const char* logfile) +static int load_blackbox(const char* logfile, void* blackbox, int size) { HANDLE hFile; - DWORD pid, read; + DWORD read; BOOL ret; hFile=CreateFileA(logfile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); @@ -79,21 +79,27 @@ static DWORD get_logged_pid(const char* logfile) ok(0, "unable to open '%s'\n", logfile); return 0; } - pid=0; - read=sizeof(pid); - ret=ReadFile(hFile, &pid, sizeof(pid), &read, NULL); - ok(read == sizeof(pid), "wrong size for '%s': read=%d\n", logfile, read); + ret=ReadFile(hFile, blackbox, size, &read, NULL); + ok(read == size, "wrong size for '%s': read=%d\n", logfile, read); CloseHandle(hFile); - return pid; + return 1; } +typedef struct +{ + DWORD pid; +} crash_blackbox_t; + static void doCrash(int argc, char** argv) { char* p; - const char* logfile; - logfile=(argc >= 4 ? argv[3] : NULL); - log_pid(logfile, GetCurrentProcessId()); + if (argc >= 4) + { + crash_blackbox_t blackbox; + blackbox.pid=GetCurrentProcessId(); + save_blackbox(argv[3], &blackbox, sizeof(blackbox)); + } /* Just crash */ trace("child: crashing...\n"); @@ -101,22 +107,33 @@ static void doCrash(int argc, char** argv) *p=0; } +typedef struct +{ + int argc; + DWORD pid; + BOOL debug_rc; + DWORD debug_err; +} debugger_blackbox_t; + static void doDebugger(int argc, char** argv) { const char* logfile; + debugger_blackbox_t blackbox; HANDLE start_event, done_event, debug_event; - DWORD pid; - ok(argc == 6, "wrong debugger argument count: %d\n", argc); + blackbox.argc=argc; logfile=(argc >= 4 ? argv[3] : NULL); - pid=(argc >= 5 ? atol(argv[4]) : 0); + blackbox.pid=(argc >= 5 ? atol(argv[4]) : 0); debug_event=(argc >= 6 ? (HANDLE)atol(argv[5]) : NULL); if (debug_event && strcmp(myARGV[2], "dbgnoevent") != 0) { - ok(SetEvent(debug_event), "debugger: SetEvent(debug_event) failed\n"); + blackbox.debug_rc=SetEvent(debug_event); + if (!blackbox.debug_rc) + blackbox.debug_err=GetLastError(); } + else + blackbox.debug_rc=TRUE; - log_pid(logfile, pid); get_events(logfile, &start_event, &done_event); if (strcmp(myARGV[2], "dbgnoevent") != 0) { @@ -124,8 +141,9 @@ static void doDebugger(int argc, char** argv) WaitForSingleObject(start_event, INFINITE); } - ok(SetEvent(done_event), "debugger: SetEvent(done_event) failed\n"); + save_blackbox(logfile, &blackbox, sizeof(blackbox)); trace("debugger: done debugging...\n"); + SetEvent(done_event); /* Just exit with a known value */ ExitProcess(0xdeadbeef); @@ -141,7 +159,8 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* debugger) PROCESS_INFORMATION info; STARTUPINFOA startup; DWORD exit_code; - DWORD pid1, pid2; + crash_blackbox_t crash_blackbox; + debugger_blackbox_t dbg_blackbox; ret=RegSetValueExA(hkey, "auto", 0, REG_SZ, (BYTE*)"1", 2); ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%d\n", ret); @@ -181,13 +200,47 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* debugger) trace("waiting for the debugger...\n"); ok(WaitForSingleObject(done_event, 60000) == WAIT_OBJECT_0, "Timed out waiting for the debugger\n"); - pid1=get_logged_pid(dbglog); - pid2=get_logged_pid(childlog); - ok(pid1 == pid2, "the child and debugged pids don't match: %d != %d\n", pid1, pid2); + assert(load_blackbox(childlog, &crash_blackbox, sizeof(crash_blackbox))); + assert(load_blackbox(dbglog, &dbg_blackbox, sizeof(dbg_blackbox))); + + ok(dbg_blackbox.argc == 6, "wrong debugger argument count: %d\n", dbg_blackbox.argc); + ok(dbg_blackbox.pid == crash_blackbox.pid, "the child and debugged pids don't match: %d != %d\n", crash_blackbox.pid, dbg_blackbox.pid); + ok(dbg_blackbox.debug_rc, "debugger: SetEvent(debug_event) failed err=%d\n", dbg_blackbox.debug_err); + assert(DeleteFileA(dbglog) != 0); assert(DeleteFileA(childlog) != 0); } +static void crash_and_winedbg(HKEY hkey, const char* argv0) +{ + DWORD ret; + char* cmd; + PROCESS_INFORMATION info; + STARTUPINFOA startup; + DWORD exit_code; + + ret=RegSetValueExA(hkey, "auto", 0, REG_SZ, (BYTE*)"1", 2); + ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%d\n", ret); + + cmd=HeapAlloc(GetProcessHeap(), 0, strlen(argv0)+15+1); + sprintf(cmd, "%s debugger crash", argv0); + + memset(&startup, 0, sizeof(startup)); + startup.cb = sizeof(startup); + startup.dwFlags = STARTF_USESHOWWINDOW; + startup.wShowWindow = SW_SHOWNORMAL; + ret=CreateProcessA(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info); + ok(ret, "CreateProcess: err=%d\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, cmd); + CloseHandle(info.hThread); + + trace("waiting for child exit...\n"); + ok(WaitForSingleObject(info.hProcess, 60000) == WAIT_OBJECT_0, "Timed out waiting for the child to crash\n"); + ok(GetExitCodeProcess(info.hProcess, &exit_code), "GetExitCodeProcess failed: err=%d\n", GetLastError()); + todo_wine ok(exit_code == STATUS_ACCESS_VIOLATION, "exit code = %08x\n", exit_code); + CloseHandle(info.hProcess); +} + static void test_ExitCode(void) { static const char* AeDebug="Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug"; @@ -239,6 +292,10 @@ static void test_ExitCode(void) return; } + if (debugger_val && debugger_type == REG_SZ && + strstr((char*)debugger_val, "winedbg --auto")) + crash_and_winedbg(hkey, test_exe); + crash_and_debug(hkey, test_exe, "dbgevent"); crash_and_debug(hkey, test_exe, "dbgnoevent"); diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 3643fdac9cb..cc619e5968a 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -1062,7 +1062,7 @@ int CDECL _ismbslead(const unsigned char* start, const unsigned char* str) if(!g_mbcp_is_multibyte) return 0; - /* Lead bytes can also be trail bytes so we need to analise the string + /* Lead bytes can also be trail bytes so we need to analyse the string */ while (start <= str) { diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 9c51b48041e..d2cd09c9cee 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -172,7 +172,7 @@ static BSTR _bstr_(const char *str) return alloced_bstrs[alloced_bstrs_count++]; } -static void free_bstrs() +static void free_bstrs(void) { int i; for (i = 0; i < alloced_bstrs_count; i++) @@ -1457,7 +1457,7 @@ static void test_IXMLDOMDocument2(void) free_bstrs(); } -static void test_XPath() +static void test_XPath(void) { HRESULT r; VARIANT var; diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c index 5dc7a9272a6..56a138e3d29 100644 --- a/dlls/ntdll/cdrom.c +++ b/dlls/ntdll/cdrom.c @@ -305,27 +305,28 @@ static int CDROM_MediaChanged(int dev) /****************************************************************** - * open_parent_device + * get_parent_device * - * On Mac OS, open the device for the whole disk from a fd that points to a partition. + * On Mac OS, get the device for the whole disk from a fd that points to a partition. * This is ugly and inefficient, but we have no choice since the partition fd doesn't * support the eject ioctl. */ #ifdef __APPLE__ -static int open_parent_device( int fd ) +static NTSTATUS get_parent_device( int fd, char *name, size_t len ) { + NTSTATUS status = STATUS_NO_SUCH_FILE; struct stat st; - int i, parent_fd = -1; + int i; io_service_t service; CFMutableDictionaryRef dict; CFTypeRef val; - if (fstat( fd, &st ) == -1) return -1; - if (!S_ISCHR( st.st_mode )) return -1; + if (fstat( fd, &st ) == -1) return FILE_GetNtStatus(); + if (!S_ISCHR( st.st_mode )) return STATUS_OBJECT_TYPE_MISMATCH; /* create a dictionary with the right major/minor numbers */ - if (!(dict = IOServiceMatching( kIOMediaClass ))) return -1; + if (!(dict = IOServiceMatching( kIOMediaClass ))) return STATUS_NO_MEMORY; i = major( st.st_rdev ); val = CFNumberCreate( NULL, kCFNumberIntType, &i ); @@ -360,11 +361,10 @@ static int open_parent_device( int fd ) if ((str = IORegistryEntryCreateCFProperty( service, CFSTR("BSD Name"), NULL, 0 ))) { - char name[100]; strcpy( name, "/dev/r" ); - CFStringGetCString( str, name + 6, sizeof(name) - 6, kCFStringEncodingUTF8 ); + CFStringGetCString( str, name + 6, len - 6, kCFStringEncodingUTF8 ); CFRelease( str ); - parent_fd = open( name, O_RDONLY ); + status = STATUS_SUCCESS; } IOObjectRelease( service ); break; @@ -374,7 +374,7 @@ next: IOObjectRelease( service ); service = parent; } - return parent_fd; + return status; } #endif @@ -2181,17 +2181,23 @@ NTSTATUS CDROM_DeviceIoControl(HANDLE hDevice, else { #ifdef __APPLE__ - int parent_fd = open_parent_device( fd ); - if (parent_fd != -1) + char name[100]; + + /* This is ugly as hell, but Mac OS is unable to eject from the device fd, + * it wants an fd for the whole device, and it also requires the device fd + * to be closed first, so we have to close the handle that the caller gave us. + * Also for some reason it wants the fd to be closed before we even open the parent. + */ + if ((status = get_parent_device( fd, name, sizeof(name) ))) break; + NtClose( hDevice ); + if (needs_close) close( fd ); + TRACE("opening parent %s\n", name ); + if ((fd = open( name, O_RDONLY )) == -1) { - /* This is ugly as hell, but Mac OS is unable to eject from the device fd, - * it wants an fd for the whole device, and it also requires the device fd - * to be closed first, so we have to close the handle that the caller gave us */ - NtClose( hDevice ); - if (needs_close) close( fd ); - fd = parent_fd; - needs_close = 1; + status = FILE_GetNtStatus(); + break; } + needs_close = 1; #endif status = CDROM_SetTray(fd, TRUE); } diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index 202db67e1db..f756d83a4ed 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -574,7 +574,7 @@ HRESULT WINAPI GetActiveObject(REFCLSID rcid,LPVOID preserved,LPUNKNOWN *ppunk) * Currently the versions returned are 2.20 for Win3.1, 2.30 for Win95 & NT 3.51, * and 2.40 for all later versions. The build number is maximum, i.e. 0xffff. */ -ULONG WINAPI OaBuildVersion() +ULONG WINAPI OaBuildVersion(void) { switch(GetVersion() & 0x8000ffff) /* mask off build number */ { diff --git a/dlls/olepro32/olepro32stubs.c b/dlls/olepro32/olepro32stubs.c index 5046960dd40..04b1868dfc0 100644 --- a/dlls/olepro32/olepro32stubs.c +++ b/dlls/olepro32/olepro32stubs.c @@ -33,7 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); /*********************************************************************** * DllUnregisterServer (OLEPRO32.258) */ -HRESULT WINAPI DllUnregisterServer() +HRESULT WINAPI DllUnregisterServer(void) { FIXME("stub\n"); return S_OK; @@ -42,7 +42,7 @@ HRESULT WINAPI DllUnregisterServer() /*********************************************************************** * DllRegisterServer (OLEPRO32.257) */ -HRESULT WINAPI DllRegisterServer() +HRESULT WINAPI DllRegisterServer(void) { FIXME("stub\n"); return S_OK; diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c index 1e9e892bc2b..230e5be3d5e 100644 --- a/dlls/quartz/main.c +++ b/dlls/quartz/main.c @@ -201,7 +201,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) /*********************************************************************** * DllCanUnloadNow (QUARTZ.@) */ -HRESULT WINAPI DllCanUnloadNow() +HRESULT WINAPI DllCanUnloadNow(void) { return dll_ref != 0 ? S_FALSE : S_OK; } diff --git a/dlls/secur32/Makefile.in b/dlls/secur32/Makefile.in index 45043d3f189..43efc1caf47 100644 --- a/dlls/secur32/Makefile.in +++ b/dlls/secur32/Makefile.in @@ -11,6 +11,7 @@ C_SRCS = \ base64_codec.c \ dispatcher.c \ hmac_md5.c \ + lsa.c \ negotiate.c \ ntlm.c \ schannel.c \ diff --git a/dlls/secur32/lsa.c b/dlls/secur32/lsa.c new file mode 100644 index 00000000000..738253ab623 --- /dev/null +++ b/dlls/secur32/lsa.c @@ -0,0 +1,100 @@ +/* Copyright (C) 2004 Juan Lang + * Copyright (C) 2007 Kai Blin + * + * Local Security Authority functions, as far as secur32 has them. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "ntsecapi.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(lsa); + +NTSTATUS WINAPI LsaCallAuthenticationPackage(HANDLE LsaHandle, + ULONG AuthenticationPackage, PVOID ProtocolSubmitBuffer, + ULONG SubmitBufferLength, PVOID* ProtocolReturnBuffer, + PULONG ReturnBufferLength, PNTSTATUS ProtocolStatus) +{ + FIXME("%p %d %p %d %p %p %p stub\n", LsaHandle, AuthenticationPackage, + ProtocolSubmitBuffer, SubmitBufferLength, ProtocolReturnBuffer, + ReturnBufferLength, ProtocolStatus); + return STATUS_SUCCESS; +} + +NTSTATUS WINAPI LsaConnectUntrusted(PHANDLE LsaHandle) +{ + FIXME("%p stub\n", LsaHandle); + return STATUS_SUCCESS; +} + +NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE LsaHandle) +{ + FIXME("%p stub\n", LsaHandle); + return STATUS_SUCCESS; +} + +NTSTATUS WINAPI LsaEnumerateLogonSessions(PULONG LogonSessionCount, + PLUID* LogonSessionList) +{ + FIXME("%p %p stub\n", LogonSessionCount, LogonSessionList); + *LogonSessionCount = 0; + *LogonSessionList = NULL; + + return STATUS_SUCCESS; +} + +NTSTATUS WINAPI LsaFreeReturnBuffer(PVOID Buffer) +{ + FIXME("%p stub\n", Buffer); + return STATUS_SUCCESS; +} + +NTSTATUS WINAPI LsaGetLogonSessionData(PLUID LogonId, + PSECURITY_LOGON_SESSION_DATA* ppLogonSessionData) +{ + FIXME("%p %p stub\n", LogonId, ppLogonSessionData); + return STATUS_SUCCESS; +} + +NTSTATUS WINAPI LsaLogonUser(HANDLE LsaHandle, PLSA_STRING OriginName, + SECURITY_LOGON_TYPE LogonType, ULONG AuthenticationPackage, + PVOID AuthenticationInformation, ULONG AuthenticationInformationLength, + PTOKEN_GROUPS LocalGroups, PTOKEN_SOURCE SourceContext, + PVOID* ProfileBuffer, PULONG ProfileBufferLength, PLUID LogonId, + PHANDLE Token, PQUOTA_LIMITS Quotas, PNTSTATUS SubStatus) +{ + FIXME("%p %p %d %d %p %d %p %p %p %p %p %p %p %p stub\n", LsaHandle, + OriginName, LogonType, AuthenticationPackage, + AuthenticationInformation, AuthenticationInformationLength, + LocalGroups, SourceContext, ProfileBuffer, ProfileBufferLength, + LogonId, Token, Quotas, SubStatus); + return STATUS_SUCCESS; +} + +NTSTATUS WINAPI LsaLookupAuthenticationPackage(HANDLE LsaHandle, + PLSA_STRING PackageName, PULONG AuthenticationPackage) +{ + FIXME("%p %p %p stub\n", LsaHandle, PackageName, AuthenticationPackage); + AuthenticationPackage = NULL; + return STATUS_SUCCESS; +} diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index 21fbc59c9ef..79241561eb2 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -1868,6 +1868,9 @@ void SECUR32_initNTLMSP(void) MIN_NTLM_AUTH_MAJOR_VERSION, MIN_NTLM_AUTH_MINOR_VERSION, MIN_NTLM_AUTH_MICRO_VERSION); + ERR("Usually, you can find it in the winbind package of your " + "distribution.\n"); + } cleanup_helper(helper); } diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index 2e12c66b728..1e040ea4246 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -1050,29 +1050,6 @@ BOOLEAN WINAPI GetUserNameExW( return FALSE; } -NTSTATUS WINAPI LsaCallAuthenticationPackage( - HANDLE LsaHandle, ULONG AuthenticationPackage, PVOID ProtocolSubmitBuffer, - ULONG SubmitBufferLength, PVOID* ProtocolReturnBuffer, PULONG ReturnBufferLength, - PNTSTATUS ProtocolStatus) -{ - FIXME("%p %d %p %d %p %p %p\n", LsaHandle, AuthenticationPackage, - ProtocolSubmitBuffer, SubmitBufferLength, ProtocolReturnBuffer, - ReturnBufferLength, ProtocolStatus); - return 0; -} - -NTSTATUS WINAPI LsaConnectUntrusted(PHANDLE LsaHandle) -{ - FIXME("%p\n", LsaHandle); - return 0; -} - -NTSTATUS WINAPI LsaDeregisterLogonProcess(HANDLE LsaHandle) -{ - FIXME("%p\n", LsaHandle); - return 0; -} - BOOLEAN WINAPI TranslateNameA( LPCSTR lpAccountName, EXTENDED_NAME_FORMAT AccountNameFormat, EXTENDED_NAME_FORMAT DesiredNameFormat, LPSTR lpTranslatedName, diff --git a/dlls/secur32/secur32.spec b/dlls/secur32/secur32.spec index 5e73003e46d..d237decb510 100644 --- a/dlls/secur32/secur32.spec +++ b/dlls/secur32/secur32.spec @@ -35,11 +35,11 @@ @ stdcall LsaCallAuthenticationPackage(long long ptr long ptr ptr ptr) @ stdcall LsaConnectUntrusted(long) @ stdcall LsaDeregisterLogonProcess(long) -@ stub LsaEnumerateLogonSessions -@ stub LsaFreeReturnBuffer -@ stub LsaGetLogonSessionData -@ stub LsaLogonUser -@ stub LsaLookupAuthenticationPackage +@ stdcall LsaEnumerateLogonSessions(ptr ptr) +@ stdcall LsaFreeReturnBuffer(ptr) +@ stdcall LsaGetLogonSessionData(ptr ptr) +@ stdcall LsaLogonUser(ptr ptr long long ptr long ptr ptr ptr ptr ptr ptr ptr ptr) +@ stdcall LsaLookupAuthenticationPackage(ptr ptr ptr) @ stub LsaRegisterLogonProcess @ stub LsaRegisterPolicyChangeNotification @ stub LsaUnregisterPolicyChangeNotification diff --git a/dlls/setupapi/setupx_main.c b/dlls/setupapi/setupx_main.c index 81079d62416..fcf89c063e3 100644 --- a/dlls/setupapi/setupx_main.c +++ b/dlls/setupapi/setupx_main.c @@ -63,7 +63,6 @@ #include "winbase.h" #include "winreg.h" #include "winerror.h" -#include "wine/winuser16.h" #include "wownt32.h" #include "winuser.h" #include "winnls.h" diff --git a/dlls/setupapi/stubs.c b/dlls/setupapi/stubs.c index 5704ce6c7bb..af1b0c3a295 100644 --- a/dlls/setupapi/stubs.c +++ b/dlls/setupapi/stubs.c @@ -150,7 +150,7 @@ BOOL WINAPI RegistryDelnode(DWORD x, DWORD y) /*********************************************************************** * SetupCloseLog(SETUPAPI.@) */ -void WINAPI SetupCloseLog() +void WINAPI SetupCloseLog(void) { FIXME("() stub\n"); } @@ -158,7 +158,7 @@ void WINAPI SetupCloseLog() /*********************************************************************** * SetupLogErrorW(SETUPAPI.@) */ -BOOL WINAPI SetupLogErrorW(PCWSTR MessageString, LogSeverity Severity) +BOOL WINAPI SetupLogErrorW(LPCWSTR MessageString, LogSeverity Severity) { FIXME("(%s, %d) stub\n", debugstr_w(MessageString), Severity); return TRUE; diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c index f11abb8ec13..1c3ca49bd4c 100644 --- a/dlls/setupapi/tests/parser.c +++ b/dlls/setupapi/tests/parser.c @@ -321,7 +321,7 @@ static const struct { "a=%big%%big%%big%%big%%big%%big%%big%%big%%big%%big%%big%\n" STR_SECTION, "a", { A4097 /*MAX_INF_STRING_LENGTH+1*/ } }, /* Prove expansion of system entries removes extra \'s and string - replacements doesnt */ + replacements doesn't */ { "ab=\"%24%\"\n" STR_SECTION, "ab", { "C:\\" } }, { "ab=\"%mydrive%\"\n" STR_SECTION, "ab", { "C:\\" } }, { "ab=\"%24%\\fred\"\n" STR_SECTION, "ab", { "C:\\fred" } }, diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index 4c1ccdbe7e2..fb7168279c6 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -317,8 +317,8 @@ static IBindStatusCallback *create_callback(DocHost *This, PBYTE post_data, return BINDSC(ret); } -static void on_before_navigate2(DocHost *This, LPWSTR url, PBYTE post_data, ULONG post_data_len, - LPWSTR headers, VARIANT_BOOL *cancel) +static void on_before_navigate2(DocHost *This, LPCWSTR url, const BYTE *post_data, + ULONG post_data_len, LPWSTR headers, VARIANT_BOOL *cancel) { VARIANT var_url, var_flags, var_frame_name, var_post_data, var_post_data2, var_headers; DISPPARAMS dispparams; @@ -514,8 +514,8 @@ static HRESULT bind_url_to_object(DocHost *This, LPCWSTR url, PBYTE post_data, U return hres; } -HRESULT navigate_url(DocHost *This, BSTR url, VARIANT *Flags, VARIANT *TargetFrameName, - VARIANT *PostData, VARIANT *Headers) +HRESULT navigate_url(DocHost *This, BSTR url, const VARIANT *Flags, + const VARIANT *TargetFrameName, VARIANT *PostData, VARIANT *Headers) { PBYTE post_data = NULL; ULONG post_data_len = 0; diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index 57041564a2b..d4210250f3e 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -194,7 +194,7 @@ HRESULT WebBrowserV2_Create(IUnknown*,REFIID,void**); void create_doc_view_hwnd(DocHost*); void deactivate_document(DocHost*); void call_sink(ConnectionPoint*,DISPID,DISPPARAMS*); -HRESULT navigate_url(DocHost*,BSTR,VARIANT*,VARIANT*,VARIANT*,VARIANT*); +HRESULT navigate_url(DocHost*,BSTR,const VARIANT*,const VARIANT*,VARIANT*,VARIANT*); HRESULT InternetExplorer_Create(IUnknown*,REFIID,void**); void InternetExplorer_WebBrowser_Init(InternetExplorer*); diff --git a/dlls/shell32/shell.c b/dlls/shell32/shell.c index 7ffc33bc38e..2703c7ae04a 100644 --- a/dlls/shell32/shell.c +++ b/dlls/shell32/shell.c @@ -42,7 +42,6 @@ #include "shlwapi.h" #include "wine/winbase16.h" -#include "wine/winuser16.h" #include "shell32_main.h" #include "wine/debug.h" diff --git a/dlls/shell32/tests/systray.c b/dlls/shell32/tests/systray.c index e6d72a998c9..b80b1090907 100644 --- a/dlls/shell32/tests/systray.c +++ b/dlls/shell32/tests/systray.c @@ -27,7 +27,7 @@ static HWND hMainWnd; -void test_cbsize() +void test_cbsize(void) { NOTIFYICONDATAW nidW; NOTIFYICONDATAA nidA; diff --git a/dlls/shlwapi/thread.c b/dlls/shlwapi/thread.c index 1affb79d277..901413f6051 100644 --- a/dlls/shlwapi/thread.c +++ b/dlls/shlwapi/thread.c @@ -184,7 +184,7 @@ HRESULT WINAPI SHSetThreadRef(IUnknown *lpUnknown) * Success: S_OK. The threads object reference is released. * Failure: An HRESULT error code. */ -HRESULT WINAPI SHReleaseThreadRef() +HRESULT WINAPI SHReleaseThreadRef(void) { FIXME("() - stub!\n"); return S_OK; diff --git a/dlls/user32/message.c b/dlls/user32/message.c index e87c4281653..46333b64dc0 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -2017,9 +2017,12 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags ULONG_PTR extra_info = 0; struct user_thread_info *thread_info = get_user_thread_info(); struct received_message_info info, *old_info; + unsigned int wake_mask, changed_mask = HIWORD(flags); unsigned int hw_id = 0; /* id of previous hardware message */ if (!first && !last) last = ~0; + if (!changed_mask) changed_mask = QS_ALLINPUT; + wake_mask = changed_mask & (QS_SENDMESSAGE | QS_SMRESULT); for (;;) { @@ -2038,6 +2041,8 @@ static BOOL peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags req->get_first = first; req->get_last = last; req->hw_id = hw_id; + req->wake_mask = wake_mask; + req->changed_mask = changed_mask; if (buffer_size) wine_server_set_reply( req, buffer, buffer_size ); if (!(res = wine_server_call( req ))) { @@ -2933,35 +2938,14 @@ BOOL WINAPI GetMessageW( MSG *msg, HWND hwnd, UINT first, UINT last ) if ((first <= WM_SYSTIMER) && (last >= WM_SYSTIMER)) mask |= QS_TIMER; if ((first <= WM_PAINT) && (last >= WM_PAINT)) mask |= QS_PAINT; } - else mask |= QS_MOUSE | QS_KEY | QS_TIMER | QS_PAINT; + else mask = QS_ALLINPUT; - while (!PeekMessageW( msg, hwnd, first, last, PM_REMOVE )) + while (!PeekMessageW( msg, hwnd, first, last, PM_REMOVE | PM_NOYIELD | (mask << 16) )) { - /* wait until one of the bits is set */ - unsigned int wake_bits = 0, changed_bits = 0; DWORD dwlc; - SERVER_START_REQ( set_queue_mask ) - { - req->wake_mask = QS_SENDMESSAGE; - req->changed_mask = mask; - req->skip_wait = 1; - if (!wine_server_call( req )) - { - wake_bits = reply->wake_bits; - changed_bits = reply->changed_bits; - } - } - SERVER_END_REQ; - - if (changed_bits & mask) continue; - if (wake_bits & QS_SENDMESSAGE) continue; - - TRACE( "(%04x) mask=%08x, bits=%08x, changed=%08x, waiting\n", - GetCurrentThreadId(), mask, wake_bits, changed_bits ); - ReleaseThunkLock( &dwlc ); - USER_Driver->pMsgWaitForMultipleObjectsEx( 1, &server_queue, INFINITE, QS_ALLINPUT, 0 ); + USER_Driver->pMsgWaitForMultipleObjectsEx( 1, &server_queue, INFINITE, mask, 0 ); if (dwlc) RestoreThunkLock( dwlc ); } diff --git a/dlls/user32/static.c b/dlls/user32/static.c index 8afaca11084..bb6abfb0524 100644 --- a/dlls/user32/static.c +++ b/dlls/user32/static.c @@ -111,6 +111,33 @@ const struct builtin_class_descr STATIC_builtin_class = 0 /* brush */ }; +static void setup_clipping(HWND hwnd, HDC hdc, HRGN *orig) +{ + RECT rc; + HRGN hrgn; + + /* Native control has always a clipping region set (this may be because + * builtin controls uses CS_PARENTDC) and an application depends on it + */ + hrgn = CreateRectRgn(0, 0, 1, 1); + if (GetClipRgn(hdc, hrgn) != 1) + { + DeleteObject(hrgn); + *orig = NULL; + } else + *orig = hrgn; + + GetClientRect(hwnd, &rc); + DPtoLP(hdc, (POINT *)&rc, 2); + IntersectClipRect(hdc, rc.left, rc.top, rc.right, rc.bottom); +} + +static void restore_clipping(HDC hdc, HRGN hrgn) +{ + SelectClipRgn(hdc, hrgn); + if (hrgn != NULL) + DeleteObject(hrgn); +} /*********************************************************************** * STATIC_SetIcon @@ -315,8 +342,12 @@ static VOID STATIC_TryPaintFcn(HWND hwnd, LONG full_style) if (!IsRectEmpty(&rc) && IsWindowVisible(hwnd) && staticPaintFunc[style]) { HDC hdc; + HRGN hOrigClipping; + hdc = GetDC( hwnd ); + setup_clipping(hwnd, hdc, &hOrigClipping); (staticPaintFunc[style])( hwnd, hdc, full_style ); + restore_clipping(hdc, hOrigClipping); ReleaseDC( hwnd, hdc ); } } @@ -413,7 +444,12 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, PAINTSTRUCT ps; HDC hdc = wParam ? (HDC)wParam : BeginPaint(hwnd, &ps); if (staticPaintFunc[style]) + { + HRGN hOrigClipping; + setup_clipping(hwnd, hdc, &hOrigClipping); (staticPaintFunc[style])( hwnd, hdc, full_style ); + restore_clipping(hdc, hOrigClipping); + } if (!wParam) EndPaint(hwnd, &ps); } break; @@ -721,6 +757,7 @@ static void STATIC_PaintRectfn( HWND hwnd, HDC hdc, DWORD style ) GetClientRect( hwnd, &rc); + /* FIXME: send WM_CTLCOLORSTATIC */ switch (style & SS_TYPEMASK) { case SS_BLACKRECT: @@ -865,6 +902,7 @@ static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style ) { RECT rc; + /* FIXME: sometimes (not always) sends WM_CTLCOLORSTATIC */ GetClientRect( hwnd, &rc ); switch (style & SS_TYPEMASK) { diff --git a/dlls/user32/tests/Makefile.in b/dlls/user32/tests/Makefile.in index 505d62dfc90..40fec5bd424 100644 --- a/dlls/user32/tests/Makefile.in +++ b/dlls/user32/tests/Makefile.in @@ -21,6 +21,7 @@ CTESTS = \ monitor.c \ msg.c \ resource.c \ + static.c \ sysparams.c \ text.c \ win.c \ diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index b29ec5a8a19..7f54e2f444b 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -565,7 +565,7 @@ static void test_instances(void) check_thread_instance( "EDIT", (HINSTANCE)0x12345678, (HINSTANCE)0x12345678, (HINSTANCE)0xdeadbeef ); } -static void test_defwndproc() +static void test_defwndproc(void) { static const char classA[] = "deftest"; static const WCHAR classW[] = {'d','e','f','t','e','s','t',0}; diff --git a/dlls/user32/tests/static.c b/dlls/user32/tests/static.c new file mode 100644 index 00000000000..7810db4e399 --- /dev/null +++ b/dlls/user32/tests/static.c @@ -0,0 +1,130 @@ +/* Unit test suite for static controls. + * + * Copyright 2007 Google (Mikolaj Zalewski) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include + +#define STRICT +#define WIN32_LEAN_AND_MEAN +#include + +#include "wine/test.h" + +#define TODO_COUNT 1 + +#define CTRL_ID 1995 + +static HWND hMainWnd; + +#define expect_eq(expr, value, type, fmt) { type val = expr; ok(val == (value), #expr " expected " #fmt " got " #fmt "\n", (value), val); } +#define expect_rect(r, _left, _top, _right, _bottom) ok(r.left == _left && r.top == _top && \ + r.bottom == _bottom && r.right == _right, "Invalid rect (%d,%d) (%d,%d) vs (%d,%d) (%d,%d)\n", \ + r.left, r.top, r.right, r.bottom, _left, _top, _right, _bottom); + +int g_nReceivedColorStatic = 0; + +static HWND build_static(DWORD style) +{ + return CreateWindow("static", "Test", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)CTRL_ID, NULL, 0); +} + +static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + switch (msg) + { + case WM_CTLCOLORSTATIC: + { + HDC hdc = (HDC)wparam; + HRGN hrgn = CreateRectRgn(0, 0, 1, 1); + ok(GetClipRgn(hdc, hrgn) == 1, "Static controls during a WM_CTLCOLORSTATIC must have a clipping region\n"); + DeleteObject(hrgn); + g_nReceivedColorStatic++; + } + break; + } + + return DefWindowProc(hwnd, msg, wparam, lparam); +} + +void test_updates(int style, int flags) +{ + RECT r1 = {20, 20, 30, 30}; + HWND hStatic = build_static(style); + int exp; + + trace("Testing style 0x%x\n", style); + g_nReceivedColorStatic = 0; + /* during each update parent WndProc will test the WM_CTLCOLORSTATIC message */ + InvalidateRect(hMainWnd, NULL, FALSE); + UpdateWindow(hMainWnd); + InvalidateRect(hMainWnd, &r1, FALSE); + UpdateWindow(hMainWnd); + InvalidateRect(hStatic, &r1, FALSE); + UpdateWindow(hStatic); + InvalidateRect(hStatic, NULL, FALSE); + UpdateWindow(hStatic); + + + if (style != SS_ETCHEDHORZ && style != SS_ETCHEDVERT) + exp = 4; + else + exp = 1; /* SS_ETCHED* seems to send WM_CTLCOLORSTATIC only sometimes */ + + if (flags & TODO_COUNT) + todo_wine { expect_eq(g_nReceivedColorStatic, exp, int, "%d"); } + else + expect_eq(g_nReceivedColorStatic, exp, int, "%d"); + DestroyWindow(hStatic); +} + +START_TEST(static) +{ + static char szClassName[] = "testclass"; + WNDCLASSEX wndclass; + + wndclass.cbSize = sizeof(wndclass); + wndclass.style = CS_HREDRAW | CS_VREDRAW; + wndclass.lpfnWndProc = WndProc; + wndclass.cbClsExtra = 0; + wndclass.cbWndExtra = 0; + wndclass.hInstance = GetModuleHandle(NULL); + wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wndclass.hIconSm = LoadIcon(NULL, IDI_APPLICATION); + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); + wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); + wndclass.lpszClassName = szClassName; + wndclass.lpszMenuName = NULL; + RegisterClassEx(&wndclass); + + hMainWnd = CreateWindow(szClassName, "Test", WS_OVERLAPPEDWINDOW, 0, 0, 500, 500, NULL, NULL, GetModuleHandle(NULL), NULL); + ShowWindow(hMainWnd, SW_SHOW); + UpdateWindow(hMainWnd); + + test_updates(0, 0); + test_updates(SS_SIMPLE, 0); + test_updates(SS_ICON, 0); + test_updates(SS_BITMAP, 0); + test_updates(SS_BLACKRECT, TODO_COUNT); + test_updates(SS_WHITERECT, TODO_COUNT); + test_updates(SS_ETCHEDHORZ, TODO_COUNT); + test_updates(SS_ETCHEDVERT, TODO_COUNT); + + DestroyWindow(hMainWnd); +} diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 9e69cb82bd6..4d02f4ae1c5 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -842,7 +842,7 @@ HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR pszThemeName, * RETURNS * some kind of status flag */ -DWORD WINAPI QueryThemeServices() +DWORD WINAPI QueryThemeServices(void) { FIXME("stub\n"); return 3; /* This is what is returned under XP in most cases */ diff --git a/dlls/version/resource.c b/dlls/version/resource.c index 63311756f2e..08e40983714 100644 --- a/dlls/version/resource.c +++ b/dlls/version/resource.c @@ -39,7 +39,6 @@ #include "wine/unicode.h" #include "wine/winbase16.h" -#include "wine/winuser16.h" #include "wine/debug.h" diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e60812a1d35..5bf0ae84a83 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2498,7 +2498,7 @@ BOOL InitAdapters(void) { return FALSE; } -/* Dynamicly load all GL core functions */ +/* Dynamically load all GL core functions */ GL_FUNCS_GEN; #undef USE_GL_FUNC diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 3b45db38749..679d9d9eedb 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -350,7 +350,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData /* Default settings for data that is not passed */ if (sd->u.s.normal.lpData == NULL) { - glNormal3f(0, 0, 1); + glNormal3f(0, 0, 0); } if(sd->u.s.diffuse.lpData == NULL) { glColor4f(1.0f, 1.0f, 1.0f, 1.0f); @@ -942,6 +942,94 @@ void blt_to_drawable(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *surface) { LEAVE_GL(); } +static inline void remove_vbos(IWineD3DDeviceImpl *This, WineDirect3DVertexStridedData *s) { + unsigned char i; + IWineD3DVertexBufferImpl *vb; + + if(s->u.s.position.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.position.streamNo]; + s->u.s.position.VBO = 0; + s->u.s.position.lpData = (BYTE *) ((unsigned long) s->u.s.position.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.blendWeights.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.blendWeights.streamNo]; + s->u.s.blendWeights.VBO = 0; + s->u.s.blendWeights.lpData = (BYTE *) ((unsigned long) s->u.s.blendWeights.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.blendMatrixIndices.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.blendMatrixIndices.streamNo]; + s->u.s.blendMatrixIndices.VBO = 0; + s->u.s.blendMatrixIndices.lpData = (BYTE *) ((unsigned long) s->u.s.blendMatrixIndices.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.normal.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.normal.streamNo]; + s->u.s.normal.VBO = 0; + s->u.s.normal.lpData = (BYTE *) ((unsigned long) s->u.s.normal.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.pSize.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.pSize.streamNo]; + s->u.s.pSize.VBO = 0; + s->u.s.pSize.lpData = (BYTE *) ((unsigned long) s->u.s.pSize.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.diffuse.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.diffuse.streamNo]; + s->u.s.diffuse.VBO = 0; + s->u.s.diffuse.lpData = (BYTE *) ((unsigned long) s->u.s.diffuse.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.specular.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.specular.streamNo]; + s->u.s.specular.VBO = 0; + s->u.s.specular.lpData = (BYTE *) ((unsigned long) s->u.s.specular.lpData + (unsigned long) vb->resource.allocatedMemory); + } + for(i = 0; i < WINED3DDP_MAXTEXCOORD; i++) { + if(s->u.s.texCoords[i].VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.texCoords[i].streamNo]; + s->u.s.texCoords[i].VBO = 0; + s->u.s.texCoords[i].lpData = (BYTE *) ((unsigned long) s->u.s.texCoords[i].lpData + (unsigned long) vb->resource.allocatedMemory); + } + } + if(s->u.s.position2.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.position2.streamNo]; + s->u.s.position2.VBO = 0; + s->u.s.position2.lpData = (BYTE *) ((unsigned long) s->u.s.position2.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.normal2.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.normal2.streamNo]; + s->u.s.normal2.VBO = 0; + s->u.s.normal2.lpData = (BYTE *) ((unsigned long) s->u.s.normal2.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.tangent.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.tangent.streamNo]; + s->u.s.tangent.VBO = 0; + s->u.s.tangent.lpData = (BYTE *) ((unsigned long) s->u.s.tangent.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.binormal.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.binormal.streamNo]; + s->u.s.binormal.VBO = 0; + s->u.s.binormal.lpData = (BYTE *) ((unsigned long) s->u.s.binormal.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.tessFactor.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.tessFactor.streamNo]; + s->u.s.tessFactor.VBO = 0; + s->u.s.tessFactor.lpData = (BYTE *) ((unsigned long) s->u.s.tessFactor.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.fog.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.fog.streamNo]; + s->u.s.fog.VBO = 0; + s->u.s.fog.lpData = (BYTE *) ((unsigned long) s->u.s.fog.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.depth.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.depth.streamNo]; + s->u.s.depth.VBO = 0; + s->u.s.depth.lpData = (BYTE *) ((unsigned long) s->u.s.depth.lpData + (unsigned long) vb->resource.allocatedMemory); + } + if(s->u.s.sample.VBO) { + vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[s->u.s.sample.streamNo]; + s->u.s.sample.VBO = 0; + s->u.s.sample.lpData = (BYTE *) ((unsigned long) s->u.s.sample.lpData + (unsigned long) vb->resource.allocatedMemory); + } +} + /* Routine common to the draw primitive and draw indexed primitive routines */ void drawPrimitive(IWineD3DDevice *iface, int PrimitiveType, @@ -1052,34 +1140,9 @@ void drawPrimitive(IWineD3DDevice *iface, } if(emulation) { - IWineD3DVertexBufferImpl *vb; - strided = &stridedlcl; memcpy(&stridedlcl, &This->strided_streams, sizeof(stridedlcl)); - -#define FIXVBO(type) \ -if(stridedlcl.u.s.type.VBO) { \ - vb = (IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[stridedlcl.u.s.type.streamNo]; \ - stridedlcl.u.s.type.VBO = 0; \ - stridedlcl.u.s.type.lpData = (BYTE *) ((unsigned long) stridedlcl.u.s.type.lpData + (unsigned long) vb->resource.allocatedMemory); \ -} - FIXVBO(position); - FIXVBO(blendWeights); - FIXVBO(blendMatrixIndices); - FIXVBO(normal); - FIXVBO(pSize); - FIXVBO(diffuse); - FIXVBO(specular); - for(i = 0; i < WINED3DDP_MAXTEXCOORD; i++) FIXVBO(texCoords[i]); - FIXVBO(position2); - FIXVBO(normal2); - FIXVBO(tangent); - FIXVBO(binormal); - FIXVBO(tessFactor); - FIXVBO(fog); - FIXVBO(depth); - FIXVBO(sample); -#undef FIXVBO + remove_vbos(This, &stridedlcl); } } diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 4b38e40e6fc..fe25e4b491e 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1196,7 +1196,16 @@ static void state_zbias(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D static void state_normalize(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { - if (stateblock->renderState[WINED3DRS_NORMALIZENORMALS]) { + if(isStateDirty(context, STATE_VDECL)) { + return; + } + /* Without vertex normals, we set the current normal to 0/0/0 to remove the diffuse factor + * from the opengl lighting equation, as d3d does. Normalization of 0/0/0 can lead to a division + * by zero and is not properly defined in opengl, so avoid it + */ + if (stateblock->renderState[WINED3DRS_NORMALIZENORMALS] && ( + stateblock->wineD3DDevice->strided_streams.u.s.normal.lpData || + stateblock->wineD3DDevice->strided_streams.u.s.normal.VBO)) { glEnable(GL_NORMALIZE); checkGLcall("glEnable(GL_NORMALIZE);"); } else { @@ -3031,8 +3040,8 @@ static void loadVertexData(IWineD3DStateBlockImpl *stateblock, WineDirect3DVerte checkGLcall("glEnableClientState(GL_NORMAL_ARRAY)"); } else { - glNormal3f(0, 0, 1); - checkGLcall("glNormal3f(0, 0, 1)"); + glNormal3f(0, 0, 0); + checkGLcall("glNormal3f(0, 0, 0)"); } /* Diffuse Colour --------------------------------------------*/ @@ -3307,6 +3316,9 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W if(context->last_was_vshader && !isStateDirty(context, STATE_RENDER(WINED3DRS_CLIPPLANEENABLE))) { state_clipping(STATE_RENDER(WINED3DRS_CLIPPLANEENABLE), stateblock, context); } + if(!isStateDirty(context, STATE_RENDER(WINED3DRS_NORMALIZENORMALS))) { + state_normalize(STATE_RENDER(WINED3DRS_NORMALIZENORMALS), stateblock, context); + } } else { /* We compile the shader here because we need the vertex declaration * in order to determine if we need to do any swizzling for D3DCOLOR diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 2abb277db33..b2d3aa1187c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -1632,7 +1632,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_ break; case WINED3DFMT_R16F: - /* Simmilar to R32F */ + /* Similar to R32F */ *convert = CONVERT_R16F; *format = GL_RGB; *internal = GL_RGB16F_ARB; @@ -1963,6 +1963,41 @@ static BOOL palette9_changed(IWineD3DSurfaceImpl *This) { return TRUE; } +static inline void clear_unused_channels(IWineD3DSurfaceImpl *This) { + GLboolean oldwrite[4]; + + /* Some formats have only some color channels, and the others are 1.0. + * since our rendering renders to all channels, and those pixel formats + * are emulated by using a full texture with the other channels set to 1.0 + * manually, clear the unused channels. + * + * This could be done with hacking colorwriteenable to mask the colors, + * but before drawing the buffer would have to be cleared too, so there's + * no gain in that + */ + switch(This->resource.format) { + case WINED3DFMT_R16F: + case WINED3DFMT_R32F: + TRACE("R16F or R32F format, clearing green, blue and alpha to 1.0\n"); + /* Do not activate a context, the correct drawable is active already + * though just the read buffer is set, make sure to have the correct draw + * buffer too + */ + glDrawBuffer(This->resource.wineD3DDevice->offscreenBuffer); + glDisable(GL_SCISSOR_TEST); + glGetBooleanv(GL_COLOR_WRITEMASK, oldwrite); + glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE); + glClearColor(0.0, 1.0, 1.0, 1.0); + glClear(GL_COLOR_BUFFER_BIT); + glColorMask(oldwrite[0], oldwrite[1], oldwrite[2], oldwrite[3]); + if(!This->resource.wineD3DDevice->render_offscreen) glDrawBuffer(GL_BACK); + checkGLcall("Unused channel clear\n"); + break; + + default: break; + } +} + static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BOOL srgb_mode) { IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; @@ -2006,9 +2041,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BO d3dfmt_get_conv(This, TRUE /* We need color keying */, TRUE /* We will use textures */, &format, &internal, &type, &convert, &bpp, srgb_mode); if (This->Flags & SFLAG_INDRAWABLE) { - if (This->glDescription.level != 0) - FIXME("Surface in texture is only supported for level 0\n"); - else if (This->resource.format == WINED3DFMT_P8 || This->resource.format == WINED3DFMT_A8P8 || + if (This->resource.format == WINED3DFMT_P8 || This->resource.format == WINED3DFMT_A8P8 || This->resource.format == WINED3DFMT_DXT1 || This->resource.format == WINED3DFMT_DXT2 || This->resource.format == WINED3DFMT_DXT3 || This->resource.format == WINED3DFMT_DXT4 || This->resource.format == WINED3DFMT_DXT5) @@ -2027,6 +2060,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BO This->pow2Height, format, type); } + clear_unused_channels(This); + glCopyTexSubImage2D(This->glDescription.target, This->glDescription.level, 0, 0, 0, 0, @@ -2768,9 +2803,17 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * TRACE("(%p)->(%p,%p,%p,%08x,%p)\n", This, DestRect, SrcSurface, SrcRect, Flags, DDBltFx); /* Get the swapchain. One of the surfaces has to be a primary surface */ + if(This->resource.pool == WINED3DPOOL_SYSTEMMEM) { + WARN("Destination is in sysmem, rejecting gl blt\n"); + return WINED3DERR_INVALIDCALL; + } IWineD3DSurface_GetContainer( (IWineD3DSurface *) This, &IID_IWineD3DSwapChain, (void **)&dstSwapchain); if(dstSwapchain) IWineD3DSwapChain_Release((IWineD3DSwapChain *) dstSwapchain); if(Src) { + if(Src->resource.pool == WINED3DPOOL_SYSTEMMEM) { + WARN("Src is in sysmem, rejecting gl blt\n"); + return WINED3DERR_INVALIDCALL; + } IWineD3DSurface_GetContainer( (IWineD3DSurface *) Src, &IID_IWineD3DSwapChain, (void **)&srcSwapchain); if(srcSwapchain) IWineD3DSwapChain_Release((IWineD3DSwapChain *) srcSwapchain); } diff --git a/dlls/winedos/vga.c b/dlls/winedos/vga.c index dcf68dd508b..2a07f219e47 100644 --- a/dlls/winedos/vga.c +++ b/dlls/winedos/vga.c @@ -646,7 +646,7 @@ void VGA_SetWindowStart(int start) * Get start of 64k window at 0xa0000 in bytes. * Value is -1 in color plane modes. */ -int VGA_GetWindowStart() +int VGA_GetWindowStart(void) { return vga_fb_window; } diff --git a/dlls/winedos/vxd.c b/dlls/winedos/vxd.c index 4e8332789e0..18ca0d4985d 100644 --- a/dlls/winedos/vxd.c +++ b/dlls/winedos/vxd.c @@ -41,7 +41,6 @@ #include "wingdi.h" #include "winuser.h" #include "wine/winbase16.h" -#include "wine/winuser16.h" #include "dosexe.h" #include "wine/debug.h" diff --git a/dlls/wineps.drv/escape.c b/dlls/wineps.drv/escape.c index 3e5de7f5ab4..e440047d3a4 100644 --- a/dlls/wineps.drv/escape.c +++ b/dlls/wineps.drv/escape.c @@ -23,7 +23,6 @@ #include "winbase.h" #include "wingdi.h" #include "wine/wingdi16.h" -#include "wine/winuser16.h" #include "wownt32.h" #include "psdrv.h" #include "wine/debug.h" diff --git a/dlls/wineps.drv/mkagl.c b/dlls/wineps.drv/mkagl.c index 9701621ff80..3606fe675a1 100644 --- a/dlls/wineps.drv/mkagl.c +++ b/dlls/wineps.drv/mkagl.c @@ -55,12 +55,12 @@ static int cmp_by_name(const void *a, const void *b) return strcmp(((const GLYPHINFO *)a)->name, ((const GLYPHINFO *)b)->name); } -static inline void sort_by_UV() +static inline void sort_by_UV(void) { qsort(glyphs, num_glyphs, sizeof(GLYPHINFO), cmp_by_UV); } -static inline void sort_by_name() +static inline void sort_by_name(void) { qsort(glyphs, num_glyphs, sizeof(GLYPHINFO), cmp_by_name); } @@ -113,7 +113,7 @@ static inline void triple_space(FILE *f) * Read the Adobe Glyph List from 'glyphlist.txt' */ -static void read_agl() +static void read_agl(void) { FILE *f = fopen("glyphlist.txt", "r"); char linebuf[256], namebuf[128], commbuf[128]; diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index d8d57a69b0d..25c0a3ff097 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1008,6 +1008,7 @@ static void get_desktop_xwin( Display *display, struct x11drv_win_data *data ) { data->managed = TRUE; SetPropA( data->hwnd, managed_prop, (HANDLE)1 ); + set_initial_wm_hints( display, data ); } } } diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index ce5323b9df8..44c41a1e755 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -6447,7 +6447,7 @@ BOOL WINAPI AddPrinterDriverExW( LPWSTR pName, DWORD level, LPBYTE pDriverInfo, ptr = get_servername_from_name(pName); HeapFree(GetProcessHeap(), 0, ptr); if (ptr) { - FIXME("not suported for server: %s\n", debugstr_w(pName)); + FIXME("not supported for server: %s\n", debugstr_w(pName)); SetLastError(ERROR_ACCESS_DENIED); return FALSE; } diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 872ac9b757e..29d9f5b753c 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -29,6 +29,7 @@ extern "C" { GpStatus WINGDIPAPI GdipClonePen(GpPen*,GpPen**); GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**); +GpStatus WINGDIPAPI GdipCreatePen2(GpBrush*,REAL,GpUnit,GpPen**); GpStatus WINGDIPAPI GdipDeletePen(GpPen*); GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen*,GpBrush**); GpStatus WINGDIPAPI GdipGetPenColor(GpPen*,ARGB*); @@ -53,36 +54,61 @@ GpStatus WINGDIPAPI GdipCreateFromHDC(HDC,GpGraphics**); GpStatus WINGDIPAPI GdipCreateFromHWND(HWND,GpGraphics**); GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF*,GDIPCONST GpPointF*, ARGB,ARGB,GpWrapMode,GpLineGradient**); +GpStatus WINGDIPAPI GdipCreateLineBrushI(GDIPCONST GpPoint*,GDIPCONST GpPoint*, + ARGB,ARGB,GpWrapMode,GpLineGradient**); +GpStatus WINGDIPAPI GdipCreateLineBrushFromRect(GDIPCONST GpRectF*,ARGB,ARGB, + LinearGradientMode,GpWrapMode,GpLineGradient**); +GpStatus WINGDIPAPI GdipCreateLineBrushFromRectI(GDIPCONST GpRect*,ARGB,ARGB, + LinearGradientMode,GpWrapMode,GpLineGradient**); GpStatus WINGDIPAPI GdipCreateMetafileFromEmf(HENHMETAFILE,BOOL,GpMetafile**); GpStatus WINGDIPAPI GdipCreateMetafileFromWmf(HMETAFILE,BOOL, GDIPCONST WmfPlaceableFileHeader*,GpMetafile**); GpStatus WINGDIPAPI GdipCreateStreamOnFile(GDIPCONST WCHAR*,UINT,IStream**); GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *); GpStatus WINGDIPAPI GdipDrawArc(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL, - REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawArcI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawBezierI(GpGraphics*,GpPen*,INT,INT,INT,INT,INT,INT,INT,INT); +GpStatus WINGDIPAPI GdipDrawCurve(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); +GpStatus WINGDIPAPI GdipDrawCurveI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL); +GpStatus WINGDIPAPI GdipDrawCurve2I(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT,REAL); GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics*,GpImage*,INT,INT); GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics*,GpImage*, GDIPCONST GpPointF*,INT,REAL,REAL,REAL,REAL,GpUnit, GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); +GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics*,GpImage*, + GDIPCONST GpPointF*,INT,INT,INT,INT,INT,GpUnit, + GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*); GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL, REAL,REAL,REAL,REAL,REAL,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort, VOID*); -GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics,GpPen*,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics*,GpImage*,INT,INT,INT, + INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort, + VOID*); +GpStatus WINGDIPAPI GdipDrawLine(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT); +GpStatus WINGDIPAPI GdipDrawLinesI(GpGraphics*,GpPen*,GDIPCONST GpPoint*,INT); GpStatus WINGDIPAPI GdipDrawPath(GpGraphics*,GpPen*,GpPath*); GpStatus WINGDIPAPI GdipDrawPie(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawPieI(GpGraphics*,GpPen*,INT,INT,INT,INT,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawRectangle(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawRectangleI(GpGraphics*,GpPen*,INT,INT,INT,INT); -GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics*,GpPen*,GpRectF*,INT); +GpStatus WINGDIPAPI GdipDrawRectangles(GpGraphics*,GpPen*,GDIPCONST GpRectF*,INT); +GpStatus WINGDIPAPI GdipDrawRectanglesI(GpGraphics*,GpPen*,GDIPCONST GpRect*,INT); GpStatus WINGDIPAPI GdipDrawString(GpGraphics*,GDIPCONST WCHAR*,INT, GDIPCONST GpFont*,GDIPCONST RectF*, GDIPCONST GpStringFormat*, GDIPCONST GpBrush*); GpStatus WINGDIPAPI GdipFillPath(GpGraphics*,GpBrush*,GpPath*); GpStatus WINGDIPAPI GdipFillPie(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL,REAL,REAL); -GpStatus WINGDIPAPI GdipFillPolygonI(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT, - GpFillMode); +GpStatus WINGDIPAPI GdipFillPieI(GpGraphics*,GpBrush*,INT,INT,INT,INT,REAL,REAL); +GpStatus WINGDIPAPI GdipFillPolygon(GpGraphics*,GpBrush*,GDIPCONST GpPointF*, + INT,GpFillMode); +GpStatus WINGDIPAPI GdipFillPolygonI(GpGraphics*,GpBrush*,GDIPCONST GpPoint*, + INT,GpFillMode); +GpStatus WINGDIPAPI GdipFillPolygon2(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT); +GpStatus WINGDIPAPI GdipFillPolygon2I(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT); GpStatus WINGDIPAPI GdipFillRectangle(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics*,GpBrush*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipGetCompositingMode(GpGraphics*,CompositingMode*); @@ -112,8 +138,8 @@ GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics*,GpMatrix*); GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipCloneBrush(GpBrush*,GpBrush**); -GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF*,INT,GpWrapMode, - GpPathGradient**); +GpStatus WINGDIPAPI GdipCreatePathGradient(GDIPCONST GpPointF*,INT,GpWrapMode,GpPathGradient**); +GpStatus WINGDIPAPI GdipCreatePathGradientI(GDIPCONST GpPoint*,INT,GpWrapMode,GpPathGradient**); GpStatus WINGDIPAPI GdipCreatePathGradientFromPath(GDIPCONST GpPath*, GpPathGradient**); GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**); @@ -122,12 +148,14 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage*,GDIPCONST GpImageAttributes*, GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush*); GpStatus WINGDIPAPI GdipGetBrushType(GpBrush*,GpBrushType*); GpStatus WINGDIPAPI GdipGetLineGammaCorrection(GpLineGradient*,BOOL*); +GpStatus WINGDIPAPI GdipGetPathGradientCenterColor(GpPathGradient*,ARGB*); GpStatus WINGDIPAPI GdipGetPathGradientCenterPoint(GpPathGradient*,GpPointF*); GpStatus WINGDIPAPI GdipGetPathGradientFocusScales(GpPathGradient*,REAL*,REAL*); GpStatus WINGDIPAPI GdipGetPathGradientGammaCorrection(GpPathGradient*,BOOL*); GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient*,INT*); GpStatus WINGDIPAPI GdipGetPathGradientSurroundColorsWithCount(GpPathGradient*, ARGB*,INT*); +GpStatus WINGDIPAPI GdipGetPathGradientWrapMode(GpPathGradient*,GpWrapMode*); GpStatus WINGDIPAPI GdipGetSolidFillColor(GpSolidFill*,ARGB*); GpStatus WINGDIPAPI GdipSetLineBlend(GpLineGradient*,GDIPCONST REAL*, GDIPCONST REAL*,INT); @@ -149,6 +177,8 @@ GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT); +GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathLineI(GpPath*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL); @@ -159,14 +189,14 @@ GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT, GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipDeletePath(GpPath*); -GpStatus WINGDIPAPI GdipFillPolygon(GpGraphics*,GpBrush*,GDIPCONST GpPointF*, - INT,GpFillMode); GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath*,GpFillMode*); GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT); GpStatus WINGDIPAPI GdipGetPathTypes(GpPath*,BYTE*,INT); -GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath*,GpRectF*,GDIPCONST GpMatrix*, - GDIPCONST GpPen*); +GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath*,GpRectF*,GDIPCONST GpMatrix*,GDIPCONST GpPen*); +GpStatus WINGDIPAPI GdipGetPathWorldBoundsI(GpPath*,GpRect*,GDIPCONST GpMatrix*,GDIPCONST GpPen*); GpStatus WINGDIPAPI GdipGetPointCount(GpPath*,INT*); + GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(GpPath*,REAL,REAL,GpPen*, + GpGraphics*,BOOL*); GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPointI(GpPath*,INT,INT,GpPen*, GpGraphics*,BOOL*); GpStatus WINGDIPAPI GdipResetPath(GpPath*); @@ -175,8 +205,6 @@ GpStatus WINGDIPAPI GdipStartPathFigure(GpPath*); GpStatus WINGDIPAPI GdipTransformPath(GpPath*,GpMatrix*); GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix*,GpMatrix**); -GpStatus WINGDIPAPI GdipCreateLineBrushFromRectI(GDIPCONST GpRect*,ARGB,ARGB, - LinearGradientMode,GpWrapMode,GpLineGradient**); GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix**); GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**); GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *,GDIPCONST GpPointF*, @@ -205,6 +233,7 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap, GpLineCap); GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*); +GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap*,INT,INT,ARGB); GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap*,GDIPCONST GpRect*,UINT, PixelFormat,BitmapData*); GpStatus WINGDIPAPI GdipConvertToEmfPlus(const GpGraphics*,GpMetafile*,BOOL*, @@ -216,6 +245,9 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*, GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,GpBitmap**); GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream*,GpBitmap**); GpStatus WINGDIPAPI GdipDisposeImage(GpImage*); +GpStatus WINGDIPAPI GdipFindFirstImageItem(GpImage*,ImageItemData*); +GpStatus WINGDIPAPI GdipFindNextImageItem(GpImage*,ImageItemData*); +GpStatus WINGDIPAPI GdipGetImageItemData(GpImage*,ImageItemData*); GpStatus WINGDIPAPI GdipGetImageBounds(GpImage*,GpRectF*,GpUnit*); GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**); GpStatus WINGDIPAPI GdipGetImageHeight(GpImage*,UINT*); @@ -225,14 +257,21 @@ GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage*,GUID*); GpStatus WINGDIPAPI GdipGetImageType(GpImage*,ImageType*); GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage*,REAL*); GpStatus WINGDIPAPI GdipGetImageWidth(GpImage*,UINT*); +GpStatus WINGDIPAPI GdipGetMetafileHeaderFromEmf(HENHMETAFILE,MetafileHeader*); +GpStatus WINGDIPAPI GdipGetMetafileHeaderFromFile(GDIPCONST WCHAR*,MetafileHeader*); GpStatus WINGDIPAPI GdipGetMetafileHeaderFromMetafile(GpMetafile*,MetafileHeader*); +GpStatus WINGDIPAPI GdipGetMetafileHeaderFromStream(IStream*,MetafileHeader*); +GpStatus WINGDIPAPI GdipGetMetafileHeaderFromWmf(HMETAFILE,GDIPCONST WmfPlaceableFileHeader*,MetafileHeader*); GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage*,PROPID,UINT*); GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage*,GDIPCONST GUID*,UINT*); GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage*,GUID*,UINT); GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage*,GDIPCONST GUID*,UINT); +GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR*,GpImage**); +GpStatus WINGDIPAPI GdipLoadImageFromFileICM(GDIPCONST WCHAR*,GpImage**); GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream*,GpImage**); GpStatus WINGDIPAPI GdipLoadImageFromStreamICM(IStream*,GpImage**); GpStatus WINGDIPAPI GdipRemovePropertyItem(GpImage*,PROPID); +GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage*,GDIPCONST WCHAR*,GDIPCONST CLSID*,GDIPCONST EncoderParameters*); GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage*,IStream*, GDIPCONST CLSID*,GDIPCONST EncoderParameters*); GpStatus WINGDIPAPI GdipSetImagePalette(GpImage*,GDIPCONST ColorPalette*); diff --git a/include/gdiplusgpstubs.h b/include/gdiplusgpstubs.h index 7b08538aac9..364f21c4364 100644 --- a/include/gdiplusgpstubs.h +++ b/include/gdiplusgpstubs.h @@ -69,12 +69,12 @@ typedef FillMode GpFillMode; typedef PathData GpPathData; typedef LineCap GpLineCap; typedef RectF GpRectF; +typedef Rect GpRect; typedef LineJoin GpLineJoin; typedef DashCap GpDashCap; typedef DashStyle GpDashStyle; typedef MatrixOrder GpMatrixOrder; typedef Point GpPoint; typedef WrapMode GpWrapMode; -typedef Rect GpRect; #endif diff --git a/include/gdiplusimaging.h b/include/gdiplusimaging.h index 28fe28bca88..c78e1b16eb1 100644 --- a/include/gdiplusimaging.h +++ b/include/gdiplusimaging.h @@ -54,6 +54,18 @@ public: UINT_PTR Reserved; }; +class ImageItemData +{ +public: + UINT Size; + UINT Position; + VOID* Desc; + UINT DescSize; + VOID* Data; + UINT DataSize; + UINT Cookie; +}; + #else /* end of c++ typedefs */ typedef enum ImageLockMode ImageLockMode; @@ -80,7 +92,18 @@ typedef struct BitmapData PixelFormat PixelFormat; VOID* Scan0; UINT_PTR Reserved; /* undocumented: stores the lock mode */ -}BitmapData; +} BitmapData; + +typedef struct ImageItemData +{ + UINT Size; + UINT Position; + VOID* Desc; + UINT DescSize; + VOID* Data; + UINT DataSize; + UINT Cookie; +} ImageItemData; #endif /* end of c typedefs */ diff --git a/include/gdiplustypes.h b/include/gdiplustypes.h index 96112ea96f1..9d73a851b09 100644 --- a/include/gdiplustypes.h +++ b/include/gdiplustypes.h @@ -177,6 +177,7 @@ public: REAL Height; }; +/* FIXME: missing the methods. */ class Rect { public: diff --git a/include/ntsecapi.h b/include/ntsecapi.h index 8ef61674e3f..cedd20ce94c 100644 --- a/include/ntsecapi.h +++ b/include/ntsecapi.h @@ -235,6 +235,21 @@ typedef struct _POLICY_MODIFICATION_INFO LARGE_INTEGER DatabaseCreationTime; } POLICY_MODIFICATION_INFO, *PPOLICY_MODIFICATION_INFO; +typedef struct _SECURITY_LOGON_SESSION_DATA { + ULONG Size; + LUID LogonId; + LSA_UNICODE_STRING UserName; + LSA_UNICODE_STRING LogonDomain; + LSA_UNICODE_STRING AuthenticationPackage; + ULONG LogonType; + ULONG Session; + PSID Sid; + LARGE_INTEGER LogonTime; + LSA_UNICODE_STRING LogonServer; + LSA_UNICODE_STRING DnsDomainName; + LSA_UNICODE_STRING Upn; +} SECURITY_LOGON_SESSION_DATA, *PSECURITY_LOGON_SESSION_DATA; + typedef struct { SID_NAME_USE Use; diff --git a/include/setupapi.h b/include/setupapi.h index 243463927c7..60a794b8d91 100644 --- a/include/setupapi.h +++ b/include/setupapi.h @@ -751,6 +751,7 @@ LONG WINAPI QueryRegistryValue(HKEY, PCWSTR, PBYTE *, PDWORD, PDWORD); DWORD WINAPI RetreiveFileSecurity(PCWSTR, PSECURITY_DESCRIPTOR *); BOOL WINAPI SetupCloseFileQueue( HSPFILEQ ); void WINAPI SetupCloseInfFile( HINF hinf ); +void WINAPI SetupCloseLog(void); BOOL WINAPI SetupCommitFileQueueA( HWND, HSPFILEQ, PSP_FILE_CALLBACK_A, PVOID ); BOOL WINAPI SetupCommitFileQueueW( HWND, HSPFILEQ, PSP_FILE_CALLBACK_W, PVOID ); #define SetupCommitFileQueue WINELIB_NAME_AW(SetupCommitFileQueue) @@ -892,6 +893,9 @@ BOOL WINAPI SetupInstallFromInfSectionW(HWND,HINF,PCWSTR,UINT,HKEY,PCWSTR,UI BOOL WINAPI SetupIterateCabinetA(PCSTR, DWORD, PSP_FILE_CALLBACK_A, PVOID); BOOL WINAPI SetupIterateCabinetW(PCWSTR, DWORD, PSP_FILE_CALLBACK_W, PVOID); #define SetupIterateCabinet WINELIB_NAME_AW(SetupIterateCabinet) +BOOL WINAPI SetupLogErrorA(LPCSTR,LogSeverity); +BOOL WINAPI SetupLogErrorW(LPCWSTR,LogSeverity); +#define SetupLogError WINELIB_NAME_AW(SetupLogError) BOOL WINAPI SetupOpenAppendInfFileA( PCSTR, HINF, UINT * ); BOOL WINAPI SetupOpenAppendInfFileW( PCWSTR, HINF, UINT * ); #define SetupOpenAppendInfFile WINELIB_NAME_AW(SetupOpenAppendInfFile) @@ -899,6 +903,7 @@ HSPFILEQ WINAPI SetupOpenFileQueue(void); HINF WINAPI SetupOpenInfFileA( PCSTR name, PCSTR pszclass, DWORD style, UINT *error ); HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR pszclass, DWORD style, UINT *error ); #define SetupOpenInfFile WINELIB_NAME_AW(SetupOpenInfFile) +BOOL WINAPI SetupOpenLog(BOOL); HINF WINAPI SetupOpenMasterInf( VOID ); INT WINAPI SetupPromptReboot( HSPFILEQ, HWND, BOOL); BOOL WINAPI SetupQueryInfFileInformationA(PSP_INF_INFORMATION, UINT, PSTR, DWORD, PDWORD); diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 52035716735..5805806f196 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -2499,6 +2499,8 @@ struct get_message_request unsigned int get_first; unsigned int get_last; unsigned int hw_id; + unsigned int wake_mask; + unsigned int changed_mask; }; struct get_message_reply { @@ -2523,7 +2525,7 @@ struct get_message_reply struct reply_message_request { struct request_header __header; - unsigned int result; + unsigned long result; int remove; /* VARARG(data,bytes); */ }; @@ -2556,7 +2558,7 @@ struct get_message_reply_request struct get_message_reply_reply { struct reply_header __header; - unsigned int result; + unsigned long result; /* VARARG(data,bytes); */ }; @@ -4830,6 +4832,6 @@ union generic_reply struct make_process_system_reply make_process_system_reply; }; -#define SERVER_PROTOCOL_VERSION 310 +#define SERVER_PROTOCOL_VERSION 312 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/include/wine/wined3d_types.h b/include/wine/wined3d_types.h index b7dc333fa6b..477df2479c1 100644 --- a/include/wine/wined3d_types.h +++ b/include/wine/wined3d_types.h @@ -1267,6 +1267,13 @@ typedef struct WineDirect3DStridedData { } WineDirect3DStridedData; typedef struct WineDirect3DVertexStridedData { + /* IMPORTANT: + * + * This structure can be accessed in two ways: Named access, and array + * access. Please note that named access is only valid with the fixed + * function vertex pipeline, and the arrays are only valid with the + * programmable vertex pipeline(vertex shaders) + */ union { struct { diff --git a/programs/taskmgr/De.rc b/programs/taskmgr/De.rc index ac2c0028c9b..516f1ab7477 100644 --- a/programs/taskmgr/De.rc +++ b/programs/taskmgr/De.rc @@ -480,5 +480,5 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_NORMAL "Setzt den Prozeß in die NORMAL-Prioritätsklasse" ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "Setzt den Prozeß in die NIEDRIGER ALS NORMAL-Prioritätsklasse" ID_PROCESS_PAGE_SETPRIORITY_LOW "Setzt den Prozeß in die NIEDRIG-Prioritätsklasse" - IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\r\n\r\nYou should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." END diff --git a/programs/taskmgr/En.rc b/programs/taskmgr/En.rc index cef35e5f457..988b4d0ee14 100644 --- a/programs/taskmgr/En.rc +++ b/programs/taskmgr/En.rc @@ -496,5 +496,5 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "Sets process to the BELOW NORMAL priority class" ID_PROCESS_PAGE_SETPRIORITY_LOW "Sets process to the LOW priority class" - IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\r\n\r\nYou should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." END diff --git a/programs/taskmgr/Ja.rc b/programs/taskmgr/Ja.rc index 96717a0fc86..66915f73a3f 100644 --- a/programs/taskmgr/Ja.rc +++ b/programs/taskmgr/Ja.rc @@ -497,5 +497,5 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "ƒvƒ�ƒZƒX‚Ì—D�æƒNƒ‰ƒX‚ð ’Ê�íˆÈ‰º ‚É�ݒ肵‚Ü‚·�B" ID_PROCESS_PAGE_SETPRIORITY_LOW "ƒvƒ�ƒZƒX‚Ì—D�æƒNƒ‰ƒX‚ð ’á ‚É�ݒ肵‚Ü‚·�B" - IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\r\n\r\nYou should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." END diff --git a/programs/taskmgr/Ko.rc b/programs/taskmgr/Ko.rc index ae2f59c9010..97d4ab27c6e 100644 --- a/programs/taskmgr/Ko.rc +++ b/programs/taskmgr/Ko.rc @@ -496,5 +496,5 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "ÀÛ¾÷À» º¸Å뺸´Ù ³·Àº ¼øÀ§ Ŭ·¡½º·Î ¼³Á¤" ID_PROCESS_PAGE_SETPRIORITY_LOW "ÀÛ¾÷À» ³·Àº ¼øÀ§ Ŭ·¡½º·Î ¼³Á¤" - IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\r\n\r\nYou should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." END diff --git a/programs/taskmgr/Nl.rc b/programs/taskmgr/Nl.rc index 29c3ee45eeb..9416e4c9cdf 100644 --- a/programs/taskmgr/Nl.rc +++ b/programs/taskmgr/Nl.rc @@ -480,5 +480,5 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_NORMAL "Zet het proces in de NORMAAL-prioriteitsklasse" ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "Zet het proces in de LAGER DAN NORMAAL-prioriteitsklasse" ID_PROCESS_PAGE_SETPRIORITY_LOW "Zet het proces in de LAGE-prioriteitsklasse" - IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\r\n\r\nYou should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." END diff --git a/programs/taskmgr/No.rc b/programs/taskmgr/No.rc index c8b2a8bb702..a81a0576b54 100644 --- a/programs/taskmgr/No.rc +++ b/programs/taskmgr/No.rc @@ -496,5 +496,5 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "Gir prosessen under normal prioritet" ID_PROCESS_PAGE_SETPRIORITY_LOW "Gir prosessen lav prioritet" - IDS_LICENSE "Dette programmer er fri programvare; du kan redistribuere det i henhold til vilkårene i 'GNU Lesser General Public License', utgitt av 'the Free Software Foundation'; enten versjon 2.1 av lisensen, eller (hvis du ønsker) en nyere versjon.\r\n\r\nDette programmet distribueres med et håp om at det er nyttig, men UTEN ENHVER FORM FOR GARANTI; ikke engang garanti for HANDELSDYKTIGHET eller EGNETHET FOR ET SPESIELT FORMÅL. Se 'GNU General Public License' for detaljer.\r\n\r\nDu skal ha fått en kopi av 'GNU General Public License' sammen med programmet; hvis ikke, skriv til 'the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA'." + IDS_LICENSE "Dette programmer er fri programvare; du kan redistribuere det i henhold til vilkårene i 'GNU Lesser General Public License', utgitt av 'the Free Software Foundation'; enten versjon 2.1 av lisensen, eller (hvis du ønsker) en nyere versjon.\r\n\r\nDette programmet distribueres med et håp om at det er nyttig, men UTEN ENHVER FORM FOR GARANTI; ikke engang garanti for HANDELSDYKTIGHET eller EGNETHET FOR ET SPESIELT FORMÅL. Se 'GNU Lesser General Public License' for detaljer.\r\n\r\nDu skal ha fått en kopi av 'GNU Lesser General Public License' sammen med programmet; hvis ikke, skriv til 'the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA'." END diff --git a/programs/taskmgr/Pl.rc b/programs/taskmgr/Pl.rc index 396eddc2a56..0e61dcdebd4 100644 --- a/programs/taskmgr/Pl.rc +++ b/programs/taskmgr/Pl.rc @@ -496,5 +496,5 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "Ustala priorytet procesu na poni¿ej normalnego" ID_PROCESS_PAGE_SETPRIORITY_LOW "Ustala priorytet procesu na niski" - IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\r\n\r\nYou should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." END diff --git a/programs/taskmgr/Tr.rc b/programs/taskmgr/Tr.rc index 094b200e313..b30d6413a63 100644 --- a/programs/taskmgr/Tr.rc +++ b/programs/taskmgr/Tr.rc @@ -496,5 +496,5 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL "Süreci NORMAL ALTI öncelik sýnýfýnda çalýþmaya ayarlar" ID_PROCESS_PAGE_SETPRIORITY_LOW "Süreci DÜÞÜK öncelik sýnýfýnda çalýþmaya ayarlar" - IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." + IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.\r\n\r\nYou should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA." END diff --git a/programs/taskmgr/graphctl.c b/programs/taskmgr/graphctl.c index 749d9fa801b..e255487039d 100644 --- a/programs/taskmgr/graphctl.c +++ b/programs/taskmgr/graphctl.c @@ -111,7 +111,7 @@ static void GraphCtrl_Init(TGraphCtrl* this) } #if 0 -TGraphCtrl::~TGraphCtrl() +TGraphCtrl::~TGraphCtrl(void) { /* just to be picky restore the bitmaps for the two memory dc's */ /* (these dc's are being destroyed so there shouldn't be any leaks) */ @@ -515,7 +515,7 @@ void GraphCtrl_Resize(TGraphCtrl* this) } #if 0 -void TGraphCtrl::Reset() +void TGraphCtrl::Reset(void) { /* to clear the existing data (in the form of a bitmap) */ /* simply invalidate the entire control */ diff --git a/programs/winefile/Ru.rc b/programs/winefile/Ru.rc index a459f8a7ce1..6294beb088a 100644 --- a/programs/winefile/Ru.rc +++ b/programs/winefile/Ru.rc @@ -265,7 +265,7 @@ STRINGTABLE IDS_LICENSE_CAPTION, "Ëèöåíçèÿ" IDS_LICENSE, "Ýòà ðàáîòà ÿâëÿåòñÿ ñâîáîäíûì ïðîãðàììíûì îáåñïå÷åíèåì; âû ìîæåòå ñâîáîäíî ðàñïðîñòðàíÿòü è/èëè \ -èçìåíÿòü å¸ ïðè ñîáëþäåíèè óñëîâèé ëèöåíçèè GNU General Public \ +èçìåíÿòü å¸ ïðè ñîáëþäåíèè óñëîâèé ëèöåíçèè GNU Lesser General Public \ êîòîðàÿ áûëà îïóáëèêîâàíà Free Software Foundation; \ ëèáî âåðñèè 2.1, ëèáî ëþáîé áîëåå ïîçäíåé âåðñèè.\n\ Äàííàÿ ðàáîòà ðàñïðîñòðàíÿåòñÿ â íàäåæäå, ÷òî îíà áóäåò ïîëåçíîé, \ diff --git a/server/protocol.def b/server/protocol.def index f50987a8ed6..18f42841359 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1859,6 +1859,8 @@ enum message_type unsigned int get_first; /* first message code to get */ unsigned int get_last; /* last message code to get */ unsigned int hw_id; /* id of the previous hardware message (or 0) */ + unsigned int wake_mask; /* wakeup bits mask */ + unsigned int changed_mask; /* changed bits mask */ @REPLY user_handle_t win; /* window handle */ int type; /* message type */ @@ -1878,7 +1880,7 @@ enum message_type /* Reply to a sent message */ @REQ(reply_message) - unsigned int result; /* message result */ + unsigned long result; /* message result */ int remove; /* should we remove the message? */ VARARG(data,bytes); /* message data for sent messages */ @END @@ -1896,7 +1898,7 @@ enum message_type @REQ(get_message_reply) int cancel; /* cancel message if not ready? */ @REPLY - unsigned int result; /* message result */ + unsigned long result; /* message result */ VARARG(data,bytes); /* message data for sent messages */ @END diff --git a/server/queue.c b/server/queue.c index 3220fcb6619..1e8de22f51e 100644 --- a/server/queue.c +++ b/server/queue.c @@ -56,8 +56,8 @@ struct message_result struct msg_queue *sender; /* sender queue */ struct msg_queue *receiver; /* receiver queue */ int replied; /* has it been replied to? */ - unsigned int result; /* reply result */ unsigned int error; /* error code to pass back to sender */ + unsigned long result; /* reply result */ struct message *callback_msg; /* message to queue for callback */ void *data; /* message reply data */ unsigned int data_size; /* size of message reply data */ @@ -437,7 +437,7 @@ static inline void remove_result_from_sender( struct message_result *result ) } /* store the message result in the appropriate structure */ -static void store_message_result( struct message_result *res, unsigned int result, +static void store_message_result( struct message_result *res, unsigned long result, unsigned int error ) { res->result = result; @@ -626,7 +626,7 @@ static void receive_message( struct msg_queue *queue, struct message *msg, } /* set the result of the current received message */ -static void reply_message( struct msg_queue *queue, unsigned int result, +static void reply_message( struct msg_queue *queue, unsigned long result, unsigned int error, int remove, const void *data, data_size_t len ) { struct message_result *res = queue->recv_result; @@ -1828,6 +1828,8 @@ DECL_HANDLER(get_message) return; } + queue->wake_mask = req->wake_mask; + queue->changed_mask = req->changed_mask; set_error( STATUS_PENDING ); /* FIXME */ } diff --git a/server/trace.c b/server/trace.c index befdd595c91..b93e598e260 100644 --- a/server/trace.c +++ b/server/trace.c @@ -2304,7 +2304,9 @@ static void dump_get_message_request( const struct get_message_request *req ) fprintf( stderr, " get_win=%p,", req->get_win ); fprintf( stderr, " get_first=%08x,", req->get_first ); fprintf( stderr, " get_last=%08x,", req->get_last ); - fprintf( stderr, " hw_id=%08x", req->hw_id ); + fprintf( stderr, " hw_id=%08x,", req->hw_id ); + fprintf( stderr, " wake_mask=%08x,", req->wake_mask ); + fprintf( stderr, " changed_mask=%08x", req->changed_mask ); } static void dump_get_message_reply( const struct get_message_reply *req ) @@ -2327,7 +2329,7 @@ static void dump_get_message_reply( const struct get_message_reply *req ) static void dump_reply_message_request( const struct reply_message_request *req ) { - fprintf( stderr, " result=%08x,", req->result ); + fprintf( stderr, " result=%lx,", req->result ); fprintf( stderr, " remove=%d,", req->remove ); fprintf( stderr, " data=" ); dump_varargs_bytes( cur_size ); @@ -2347,7 +2349,7 @@ static void dump_get_message_reply_request( const struct get_message_reply_reque static void dump_get_message_reply_reply( const struct get_message_reply_reply *req ) { - fprintf( stderr, " result=%08x,", req->result ); + fprintf( stderr, " result=%lx,", req->result ); fprintf( stderr, " data=" ); dump_varargs_bytes( cur_size ); } diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c index 0238dc24f22..7afeef6ffd8 100644 --- a/tools/widl/typelib.c +++ b/tools/widl/typelib.c @@ -103,7 +103,7 @@ int is_array(const type_t *t) /* List of oleauto types that should be recognized by name. * (most of) these seem to be intrinsic types in mktyplib. */ -static struct oatype { +static const struct oatype { const char *kw; unsigned short vt; } oatypes[] = { @@ -129,7 +129,8 @@ static int kw_cmp_func(const void *s1, const void *s2) static unsigned short builtin_vt(const type_t *t) { const char *kw = t->name; - struct oatype key, *kwp; + struct oatype key; + const struct oatype *kwp; key.kw = kw; #ifdef KW_BSEARCH kwp = bsearch(&key, oatypes, NTYPES, sizeof(oatypes[0]), kw_cmp_func); @@ -206,6 +207,8 @@ unsigned short get_type_vt(type_t *t) case RPC_FC_UP: case RPC_FC_OP: case RPC_FC_FP: + case RPC_FC_CARRAY: + case RPC_FC_CVARRAY: if(t->ref) { if (match(t->ref->name, "SAFEARRAY")) diff --git a/tools/widl/widl.c b/tools/widl/widl.c index 21657b63cb2..cca13250ce5 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -49,7 +49,7 @@ /* O = generate interpreted stubs */ /* w = select win16/win32 output (?) */ -static char usage[] = +static const char usage[] = "Usage: widl [options...] infile.idl\n" " -c Generate client stub\n" " -C file Name of client stub file (default is infile_c.c)\n" @@ -133,9 +133,9 @@ enum { PREFIX_SERVER_OPTION }; -static const char *short_options = +static const char short_options[] = "cC:d:D:EhH:I:NpP:sS:tT:uU:VW"; -static struct option long_options[] = { +static const struct option long_options[] = { { "oldnames", no_argument, 0, OLDNAMES_OPTION }, { "prefix-all", required_argument, 0, PREFIX_ALL_OPTION }, { "prefix-client", required_argument, 0, PREFIX_CLIENT_OPTION }, diff --git a/tools/winapi/msvcmaker b/tools/winapi/msvcmaker index fac4359af9f..50644ac9b4b 100755 --- a/tools/winapi/msvcmaker +++ b/tools/winapi/msvcmaker @@ -1139,7 +1139,7 @@ sub _generate_winetest_c($) { print OUT "/* Automatically generated file; DO NOT EDIT!! */\n\n"; print OUT "/* Force the linker to generate a .lib file */\n"; - print OUT "void __wine_dummy_lib_function()\n{\n}\n\n"; + print OUT "void __wine_dummy_lib_function(void)\n{\n}\n\n"; } if ($options->wine) { diff --git a/tools/wmc/wmc.c b/tools/wmc/wmc.c index 29412194833..910a654b3c8 100644 --- a/tools/wmc/wmc.c +++ b/tools/wmc/wmc.c @@ -31,7 +31,7 @@ #include "lang.h" #include "write.h" -static char usage[] = +static const char usage[] = "Usage: wmc [options...] [inputfile.mc]\n" " -B x Set output byte-order x={n[ative], l[ittle], b[ig]}\n" " (default is n[ative] which equals " @@ -58,7 +58,7 @@ static char usage[] = "bytes read, which should be 0x0000..0x00ff.\n" ; -static char version_string[] = +static const char version_string[] = "Wine Message Compiler version " PACKAGE_VERSION "\n" "Copyright 2000 Bertho A. Stultiens\n" ; diff --git a/tools/wmc/write.c b/tools/wmc/write.c index 5a8cd717fe0..13b72634a21 100644 --- a/tools/wmc/write.c +++ b/tools/wmc/write.c @@ -87,7 +87,7 @@ * for normal character strings and 1 for unicode strings. */ -static char str_header[] = +static const char str_header[] = "/* This file is generated with wmc version " PACKAGE_VERSION ". Do not edit! */\n" "/* Source : %s */\n" "/* Cmdline: %s */\n" diff --git a/tools/wrc/wrc.c b/tools/wrc/wrc.c index e91661c72bc..828176cb745 100644 --- a/tools/wrc/wrc.c +++ b/tools/wrc/wrc.c @@ -174,9 +174,9 @@ int getopt (int argc, char *const *argv, const char *optstring); static void cleanup_files(void); static void segvhandler(int sig); -static const char* short_options = +static const char short_options[] = "D:Ef:F:hi:I:J:l:o:O:rU:v"; -static struct option long_options[] = { +static const struct option long_options[] = { { "debug", 1, 0, 6 }, { "define", 1, 0, 'D' }, { "endianess", 1, 0, 7 }, -- 2.11.4.GIT