From 2319b14f939af56f5ce916c7a6792996aaceb998 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Tue, 28 Aug 2007 02:06:24 +0200 Subject: [PATCH] push 92ef5b88da02911741c0a2f56030fd2e20189321 --- .gitignore | 2 + ANNOUNCE | 1199 ++++++++++----------- ChangeLog | 1846 ++++++++++++++++++++++++++++++++ VERSION | 2 +- configure | 25 +- configure.ac | 4 + dlls/advapi32/tests/security.c | 6 +- dlls/advpack/files.c | 30 +- dlls/cabinet/cabinet.h | 2 +- dlls/cabinet/cabinet_main.c | 45 +- dlls/cabinet/fdi.c | 1 - dlls/cabinet/tests/extract.c | 194 ++-- dlls/comdlg32/cdlg_No.rc | 16 +- dlls/comdlg32/printdlg.c | 33 +- dlls/crypt32/msg.c | 101 +- dlls/d3d8/device.c | 9 +- dlls/d3d9/device.c | 19 +- dlls/d3d9/tests/visual.c | 504 +++++++++ dlls/dinput/joystick_linux.c | 7 +- dlls/dsound/buffer.c | 91 +- dlls/dsound/dsound.c | 45 +- dlls/dsound/dsound_private.h | 3 +- dlls/dsound/duplex.c | 2 +- dlls/dsound/primary.c | 136 ++- dlls/gphoto2.ds/ds_ctrl.c | 2 +- dlls/gphoto2.ds/gphoto2_Ko.rc | 6 +- dlls/gphoto2.ds/ui.c | 2 + dlls/imm32/imm.c | 74 +- dlls/inseng/regsvr.c | 79 +- dlls/kernel32/console.c | 12 +- dlls/mlang/regsvr.c | 79 +- dlls/mscoree/mscoree_main.c | 96 +- dlls/msi/regsvr.c | 76 +- dlls/msvcrt/mbcs.c | 78 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/tests/string.c | 54 +- dlls/msxml3/regsvr.c | 76 +- dlls/objsel/regsvr.c | 76 +- dlls/ole32/defaulthandler.c | 3 +- dlls/ole32/regsvr.c | 80 +- dlls/rsaenh/implglue.c | 4 +- dlls/rsaenh/implglue.h | 4 +- dlls/rsaenh/rsaenh.c | 6 +- dlls/secur32/dispatcher.c | 2 + dlls/secur32/hmac_md5.c | 4 +- dlls/secur32/hmac_md5.h | 4 +- dlls/secur32/schannel.c | 10 +- dlls/secur32/secur32.c | 6 +- dlls/secur32/secur32_priv.h | 4 +- dlls/secur32/thunks.c | 4 +- dlls/secur32/util.c | 2 +- dlls/setupapi/parser.c | 16 +- dlls/setupapi/setupapi_private.h | 4 +- dlls/setupapi/tests/devinst.c | 4 +- dlls/shdocvw/iexplore.c | 6 + dlls/shlwapi/tests/path.c | 4 + dlls/shlwapi/url.c | 5 +- dlls/user32/message.c | 2 +- dlls/user32/painting.c | 28 +- dlls/user32/tests/msg.c | 5 +- dlls/user32/tests/win.c | 24 +- dlls/user32/win.c | 2 +- dlls/user32/winpos.c | 22 +- dlls/winealsa.drv/dsoutput.c | 39 +- dlls/winealsa.drv/waveinit.c | 4 + dlls/wined3d/context.c | 88 +- dlls/wined3d/device.c | 40 +- dlls/wined3d/directx.c | 170 +-- dlls/wined3d/drawprim.c | 21 +- dlls/wined3d/state.c | 21 +- dlls/wined3d/stateblock.c | 46 +- dlls/wined3d/utils.c | 61 +- dlls/wined3d/wined3d_private.h | 8 +- dlls/wineoss.drv/audio.c | 14 +- dlls/winex11.drv/dce.c | 2 +- dlls/winex11.drv/window.c | 7 +- dlls/winex11.drv/winpos.c | 4 +- dlls/winex11.drv/x11drv.h | 2 +- dlls/winhttp/main.c | 7 + dlls/winhttp/winhttp.spec | 2 +- dlls/winspool.drv/info.c | 105 +- dlls/wintrust/Makefile.in | 1 + dlls/wintrust/register.c | 14 +- dlls/wintrust/softpub.c | 37 + dlls/wintrust/tests/Makefile.in | 5 +- dlls/wintrust/tests/register.c | 2 + dlls/wintrust/tests/softpub.c | 132 +++ dlls/wintrust/wintrust.spec | 2 +- include/config.h.in | 3 + include/hlink.idl | 2 + include/mshtml.idl | 6 + include/ocidl.idl | 1 + include/shlguid.h | 9 +- include/wine/server_protocol.h | 36 +- include/wine/wined3d_gl.h | 3 + include/wine/wined3d_interface.h | 4 +- include/wintrust.h | 57 +- libs/wine/ldt.c | 8 +- loader/Makefile.in | 9 + loader/freebsd.c | 61 ++ programs/wineconsole/curses.c | 1 + programs/wineconsole/dialog.c | 8 +- programs/wineconsole/user.c | 104 +- programs/wineconsole/winecon_private.h | 1 + programs/wineconsole/winecon_user.h | 1 - programs/wineconsole/wineconsole.c | 22 +- programs/winetest/Makefile.in | 2 +- programs/winetest/main.c | 35 + programs/wordpad/Ko.rc | 26 +- server/console.c | 7 + server/protocol.def | 38 +- server/ptrace.c | 15 +- server/trace.c | 2 + server/window.c | 71 +- 114 files changed, 4625 insertions(+), 2030 deletions(-) rewrite ANNOUNCE (95%) create mode 100644 dlls/wintrust/softpub.c create mode 100644 dlls/wintrust/tests/softpub.c create mode 100644 loader/freebsd.c diff --git a/.gitignore b/.gitignore index be3dbc071cf..95e06ac1582 100644 --- a/.gitignore +++ b/.gitignore @@ -764,6 +764,8 @@ libs/wpp/ppl.yy.c libs/wpp/ppy.tab.c libs/wpp/ppy.tab.h loader/wine +loader/wine-freebsd +loader/wine-freebsd-installed loader/wine-glibc loader/wine-glibc-installed loader/wine-kthread diff --git a/ANNOUNCE b/ANNOUNCE dissimilarity index 95% index 3776eaa6538..641a9a89fff 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,654 +1,545 @@ -This is release 0.9.43 of Wine, a free implementation of Windows on Unix. - -What's new in this release: - - Direct3D support on top of WGL instead of GLX for better portability. - - Many DirectSound fixes. - - Still more gdiplus functions. - - Many crypt32 improvements. - - Lots of bug fixes. - -Because of lags created by using mirrors, this message may reach you -before the release is available at the public sites. The sources will -be available from the following locations: - - http://ibiblio.org/pub/linux/system/emulators/wine/wine-0.9.43.tar.bz2 - http://prdownloads.sourceforge.net/wine/wine-0.9.43.tar.bz2 - -Binary packages for various distributions will be available from: - - http://www.winehq.org/site/download - -You will find documentation on - - http://www.winehq.org/site/documentation - -You can also get the current source directly from the git or CVS -repositories. Check respectively http://www.winehq.org/site/git or -http://www.winehq.org/site/cvs for details. - -If you fix something, please submit a patch; instructions on how to do -this can be found at http://www.winehq.org/site/sending_patches - -Wine is available thanks to the work of many people. See the file -AUTHORS in the distribution for the complete list. - ----------------------------------------------------------------- - -Changes since 0.9.42: - -Alexandre Julliard (29): - wined3d: Fix compiler warning. - libwine: Fix lookup of 16-bit dll placeholders. Remove some old compatibility code. - ntdll: Fix a compiler warning. - ntdll: Convert the XML parser to Unicode to support UCS-16 manifests. - ntdll: Fixed the null bytes check in RtlIsTextUnicode. - ntdll: Use the exact size of the manifest file. - ntdll: Allow optional elements in the comClass element. - ntdll: Avoid activation context leak for dlls with no imports. - Avoid non-portable Unix mode bits macros. - make_makefiles: Add check for incorrect module name. - ntdll: Load dll from the directory containing the manifest for local assemblies. - user32: Erase parent window when child is hidden. From a patch by Clinton Stimpson. - advapi32/tests: Don't test the contents of an uninitialized buffer. - configure: Add -m32 flag for C++ compiler too. - ntdll: Relax the activation context size check. - user32: Store all builtin winprocs at the start of the array. - make_makefiles: Added support for updating include/Makefile.in. - gdiplus: Fixed GdiplusStartupOutput definition. - user32: Fixed the return value of DispatchMessageA/W. - user32: Get rid of winproc.h and move definitions in user_private.h. - d3d9: Comment out some failing fog tests. - msvcrt: Use the correct size_t type. - user32: Factor out the various SendMessage functions into a common routine. - user32: Factor out the calling of a window's winproc into a separate function. - user32: Added support for the magic WM_CHAR A->W conversions in Send/Post/DispatchMessage. - user32/tests: Added test cases for WM_CHAR conversions. - user32: Support for the magic WM_CHAR W->A conversion in Get/PeekMessage. - user32: WM_IME_CHAR should result in posted, not sent, WM_CHAR messages. - server: Fixed handling of a relative start time for a timer. - -Andrew Talbot (8): - oleaut32: Constify some variables. - oleaut32: Constify some variables. - oleaut32: Constify some variables. - oleaut32: Constify some variables. - oleaut32: Constify some variables. - oledlg: Constify some variables. - qcap: Constify some variables. - quartz: Constify some variables. - -Aric Stewart (1): - imm32: Additional constants needed for the IME implementation. - -Chris Robinson (11): - winex11: Check for WGL drawing caps. - winex11: Report accumulation buffer bits for pixel formats. - winex11: Don't use ConvertAttribWGLtoGLX for wglCreatePbufferARB. - wgl: WGL_COLOR_BITS_ARB does include alpha. - winex11: Properly handle WGL_PBUFFER_LOST_ARB. - winex11: Be consistent with GLX_SLOW_CONFIG meaning GENERIC_ACCELERATION. - wined3d: Properly setup DevModeW before using it. - wined3d: Initialize major and minor when filling GL caps. - wined3d: Use the macro when querying the current display settings. - wined3d: Use a safer, more compliant method to parse extension strings. - winex11: Don't add spaces to the beginning of the wglExtensions list. - -Clinton Stimpson (1): - user32: Also test parent messages when hiding child window. - -Damjan Jovanovic (1): - msvcrt: mbsnbicmp should be case insensitive. - -Detlef Riekenberg (6): - winspool: Add a TRACE when wine_dlopen for SONAME_LIBCUPS failed. - user32: Add a stub for GetAppCompatFlags2. - comdlg32: Return defaults for hDevMode and hDevNames. - comdlg32/tests: Add simple tests for PrintDlgA. - comdlg32/tests: More tests for the member lStructSize. - winspool/tests: Add tests for EnumPrinterDrivers. - -Dmitry Timoshkov (11): - kernel32: Add more tests for time zone info. - kernel32: Fix TIME_CompTimeZoneID return type. - ntdll: Add some traces to make debugging time zone related problems easier. - ntdll: Simplify TIME_GetBias. - kernel32: Skip remainder of the time zone test if SystemTimeToTzSpecificLocalTime not present. - mshtml: Constify some data. - winecfg: Fix some compatibility problems. - gdi32: Make GetFontData traces more readable. - gdi32: Also print a readable table name in the failure notice. - include: winres.h no longer exists in PSDK, fix winresrc.h includes. - user32: CBN_SELCHANGE notification should be sent before an edit update. - -Erik Inge Bolsø (1): - dinput: Fix joystick axis remapping. - -Evan Stade (101): - gdiplus: Draw custom dashes. - gdiplus/tests: More GdipSetPenDashArray tests. - gdiplus: Check custom dash array for bad properties. - gdiplus: Fixed a typo. - oleaut32: Recognize EMF header when loading picture. - gdiplus: Partial implementation of GdipCreateMetafileFromWMF. - gdiplus: Added GdipGetImageBounds stub. - gdiplus: Added ImageAttributes stubs. - gdiplus: Added GdipDrawImagePointsRect stub. - gdiplus: Implemented GdipGetImageType. - gdiplus: Added a minimal implementation of GdipCreateImageAttributes. - gdiplus: Implemented GdipGetImageBounds for metafiles. - gdiplus: Partial implementation of GdipDrawImagePointsRect. - gdi32: Improve ExtCreatePen parameter checking. - gdi32: Added more tests for ExtCreatePen on PS_USERSTLYE. - gdi32: Handle PS_USERSTYLE in ExtCreatePen. - gdiplus: Implemented GdipDisposeImageAttributes. - gdiplus: Implemented GdipDisposeImage. - gdiplus: Added more stubs to gdiplus.spec. - gdiplus: Changed GdipGetImageType. - gdiplus: Fix memory leak in GdipCreateMetafileFromWMF. - gdiplus: Change include list on 3 tests. - gdiplus: Added GdipGetMetafileHeaderFromMetafile stub. - gdiplus: Added GdipFindFirstImageItem stub. - gdiplus: Added GdipGetMatrixElements. - gdiplus: Added GdipSetMatrixElements. - gdiplus: Added GdipCreateMatrix3. - gdiplus: Implemented GdipLoadImageFromStreamICM. - gdiplus: Added GdipCreateBitmapFromScan0. - gdiplus: Added GdipGetPropertyItemSize stub. - gdiplus: Added partial implementation of GdipSaveImageToStream. - gdiplus: Added GdipCreateBitmapFromStreamICM. - gdiplus: Added GdipRemovePropertyItem stub. - gdiplus: Added GdipBitmapGetPixel stub. - gdiplus: Added GdipSetImageAttributesColorKeys stub. - gdiplus: Track width and height of GpBitmaps. - gdiplus: Extend GdipDrawImagePointsRect. - oleaut32: Slight correction to EMF rendering. - gdiplus: Don't suggest image size when converting WMF to EMF. - gdiplus: Added GdipIsOutlineVisiblePathPointI stub. - gdiplus: Added GdipClonePath. - gdiplus: Added GdipFillPolygon. - gdiplus: Added GdipSetPenWidth. - gdiplus: Added GdipDrawLine. - gdiplus: Added solid-color path gradient brush implementation. - gdiplus: Added GdipSetPathGradientCenterColor. - gdiplus: Added GdipSetPathGradientWrapMode. - gdi32: Don't print fixme more than once. - gdiplus: Added GdipGetPathGradientPointCount. - gdiplus: Added GdipCreatePathGradient. - gdiplus: Added GdipS/GetPathGradientSurroundColorsWithCount stubs. - gdiplus: Added GdipSetPathGradientSigmaBlend stub. - gdiplus: Added GdipS/GetPathGradientGammaCorrection. - gdiplus: Updated GpBrush functions. - gdiplus: Added GdipG/SetPathGradientCenterPoint. - gdiplus: Added GdipG/SetPathGradientFocusScales. - gdiplus: Use custom cap base inset differently. - gdiplus: Removed old fixmes. - gdiplus: Alphabetized header. - oleaut32: Allow PNG_COLOR_TYPE_RGB_ALPHA. - gdiplus: Allow non-default GdiplusStartupInput. - gdiplus: Added GdipCreateBitmapFromStream. - gdiplus: Added GdipImageGetFrameDimensionsList stub. - gdiplus: Added GdipGetImagePixelFormat. - gdiplus: Added GdipImageSelectActiveFrame stub. - gdiplus: Added GdipBitmapLockBits. - gdiplus: Added GdipCreateStreamOnFile. - gdiplus: Added GdipCreateBitmapFromFile. - gdiplus: Return width and height of metafiles. - gdiplus: Added GdipDrawImageI. - gdiplus: Don't prematurely release stream. - gdiplus: GdipLoadImageFromStream makes initializations. - gdiplus: Make GdipGetMetafileHeaderFromMetafile return Ok. - gdiplus: Added GdipCreateLineBrush. - gdiplus: Added GdipSetLineWrapMode. - gdiplus: Added GdipSetLineSigmaBlend stub. - gdiplus: Added GdipGetLineGammaCorrection/GdipSetLineGammaCorrection. - gdiplus: Fixed bug drawing custom caps. - gdiplus: Added GdipSetImageAttributesColorMatrix stub. - gdiplus: Added GdipSetCustomLineCapStrokeCaps stub. - gdiplus: Updated brush cloner/deleter. - gdiplus: Added GdipCreateLineBrushFromRectI. - gdiplus: Added GdipFillRectangleI. - gdiplus: Updated GdipDrawRectangleI. - gdiplus: Added GdipCreatePath2. - gdiplus: Added GdipGetPenDashOffset/GdipSetPenDashOffset. - gdiplus: Added GdipFillRectangle. - gdiplus: Added GdipSetImagePalette stub. - gdiplus/tests: Added GdipCreateBitmapFromScan0 test. - gdiplus: Fixed conformance of GdipCreateBitmapFromScan0. - gdiplus: Added GdipCreateBitmapFromGraphics stub. - oleaut32: Handle transparency data when loading PNG images. - gdiplus: Added GdipGetImageGraphicsContext. - gdiplus: Replace GetDC(0) with CreateCompatibleDC(0). - gdiplus: Added GdipDrawImageRectRect. - gdiplus: Added GdipCreateTextureIA. - gdiplus: Updated GdipCloneBrush, GdipDeleteBrush. - gdiplus: Added GdipSetTextureTransform stub. - gdiplus: Better error checking in GdipBitmapLockBits. - gdiplus: Added GdipTranslateWorldTransform. - gdiplus: Added GdipConvertToEmfPlus stub. - -Francois Gouget (79): - dxdiagn: Fix compilation on systems that don't support nameless unions. - comctl32: According to the PSDK, DrawShadowText() takes a non-const RECT pointer. - crypt32: Fix the CryptReleaseContext() prototype. - crypt32: Add some missing CERT_XXX_ID constants. - crypt32: Add FIXMEs for a couple of missing includes. - winapi: Remove some dead code. - atl: Update win32.api to fix the winapi_check warnings. - Assorted spelling fixes. - d3d9: Declare the D3DPERF_Xxx() functions in d3d9.h. - dnsapi: Define DNS_STATUS as LONG instead of long to improve Win64 compatibility. - dnsapi: Add some constants. - gdiplus: Use the gdiplus type, REAL, rather than FLOAT. - imagehlp: Add two missing fields. - dbghelp: Better match the PSDK types, especially with regards to constness. - dxdiagn: Use quotes to include ddraw.h. Fixes a winapi_check warning. - netapi32: Add missing #include directives to the netapi32 headers. - oleaut32: Fix a signed/unsigned mismatch. - d3d8: Better match the PSDK types and fix the winapi_check warnings. - comctl32: Update win32.api to fix the winapi_check warnings. - advapi32: Update win32.api to fix the winapi_check warnings. - crypt32: Add and use HCRYPTPROV_LEGACY and HCRYPTPROV_OR_NCRYPT_KEY_HANDLE. - gdiplus: Fix a couple of prototypes in the spec file. - opengl32/tests: Add missing '\n' to ok() call. - winapi_check: FLOAT is a float. - netapi32: Fix the NetUseAdd() calling convention. - d3d9: Update win32.api to fix the winapi_check warnings. - mapi32: Add a skeleton mapiform.h header with a proper prototype for MAPIOpenLocalFormContainer(). - kernel32/tests: Re-balance the curly parentheses so winapi_check can parse the file. - imagehlp & dbghelp: Add the IMAGEAPI and DBHLPAPI macros. - advapi32: We have cfgmgr32.h now. - msi: MsiProvideComponentFromDescriptorA/W() is not supposed to be defined in msi.h. - dnsapi: The DNS APIs don't take PIP4_ARRAYs anymore (for IPv6 compatibility). - crypt32: Better match the PSDK types and fix the winapi_check warnings. - mapi32: Add missing #include directives. - dwmapi: Add dwmapi.h and update win32.api to fix the winapi_check warnings. - imagehlp: Better match the PSDK types, especially with regards to constness. - mscoree: Add cor.h and mscoree.idl and fix some semi-stub prototypes. - netapi32: Add fixmes for the headers that are still missing and thus cannot be included in lm.h. - netapi32: Add lmuseflg.h and include it from lmuse.h. - mapi32: Add a prototype for MAPIAdminProfiles. - msi: Fix the MsiEnumProductsEx*(), MsiQueryComponentState*() and MsiProvideQualifiedComponentEx*() prototypes. - ddraw: Better match the PSDK types and fix the winapi_check warnings. - winreg.h: Add RRF_RT_ANY. - pdh/tests: Add missing '\n' to ok() calls. - netapi32: Add some missing prototypes in the lmaccess.h, lmshare.h and lmwksta.h headers. - dnsapi: Better match the PSDK types, especially with regards to constness. - winapi_check: Fix a couple of dll names. - ntdll: Fix the RtlQueryInformationActivationContext() .spec prototype to match its implementation. - crypt32/tests: Fix compilation on systems that don't support nameless unions. - urlmon: Fix compilation on systems that don't support nameless unions. - wintrust: Fix the CryptCATAdminReleaseCatalogContext() prototype and better match the PSDK types. - mapi32: Remove redundant protections against duplicate header inclusion. - hhctrl.ocx: Update win32.api to fix the winapi_check warnings. - wined3d: Update win32.api to fix the winapi_check warnings. - localui: Update win32.api to fix the winapi_check warnings. - hlink: Add a missing prototype and update win32.api to fix the winapi_check warnings. - advapi32: Add a prototype for RegDeleteKeyValue*(). - wininet: #undef some macros to avoid a conflict between openssl/ssl.h and wincrypt.h. - wininet: Add a skeleton winineti.h header with fixed prototypes for [GS]etUrlCacheConfigInfo*(), DeleteIE3Cache() and IsUrlCacheEntryExpired*(). - ddrawex: Better match the PSDK types and fix the winapi_check warnings. - kernel32: Don't get stuck if the debugger exits without signaling the event. - netapi32: Update win32.api to fix the winapi_check warnings. - d3drm: Update win32.api to fix the winapi_check warnings. - imm32: Add a couple of missing prototypes and update win32.api to fix the winapi_check warnings. - msi: Better match the PSDK types, remove some now unused types from win32.api, and update it to fix the winapi_check warnings. - mscoree: Update win32.api to fix the winapi_check warnings. - gdi32: Update win32.api to fix the winapi_check warnings. - Assorted spelling fixes. - d3d8/tests: DXGetErrorString8() prints 'Unknown' for too many hresults which makes diagnosis impossible. So print the raw code instead. - kernel32: Update win32.api to fix the winapi_check warnings. - wined3d: Add a '\n' to a Wine trace. - userenv: Add a skeleton userenv.h header and use it. - userenv: Update win32.api to fix the winapi_check warnings. - wined3d: '0x' is redundant with the '#' format modifier. - mapi32: Update win32.api to fix the winapi_check warnings. - mprapi: Update win32.api to fix the winapi_check warnings. - wing32: Update win32.api to fix the winapi_check warnings. - pdh: Update win32.api to fix the winapi_check warnings. - kernel32/tests: Test the debugger startup and crashed processes exit code. - -H. Verbeet (4): - wined3d: Set SFLAG_INSYSMEM when WINED3DLOCK_DISCARD is passed to IWineD3DSurfaceImpl_LockRect. - wined3d: Add definitions and detection for GL_NV_half_float. - wined3d: Properly load FLOAT16_2 and FLOAT16_4 vertex data. - wined3d: Only report 16 bit float declaration types as supported if we support them. - -Hans Leidekker (4): - wininet: Don't crash on NULL first or last parameter in InternetCrackUrlW. - wininet: Also set last error on NULL first parameter in InternetCreateUrl{A, W}. - wininet: Implement INTERNET_OPTION_CALLBACK in InternetSetOption{A, W}. - wininet: Process caller supplied headers after inserting connection and authorization headers, not before. - -Huw Davies (4): - wininet: Fix the case when Proxy or ProxyBypass is NULL. - ole32: Fix a few comments. - ole32: Factor out the running object test into a separate function. - ole32: The default handler needs to have its own implementation of IPersistStorage. - -Hwang YunSong(황윤성) (2): - winecfg: Updated Korean resource. - write: New Korean resource. - -Jacek Caban (16): - widl: Use correct bytes in write_value. - widl: Added nonbrowsable attribute handling. - widl: Added displaybind attribute handling. - widl: Reorder switch cases to keep alphabetical order. - mshtml.idl: Added some missing attributes. - mshtml: Added mshtml.tlb. - mshtml.tlb: Fixed a typo in copyright header. - mshtml: Added mshtml.tlb registration. - mshtml: Added HTMLWindow's IDispatch methods implementation. - winhttp: Added winhttp.dll. - uuid: Added IID_IProxyManager. - mshtml: Fixed QueryInterface failures on IE7. - mshtml: Added IHTMLWindow::get_external implementation. - shdocvw: Added GetExternal implementation. - shdocvw: Wrong PostData VT is not an error. - mshtml: Release typelib in PROCESS_DETACH. - -James Hawkins (14): - msi: Keep track of the wildcard record index. - msi: Use a more unique property separator. - msi: Treat an empty string and a NULL string as the same value. - msi: Add a stub implementation of MsiSourceListEnumSourcesA. - msiexec: Implement a stub MSIServer service. - msi: Add tests for joining three tables. - msi: Reimplement joins to allow joining any number of tables, each of arbitrary size. - msi: Fix the size allocated for the deferred custom action string. - msi: Add tests for MsiQueryComponentState. - msi: Forward MsiQueryComponentStateA to MsiQueryComponentStateW. - msi: Implement the MSIINSTALLCONTEXT_MACHINE context for MsiQueryComponentState. - msi: Implement the remaining contexts for MsiQueryComponentState. - msi: Simplify MsiQueryComponentState, with more tests. - msi: Implement the UnpublishFeatures standard action. - -Janusz Tomczak (6): - avifil32: Fix Polish translation. - comdlg32: Fix Polish translation. - hhctrl.ocx: Fix Polish translation. - msvfw32: Fix Polish translation. - mpr: Fix Polish translation. - oledlg: Fix Polish translation. - -Jason Edmeades (9): - comdlg32: Save dialog works if fred\ entered as filename. - cmd: Add support for wildcards in copy. - cmd: Fix comment to accurately reflect the function. - cmd: Remove some debug code. - dpnet: Implement directplay lobbied application stubs. - user32: Skip system menu entries when using keyboard. - cmd.exe: Wait when launching GUI pgms in batch. - setupapi: Add test to show setupapi does not handle single quotes. - advpack: Show fixme when advpack fails to prompt user for directory. - -John Klehm (2): - inkobj: Add stub header for inkobj dll. - inkobj: Add stub implementation of inkobj dll. - -Juan Lang (45): - crypt32: A decoded message's parameters are dependent on its type. - crypt32: Correct type of a decoded signed message. - crypt32: Store decoded signed content in message. - crypt32: Test getting parameters from decoded signed messages. - crypt32: Change type to avoid unnecessary casting. - crypt32: Implement getting some parameters from a decoded signed message. - crypt32: Add tests for message stores. - crypt32: Only destroy a decoded message's hash if it's been created. - crypt32: Implement message stores. - crypt32: Test getting more parameters from a decoded signed message. - crypt32: Implement getting inner content of a decoded signed message. - crypt32: Separate decoding PKCS signer info into internal and external versions. - crypt32: Implement getting signer info from a decoded signed message. - crypt32: Implement getting the signer cert info from a decoded signed message. - crypt32: Add CryptMsgControl stub. - crypt32: Add missing definitions. - crypt32: Simplify alignment calculation. - crypt32: Add a few traces. - crypt32: Get rid of attribute certs from signed info, they're not supported anyway. - crypt32: Support getting the inner content OID from a decoded signed message. - crypt32: Use the outer content's signature algorithm rather than the public key's embedded algorithm. - crypt32: Remove bad special case, it isn't necessary since the outer content specifies the hash algorithm. - crypt32: Add CERT_ID_XXX defines. - crypt32: Get rid of bogus check and improve traces for unexpected alt name entry types. - crypt32: Test encoding/decoding a couple more alt name entry types. - crypt32: Implement encoding OID and directory name alt name entries. - crypt32: Introduce a OID decoding function that ignores the tag and use it where the caller already checks the tag. - crypt32: Implement decoding OID and directory name alt name entries. - crypt32: Add and use a helper function for getting cert properties. - crypt32: Fix typo in key context property test, and the problems it hid. - crypt32: Test encoding a cert with a public key. - crypt32: Test encoding a cert with a subject key identifier extension. - crypt32: Test and fix getting a certificate context's key identifier property. - crypt32: Support finding certificates by cert id. - crypt32: Implement CertRDNValueToStr for UTF-8 strings. - crypt32: Introduce cryptasn debug channel to quiet down crypt traces. - crypt32: Fix typo. - crypt32: Use the authority key identifier to search for a certificate's issuer. - crypt32: Test and correct finding a subject certificate. - crypt32: Add a couple traces. - crypt32: According to MSDN, inner content is only decoded when the content type is data. - crypt32: Correct loading OID functions from the registry. - crypt32: Use real certificates to test finding subject certificates, and correct finding them. - crypt32: Trace more return values. - crypt32: Add stub for I_CryptGetAsn1Decoder. - -Kirill K. Smirnov (3): - winecfg: Values list should be NULL-terminated. - kernel32: Do not append empty lines to the console history. - wineconsole: Rearrange control elements in Russian resources. - -Lei Zhang (1): - ntdll: Add Bolivian time zone info. - -Louis Lenders (1): - shell32: Define avi resource #164. - -Luis C. Busquets Pérez (3): - ntdll: Update Nt stdcalls for stubs of Zw. - kernel32: Export RestoreLastError. - dpnlobby: Add dpnlobby that forwards to dpnet.dll. - -Maarten Lankhorst (23): - winealsa: Increase performance of wavein getposition. - winealsa: Increase performance of waveout getposition. - winealsa: Always commit at least 3 periods in dsoutput. - dsound: Replace buffer critical section with a rw-lock. - dsound: Reset state when stopping device. - dsound: Small mixer optimizations. - dsound: Fix locking in mixer. - dsound: Silence the IDirectSoundBuffer_Initialize warnings. - dsound: Remove some more unused variables. - dsound: Constify DSOUND_CheckEvent. - winealsa: Implement a light form of locking for dsoutput. - dsound: Add a registry setting for hel buffer length. - dsound: Get rid of DS_HEL_FRAGS. - dsound: Add SndQueueMin to have less lock contention in mixer. - dsound: Move resampling away from mixer thread. - winealsa: Fix GetPosition in dsoutput. - winealsa: Fix Lock in dsoutput. - winealsa: Don't commit data on Stop and Play. - winealsa: wavein has LPWAVEINCAPSW not LPWAVEOUTCAPSW. - dsound: Sound acceleration fixes. - dsound: Make timer more robust. - dsound: Acceleration fixes for wavein emulation. - dsound: Make hardware acceleration work again. - -Marcus Meissner (1): - kernel32/tests: Fixed size to MultiByteToWideChar. - -Michael Stefaniuc (6): - ntdll: Match the definition of NtQueryEvent() with its declaration. - winefile: Use SendMessageW instead of SNDMSG. - inkobj: Remove break after return. Found by Smatch. - winex11.drv: Move the TRACE before the return. Found by Smatch. - dsound: Remove redundant NULL check before HeapFree. Found by Smatch. - mshtml: Remove const in front of REFIID as that is a macro that already starts with const. - -Mikołaj Zalewski (2): - write.exe: Add a new program that calls wordpad.exe. - user32: CallWindowProc[AW] for mismatched built-in winprocs should take into account if the window is Unicode. - -Misha Koshelev (19): - msi: Use SysAllocString/SysFreeString for BSTR members of EXCEPINFO structure. - urlmon: Set the queue tail to the new task when pushing a task onto the tail of the queue. - urlmon: Use BSCF_ values passed to report_data to keep track of download state. - urlmon: Report BINDSTATUS_DOWNLOADINGDATA on BSCF_INTERMEDIATEDATANOTIFICATION. - urlmon: Report total data read in this bind operation to OnDataAvailable, not the size of the available buffer. - urlmon: Do not fill stream buffer on every report_data, native doesn't. - Revert "urlmon: Report BINDSTATUS_DOWNLOADINGDATA on BSCF_INTERMEDIATEDATANOTIFICATION." - Revert "urlmon: Use BSCF_ values passed to report_data to keep track of download state." - urlmon: Call IBindStatusCallback_OnStopBinding only if this actually is the last ReportData. - urlmon: Send BINDSTATUS_DOWNLOADINGDATA if we do not send BEGINDOWNLOADDATA or ENDDOWNLOADDATA. - urlmon/tests: Fix todo_wine's to show the IServiceProvider interface is not queried on wine from CreateAsyncBindCtx. - urlmon/tests: Declare the bind flags as a global variable in url tests. - urlmon: Add support for synchronous binding. - urlmon/tests: Add tests for synchronous vs asynchronous binding. - urlmon/tests: Keep track of download state in tests. - urlmon/tests: Add test for binding to a URL from which a very short response is received. - urlmon/tests: Fix clipformat test. - urlmon: Do not use BindToStorage_hack for INTERNET_SCHEME_HTTP. - urlmon/tests: Call CHECK_CALLED(OnProgress_SENDINGREQUEST) for FILE_TEST since we SET_EXPECT it. - -Nigel Liang (8): - winecfg: Add trackbar to set screen resolution in graphics tab. - winecfg: Add menu font settings to desktop integration tab. - winecfg: Read/write registry in unicode. - winecfg: Remove bad default setting for logpixels registery. - winecfg: Fix crash caused by calling set_reg_key with NULL value. - winecfg: Fix apply button always available in graphics tab bug. - winecfg: Fix crash in graphics tab. - winecfg: Fix crash when remove app button is pressed in applications tab. - -Paul Vriens (22): - localspl/tests: Use skip if localspl can't be loaded. - advapi32/service: Set correct error when the service doesn't exist. - advapi32/service: Test for too small buffer. - advapi32/service: Fix GetServiceDisplayNameA for service with no displayname. - advapi32/service: Be a bit more consistent. - advapi32/tests: Use skip when we don't have enough rights. - advapi32/service: Cater for domain in the test. - include/pdhmsg.h: Add some defines. - msi/registry: Use the return value of squash_guid. - setupapi/tests: Use GetModuleHandleA instead of LoadLibraryA. - winhttp: Fix compile/install issue. - advapi32/service: Cater better for domain in test. - winetest: Skip tests for which the dll is missing. - winecfg: Fix virtual desktop selection. - shlwapi/tests: Use GetModuleHandleA instead of LoadLibraryA. - kernel32/tests: Changed skip message. - kernel32/tests: Create paths after checking availability of functions. - winecfg: Show version again in About box. - advapi32/tests: Fix typo. - snmpapi/tests: Run tests again on win98 and NT4. - msi/tests: Run tests again on win98 and NT4. - snmpapi/tests: Be more verbose on missing functions. - -Peter Beutner (2): - msvcrt: Add _makepath() tests. - msvcrt: Fix _makepath(). - -Peter Dons Tychsen (3): - server: Added the install driver privilege to the default user. - faultrep: Add a stub dll. - dinput: Allow the use of the standard Joystick GUID when calling CreateDevice. - -Ralf Beck (1): - winealsa.drv: Correct midi input program change + channel aftertouch. - -Rob Shearman (8): - secur32: Split the NTLM credential and context handles into separate objects. - secur32: Remove valid_session_key from NegoHelper since it is only ever set and not read. - include: Add declarations for URLOpenStreamA/W, URLOpenBlockingStreamA/W and URLOpenPullStreamA/W. - urlmon: Implement stubs for URLOpenBlockingStreamA/W and URLOpenStreamA/W. - urlmon: The pcbRead parameter for IInternetProtocol::Read is optional, so fix the protocol implementation to check for this. - urlmon: Implement URLOpenBlockingStreamA/W and URLOpenStreamA/W. - urlmon: Add tests for URLOpenStreamW and URLOpenBlockingStreamW. - urlmon: Check some of the input parameters to URLOpenStreamA/W & URLOpenBlockingStreamA/W for NULL. - -Robert Millan (1): - ddraw: Remove thread safety FIXMEs. - -Robert Reif (2): - msvcrt: Add _aligned_malloc functions. - msvcrt/tests: Add _aligned_malloc tests. - -Roderick Colenbrander (27): - wgl: Fix a BadMatch error resulting from ignoring that iPixelFormat stars counting from 1. - wgl: Fix another BadMatch error by giving a pbuffer its own GLXContext. - wgl: Add WGL_NV_float_buffer and WGL_NV_texture_rectangle support. - wgl: Use correct types and pixelformats for pbuffers. - wgl: Enable WGL_EXT_swap_control by default even when the GLX version isn't there. - wgl: Add WGL_ATI_pixel_format_float/WGL_ARB_pixel_format_float support. - wgl: wglBindTexImageARB should return TRUE on success. - wgl: Replace glReadPixels in wglBindTexImage2D by the MUCH faster glCopyTexImage2D. - wgl: Fix compilation on systems without GLX_RGBA_FLOAT_ARB. - wined3d: Compile against standard GL headers. - wgl: Silence an error in ConvertPixelFormatWGLtoGLX. - wgl: GetPixelFormat fix for offscreen formats. - wgl: SetPixelFormat should fail on the root window. - wgl: Print more debug info. - wgl: Support WGL_FLOAT_COMPONENTS_NV in wglGetPixelFormatAttrib*. - wgl: wglChooosePixelFormatARB returns the total number of matching pixelformats and not the number of pixelformats stored in the buffer. - wined3d: Another devmode bug. - wined3d: Don't call ActivateContext between ENTER_GL/LEAVE_GL. - wined3d: Use UINT instead of uint. - wined3d: Move fake context code over to WGL. - wined3d: Prepare pbuffer code for WGL transition. - wined3d: Move over to WGL. - wgl: Correctly check GLX capabilities. Use client GLX extensions on ATI hardware to work around driver bugs. - wgl: Rewrite ChoosePixelFormat. - wined3d: Better pixelformat selection code. - wined3d: Add better pixelformat selection code for pbuffers. - wgl: Make sure onscreen pixelformats are on top in wglChoosePixelFormatARB. - -Stefan Dösinger (25): - wined3d: Split up the format table. - wined3d: Store the gl format table in the gl info structure. - wined3d: A more dynamic initialization of the gl pixel formats. - d3d8: Skip volume test if volume textures are not supported. - d3d8: Only test pixel shaders for refcounting if they are supported. - d3d8: Only test cube textures if they are supported. - d3d8: Only test volume textures if they are supported. - d3d8: Use a less demanding format for the depth stencil test. - d3d8: Only test pixel shaders if they are supported. - ddraw: Table fog may be unsupported. - ddraw: Some drivers return DDERR_INVALIDPARAMS if DXTn surfaces aren't supported. - wined3d: Downgrade an ERR. - ddraw: SetDisplayMode may fail. - d3d9: Some visual test fixes. - d3d9: Check for volume texture support before running the volume test. - d3d9: Deal with failing surface creation. - d3d8: Skip tests if d3d is not supported. - d3d9: Do not fail if d3d9 is not available. - wined3d: WINED3DSAMP_MAXMIPLEVEL fixes. - wined3d: Present requires the swapchain's context. - ddraw: Implement IDirect3DDevice7::DrawIndexedPrimitiveStrided. - d3d: Add a simple offscreen rendering test. - wined3d: Remove link collection from vertexdeclaration.c. - wined3d: Determine used streams at vdecl creation. - wined3d: Store the position_transformed flag in the vdecl. - -Tijl Coosemans (5): - wineoss: Add SNDCTL_MIXERINFO support. - wineoss: Avoid SNDCTL_DSP_GETTRIGGER. - ntdll: Implement CDROM_Verify for FreeBSD. - configure: Remove check for libxpg4. - loader: Use thr_self syscall to get thread id on FreeBSD. - -Tim Schwartz (1): - lmuse.h: Add structures needed by NetUseAdd(). - -Tomas Carnecky (1): - configure: Check whether linker supports --enable-new-dtags. - -Vitaliy Margolen (5): - dinput: Fix typo. - dinput: Fix mapping of axes ids to property ids. - dinput: Fix handling of dead-zone in evdev joystick. - dinput: Fix POV calculation. - dinput: Reuse common code and definition. - --- -Alexandre Julliard -julliard@winehq.org +This is release 0.9.44 of Wine, a free implementation of Windows on Unix. + +What's new in this release: + - Better heuristics for making windows managed. + - Automatic detection of timezone parameters. + - Improvements to the builtin WordPad. + - Better signatures support in crypt32. + - Still more gdiplus functions. + - Lots of bug fixes. + +Because of lags created by using mirrors, this message may reach you +before the release is available at the public sites. The sources will +be available from the following locations: + + http://ibiblio.org/pub/linux/system/emulators/wine/wine-0.9.44.tar.bz2 + http://prdownloads.sourceforge.net/wine/wine-0.9.44.tar.bz2 + +Binary packages for various distributions will be available from: + + http://www.winehq.org/site/download + +You will find documentation on + + http://www.winehq.org/site/documentation + +You can also get the current source directly from the git or CVS +repositories. Check respectively http://www.winehq.org/site/git or +http://www.winehq.org/site/cvs for details. + +If you fix something, please submit a patch; instructions on how to do +this can be found at http://www.winehq.org/site/sending_patches + +Wine is available thanks to the work of many people. See the file +AUTHORS in the distribution for the complete list. + +---------------------------------------------------------------- + +Changes since 0.9.43: + +Alex Villacís Lasso (4): + quartz: Add test for IReferenceClock. + quartz: Fix IReferenceClock::GetTime() implementation for system clock. + user32: Fix crash while dir-navigating in Win3.1-style file open dialog. + user32: Fix change-drive in Win3.1-style file open dialog. + +Alexander Nicolaysen Sørnes (17): + comdlg32: printdlg: Set/Load paper orientation in PageSetupDlgW. + comdlg32: PrintDlg: Set PD_SELECTION on return. + wordpad: Add search functionality. + wordpad: Display error box when richedit loading fails. + wordpad: Fix formatbar for native comctl32/XP. + wordpad: Fix error handling when saving empty files. + wordpad: Add bullet points option. + wordpad: Add bullet points button. + wordpad: Fix save changes prompt for the open file dialogue. + comdlg32: printdlg: Fix number display in PrintDlgW(). + wordpad: Add recent file list. + wordpad: Handle different formats on open/save. + wordpad: Prompt for format when selecting new file. + wordpad: Clear formatting before opening a file. + wordpad: Store window rect in the registry. + wordpad: Don't show full path in caption. + wordpad: Don't display full path in save changes dialog. + +Alexandre Julliard (29): + ntdll: Fixed the prototype of the open_nt_file wrapper. + comctl32: Create a manifest file at dll registration time. + make_makefiles: wined3d doesn't depend on OpenGL libs anymore. + msvcrt: Use a valid parameter array when demangling a template name. + winex11: Store wm hints in the window data instead of fetching them when needed. + winex11: Don't try to activate the desktop window on take focus. + mscms/tests: Allocate the profile buffer dynamically to make sure it's large enough. + comctl32: Create the manifest directory if needed (spotted by Dan Kegel). + winex11: Move setting of the initial wm hints to a separate function. + winex11: Don't set the cursor on the desktop window since it's managed by another process. + winex11: Don't select for StructureNotify events on unmanaged windows. + ntdll: Return an error instead of dying in wine_server_call if the input buffer is invalid. + user32/tests: Use flush_events more consistently in the message tests. + user32/tests: Allow WM_MOUSEACTIVATE in the mouse hover test for compatibility with X11 focus policy. + winex11: Switch windows to managed mode in SetWindowPos instead of at creation time. + winex11: Force a window to managed mode when it is activated. + dsound: Fix a compiler warning. + gdi32: Add separate functions for releasing/freeing DCs to replace the standard GDI ones. + winex11: Update the wm hints also when mapping a previously zero-size window. + cabinet: Use the proper fcntl defines in the FDI_OPEN calls. + cabinet: Use the correct create disposition in fdi_open. + user32: Thread-local hooks need a module if they don't belong to the current process. + ntdll: Flesh out the stub for IOCTL_STORAGE_GET_DEVICE_NUMBER. + gdi32: Fix a few more places that use the wrong get/release function for DCs. + winex11: Properly update the hdc in the GL context. + winex11: Get rid of get_context_from_GLXContext. + server: Validate the parents every time we paint a window instead of only on RDW_UPDATENOW. + user32: IsChild must not consider the desktop window. + msvcrt: Don't include mbstring.h to avoid conflicts with system headers. + +Andrew Talbot (9): + riched20: Constify some variables. + riched20: Constify some variables. + riched20: Constify some variables. + riched20: Constify some variables. + riched20: Constify some variables. + rpcrt4: Constify some variables. + rpcrt4: Constify some variables. + rsaenh: Constify some variables. + rsaenh: Constify some variables. + +Aric Stewart (1): + shell32: In SHNameTranslate use the right part of the string for sizing. + +Bryan DeGrendel (1): + mscoree: Return S_OK if mono runtime is found. + +Chris Robinson (2): + winex11: Set proper pixel format flags. + wgl: GDI support is not advertised with double buffering. + +Damjan Jovanovic (2): + winex11.drv: Correctly handle overlapping source and destination regions on the same DIB when copying DIBs client-side. + setupapi: Use NtDeleteKey instead of an invalid RegDeleteKeyW. + +Detlef Riekenberg (8): + user32: Call a 16-Bit winproc again. + winspool/tests: Fix 2 failing tests for restricted users. + winspool: Implement AddPrinterDriverExW. + winspool: Implement AddPrinterDriverExA. + winspool: Add always the Win9x and the NT printerdriver. + wineprefixcreate: Create spool/drivers directory for printer drivers. + winspool: Strings can be NULL in AddPrinterDriverExA. + winspool: Forward AddPrinterDriver to AddPrinterDriverEx. + +Dmitry Timoshkov (7): + ntdll: Detect current time zone settings. + kernel32: Fix test case failures for time zones with absolute transition dates. + msvcrt: Route mktime and localtime to glibc. + msvcrt: Restore error handling code in localtime. + kernel32: Restore check for StandardDate.wMonth being 0. + include/wine/test.h: Use appropriate type. + ntdll: Reimplement TIME_GetBias using new time zone code. + +Evan Stade (36): + gdiplus: Fix test to pass in Windows. + gdiplus: Added GdipSetCompositingMode/GdipGetCompositingMode. + gdiplus: Better handle UnitPixel pen width. + gdiplus: Added GdipRotateWorldTransform. + gdiplus: Added GdipScaleWorldTransform. + gdiplus: Added GdipDrawRectangles. + gdiplus: Added font constructor. + gdiplus: Added GdipCreateFontFromLogfontA. + gdiplus: Added GdipDrawString. + gdiplus: Added GdipGetLogFontW. + gdiplus: Added font tests. + gdiplus: Fixed conformance of font constructor. + gdiplus: Added GdipDeleteFont. + gdiplus: Added more font tests. + gdiplus: Save elements of font's style. + gdiplus: Added string format constructor. + gdiplus: Added GdipAddPathBezierI. + gdiplus: Added GdipSetTextRenderingHint/GdipGetTextRenderingHint. + gdiplus: Added GdipAddPathLineI. + gdiplus: Added GdipGetStringFormatAlign/GdipSetStringFormatAlign. + gdiplus: Added GdipGetStringFormatTrimming/GdipSetStringFormatTrimming. + gdiplus: Added GdipSetStringFormatHotkeyPrefix/GdipGetStringFormatHotkeyPrefix. + gdiplus: Added GdipSetLineBlend stub. + gdiplus: Allow null-terminated strings in GdipDrawString. + gdiplus: Added GdipSetStringFormatLineAlign/GdipGetStringFormatLineAlign. + gdiplus: Added GdipDeleteStringFormat. + gdiplus: Added GdipMeasureString. + gdiplus: Fixed 2 GdipDrawString bugs. + gdiplus: Handle StringFormatFlagsNoWrap in GdipDrawString. + gdiplus: Handle StringFormatFlagsNoWrap in GdipMeasureString. + gdiplus: Handle empty layout rectangle in GdipMeasureString. + gdiplus: Handle empty layout rectangle in GdipDrawString. + gdiplus: Use DrawText instead of TabbedTextOut. + gdiplus/tests: Added GdipAddPathLineI test. + gdiplus/tests: Added GpStringFormat tests. + gdiplus: Fix default value of StringTrimmingCharacter. + +Francois Gouget (7): + mshtml: Update win32.api to fix the winapi_check warnings. + kernel32/tests: Remove a redundant RegSetValueExA() call. + nddeapi: Update win32.api to fix the winapi_check warnings. + ntdll: Better match the PSDK types and fix the winapi_check warnings. + ntoskrnel.exe: Better match the PSDK types and fix the winapi_check warnings. + ntprint: Update win32.api to fix the winapi_check warnings. + printui: Update win32.api to fix the winapi_check warnings. + +H. Verbeet (3): + wined3d: UBYTE4 data shouldn't be normalized. + wined3d: Restore a line that got lost. + wined3d: Attach the correct surface the the fbo. + +Hernan Rajchert (1): + wined3d: Fixed error message when glDrawElement fails. + +Huw Davies (2): + riched20: Add some test for EM_GETTEXTLENGTHEX and fix the single line edit cases. + gdi32: Quote the printer name prior to passing it to the shell. + +Jacek Caban (20): + urlmon: Wrap IBindCtx in CreateAsyncBindCtxEx. + mshtml: Don't mess with gecko specific protocols. + mshtml: Added IDM_SELECTALL implementation. + mshtml: Use GetIsCollapsed in IHTMLSelectionObject::get_type. + mshtml: Make get_typeinfo thread safe. + mshtml: Added IHTMLTxtRange::duplicate implementation. + mshtml: Added IHTMLTxtRange::collapse implementation. + mshtml: Added ICustomDoc stub implementation. + mshtml: Reduce debug traces. + mshtml: Check use_wine_url in nsIURI::GetAsciiSpec. + mshtml: Return wine: URI for protocols handled by MSHTML. + mshtml: Make window.external visible for JavaScript code. + mshtml: Call setup_nswindow on load event. + mshtml: Store HTMLDocument reference in HTMLSelectionObject. + mshtml: Store HTMLDocument reference in HTMLTxtRange object. + mshtml: Added IHTMLTxtRange::put_text implementation. + mshtml: Don't create element object for document node. + mshtml: Added get_scrollWidth and get_scrollHeight implementation. + mshtml: Added IHTMLTxtRange::select implementation. + mshtml: Added IHTMLTxtRange::compareEndPoints implementation. + +James Hawkins (7): + msi: Add tests for the RemoveFiles standard action. + cabinet: Formalize the SESSION struct and add more tests of its members. + cabinet: Formalize the SESSION struct. + advpack: Formalize the SESSION struct. + cabinet: Pass the session Error to FDICopy. + cabinet: Append new file nodes to the front of the file list. + cabinet: Return the value of GetLastError if FDICopy fails. + +Jason Edmeades (9): + user32: Allow alt+space to highlight system menu. + user32: Fix regression in alt, then right processing with eg wines notepad. + cmd.exe: Redirection for external programs was broken by the conversion to unicode. + advpack: Strip single quotes (with tests) on reg keys. + regedit: Fix importing of .reg hex. + setupapi: Remove duplicate backslashes on dirids. + comctl32: Fix missing tooltips. + comctl32: Fix tooltips uninitialized variables plus wrong positioning. + comctl32: Listview fails to add a column if mask=0. + +Juan Lang (80): + crypt32: Ex encode/decode functions should call non-Ex versions if no Ex version is available. + crypt32: Use helper functions to simplify CryptDecodeObject and CryptDecodeObjectEx. + crypt32: Validate parameters better in CryptDecodeObject. + crypt32: Use helper functions to simplify CryptEncodeObject and CryptEncodeObjectEx. + crypt32: Improve tracing when builtin function isn't available. + wintrust: Implement CryptSIPGetSignedDataMsg. + wintrust: Add stubs for SPC_LINK and SPC_PE_IMAGE encoding/decoding. + wintrust: Add missing definitions. + wintrust: Add tests for encoding/decoding SPC links. + wintrust: Implement decoding SPC links. + wintrust: Implement encoding SPC links. + wintrust: Add tests for encoding and decoding SPC PE image data. + crypt32: Test authority key identifier with a multi-byte id to show that its byte-order is swapped and fix encoding and decoding it. + crypt32: Add missing break. + crypt32: Avoid a memory allocation when decoding the subject key identifier extension. + crypt32: Test finding the issuer of a certificate. + wintrust: Implement SPC PE image decoding. + wintrust: Implement SPC PE image encoding. + wintrust: Implement SPC indirect data encoding. + wintrust: Implement SPC indirect data decoding. + wintrust: Implement WTHelperGetProvSignerFromChain. + wintrust: Implement WTHelperGetProvCertFromChain. + wintrust: Implement WTHelperProvDataFromStateData. + wintrust: Forward WinVerifyTrustEx to WinVerifyTrust. + crypt32: Fix typo. + crypt32: Fix typo. + crypt32: Move CertGetCertificateChain to chain.c. + crypt32: Add stub for CertFreeCertificateChain. + crypt32: Set output chain to NULL. + crypt32: Add initial tests for certificate chains. + crypt32: Add a chain test with real certificates. + crypt32: Initial implementation of CertGetCertificateChain and CertFreeCertificateChain. + crypt32: Set return value on exception. + crypt32: Free default chain engine. + wintrust: Remove redundant check of pbSignedDataMsg (Coverity). + crypt32: Rename a confusing type. + crypt32: Remove some unnecessary casts. + crypt32: Use public type and APIs for memory stores wherever possible. + crypt32: Use public APIs to empty a store. + crypt32: Use externed vars for context variables. + crypt32: Where possible, pass a pointer rather than an offset, it's less confusing. + crypt32: Move cert store definitions to header. + crypt32: Move collection stores to a separate file. + crypt32: Move provider stores to a separate file. + crypt32: Move registry stores to a separate file. + crypt32: Move file store to a separate file. + crypt32: Pass crypto provider and appropriate flags when opening PKCS messages, and don't store a redundant copy of the crypto provider in message stores. + crypt32: Don't store redundant copy of crypto provider in reg store. + crypt32: Don't store redundant copy of crypto provider in file store. + crypt32: Don't store the crypto provider when it isn't needed. + crypt32: Test an encoded signed message with a cert with a public key. + crypt32: Add tests for CryptMsgControl. + crypt32: Add a default message control function pointer. + crypt32: Add a mostly stub control function for decode messages. + crypt32: Add a couple tests that show you can't get the hash from an encoded hash message, and fix encoded hash messages to match. + crypt32: Implement verifying the hash of a decoded hash message. + crypt32: Make a signed message data type. + crypt32: Use signed message data type for decoded signed messages. + crypt32: Make a helper function to a free a signed message's handles. + crypt32: Make updating a hash a member of signed message data, not signed message. + crypt32: Make more functions members of signed message data, rather than message. + crypt32: Add helper function to update signed message data. + crypt32: Add a helper function to construct a signer handles structure. + crypt32: Separate construction of signer handles from signer info. + crypt32: Don't keep an unneeded copy of the crypto provider for each signer. + crypt32: Use a helper function to allocate signer handles. + crypt32: Make constructing handles a member of signed msg data. + crypt32: Move signed message data functions together. + crypt32: Update a hash message's hash handles when decoding it. + crypt32: Test and implement getting the computed hash from a decoded signed message. + crypt32: Implement verifying a decoded signed message's signature. + crypt32: Trace encoding and decoding public keys on crypt channel. + crypt32: Implement CryptGetMessageCertificates. + crypt32: Test and implement CryptGetMessageSignerCount. + crypt32: Only free allocated handles. + crypt32: Explicitly terminate loop when a matching signer cert is found. + crypt32: Test encoding a signed message with a valid public key. + advapi32: Add more tests for CryptVerifySignatureW, and correct its parameter checking. + crypt32: Test and correct verifying the signature of a valid signed message. + crypt32: Implement CryptVerifyMessageSignature. + +Kirill K. Smirnov (3): + programs/cmd: Do not use hardcoded constants when corresponding macro is already defined. + wineconsole: Move window handle to inner_data structure. + wineconsole: Implement GetConsoleWindow. + +Lei Zhang (6): + riched20: Properly calculate control display height. + riched20: Add missing scroll bar update. + wine.inf: Add twain_32.dll to the list of fake dlls. + gphoto2.ds: Add preview button and ability to disable import GUI. + gphoto2: Import photos in the right order. + gphoto2: Add missing brackets. + +Louis Lenders (1): + kernel32: Set USERNAME environment variable. + +Maarten Lankhorst (11): + dsound: Handle failing of obtaining IDsDriverNotify. + winealsa: Add initial dscapturedriver stub. + winealsa: Implement IDsCaptureDriverImpl_Open. + winealsa: Add IDsCaptureDriverBuffer stub. + winealsa: Add support for opening/closing dsound capture buffer. + winealsa: Add support for playing dsound capture buffer. + dxguid: Remove dsdriver.h from imports. + winealsa: Report card name in volume control fixme. + dsound: Handle failing of IDsDriver_CreateSoundBuffer better. + dsound: Move assignment of DSBCAPS_LOC to primary buffer creation time. + dsound: Transparantly fall back to software mode if hardware mode is unavailable. + +Marcus Meissner (5): + user32: Initialize MONITORINFO.cbSize. + cmd.exe: WCMD_for is only for files. + msi: Allocate 1 byte more buffer. + kernel32: Initialize variable to a known bad value. + comdlg32/tests: Handle case where no printer is configured. + +Mikolaj Zalewski (16): + msvcrt: __mb_cur_max is not updated in _setmbcp (with testcase) and should not be used in _ismbblead. + iexplore: Add VERSIONINFO resource. + setupapi: If needed create directories for fake dlls. + msvcrt: Fill _mbctype table in _setmbcp. + msvcrt: Implement _ismbblead/_ismbbtrail using _mbctype (with tests). + msvcrt: Test and fix _mbsnextc. + msvcrt: Test and fix _mbclen/_mbslen. + msvcrt: Test that some functions depends on locale codepage, not the one set by _setmbcp. + msvcrt: Test and fix _mbccpy, _mbsncpy and _mbsnbcpy. + msvcrt: Don't test codepage 20932. + msvcrt: Test and fix _mbsinc/_mbsninc. + include: Add some definitions to winioctl.h. + advapi32: Return an error if we try to start an already running service. + advapi32: Obtain the process id locally. + msvcrt: Test and fix _ismbslead and _ismbstrail. + msvcrt: Implement and test _mbsbtype. + +Mikołaj Zalewski (6): + kernel: Allocate global memory with execute permission. + winedos: Make UMB executable. + kernel32: Return error code if WOWCallback16Ex of a real-mode function failed. + wininet: Support HTTP_QUERY_RAW_HEADER_CRLF|HTTP_QUERY_FLAG_REQUEST_HEADERS. + wininet: Make HttpQueryInfo[AW] work for lpBuffer == NULL and len > 0. + wininet: A small test for HttpQueryInfoA. + +Misha Koshelev (13): + wininet: Don't peek data in InternetQueryDataAvailable if there is no more to be expected. + wininet: InternetQueryDataAvailable does not return ERROR_NO_MORE_FILES when no more HTTP data is available. + wininet/tests: Test that for an open HTTP connection InternetQueryDataAvailable succeeds or returns ERROR_IO_PENDING. + winebrowser: Add support for XTYP_REQUEST in DDE callback. + urlmon: Fix timing issue with FLAG_REQUEST_COMPLETE and InternetQueryDataAvailable in HttpProtocol_Continue. + urlmon: Call IInternetProtocolSink_AddRef in HttpProtocol where native does (but just once). + urlmon: Call IInternetProtocolSink_Release and ReleaseStgMedium in HttpProtocol where native does. + shlwapi: Take sizeof(WCHAR) into account when allocating Unicode string. + wininet: Don't send INTERNET_STATUS_HANDLE_CLOSING when closing handle opened with InternetOpen for HTTP connection. + wininet: Fix reference count on internet handle for asynchronous InternetReadFileEx call. + wininet: Rename WININET_object_destructor to a more general WININET_object_function. + wininet: Separate connection closing from object destruction. + wininet: Send INTERNET_STATUS_HANDLE_CLOSING when object is being destroyed as native does. + +Nigel Liang (1): + winecfg: Suport color schemes from .theme format themes. + +Paul Vriens (41): + advapi32/tests: Make tests run again on win95. + d3d8/tests: Make tests run again on win95. + crypt32/tests: Make tests run again on win95. + ntdll/tests: Make tests run again on win95. + shell32/tests: Make tests run again on win95. + advapi32/tests: Use GetModuleHandleA and skip. + cabinet/tests: Use GetModuleHandleA instead of LoadLibraryA. + crypt32/tests: Use GetModuleHandle and skip. + msvcrt/tests: Remove wrong FreeLibrary and fix typo's. + secur32/tests: Run tests on win95 again. + user32/tests: Run tests on win95 again. + shell32/tests: Use GetModuleHandle instead of LoadLibrary. + shell32/tests: Use GetModuleHandle instead of LoadLibrary. + wininet/tests: Fix test failures for wininet.dll that comes with IE7. + advapi32/tests: Skip a test when not properly logged in on win9x. + avifil32/regsvr: Replace recursive delete functions by RegDeleteTree. + oleaut32/tests: Use GetModuleHandle and check only once for availability of some functions. + oleaut32/tests: Use GetModuleHandle and add a few skip's. + oleaut32/tests: Add a few skip's to the vartype tests. + oleaut32/tests: Fix a few typos. + oleaut32/tests: Skip VarCat tests if there is no I8 and/or UI8 support. + oleaut32/tests: Skip VarAnd tests if there is no I8 and/or UI8 support. + oleaut32/tests: Skip VarDiv tests if there is no I8 and/or UI8 support. + opengl32/tests: Be a bit more verbose when doing wglGetProcAddress. + mshtml/htmltextcont: Initialize value (Coverity). + oleaut32/tests: Skip VarIdiv tests if there is no I8 and/or UI8 support. + oleaut32/tests: Skip VarImp tests if there is no I8 and/or UI8 support. + oleaut32/tests: Skip VarCat and VarAnd tests a bit better if there is no I8 and/or UI8 support. + msvcrt/tests: Wait for spawned processes to finish. + ntdll/tests: Do GetModuleHandle only once and add a few skip's. + ntdll/tests: Use skip instead of trace. + msi/tests: Be verbose when GetProcAddress fails. + kernel32/tests: Skip some not implemented functions and add a few skip's. + dnsapi/tests: No need to dynamically load dnsapi anymore. + wined3d/vertexdeclaration: Return when out of memory (Coverity). + gdi32: Fix possible NULL pointer dereference (Coverity). + gdi32: Fix possible NULL pointer dereference (Coverity). + ntdll/tests: Fix typos. + atl: Replace SHDeleteKeyW with RegDeleteTreeW and get rid of the import of shlwapi. + winetest: Change the way we report missing dlls. + winetest: Put dll version information in the report. + +Peter Verthez (1): + user32: LB_SETITEMDATA should return 1 on success, not 0. + +Rob Shearman (6): + include: Define some shell service IDs. + include: Add a define for SID_SHlinkFrame. + include: Add a define for SID_SOleUndoManager. + include: Add some defines for mshtml service IDs. + winex11.drv: Don't activate the systray window when repositioning it. + shlwapi: Fix UrlCombineW for absolute URLs without slashes. + +Roderick Colenbrander (21): + wined3d: Fix WINED3DFMT D16/L16 bugs in the pixelformat table. + wined3d: Use the proper depth stencil format. + wined3d: Add more pixelformats to getColorBits. + wined3d: Check the results of SetPixelFormat. + wined3d: Proper CheckDeviceType / CheckDepthStencilMatch support. + wgl: Re-enable GLX_ATI_render_texture support. + wined3d: Pass the proper DeviceName to ChangeDisplaySettings. + wgl: Recognize Vista's PFD_SUPPORT_COMPOSITION flag. + wined3d: Don't use ENTER_GL/LEAVE_GL on systems without winex11.drv. + wgl: Proper stereo / double buffering support for ChoosePixelFormat. + wined3d: Dynamically load OpenGL. + wined3d: Use WINE_GLAPI for setting the calling convention needed for OpenGL. + wined3d: Load wglGetProcAddress from opengl32.dll instead of gdi32.dll when USE_WIN32_OPENGL is defined. + wined3d: Dynamically load WGL functions. + wgl: Fix a render_texture regression. Only enable GLX_ATI_render_texture when the ati extension is around. + opengl32: Fix some gl type bugs. + wgl: Fix a typo in the trace code. + wgl: Cleanup pixelformat initialization code. + opengl32: Don't use 64bit gl types. + wined3d: Fix a null pointer dereference. + wgl: Fix wglGetCurrentReadDCARB bugs. + +Stefan Dösinger (38): + wined3d: Remove outdated TODO in D3DDevice::SetTextureStageState. + wined3d: Remove ugly code from stateblock init. + wined3d: Remove stateblock::set.*. + wined3d: Remove primary stateblock fixme. + wined3d: Optimize render states in the stateblock. + wined3d: Optimize transform state in stateblocks. + wined3d: Do not copy the saved states structure into the primary stateblock. + wined3d: Optimize bool and int vs constants. + wined3d: Optimize bool and int pixel shader constants. + wined3d: Optimize texture stage state applying. + wined3d: Fix a field in the wined3d header. + wined3d: Optimize sampler states in stateblocks. + wined3d: Optimize float constants in stateblocks. + wined3d: Add a wined3d private WINED3DSBT_RECORDED. + wined3d: Restructure Stateblock::apply a bit. + wined3d: Reorganize stateblock::capture a bit. + wined3d: Fix WINED3DFMT_R3G3B2. + wined3d: Do not advertize A8R3R3B2 support. + wined3d: Release the stateblock before destroying the swapchain. + wined3d: Reinstall the internal reference on the current index buffer. + wined3d: Fix WINED3DFMT_A4L4. + wined3d: Enable WINED3DSAMP_BORDERCOLOR. + wined3d: Simplify IWineD3DBaseTextureImpl_ApplyStateChanges. + wined3d: Fix R32F and R16F. + wined3d: Catch transformed position data that appears at offset 0. + wined3d: GL_SRC_ALPHA_SATURATE is supported as src blend param only. + wined3d: Remove a debug hack. + wined3d: FIX D3DBLEND_BOTHSRCALPHA and BLEND_BOTHINVSRCALPHA. + wined3d: Fix some alpha channels in formats. + wined3d: Reinstall the internal reference on vertex buffers. + d3d9: Some caps fixes. + wined3d: fogstart == fogend means full fog. + wined3d: Implement range based fog and advertize it correctly. + wined3d: Fall back to drawStridedSlow if fog coords are used. + wined3d: Refuse to lock locked surfaces. + wined3d: Refuse to ReleaseDC the wrong DC. + wined3d: Deal with multithreading in event queries. + wined3d: Fake occlusion queries if the wrong context is active. + +Stefan Leichter (7): + urlmon: Remove 'recursive registry key delete' function. + shell32: Remove 'recursive registry key delete' function. + shdocvw: Remove 'recursive registry key delete' function. + quartz: Remove 'recursive registry key delete' function. + oleaut32: Remove 'recursive registry key delete' function. + ole32: Remove 'recursive registry key delete' function. + objsel: Remove 'recursive registry key delete' function. + +Tijl Coosemans (1): + server: Use thr_kill2 syscall to signal threads on FreeBSD. + +Vitaliy Margolen (9): + wined3d: Activate context before applying fbo state. + dinput: Fix dead zone calculation. + dinput: Properly increment sequence number for X only movement. + dinput: Don't try to create non existing device. + dinput: Remove redundant declaration. + dinput: Use correct data structure for EVIOCGABS instead of an array. + dinput: Check acquired flag instead of fd. + dinput: Don't try to create non existing device (/dev/js*). + dinput: Fix compile with old input.h that missing input_absinfo. + +-- +Alexandre Julliard +julliard@winehq.org diff --git a/ChangeLog b/ChangeLog index 8fe4354b202..d239d235873 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,1849 @@ +2007-08-24 Alexandre Julliard + + * dlls/msvcrt/mbcs.c: + msvcrt: Don't include mbstring.h to avoid conflicts with system headers. + +2007-08-23 Kirill K. Smirnov + + * dlls/kernel32/console.c, include/wine/server_protocol.h, + programs/wineconsole/wineconsole.c, server/console.c, + server/protocol.def, server/trace.c: + wineconsole: Implement GetConsoleWindow. + + * programs/wineconsole/curses.c, programs/wineconsole/dialog.c, + programs/wineconsole/user.c, programs/wineconsole/winecon_private.h, + programs/wineconsole/winecon_user.h: + wineconsole: Move window handle to inner_data structure. + +2007-08-23 James Hawkins + + * dlls/cabinet/cabinet_main.c, dlls/cabinet/fdi.c, + dlls/cabinet/tests/extract.c: + cabinet: Return the value of GetLastError if FDICopy fails. + + * dlls/cabinet/cabinet_main.c, dlls/cabinet/tests/extract.c: + cabinet: Append new file nodes to the front of the file list. + + * dlls/cabinet/cabinet_main.c, dlls/cabinet/tests/extract.c: + cabinet: Pass the session Error to FDICopy. + +2007-08-23 Bryan DeGrendel + + * dlls/mscoree/mscoree_main.c: + mscoree: Return S_OK if mono runtime is found. + +2007-08-23 Mikolaj Zalewski + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/msvcrt.spec, dlls/msvcrt/tests/string.c: + msvcrt: Implement and test _mbsbtype. + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: Test and fix _ismbslead and _ismbstrail. + +2007-08-24 Detlef Riekenberg + + * dlls/winspool.drv/info.c: + winspool: Forward AddPrinterDriver to AddPrinterDriverEx. + +2007-08-23 Andrew Talbot + + * dlls/rsaenh/implglue.c, dlls/rsaenh/implglue.h, dlls/rsaenh/rsaenh.c: + rsaenh: Constify some variables. + +2007-08-23 Lei Zhang + + * dlls/gphoto2.ds/ui.c: + gphoto2: Add missing brackets. + + * dlls/gphoto2.ds/ds_ctrl.c: + gphoto2: Import photos in the right order. + +2007-08-24 Alexandre Julliard + + * dlls/user32/message.c, dlls/user32/tests/msg.c, dlls/user32/tests/win.c, + dlls/user32/win.c, dlls/winex11.drv/dce.c: + user32: IsChild must not consider the desktop window. + +2007-08-23 Alexandre Julliard + + * dlls/user32/painting.c, server/window.c: + server: Validate the parents every time we paint a window instead of only + on RDW_UPDATENOW. + +2007-08-23 Tijl Coosemans + + * configure, configure.ac, include/config.h.in, server/ptrace.c: + server: Use thr_kill2 syscall to signal threads on FreeBSD. + +2007-08-23 Paul Vriens + + * programs/winetest/Makefile.in, programs/winetest/main.c: + winetest: Put dll version information in the report. + +2007-08-23 Stefan Leichter + + * dlls/objsel/regsvr.c: + objsel: Remove 'recursive registry key delete' function. + + * dlls/ole32/regsvr.c: + ole32: Remove 'recursive registry key delete' function. + +2007-08-23 Rob Shearman + + * dlls/shlwapi/tests/path.c, dlls/shlwapi/url.c: + shlwapi: Fix UrlCombineW for absolute URLs without slashes. + + * dlls/winex11.drv/window.c: + winex11.drv: Don't activate the systray window when repositioning it. + + * include/mshtml.idl: + include: Add some defines for mshtml service IDs. + + * include/ocidl.idl: + include: Add a define for SID_SOleUndoManager. + + * include/hlink.idl: + include: Add a define for SID_SHlinkFrame. + + * include/shlguid.h: + include: Define some shell service IDs. + +2007-08-22 Detlef Riekenberg + + * dlls/winspool.drv/info.c: + winspool: Strings can be NULL in AddPrinterDriverExA. + + * tools/wineprefixcreate.in: + wineprefixcreate: Create spool/drivers directory for printer drivers. + +2007-08-22 Nigel Liang + + * programs/winecfg/theme.c: + winecfg: Suport color schemes from .theme format themes. + +2007-08-23 Paul Vriens + + * programs/winetest/main.c: + winetest: Change the way we report missing dlls. + +2007-08-22 Mikolaj Zalewski + + * dlls/advapi32/service.c: + advapi32: Obtain the process id locally. + + * dlls/advapi32/service.c: + advapi32: Return an error if we try to start an already running service. + +2007-08-21 Mikolaj Zalewski + + * include/winioctl.h: + include: Add some definitions to winioctl.h. + +2007-08-14 Stefan Dösinger + + * dlls/wined3d/device.c, dlls/wined3d/query.c, + dlls/wined3d/wined3d_private.h: + wined3d: Fake occlusion queries if the wrong context is active. + + * dlls/wined3d/device.c, dlls/wined3d/query.c, + dlls/wined3d/wined3d_private.h: + wined3d: Deal with multithreading in event queries. + + * dlls/wined3d/surface.c: + wined3d: Refuse to ReleaseDC the wrong DC. + + * dlls/wined3d/surface.c: + wined3d: Refuse to lock locked surfaces. + + * dlls/wined3d/drawprim.c, dlls/wined3d/state.c, + dlls/wined3d/wined3d_private.h: + wined3d: Fall back to drawStridedSlow if fog coords are used. + +2007-08-23 Lei Zhang + + * dlls/gphoto2.ds/Makefile.in, dlls/gphoto2.ds/gphoto2_De.rc, + dlls/gphoto2.ds/gphoto2_En.rc, dlls/gphoto2.ds/gphoto2_Fr.rc, + dlls/gphoto2.ds/gphoto2_Ko.rc, dlls/gphoto2.ds/gphoto2_Nl.rc, + dlls/gphoto2.ds/gphoto2_No.rc, dlls/gphoto2.ds/gphoto2_Pl.rc, + dlls/gphoto2.ds/resource.h, dlls/gphoto2.ds/ui.c: + gphoto2.ds: Add preview button and ability to disable import GUI. + +2007-08-23 Misha Koshelev + + * dlls/wininet/internet.c: + wininet: Send INTERNET_STATUS_HANDLE_CLOSING when object is being destroyed + as native does. + + * dlls/wininet/ftp.c, dlls/wininet/http.c, dlls/wininet/internet.c, + dlls/wininet/internet.h: + wininet: Separate connection closing from object destruction. + + * dlls/wininet/internet.h: + wininet: Rename WININET_object_destructor to a more general + WININET_object_function. + +2007-08-23 Alexandre Julliard + + * dlls/winex11.drv/opengl.c: + winex11: Get rid of get_context_from_GLXContext. + + * dlls/winex11.drv/opengl.c: + winex11: Properly update the hdc in the GL context. + +2007-08-22 Mikolaj Zalewski + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: Test and fix _mbsinc/_mbsninc. + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: Don't test codepage 20932. + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: Test and fix _mbccpy, _mbsncpy and _mbsnbcpy. + +2007-08-22 James Hawkins + + * dlls/advpack/files.c: + advpack: Formalize the SESSION struct. + + * dlls/cabinet/cabinet.h, dlls/cabinet/cabinet_main.c: + cabinet: Formalize the SESSION struct. + +2007-08-22 Alexander Nicolaysen Sørnes + + * programs/wordpad/wordpad.c: + wordpad: Don't display full path in save changes dialog. + + * programs/wordpad/wordpad.c: + wordpad: Don't show full path in caption. + +2007-08-22 Andrew Talbot + + * dlls/rsaenh/des.c, dlls/rsaenh/mpi.c, dlls/rsaenh/tomcrypt.h: + rsaenh: Constify some variables. + +2007-08-22 Stefan Leichter + + * dlls/oleaut32/regsvr.c: + oleaut32: Remove 'recursive registry key delete' function. + + * dlls/quartz/regsvr.c: + quartz: Remove 'recursive registry key delete' function. + +2007-08-22 Detlef Riekenberg + + * dlls/winspool.drv/info.c: + winspool: Add always the Win9x and the NT printerdriver. + +2007-08-22 Roderick Colenbrander + + * dlls/opengl32/tests/opengl.c, dlls/winex11.drv/opengl.c: + wgl: Fix wglGetCurrentReadDCARB bugs. + +2007-08-22 Juan Lang + + * dlls/crypt32/main.c, dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Implement CryptVerifyMessageSignature. + + * dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Test and correct verifying the signature of a valid signed message. + + * dlls/advapi32/crypt.c, dlls/advapi32/tests/crypt.c: + advapi32: Add more tests for CryptVerifySignatureW, and correct its parameter + checking. + +2007-08-21 Maarten Lankhorst + + * dlls/dsound/primary.c: + dsound: Transparantly fall back to software mode if hardware mode is unavailable. + +2007-08-22 Huw Davies + + * dlls/gdi32/printdrv.c: + gdi32: Quote the printer name prior to passing it to the shell. + +2007-08-22 Paul Vriens + + * dlls/atl/Makefile.in, dlls/atl/registrar.c: + atl: Replace SHDeleteKeyW with RegDeleteTreeW and get rid of the import + of shlwapi. + +2007-08-22 Alexandre Julliard + + * dlls/gdi32/dc.c, dlls/gdi32/gdiobj.c: + gdi32: Fix a few more places that use the wrong get/release function for DCs. + +2007-08-21 Juan Lang + + * dlls/crypt32/tests/msg.c: + crypt32: Test encoding a signed message with a valid public key. + + * dlls/crypt32/msg.c: + crypt32: Explicitly terminate loop when a matching signer cert is found. + + * dlls/crypt32/msg.c: + crypt32: Only free allocated handles. + + * dlls/crypt32/crypt32.spec, dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Test and implement CryptGetMessageSignerCount. + + * dlls/crypt32/crypt32.spec, dlls/crypt32/msg.c: + crypt32: Implement CryptGetMessageCertificates. + + * dlls/crypt32/encode.c: + crypt32: Trace encoding and decoding public keys on crypt channel. + +2007-08-22 Alexandre Julliard + + * dlls/ntdll/cdrom.c: + ntdll: Flesh out the stub for IOCTL_STORAGE_GET_DEVICE_NUMBER. + + * dlls/user32/hook.c, server/hook.c: + user32: Thread-local hooks need a module if they don't belong to the current + process. + + * dlls/cabinet/cabinet_main.c: + cabinet: Use the correct create disposition in fdi_open. + + * dlls/cabinet/cabinet.h, dlls/cabinet/cabinet_main.c, dlls/cabinet/fdi.c: + cabinet: Use the proper fcntl defines in the FDI_OPEN calls. + +2007-08-21 James Hawkins + + * dlls/cabinet/tests/extract.c: + cabinet: Formalize the SESSION struct and add more tests of its members. + +2007-07-18 Alexander Nicolaysen Sørnes + + * programs/wordpad/wordpad.c: + wordpad: Store window rect in the registry. + + * programs/wordpad/wordpad.c: + wordpad: Clear formatting before opening a file. + + * programs/wordpad/De.rc, programs/wordpad/En.rc, programs/wordpad/Fr.rc, + programs/wordpad/Hu.rc, programs/wordpad/Ko.rc, + programs/wordpad/Nl.rc, programs/wordpad/No.rc, + programs/wordpad/Pl.rc, programs/wordpad/Ru.rc, + programs/wordpad/Tr.rc, programs/wordpad/resource.h, + programs/wordpad/wordpad.c: + wordpad: Prompt for format when selecting new file. + + * programs/wordpad/De.rc, programs/wordpad/En.rc, programs/wordpad/Fr.rc, + programs/wordpad/Hu.rc, programs/wordpad/Ko.rc, + programs/wordpad/Nl.rc, programs/wordpad/No.rc, + programs/wordpad/Pl.rc, programs/wordpad/Ru.rc, + programs/wordpad/Tr.rc, programs/wordpad/resource.h, + programs/wordpad/wordpad.c: + wordpad: Handle different formats on open/save. + + * programs/wordpad/resource.h, programs/wordpad/wordpad.c: + wordpad: Add recent file list. + +2007-08-21 H. Verbeet + + * dlls/wined3d/device.c: + wined3d: Attach the correct surface the the fbo. + + * dlls/wined3d/device.c: + wined3d: Restore a line that got lost. + +2007-08-22 Dmitry Timoshkov + + * dlls/ntdll/time.c: + ntdll: Reimplement TIME_GetBias using new time zone code. + + * include/wine/test.h: + include/wine/test.h: Use appropriate type. + +2007-08-21 Maarten Lankhorst + + * dlls/dsound/dsound.c, dlls/dsound/primary.c: + dsound: Move assignment of DSBCAPS_LOC to primary buffer creation time. + +2007-08-22 Paul Vriens + + * dlls/ntdll/tests/om.c: + ntdll/tests: Fix typos. + + * dlls/gdi32/gdiobj.c: + gdi32: Fix possible NULL pointer dereference (Coverity). + + * dlls/gdi32/dc.c: + gdi32: Fix possible NULL pointer dereference (Coverity). + +2007-08-22 Misha Koshelev + + * dlls/wininet/internet.c, dlls/wininet/tests/http.c: + wininet: Fix reference count on internet handle for asynchronous + InternetReadFileEx call. + + * dlls/wininet/http.c, dlls/wininet/tests/http.c: + wininet: Don't send INTERNET_STATUS_HANDLE_CLOSING when closing handle opened + with InternetOpen for HTTP connection. + +2007-08-21 Andrew Talbot + + * dlls/rpcrt4/rpc_server.c, dlls/rpcrt4/rpc_transport.c: + rpcrt4: Constify some variables. + +2007-08-21 Juan Lang + + * dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Implement verifying a decoded signed message's signature. + + * dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Test and implement getting the computed hash from a decoded signed + message. + + * dlls/crypt32/msg.c: + crypt32: Update a hash message's hash handles when decoding it. + +2007-08-20 Juan Lang + + * dlls/crypt32/msg.c: + crypt32: Move signed message data functions together. + + * dlls/crypt32/msg.c: + crypt32: Make constructing handles a member of signed msg data. + + * dlls/crypt32/msg.c: + crypt32: Use a helper function to allocate signer handles. + + * dlls/crypt32/msg.c: + crypt32: Don't keep an unneeded copy of the crypto provider for each signer. + + * dlls/crypt32/msg.c: + crypt32: Separate construction of signer handles from signer info. + + * dlls/crypt32/msg.c: + crypt32: Add a helper function to construct a signer handles structure. + + * dlls/crypt32/msg.c: + crypt32: Add helper function to update signed message data. + + * dlls/crypt32/msg.c: + crypt32: Make more functions members of signed message data, rather than message. + + * dlls/crypt32/msg.c: + crypt32: Make updating a hash a member of signed message data, not signed + message. + + * dlls/crypt32/msg.c: + crypt32: Make a helper function to a free a signed message's handles. + + * dlls/crypt32/msg.c: + crypt32: Use signed message data type for decoded signed messages. + + * dlls/crypt32/msg.c: + crypt32: Make a signed message data type. + + * dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Implement verifying the hash of a decoded hash message. + + * dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Add a couple tests that show you can't get the hash from an encoded + hash message, and fix encoded hash messages to match. + + * dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Add a mostly stub control function for decode messages. + + * dlls/crypt32/msg.c, dlls/crypt32/tests/msg.c: + crypt32: Add a default message control function pointer. + + * dlls/crypt32/tests/msg.c: + crypt32: Add tests for CryptMsgControl. + + * dlls/crypt32/tests/msg.c: + crypt32: Test an encoded signed message with a cert with a public key. + +2007-08-21 Vitaliy Margolen + + * dlls/dinput/joystick_linuxinput.c: + dinput: Fix compile with old input.h that missing input_absinfo. + +2007-08-21 Dmitry Timoshkov + + * dlls/kernel32/time.c: + kernel32: Restore check for StandardDate.wMonth being 0. + + * dlls/msvcrt/time.c: + msvcrt: Restore error handling code in localtime. + +2007-08-21 Roderick Colenbrander + + * dlls/wined3d/surface.c: + wined3d: Fix a null pointer dereference. + +2007-08-21 Paul Vriens + + * dlls/wined3d/vertexdeclaration.c: + wined3d/vertexdeclaration: Return when out of memory (Coverity). + + * dlls/dnsapi/tests/Makefile.in, dlls/dnsapi/tests/name.c, + dlls/dnsapi/tests/record.c: + dnsapi/tests: No need to dynamically load dnsapi anymore. + + * dlls/kernel32/tests/change.c: + kernel32/tests: Skip some not implemented functions and add a few skip's. + + * dlls/msi/tests/install.c: + msi/tests: Be verbose when GetProcAddress fails. + +2007-08-21 Damjan Jovanovic + + * dlls/setupapi/install.c: + setupapi: Use NtDeleteKey instead of an invalid RegDeleteKeyW. + +2007-08-21 Alexandre Julliard + + * dlls/winex11.drv/winpos.c: + winex11: Update the wm hints also when mapping a previously zero-size window. + + * dlls/gdi32/bitblt.c, dlls/gdi32/bitmap.c, dlls/gdi32/brush.c, + dlls/gdi32/clipping.c, dlls/gdi32/dc.c, dlls/gdi32/dib.c, + dlls/gdi32/driver.c, dlls/gdi32/enhmfdrv/init.c, dlls/gdi32/font.c, + dlls/gdi32/freetype.c, dlls/gdi32/gdi_private.h, dlls/gdi32/gdiobj.c, + dlls/gdi32/mapping.c, dlls/gdi32/mfdrv/init.c, dlls/gdi32/opengl.c, + dlls/gdi32/painting.c, dlls/gdi32/palette.c, dlls/gdi32/path.c, + dlls/gdi32/pen.c, dlls/gdi32/printdrv.c: + gdi32: Add separate functions for releasing/freeing DCs to replace the standard + GDI ones. + This should make it possible to use a different locking mechanism for DCs. + +2007-08-21 Stefan Dösinger + + * dlls/wined3d/directx.c, dlls/wined3d/state.c: + wined3d: Implement range based fog and advertize it correctly. + +2007-08-13 Stefan Dösinger + + * dlls/d3d9/tests/visual.c, dlls/wined3d/state.c: + wined3d: fogstart == fogend means full fog. + +2007-08-21 Stefan Dösinger + + * dlls/d3d9/d3d9_private.h, dlls/d3d9/device.c, dlls/d3d9/directx.c, + dlls/wined3d/directx.c, include/d3d9caps.h: + d3d9: Some caps fixes. + +2007-08-21 Paul Vriens + + * dlls/ntdll/tests/rtl.c: + ntdll/tests: Use skip instead of trace. + + * dlls/ntdll/tests/exception.c: + ntdll/tests: Do GetModuleHandle only once and add a few skip's. + +2007-08-19 Mikolaj Zalewski + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: Test that some functions depends on locale codepage, not the one set + by _setmbcp. + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: Test and fix _mbclen/_mbslen. + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: Test and fix _mbsnextc. + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: Implement _ismbblead/_ismbbtrail using _mbctype (with tests). + + * dlls/msvcrt/locale.c, dlls/msvcrt/main.c, dlls/msvcrt/mbcs.c, + dlls/msvcrt/tests/string.c: + msvcrt: Fill _mbctype table in _setmbcp. + +2007-08-21 Alexandre Julliard + + * dlls/dsound/primary.c: + dsound: Fix a compiler warning. + +2007-08-20 Mikolaj Zalewski + + * dlls/setupapi/fakedll.c: + setupapi: If needed create directories for fake dlls. + +2007-08-20 Lei Zhang + + * tools/wine.inf: + wine.inf: Add twain_32.dll to the list of fake dlls. + +2007-08-20 Vitaliy Margolen + + * dlls/dinput/joystick_linux.c: + dinput: Don't try to create non existing device (/dev/js*). + +2007-08-17 Paul Vriens + + * dlls/msvcrt/tests/file.c: + msvcrt/tests: Wait for spawned processes to finish. + +2007-08-21 Dmitry Timoshkov + + * dlls/msvcrt/tests/time.c, dlls/msvcrt/time.c: + msvcrt: Route mktime and localtime to glibc. + +2007-08-09 Dmitry Timoshkov + + * dlls/kernel32/time.c: + kernel32: Fix test case failures for time zones with absolute transition dates. + +2007-08-07 Dmitry Timoshkov + + * dlls/kernel32/tests/time.c, dlls/ntdll/time.c, include/winternl.h: + ntdll: Detect current time zone settings. + +2007-08-19 Vitaliy Margolen + + * dlls/dinput/joystick_linuxinput.c: + dinput: Check acquired flag instead of fd. + + * dlls/dinput/joystick_linuxinput.c: + dinput: Use correct data structure for EVIOCGABS instead of an array. + + * dlls/dinput/joystick_linuxinput.c: + dinput: Remove redundant declaration. + + * dlls/dinput/joystick_linuxinput.c: + dinput: Don't try to create non existing device. + +2007-08-14 Stefan Dösinger + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c: + wined3d: Reinstall the internal reference on vertex buffers. + +2007-08-13 Stefan Dösinger + + * dlls/wined3d/utils.c: + wined3d: Fix some alpha channels in formats. + +2007-08-12 Stefan Dösinger + + * dlls/wined3d/directx.c, dlls/wined3d/state.c: + wined3d: FIX D3DBLEND_BOTHSRCALPHA and BLEND_BOTHINVSRCALPHA. + +2007-08-19 Stefan Dösinger + + * dlls/wined3d/device.c: + wined3d: Remove a debug hack. + +2007-07-24 Alexander Nicolaysen Sørnes + + * dlls/comdlg32/printdlg.c: + comdlg32: printdlg: Fix number display in PrintDlgW(). + +2007-08-20 Paul Vriens + + * dlls/oleaut32/tests/vartest.c: + oleaut32/tests: Skip VarCat and VarAnd tests a bit better if there is no I8 + and/or UI8 support. + + * dlls/oleaut32/tests/vartest.c: + oleaut32/tests: Skip VarImp tests if there is no I8 and/or UI8 support. + + * dlls/oleaut32/tests/vartest.c: + oleaut32/tests: Skip VarIdiv tests if there is no I8 and/or UI8 support. + +2007-08-20 Roderick Colenbrander + + * dlls/opengl32/make_opengl, dlls/opengl32/opengl_ext.c: + opengl32: Don't use 64bit gl types. + + * dlls/winex11.drv/opengl.c: + wgl: Cleanup pixelformat initialization code. + +2007-08-19 Roderick Colenbrander + + * dlls/winex11.drv/opengl.c: + wgl: Fix a typo in the trace code. + +2007-08-20 H. Verbeet + + * dlls/wined3d/drawprim.c: + wined3d: UBYTE4 data shouldn't be normalized. + +2007-08-19 Alex Villacís Lasso + + * dlls/user32/dialog.c: + user32: Fix change-drive in Win3.1-style file open dialog. + + * dlls/user32/dialog.c: + user32: Fix crash while dir-navigating in Win3.1-style file open dialog. + +2007-08-20 Stefan Leichter + + * dlls/shdocvw/regsvr.c: + shdocvw: Remove 'recursive registry key delete' function. + +2007-08-19 Stefan Leichter + + * dlls/shell32/regsvr.c: + shell32: Remove 'recursive registry key delete' function. + +2007-08-19 Maarten Lankhorst + + * dlls/dsound/primary.c, dlls/wineoss.drv/dsrender.c: + dsound: Handle failing of IDsDriver_CreateSoundBuffer better. + + * dlls/winealsa.drv/mixer.c: + winealsa: Report card name in volume control fixme. + +2007-08-20 Alexandre Julliard + + * dlls/user32/tests/msg.c, dlls/winex11.drv/window.c, + dlls/winex11.drv/winpos.c: + winex11: Force a window to managed mode when it is activated. + + * dlls/winex11.drv/window.c, dlls/winex11.drv/winpos.c, + dlls/winex11.drv/x11drv.h: + winex11: Switch windows to managed mode in SetWindowPos instead of at creation + time. + + * dlls/user32/tests/msg.c: + user32/tests: Allow WM_MOUSEACTIVATE in the mouse hover test for compatibility + with X11 focus policy. + + * dlls/user32/tests/msg.c, dlls/user32/tests/win.c: + user32/tests: Use flush_events more consistently in the message tests. + + * dlls/ntdll/server.c: + ntdll: Return an error instead of dying in wine_server_call if the input buffer + is invalid. + + * dlls/winex11.drv/window.c: + winex11: Don't select for StructureNotify events on unmanaged windows. + + * dlls/winex11.drv/mouse.c: + winex11: Don't set the cursor on the desktop window since it's managed by + another process. + + * dlls/winex11.drv/window.c: + winex11: Move setting of the initial wm hints to a separate function. + +2007-08-18 Paul Vriens + + * dlls/mshtml/htmltextcont.c: + mshtml/htmltextcont: Initialize value (Coverity). + +2007-08-20 Alexandre Julliard + + * dlls/comctl32/commctrl.c: + comctl32: Create the manifest directory if needed (spotted by Dan Kegel). + +2007-08-19 Marcus Meissner + + * dlls/comdlg32/tests/printdlg.c: + comdlg32/tests: Handle case where no printer is configured. + +2007-07-20 Alexander Nicolaysen Sørnes + + * programs/wordpad/wordpad.c: + wordpad: Fix save changes prompt for the open file dialogue. + + * programs/wordpad/rsrc.rc, programs/wordpad/wordpad.c: + wordpad: Add bullet points button. + + * programs/wordpad/De.rc, programs/wordpad/En.rc, programs/wordpad/Fr.rc, + programs/wordpad/Hu.rc, programs/wordpad/Ko.rc, + programs/wordpad/Nl.rc, programs/wordpad/No.rc, + programs/wordpad/Pl.rc, programs/wordpad/Ru.rc, + programs/wordpad/Tr.rc, programs/wordpad/resource.h, + programs/wordpad/wordpad.c: + wordpad: Add bullet points option. + +2007-07-18 Alexander Nicolaysen Sørnes + + * programs/wordpad/wordpad.c: + wordpad: Fix error handling when saving empty files. + + * programs/wordpad/rsrc.rc, programs/wordpad/wordpad.c: + wordpad: Fix formatbar for native comctl32/XP. + + * programs/wordpad/De.rc, programs/wordpad/En.rc, programs/wordpad/Fr.rc, + programs/wordpad/Hu.rc, programs/wordpad/Ko.rc, + programs/wordpad/Nl.rc, programs/wordpad/No.rc, + programs/wordpad/Pl.rc, programs/wordpad/Ru.rc, + programs/wordpad/Tr.rc, programs/wordpad/resource.h, + programs/wordpad/wordpad.c: + wordpad: Display error box when richedit loading fails. + + * programs/wordpad/De.rc, programs/wordpad/En.rc, programs/wordpad/Fr.rc, + programs/wordpad/Hu.rc, programs/wordpad/Ko.rc, + programs/wordpad/Nl.rc, programs/wordpad/No.rc, + programs/wordpad/Pl.rc, programs/wordpad/Ru.rc, + programs/wordpad/Tr.rc, programs/wordpad/resource.h, + programs/wordpad/rsrc.rc, programs/wordpad/wordpad.c: + wordpad: Add search functionality. + +2007-07-25 Alexander Nicolaysen Sørnes + + * dlls/comdlg32/printdlg.c: + comdlg32: PrintDlg: Set PD_SELECTION on return. + +2007-08-19 Misha Koshelev + + * dlls/shlwapi/url.c: + shlwapi: Take sizeof(WCHAR) into account when allocating Unicode string. + +2007-08-18 Stefan Leichter + + * dlls/urlmon/regsvr.c: + urlmon: Remove 'recursive registry key delete' function. + +2007-08-17 Andrew Talbot + + * dlls/rpcrt4/ndr_marshall.c, dlls/rpcrt4/rpc_binding.c, + dlls/rpcrt4/rpc_binding.h, dlls/rpcrt4/rpc_message.c: + rpcrt4: Constify some variables. + +2007-08-17 Mikolaj Zalewski + + * .gitignore, programs/iexplore/Makefile.in, programs/iexplore/version.rc: + iexplore: Add VERSIONINFO resource. + +2007-08-17 Juan Lang + + * dlls/crypt32/collectionstore.c, dlls/crypt32/crypt32_private.h, + dlls/crypt32/filestore.c, dlls/crypt32/provstore.c, + dlls/crypt32/regstore.c, dlls/crypt32/store.c: + crypt32: Don't store the crypto provider when it isn't needed. + + * dlls/crypt32/filestore.c: + crypt32: Don't store redundant copy of crypto provider in file store. + + * dlls/crypt32/regstore.c: + crypt32: Don't store redundant copy of crypto provider in reg store. + + * dlls/crypt32/store.c: + crypt32: Pass crypto provider and appropriate flags when opening PKCS messages, + and don't store a redundant copy of the crypto provider in message stores. + +2007-08-17 Roderick Colenbrander + + * dlls/opengl32/make_opengl, dlls/opengl32/opengl_ext.c: + opengl32: Fix some gl type bugs. + +2007-08-17 Paul Vriens + + * dlls/opengl32/tests/opengl.c: + opengl32/tests: Be a bit more verbose when doing wglGetProcAddress. + + * dlls/oleaut32/tests/vartest.c: + oleaut32/tests: Skip VarDiv tests if there is no I8 and/or UI8 support. + + * dlls/oleaut32/tests/vartest.c: + oleaut32/tests: Skip VarAnd tests if there is no I8 and/or UI8 support. + + * dlls/oleaut32/tests/vartest.c: + oleaut32/tests: Skip VarCat tests if there is no I8 and/or UI8 support. + + * dlls/oleaut32/tests/vartest.c: + oleaut32/tests: Fix a few typos. + + * dlls/oleaut32/tests/vartype.c: + oleaut32/tests: Add a few skip's to the vartype tests. + + * dlls/oleaut32/tests/olefont.c, dlls/oleaut32/tests/olepicture.c, + dlls/oleaut32/tests/safearray.c, dlls/oleaut32/tests/varformat.c, + dlls/oleaut32/tests/vartype.c: + oleaut32/tests: Use GetModuleHandle and add a few skip's. + +2007-08-16 Mikolaj Zalewski + + * dlls/msvcrt/mbcs.c, dlls/msvcrt/tests/string.c: + msvcrt: __mb_cur_max is not updated in _setmbcp (with testcase) and should + not be used in _ismbblead. + +2007-08-17 Roderick Colenbrander + + * dlls/winex11.drv/opengl.c: + wgl: Fix a render_texture regression. Only enable GLX_ATI_render_texture when + the ati extension is around. + +2007-08-17 Paul Vriens + + * dlls/oleaut32/tests/vartest.c: + oleaut32/tests: Use GetModuleHandle and check only once for availability of + some functions. + +2007-08-16 Louis Lenders + + * dlls/kernel32/process.c: + kernel32: Set USERNAME environment variable. + +2007-08-17 Jacek Caban + + * dlls/mshtml/nsiface.idl, dlls/mshtml/txtrange.c: + mshtml: Added IHTMLTxtRange::compareEndPoints implementation. + + * dlls/mshtml/txtrange.c: + mshtml: Added IHTMLTxtRange::select implementation. + + * dlls/mshtml/htmltextcont.c: + mshtml: Added get_scrollWidth and get_scrollHeight implementation. + + * dlls/mshtml/htmlnode.c, dlls/mshtml/mshtml_private.h: + mshtml: Don't create element object for document node. + + * dlls/mshtml/mshtml_private.h, dlls/mshtml/txtrange.c: + mshtml: Added IHTMLTxtRange::put_text implementation. + + * dlls/mshtml/htmlbody.c, dlls/mshtml/htmldoc.c, + dlls/mshtml/mshtml_private.h, dlls/mshtml/selection.c, + dlls/mshtml/txtrange.c: + mshtml: Store HTMLDocument reference in HTMLTxtRange object. + +2007-08-16 Roderick Colenbrander + + * dlls/wined3d/context.c, dlls/wined3d/directx.c, + include/wine/wined3d_gl.h: + wined3d: Dynamically load WGL functions. + +2007-08-12 Stefan Dösinger + + * dlls/wined3d/directx.c, dlls/wined3d/state.c: + wined3d: GL_SRC_ALPHA_SATURATE is supported as src blend param only. + + * dlls/wined3d/vertexbuffer.c: + wined3d: Catch transformed position data that appears at offset 0. + + * dlls/d3d9/tests/visual.c, dlls/wined3d/surface.c, + dlls/wined3d/wined3d_private.h: + wined3d: Fix R32F and R16F. + + * dlls/wined3d/basetexture.c, dlls/wined3d/wined3d_private.h: + wined3d: Simplify IWineD3DBaseTextureImpl_ApplyStateChanges. + + * dlls/wined3d/basetexture.c: + wined3d: Enable WINED3DSAMP_BORDERCOLOR. + +2007-08-16 Juan Lang + + * dlls/crypt32/Makefile.in, dlls/crypt32/crypt32_private.h, + dlls/crypt32/filestore.c, dlls/crypt32/store.c: + crypt32: Move file store to a separate file. + + * dlls/crypt32/Makefile.in, dlls/crypt32/crypt32_private.h, + dlls/crypt32/regstore.c, dlls/crypt32/store.c: + crypt32: Move registry stores to a separate file. + + * dlls/crypt32/Makefile.in, dlls/crypt32/crypt32_private.h, + dlls/crypt32/provstore.c, dlls/crypt32/store.c: + crypt32: Move provider stores to a separate file. + + * dlls/crypt32/Makefile.in, dlls/crypt32/collectionstore.c, + dlls/crypt32/crypt32_private.h, dlls/crypt32/store.c: + crypt32: Move collection stores to a separate file. + + * dlls/crypt32/crypt32_private.h, dlls/crypt32/store.c: + crypt32: Move cert store definitions to header. + + * dlls/crypt32/store.c: + crypt32: Where possible, pass a pointer rather than an offset, it's less + confusing. + + * dlls/crypt32/store.c: + crypt32: Use externed vars for context variables. + + * dlls/crypt32/store.c: + crypt32: Use public APIs to empty a store. + + * dlls/crypt32/store.c: + crypt32: Use public type and APIs for memory stores wherever possible. + + * dlls/crypt32/store.c: + crypt32: Remove some unnecessary casts. + + * dlls/crypt32/store.c: + crypt32: Rename a confusing type. + +2007-08-16 Vitaliy Margolen + + * dlls/dinput/mouse.c: + dinput: Properly increment sequence number for X only movement. + +2007-08-16 Jason Edmeades + + * dlls/comctl32/listview.c, dlls/comctl32/tests/listview.c: + comctl32: Listview fails to add a column if mask=0. + +2007-08-16 Andrew Talbot + + * dlls/riched20/editor.h, dlls/riched20/style.c, dlls/riched20/undo.c, + dlls/riched20/wrap.c, dlls/riched20/writer.c: + riched20: Constify some variables. + +2007-08-17 Alexandre Julliard + + * dlls/mscms/tests/profile.c: + mscms/tests: Allocate the profile buffer dynamically to make sure it's large + enough. + +2007-08-16 Maarten Lankhorst + + * dlls/dsound/dsound_main.c, dlls/dxguid/dxguid.c, + dlls/wineoss.drv/audio.c: + dxguid: Remove dsdriver.h from imports. + +2007-08-16 Kirill K. Smirnov + + * programs/cmd/Cs.rc, programs/cmd/De.rc, programs/cmd/En.rc, + programs/cmd/Es.rc, programs/cmd/Fr.rc, programs/cmd/Ja.rc, + programs/cmd/Ko.rc, programs/cmd/Nl.rc, programs/cmd/No.rc, + programs/cmd/Pl.rc, programs/cmd/Pt.rc, programs/cmd/Ru.rc, + programs/cmd/Si.rc, programs/cmd/Tr.rc: + programs/cmd: Do not use hardcoded constants when corresponding macro is + already defined. + +2007-08-16 Paul Vriens + + * dlls/avifil32/regsvr.c: + avifil32/regsvr: Replace recursive delete functions by RegDeleteTree. + + * dlls/advapi32/tests/security.c: + advapi32/tests: Skip a test when not properly logged in on win9x. + + * dlls/wininet/tests/url.c: + wininet/tests: Fix test failures for wininet.dll that comes with IE7. + + * dlls/shell32/tests/shelllink.c: + shell32/tests: Use GetModuleHandle instead of LoadLibrary. + +2007-08-16 Alexandre Julliard + + * dlls/winex11.drv/event.c: + winex11: Don't try to activate the desktop window on take focus. + + * dlls/winex11.drv/window.c, dlls/winex11.drv/winpos.c, + dlls/winex11.drv/x11drv.h: + winex11: Store wm hints in the window data instead of fetching them when needed. + +2007-08-16 Detlef Riekenberg + + * dlls/winspool.drv/info.c: + winspool: Implement AddPrinterDriverExA. + +2007-08-15 Detlef Riekenberg + + * dlls/winspool.drv/info.c: + winspool: Implement AddPrinterDriverExW. + +2007-08-15 Jacek Caban + + * dlls/mshtml/htmldoc.c, dlls/mshtml/mshtml_private.h, + dlls/mshtml/selection.c: + mshtml: Store HTMLDocument reference in HTMLSelectionObject. + +2007-08-15 Marcus Meissner + + * dlls/kernel32/tests/pipe.c: + kernel32: Initialize variable to a known bad value. + +2007-08-04 Alexander Nicolaysen Sørnes + + * dlls/comdlg32/printdlg.c: + comdlg32: printdlg: Set/Load paper orientation in PageSetupDlgW. + +2007-08-16 Misha Koshelev + + * dlls/urlmon/http.c: + urlmon: Call IInternetProtocolSink_Release and ReleaseStgMedium in HttpProtocol + where native does. + + * dlls/urlmon/http.c: + urlmon: Call IInternetProtocolSink_AddRef in HttpProtocol where native does + (but just once). + +2007-08-15 Mikołaj Zalewski + + * dlls/wininet/tests/http.c: + wininet: A small test for HttpQueryInfoA. + + * dlls/wininet/http.c, dlls/wininet/tests/http.c: + wininet: Make HttpQueryInfo[AW] work for lpBuffer == NULL and len > 0. + + * dlls/wininet/http.c, dlls/wininet/tests/http.c: + wininet: Support HTTP_QUERY_RAW_HEADER_CRLF|HTTP_QUERY_FLAG_REQUEST_HEADERS. + +2007-08-15 Juan Lang + + * dlls/wintrust/crypt.c: + wintrust: Remove redundant check of pbSignedDataMsg (Coverity). + + * dlls/crypt32/crypt32_private.h, dlls/crypt32/main.c: + crypt32: Free default chain engine. + +2007-08-15 Evan Stade + + * dlls/gdiplus/stringformat.c, dlls/gdiplus/tests/stringformat.c: + gdiplus: Fix default value of StringTrimmingCharacter. + + * dlls/gdiplus/tests/Makefile.in, dlls/gdiplus/tests/stringformat.c: + gdiplus/tests: Added GpStringFormat tests. + + * dlls/gdiplus/tests/graphicspath.c: + gdiplus/tests: Added GdipAddPathLineI test. + + * dlls/gdiplus/graphics.c: + gdiplus: Use DrawText instead of TabbedTextOut. + + * dlls/gdiplus/graphics.c: + gdiplus: Handle empty layout rectangle in GdipDrawString. + + * dlls/gdiplus/graphics.c: + gdiplus: Handle empty layout rectangle in GdipMeasureString. + + * dlls/gdiplus/graphics.c: + gdiplus: Handle StringFormatFlagsNoWrap in GdipMeasureString. + + * dlls/gdiplus/graphics.c: + gdiplus: Handle StringFormatFlagsNoWrap in GdipDrawString. + + * dlls/gdiplus/graphics.c: + gdiplus: Fixed 2 GdipDrawString bugs. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c, + include/gdiplusflat.h: + gdiplus: Added GdipMeasureString. + +2007-08-15 Andrew Talbot + + * dlls/riched20/editor.h, dlls/riched20/run.c, dlls/riched20/string.c: + riched20: Constify some variables. + +2007-08-11 Stefan Dösinger + + * dlls/wined3d/device.c, dlls/wined3d/surface.c, + dlls/wined3d/wined3d_private.h: + wined3d: Fix WINED3DFMT_A4L4. + +2007-08-14 Stefan Dösinger + + * dlls/d3d9/tests/visual.c, dlls/wined3d/device.c, + dlls/wined3d/stateblock.c: + wined3d: Reinstall the internal reference on the current index buffer. + + * dlls/wined3d/device.c: + wined3d: Release the stateblock before destroying the swapchain. + +2007-08-11 Stefan Dösinger + + * dlls/wined3d/directx.c: + wined3d: Do not advertize A8R3R3B2 support. + + * dlls/wined3d/utils.c: + wined3d: Fix WINED3DFMT_R3G3B2. + +2007-08-15 Paul Vriens + + * dlls/shell32/tests/shellpath.c, dlls/shell32/tests/string.c: + shell32/tests: Use GetModuleHandle instead of LoadLibrary. + +2007-08-15 Lei Zhang + + * dlls/riched20/caret.c: + riched20: Add missing scroll bar update. + + * dlls/riched20/editor.c, dlls/riched20/editstr.h, dlls/riched20/paint.c, + dlls/riched20/wrap.c: + riched20: Properly calculate control display height. + +2007-08-15 Maarten Lankhorst + + * dlls/winealsa.drv/dscapture.c: + winealsa: Add support for playing dsound capture buffer. + + * dlls/winealsa.drv/dscapture.c: + winealsa: Add support for opening/closing dsound capture buffer. + + * dlls/winealsa.drv/dscapture.c: + winealsa: Add IDsCaptureDriverBuffer stub. + + * dlls/winealsa.drv/dscapture.c: + winealsa: Implement IDsCaptureDriverImpl_Open. + + * dlls/winealsa.drv/Makefile.in, dlls/winealsa.drv/alsa.h, + dlls/winealsa.drv/dscapture.c, dlls/winealsa.drv/wavein.c, + dlls/winealsa.drv/waveinit.c: + winealsa: Add initial dscapturedriver stub. + + * dlls/dsound/capture.c: + dsound: Handle failing of obtaining IDsDriverNotify. + +2007-08-15 Huw Davies + + * dlls/riched20/caret.c, dlls/riched20/tests/editor.c: + riched20: Add some test for EM_GETTEXTLENGTHEX and fix the single line edit + cases. + +2007-08-15 Francois Gouget + + * tools/winapi/win32.api: + printui: Update win32.api to fix the winapi_check warnings. + + * tools/winapi/win32.api: + ntprint: Update win32.api to fix the winapi_check warnings. + + * dlls/ntoskrnl.exe/ntoskrnl.c, include/ddk/wdm.h, tools/winapi/win32.api: + ntoskrnel.exe: Better match the PSDK types and fix the winapi_check warnings. + + * dlls/ntdll/actctx.c, tools/winapi/win32.api: + ntdll: Better match the PSDK types and fix the winapi_check warnings. + + * tools/winapi/win32.api: + nddeapi: Update win32.api to fix the winapi_check warnings. + +2007-08-15 Francois Gouget + + * dlls/kernel32/tests/debugger.c: + kernel32/tests: Remove a redundant RegSetValueExA() call. + +2007-08-15 Francois Gouget + + * tools/winapi/win32.api: + mshtml: Update win32.api to fix the winapi_check warnings. + +2007-08-15 Paul Vriens + + * dlls/user32/tests/input.c, dlls/user32/tests/menu.c, + dlls/user32/tests/monitor.c, dlls/user32/tests/msg.c: + user32/tests: Run tests on win95 again. + + * dlls/secur32/tests/schannel.c: + secur32/tests: Run tests on win95 again. + +2007-08-15 Jacek Caban + + * dlls/mshtml/nsevents.c: + mshtml: Call setup_nswindow on load event. + +2007-08-14 Mikołaj Zalewski + + * dlls/kernel32/wowthunk.c: + kernel32: Return error code if WOWCallback16Ex of a real-mode function failed. + +2007-08-14 Evan Stade + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/stringformat.c, + include/gdiplusflat.h: + gdiplus: Added GdipDeleteStringFormat. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/gdiplus_private.h, + dlls/gdiplus/stringformat.c, include/gdiplusflat.h: + gdiplus: Added GdipSetStringFormatLineAlign/GdipGetStringFormatLineAlign. + + * dlls/gdiplus/graphics.c: + gdiplus: Allow null-terminated strings in GdipDrawString. + + * dlls/gdiplus/brush.c, dlls/gdiplus/gdiplus.spec, include/gdiplusflat.h: + gdiplus: Added GdipSetLineBlend stub. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/gdiplus_private.h, + dlls/gdiplus/stringformat.c, include/gdiplusenums.h, + include/gdiplusflat.h: + gdiplus: Added GdipSetStringFormatHotkeyPrefix/GdipGetStringFormatHotkeyPrefix. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/gdiplus_private.h, + dlls/gdiplus/stringformat.c, include/gdiplusenums.h, + include/gdiplusflat.h: + gdiplus: Added GdipGetStringFormatTrimming/GdipSetStringFormatTrimming. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/gdiplus_private.h, + dlls/gdiplus/stringformat.c, include/gdiplusenums.h, + include/gdiplusflat.h: + gdiplus: Added GdipGetStringFormatAlign/GdipSetStringFormatAlign. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphicspath.c, + include/gdiplusflat.h: + gdiplus: Added GdipAddPathLineI. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/gdiplus_private.h, + dlls/gdiplus/graphics.c, include/gdiplusenums.h, + include/gdiplusflat.h: + gdiplus: Added GdipSetTextRenderingHint/GdipGetTextRenderingHint. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c, + dlls/gdiplus/graphicspath.c, include/gdiplusflat.h: + gdiplus: Added GdipAddPathBezierI. + + * dlls/gdiplus/Makefile.in, dlls/gdiplus/gdiplus.spec, + dlls/gdiplus/gdiplus_private.h, dlls/gdiplus/stringformat.c, + include/gdiplusflat.h: + gdiplus: Added string format constructor. + + * dlls/gdiplus/font.c, dlls/gdiplus/tests/font.c: + gdiplus: Save elements of font's style. + + * dlls/gdiplus/tests/font.c: + gdiplus: Added more font tests. + + * dlls/gdiplus/font.c, dlls/gdiplus/gdiplus.spec, include/gdiplusflat.h: + gdiplus: Added GdipDeleteFont. + + * dlls/gdiplus/font.c, dlls/gdiplus/tests/font.c: + gdiplus: Fixed conformance of font constructor. + + * dlls/gdiplus/tests/Makefile.in, dlls/gdiplus/tests/font.c: + gdiplus: Added font tests. + + * dlls/gdiplus/font.c, dlls/gdiplus/gdiplus.spec, include/gdiplusflat.h: + gdiplus: Added GdipGetLogFontW. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c, + include/gdiplusflat.h, include/gdiplusgpstubs.h: + gdiplus: Added GdipDrawString. + +2007-08-14 Paul Vriens + + * dlls/msvcrt/tests/cpp.c, dlls/msvcrt/tests/string.c: + msvcrt/tests: Remove wrong FreeLibrary and fix typo's. + + * dlls/crypt32/tests/main.c, dlls/crypt32/tests/sip.c, + dlls/crypt32/tests/str.c: + crypt32/tests: Use GetModuleHandle and skip. + +2007-08-14 Juan Lang + + * dlls/crypt32/msg.c: + crypt32: Set return value on exception. + Spotted by Paul Vriens. + + * dlls/crypt32/chain.c, dlls/crypt32/tests/chain.c: + crypt32: Initial implementation of CertGetCertificateChain and + CertFreeCertificateChain. + + * dlls/crypt32/tests/chain.c: + crypt32: Add a chain test with real certificates. + + * dlls/crypt32/tests/chain.c: + crypt32: Add initial tests for certificate chains. + + * dlls/crypt32/chain.c: + crypt32: Set output chain to NULL. + + * dlls/crypt32/chain.c, dlls/crypt32/crypt32.spec: + crypt32: Add stub for CertFreeCertificateChain. + + * dlls/crypt32/cert.c, dlls/crypt32/chain.c: + crypt32: Move CertGetCertificateChain to chain.c. + + * dlls/crypt32/store.c: + crypt32: Fix typo. + + * dlls/crypt32/store.c: + crypt32: Fix typo. + + * dlls/wintrust/wintrust_main.c: + wintrust: Forward WinVerifyTrustEx to WinVerifyTrust. + + * dlls/wintrust/wintrust_main.c: + wintrust: Implement WTHelperProvDataFromStateData. + + * dlls/wintrust/wintrust.spec, dlls/wintrust/wintrust_main.c: + wintrust: Implement WTHelperGetProvCertFromChain. + + * dlls/wintrust/wintrust_main.c: + wintrust: Implement WTHelperGetProvSignerFromChain. + +2007-08-14 Jason Edmeades + + * dlls/comctl32/tooltips.c: + comctl32: Fix tooltips uninitialized variables plus wrong positioning. + +2007-08-14 Andrew Talbot + + * dlls/riched20/reader.c, dlls/riched20/rtf.h: + riched20: Constify some variables. + +2007-08-14 Jacek Caban + + * dlls/mshtml/htmlwindow.c, dlls/mshtml/mshtml_private.h, + dlls/mshtml/nsembed.c, dlls/mshtml/nsiface.idl: + mshtml: Make window.external visible for JavaScript code. + + * dlls/mshtml/nsio.c: + mshtml: Return wine: URI for protocols handled by MSHTML. + + * dlls/mshtml/nsio.c: + mshtml: Check use_wine_url in nsIURI::GetAsciiSpec. + + * dlls/mshtml/nsio.c: + mshtml: Reduce debug traces. + +2007-08-14 Aric Stewart + + * dlls/shell32/shlfileop.c: + shell32: In SHNameTranslate use the right part of the string for sizing. + +2007-08-04 Stefan Dösinger + + * dlls/wined3d/stateblock.c: + wined3d: Reorganize stateblock::capture a bit. + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c: + wined3d: Restructure Stateblock::apply a bit. + +2007-08-03 Stefan Dösinger + + * dlls/d3d8/device.c, dlls/d3d9/stateblock.c, dlls/ddraw/device.c, + include/wine/wined3d_types.h: + wined3d: Add a wined3d private WINED3DSBT_RECORDED. + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c, + dlls/wined3d/wined3d_private.h: + wined3d: Optimize float constants in stateblocks. + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c, + dlls/wined3d/wined3d_private.h: + wined3d: Optimize sampler states in stateblocks. + +2007-08-14 Stefan Dösinger + + * dlls/wined3d/wined3d_private.h: + wined3d: Fix a field in the wined3d header. + +2007-08-14 Mikołaj Zalewski + + * dlls/winedos/himem.c: + winedos: Make UMB executable. + +2007-08-14 Peter Verthez + + * dlls/user32/listbox.c, dlls/user32/tests/listbox.c: + user32: LB_SETITEMDATA should return 1 on success, not 0. + +2007-08-14 Roderick Colenbrander + + * dlls/wined3d/directx.c: + wined3d: Load wglGetProcAddress from opengl32.dll instead of gdi32.dll when + USE_WIN32_OPENGL is defined. + + * include/wine/wined3d_gl.h: + wined3d: Use WINE_GLAPI for setting the calling convention needed for OpenGL. + +2007-08-13 Chris Robinson + + * dlls/opengl32/tests/opengl.c, dlls/winex11.drv/opengl.c: + wgl: GDI support is not advertised with double buffering. + +2007-08-14 Paul Vriens + + * dlls/cabinet/tests/extract.c: + cabinet/tests: Use GetModuleHandleA instead of LoadLibraryA. + + * dlls/advapi32/tests/crypt_lmhash.c: + advapi32/tests: Use GetModuleHandleA and skip. + +2007-08-14 Vitaliy Margolen + + * dlls/dinput/joystick_linuxinput.c: + dinput: Fix dead zone calculation. + Based on patch by Artur Szymiec. + +2007-08-14 Alexandre Julliard + + * dlls/msvcrt/tests/cpp.c, dlls/msvcrt/undname.c: + msvcrt: Use a valid parameter array when demangling a template name. + + * dlls/Makefile.in, tools/make_makefiles: + make_makefiles: wined3d doesn't depend on OpenGL libs anymore. + +2007-08-14 Roderick Colenbrander + + * dlls/wined3d/Makefile.in, dlls/wined3d/directx.c, + include/wine/wined3d_gl.h: + wined3d: Dynamically load OpenGL. + +2007-08-13 Juan Lang + + * dlls/wintrust/asn.c, dlls/wintrust/wintrust.spec: + wintrust: Implement SPC indirect data decoding. + + * dlls/wintrust/asn.c, dlls/wintrust/wintrust.spec: + wintrust: Implement SPC indirect data encoding. + + * dlls/wintrust/asn.c, dlls/wintrust/tests/asn.c: + wintrust: Implement SPC PE image encoding. + + * dlls/wintrust/asn.c, dlls/wintrust/tests/asn.c: + wintrust: Implement SPC PE image decoding. + +2007-08-13 Andrew Talbot + + * dlls/riched20/editor.h, dlls/riched20/paint.c, dlls/riched20/para.c: + riched20: Constify some variables. + +2007-08-13 Mikołaj Zalewski + + * dlls/kernel32/global16.c: + kernel: Allocate global memory with execute permission. + +2007-08-12 Roderick Colenbrander + + * dlls/winex11.drv/opengl.c: + wgl: Proper stereo / double buffering support for ChoosePixelFormat. + +2007-08-14 Roderick Colenbrander + + * dlls/wined3d/wined3d_main.c: + wined3d: Don't use ENTER_GL/LEAVE_GL on systems without winex11.drv. + + * dlls/winex11.drv/opengl.c, include/wingdi.h: + wgl: Recognize Vista's PFD_SUPPORT_COMPOSITION flag. + +2007-08-14 Paul Vriens + + * dlls/shell32/tests/shelllink.c: + shell32/tests: Make tests run again on win95. + + * dlls/ntdll/tests/om.c: + ntdll/tests: Make tests run again on win95. + + * dlls/crypt32/tests/cert.c, dlls/crypt32/tests/msg.c: + crypt32/tests: Make tests run again on win95. + + * dlls/d3d8/tests/device.c: + d3d8/tests: Make tests run again on win95. + + * dlls/advapi32/tests/security.c: + advapi32/tests: Make tests run again on win95. + +2007-08-13 Evan Stade + + * dlls/gdiplus/font.c, dlls/gdiplus/gdiplus.spec, include/gdiplusflat.h: + gdiplus: Added GdipCreateFontFromLogfontA. + + * dlls/gdiplus/Makefile.in, dlls/gdiplus/font.c, + dlls/gdiplus/gdiplus.spec, dlls/gdiplus/gdiplus_private.h, + include/gdiplusflat.h, include/gdiplusgpstubs.h: + gdiplus: Added font constructor. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c, + include/gdiplusflat.h: + gdiplus: Added GdipDrawRectangles. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c, + include/gdiplusflat.h: + gdiplus: Added GdipScaleWorldTransform. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c, + include/gdiplusflat.h: + gdiplus: Added GdipRotateWorldTransform. + + * dlls/gdiplus/graphics.c: + gdiplus: Better handle UnitPixel pen width. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/gdiplus_private.h, + dlls/gdiplus/graphics.c, include/gdiplusenums.h, + include/gdiplusflat.h: + gdiplus: Added GdipSetCompositingMode/GdipGetCompositingMode. + +2007-08-14 Alexandre Julliard + + * dlls/comctl32/commctrl.c, tools/wine.inf: + comctl32: Create a manifest file at dll registration time. + + * dlls/ntdll/actctx.c: + ntdll: Fixed the prototype of the open_nt_file wrapper. + +2007-08-13 Juan Lang + + * dlls/crypt32/tests/cert.c: + crypt32: Test finding the issuer of a certificate. + + * dlls/crypt32/cert.c: + crypt32: Avoid a memory allocation when decoding the subject key identifier + extension. + + * dlls/crypt32/cert.c: + crypt32: Add missing break. + + * dlls/crypt32/decode.c, dlls/crypt32/encode.c, + dlls/crypt32/tests/encode.c: + crypt32: Test authority key identifier with a multi-byte id to show that its + byte-order is swapped and fix encoding and decoding it. + +2007-08-13 Jason Edmeades + + * dlls/comctl32/tooltips.c: + comctl32: Fix missing tooltips. + +2007-08-09 Stefan Dösinger + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c, + dlls/wined3d/wined3d_private.h: + wined3d: Optimize texture stage state applying. + +2007-08-03 Stefan Dösinger + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c, + dlls/wined3d/wined3d_private.h: + wined3d: Optimize bool and int pixel shader constants. + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c, + dlls/wined3d/wined3d_private.h: + wined3d: Optimize bool and int vs constants. + +2007-07-31 Stefan Dösinger + + * dlls/wined3d/stateblock.c: + wined3d: Do not copy the saved states structure into the primary stateblock. + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c, + dlls/wined3d/wined3d_private.h: + wined3d: Optimize transform state in stateblocks. + +2007-08-13 Vitaliy Margolen + + * dlls/wined3d/device.c: + wined3d: Activate context before applying fbo state. + +2007-08-13 Roderick Colenbrander + + * dlls/wined3d/device.c, dlls/wined3d/directx.c, + dlls/wined3d/wined3d_private.h: + wined3d: Pass the proper DeviceName to ChangeDisplaySettings. + +2007-08-13 Detlef Riekenberg + + * dlls/winspool.drv/tests/info.c: + winspool/tests: Fix 2 failing tests for restricted users. + +2007-08-13 Misha Koshelev + + * dlls/urlmon/http.c: + urlmon: Fix timing issue with FLAG_REQUEST_COMPLETE and + InternetQueryDataAvailable in HttpProtocol_Continue. + +2007-08-12 Misha Koshelev + + * programs/winebrowser/main.c: + winebrowser: Add support for XTYP_REQUEST in DDE callback. + +2007-08-12 Chris Robinson + + * dlls/winex11.drv/opengl.c: + winex11: Set proper pixel format flags. + +2007-08-12 Roderick Colenbrander + + * dlls/winex11.drv/opengl.c: + wgl: Re-enable GLX_ATI_render_texture support. + +2007-08-10 Jason Edmeades + + * dlls/advpack/tests/advpack.c, dlls/setupapi/parser.c, + dlls/setupapi/tests/parser.c: + setupapi: Remove duplicate backslashes on dirids. + +2007-08-11 Roderick Colenbrander + + * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h: + wined3d: Proper CheckDeviceType / CheckDepthStencilMatch support. + + * dlls/wined3d/context.c: + wined3d: Check the results of SetPixelFormat. + + * dlls/wined3d/utils.c: + wined3d: Add more pixelformats to getColorBits. + + * dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/swapchain.c, + dlls/wined3d/wined3d_private.h: + wined3d: Use the proper depth stencil format. + + * dlls/wined3d/utils.c: + wined3d: Fix WINED3DFMT D16/L16 bugs in the pixelformat table. + +2007-08-12 Misha Koshelev + + * dlls/wininet/tests/http.c: + wininet/tests: Test that for an open HTTP connection InternetQueryDataAvailable + succeeds or returns ERROR_IO_PENDING. + + * dlls/wininet/internet.c, dlls/wininet/netconnection.c: + wininet: InternetQueryDataAvailable does not return ERROR_NO_MORE_FILES when + no more HTTP data is available. + + * dlls/wininet/internet.c: + wininet: Don't peek data in InternetQueryDataAvailable if there is no more to + be expected. + +2007-08-12 Marcus Meissner + + * dlls/msi/tests/install.c: + msi: Allocate 1 byte more buffer. + +2007-08-11 Andrew Talbot + + * dlls/riched20/caret.c, dlls/riched20/clipboard.c, + dlls/riched20/editor.c, dlls/riched20/editor.h: + riched20: Constify some variables. + +2007-08-10 Alex Villacís Lasso + + * dlls/quartz/systemclock.c, dlls/quartz/tests/referenceclock.c: + quartz: Fix IReferenceClock::GetTime() implementation for system clock. + + * dlls/quartz/tests/Makefile.in, dlls/quartz/tests/referenceclock.c: + quartz: Add test for IReferenceClock. + +2007-08-10 Jason Edmeades + + * programs/regedit/regproc.c: + regedit: Fix importing of .reg hex. + + * dlls/advpack/advpack.c, dlls/advpack/tests/advpack.c: + advpack: Strip single quotes (with tests) on reg keys. + +2007-08-12 Jason Edmeades + + * programs/cmd/wcmdmain.c: + cmd.exe: Redirection for external programs was broken by the conversion + to unicode. + + * dlls/user32/menu.c: + user32: Fix regression in alt, then right processing with eg wines notepad. + + * dlls/user32/menu.c: + user32: Allow alt+space to highlight system menu. + +2007-08-11 Damjan Jovanovic + + * dlls/winex11.drv/bitblt.c: + winex11.drv: Correctly handle overlapping source and destination regions on + the same DIB when copying DIBs client-side. + +2007-08-12 Marcus Meissner + + * programs/cmd/builtins.c: + cmd.exe: WCMD_for is only for files. + + * dlls/user32/msgbox.c: + user32: Initialize MONITORINFO.cbSize. + +2007-08-13 Jacek Caban + + * dlls/mshtml/htmldoc.c, dlls/mshtml/mshtml_private.h, + dlls/mshtml/oleobj.c: + mshtml: Added ICustomDoc stub implementation. + +2007-08-12 Jacek Caban + + * dlls/mshtml/txtrange.c: + mshtml: Added IHTMLTxtRange::collapse implementation. + + * dlls/mshtml/txtrange.c: + mshtml: Added IHTMLTxtRange::duplicate implementation. + + * dlls/mshtml/main.c: + mshtml: Make get_typeinfo thread safe. + + * dlls/mshtml/selection.c: + mshtml: Use GetIsCollapsed in IHTMLSelectionObject::get_type. + + * dlls/mshtml/editor.c, dlls/mshtml/tests/htmldoc.c: + mshtml: Added IDM_SELECTALL implementation. + + * dlls/mshtml/nsio.c: + mshtml: Don't mess with gecko specific protocols. + + * dlls/urlmon/Makefile.in, dlls/urlmon/bindctx.c, dlls/urlmon/tests/url.c, + dlls/urlmon/umon.c: + urlmon: Wrap IBindCtx in CreateAsyncBindCtxEx. + +2007-08-11 Detlef Riekenberg + + * dlls/user32/winproc.c: + user32: Call a 16-Bit winproc again. + +2007-07-31 Stefan Dösinger + + * dlls/wined3d/device.c, dlls/wined3d/stateblock.c, + dlls/wined3d/wined3d_private.h: + wined3d: Optimize render states in the stateblock. + +2007-08-11 Stefan Dösinger + + * dlls/wined3d/stateblock.c: + wined3d: Remove primary stateblock fixme. + +2007-07-30 Stefan Dösinger + + * dlls/wined3d/device.c, dlls/wined3d/glsl_shader.c, dlls/wined3d/state.c, + dlls/wined3d/stateblock.c, dlls/wined3d/wined3d_private.h: + wined3d: Remove stateblock::set.*. + + * dlls/wined3d/stateblock.c: + wined3d: Remove ugly code from stateblock init. + + * dlls/wined3d/device.c: + wined3d: Remove outdated TODO in D3DDevice::SetTextureStageState. + +2007-08-10 James Hawkins + + * dlls/msi/tests/install.c: + msi: Add tests for the RemoveFiles standard action. + +2007-08-10 Evan Stade + + * dlls/gdiplus/tests/image.c: + gdiplus: Fix test to pass in Windows. + +2007-08-10 Juan Lang + + * dlls/wintrust/tests/asn.c: + wintrust: Add tests for encoding and decoding SPC PE image data. + + * dlls/wintrust/asn.c, dlls/wintrust/tests/asn.c: + wintrust: Implement encoding SPC links. + + * dlls/wintrust/Makefile.in, dlls/wintrust/asn.c, + dlls/wintrust/tests/asn.c: + wintrust: Implement decoding SPC links. + + * dlls/wintrust/tests/Makefile.in, dlls/wintrust/tests/asn.c: + wintrust: Add tests for encoding/decoding SPC links. + + * include/wintrust.h: + wintrust: Add missing definitions. + + * dlls/wintrust/Makefile.in, dlls/wintrust/asn.c, + dlls/wintrust/wintrust.spec: + wintrust: Add stubs for SPC_LINK and SPC_PE_IMAGE encoding/decoding. + + * dlls/wintrust/Makefile.in, dlls/wintrust/crypt.c: + wintrust: Implement CryptSIPGetSignedDataMsg. + + * dlls/crypt32/decode.c, dlls/crypt32/encode.c: + crypt32: Improve tracing when builtin function isn't available. + + * dlls/crypt32/encode.c: + crypt32: Use helper functions to simplify CryptEncodeObject and + CryptEncodeObjectEx. + + * dlls/crypt32/decode.c: + crypt32: Validate parameters better in CryptDecodeObject. + + * dlls/crypt32/decode.c: + crypt32: Use helper functions to simplify CryptDecodeObject and + CryptDecodeObjectEx. + + * dlls/crypt32/decode.c, dlls/crypt32/encode.c: + crypt32: Ex encode/decode functions should call non-Ex versions if no Ex + version is available. + +2007-08-10 Hernan Rajchert + + * dlls/wined3d/drawprim.c: + wined3d: Fixed error message when glDrawElement fails. + +2007-08-10 Alexandre Julliard + + * ANNOUNCE, ChangeLog, VERSION, configure: + Release 0.9.43. + +---------------------------------------------------------------- 2007-08-10 Paul Vriens * dlls/snmpapi/tests/util.c: diff --git a/VERSION b/VERSION index 3c4377b9536..475999647c5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Wine version 0.9.43 +Wine version 0.9.44 diff --git a/configure b/configure index 597e439ddf0..9060ab8382d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for Wine 0.9.43. +# Generated by GNU Autoconf 2.61 for Wine 0.9.44. # # Report bugs to . # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Wine' PACKAGE_TARNAME='wine' -PACKAGE_VERSION='0.9.43' -PACKAGE_STRING='Wine 0.9.43' +PACKAGE_VERSION='0.9.44' +PACKAGE_STRING='Wine 0.9.44' PACKAGE_BUGREPORT='wine-devel@winehq.org' ac_unique_file="server/atom.c" @@ -1290,7 +1290,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Wine 0.9.43 to adapt to many kinds of systems. +\`configure' configures Wine 0.9.44 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1359,7 +1359,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Wine 0.9.43:";; + short | recursive ) echo "Configuration of Wine 0.9.44:";; esac cat <<\_ACEOF @@ -1455,7 +1455,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Wine configure 0.9.43 +Wine configure 0.9.44 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1469,7 +1469,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Wine $as_me 0.9.43, which was +It was created by Wine $as_me 0.9.44, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -15644,6 +15644,11 @@ MAIN_BINARY="wine-pthread" EXTRA_BINARIES="wine-kthread wine-pthread wine-preloader" ;; + freebsd*) + MAIN_BINARY="wine-freebsd" + + EXTRA_BINARIES="wine-pthread" + ;; esac ;; esac @@ -15710,6 +15715,7 @@ esac + for ac_func in \ _pclose \ _popen \ @@ -15767,6 +15773,7 @@ for ac_func in \ strncasecmp \ strtold \ tcgetattr \ + thr_kill2 \ timegm \ usleep \ vsnprintf \ @@ -21371,7 +21378,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Wine $as_me 0.9.43, which was +This file was extended by Wine $as_me 0.9.44, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21424,7 +21431,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Wine config.status 0.9.43 +Wine config.status 0.9.44 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index dec58976e46..ca156b3c87a 100644 --- a/configure.ac +++ b/configure.ac @@ -1235,6 +1235,9 @@ case $host_cpu in linux* | k*bsd*-gnu) AC_SUBST(MAIN_BINARY,"wine-glibc") AC_SUBST(EXTRA_BINARIES,"wine-kthread wine-pthread wine-preloader") ;; + freebsd*) + AC_SUBST(MAIN_BINARY,"wine-freebsd") + AC_SUBST(EXTRA_BINARIES,"wine-pthread") ;; esac ;; esac @@ -1298,6 +1301,7 @@ AC_CHECK_FUNCS(\ strncasecmp \ strtold \ tcgetattr \ + thr_kill2 \ timegm \ usleep \ vsnprintf \ diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 25df83517b1..9756ca89700 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -1406,8 +1406,10 @@ static void test_LookupAccountName(void) ok(ret, "Failed to lookup account name\n"); todo_wine { - ok(!lstrcmp(account, "BUILTIN"), "Expected BUILTIN, got %s\n", account); - ok(!lstrcmp(domain, "BUILTIN"), "Expected BUILTIN, got %s\n", domain); + /* Using a fixed string will not work on different locales */ + ok(!lstrcmp(account, domain), + "Got %s for account and %s for domain, these should be the same\n", + account, domain); ok(sid_use == SidTypeDomain, "Expected SidTypeDomain, got %d\n", SidTypeDomain); } diff --git a/dlls/advpack/files.c b/dlls/advpack/files.c index d0f948caca3..7dc816f46bc 100644 --- a/dlls/advpack/files.c +++ b/dlls/advpack/files.c @@ -523,7 +523,7 @@ HRESULT WINAPI DelNodeRunDLL32W(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT struct FILELIST{ LPSTR FileName; struct FILELIST *next; - BOOL Extracted; + BOOL DoExtract; }; typedef struct { @@ -621,14 +621,12 @@ static BOOL file_in_list(LPCSTR szFile, LPCSTR szFileList) return FALSE; } -/* removes nodes from the linked list that aren't specified in szFileList - * returns the number of files that are in both the linked list and szFileList - */ + +/* returns the number of files that are in both the linked list and szFileList */ static DWORD fill_file_list(SESSION *session, LPCSTR szCabName, LPCSTR szFileList) { DWORD dwNumFound = 0; struct FILELIST *pNode; - struct FILELIST *prev = NULL; session->Operation |= EXTRACT_FILLFILELIST; if (pExtract(session, szCabName)) @@ -640,24 +638,12 @@ static DWORD fill_file_list(SESSION *session, LPCSTR szCabName, LPCSTR szFileLis pNode = session->FileList; while (pNode) { - if (file_in_list(pNode->FileName, szFileList)) - { - prev = pNode; - pNode = pNode->next; - dwNumFound++; - } - else if (prev) - { - prev->next = pNode->next; - free_file_node(pNode); - pNode = prev->next; - } + if (!file_in_list(pNode->FileName, szFileList)) + pNode->DoExtract = FALSE; else - { - session->FileList = pNode->next; - free_file_node(pNode); - pNode = session->FileList; - } + dwNumFound++; + + pNode = pNode->next; } session->Operation &= ~EXTRACT_FILLFILELIST; diff --git a/dlls/cabinet/cabinet.h b/dlls/cabinet/cabinet.h index 3b72ff8da61..f566124c173 100644 --- a/dlls/cabinet/cabinet.h +++ b/dlls/cabinet/cabinet.h @@ -638,7 +638,7 @@ static const cab_UWORD Zipmask[17] = { struct FILELIST{ LPSTR FileName; struct FILELIST *next; - BOOL Extracted; + BOOL DoExtract; }; typedef struct { diff --git a/dlls/cabinet/cabinet_main.c b/dlls/cabinet/cabinet_main.c index 8b3c621e160..9e2c18a047e 100644 --- a/dlls/cabinet/cabinet_main.c +++ b/dlls/cabinet/cabinet_main.c @@ -157,18 +157,24 @@ static long fdi_seek(INT_PTR hf, long dist, int seektype) static void fill_file_node(struct FILELIST *pNode, LPCSTR szFilename) { pNode->next = NULL; - pNode->Extracted = FALSE; + pNode->DoExtract = FALSE; pNode->FileName = HeapAlloc(GetProcessHeap(), 0, strlen(szFilename) + 1); lstrcpyA(pNode->FileName, szFilename); } -static BOOL file_in_list(const struct FILELIST *pNode, LPCSTR szFilename) +static BOOL file_in_list(struct FILELIST *pNode, LPCSTR szFilename, + struct FILELIST **pOut) { while (pNode) { if (!lstrcmpiA(pNode->FileName, szFilename)) + { + if (pOut) + *pOut = pNode; + return TRUE; + } pNode = pNode->next; } @@ -182,7 +188,7 @@ static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pf { case fdintCOPY_FILE: { - struct FILELIST **fileList; + struct FILELIST *fileList, *node = NULL; SESSION *pDestination = pfdin->pv; LPSTR szFullPath, szDirectory; HANDLE hFile = 0; @@ -201,26 +207,28 @@ static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pf szDirectory = HeapAlloc(GetProcessHeap(), 0, dwSize); lstrcpynA(szDirectory, szFullPath, dwSize); + pDestination->FileSize += pfdin->cb; + if (pDestination->Operation & EXTRACT_FILLFILELIST) { - fileList = &pDestination->FileList; + fileList = HeapAlloc(GetProcessHeap(), 0, + sizeof(struct FILELIST)); - while (*fileList) - fileList = &((*fileList)->next); - - *fileList = HeapAlloc(GetProcessHeap(), 0, - sizeof(struct FILELIST)); - - fill_file_node(*fileList, pfdin->psz1); + fill_file_node(fileList, pfdin->psz1); + fileList->DoExtract = TRUE; + fileList->next = pDestination->FileList; + pDestination->FileList = fileList; lstrcpyA(pDestination->CurrentFile, szFullPath); pDestination->FileCount++; } if ((pDestination->Operation & EXTRACT_EXTRACTFILES) || - file_in_list(pDestination->FilterList, pfdin->psz1)) + file_in_list(pDestination->FilterList, pfdin->psz1, NULL)) { - /* skip this file if it is not in the file list */ - if (!file_in_list(pDestination->FileList, pfdin->psz1)) + /* find the file node */ + file_in_list(pDestination->FileList, pfdin->psz1, &node); + + if (node && !node->DoExtract) return 0; /* create the destination directory if it doesn't exist */ @@ -232,6 +240,8 @@ static INT_PTR fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pf if (hFile == INVALID_HANDLE_VALUE) hFile = 0; + else if (node) + node->DoExtract = FALSE; } HeapFree(GetProcessHeap(), 0, szFullPath); @@ -306,7 +316,6 @@ HRESULT WINAPI Extract(SESSION *dest, LPCSTR szCabName) { HRESULT res = S_OK; HFDI hfdi; - ERF erf; char *str, *path, *name; TRACE("(%p, %s)\n", dest, szCabName); @@ -319,7 +328,7 @@ HRESULT WINAPI Extract(SESSION *dest, LPCSTR szCabName) fdi_close, fdi_seek, cpuUNKNOWN, - &erf); + &dest->Error); if (!hfdi) return E_FAIL; @@ -346,9 +355,11 @@ HRESULT WINAPI Extract(SESSION *dest, LPCSTR szCabName) path = NULL; } + dest->FileSize = 0; + if (!FDICopy(hfdi, name, path, 0, fdi_notify_extract, NULL, dest)) - res = E_FAIL; + res = HRESULT_FROM_WIN32(GetLastError()); HeapFree(GetProcessHeap(), 0, str); end: diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c index ef004471e12..eea62184805 100644 --- a/dlls/cabinet/fdi.c +++ b/dlls/cabinet/fdi.c @@ -2495,7 +2495,6 @@ BOOL __cdecl FDICopy( cabhf = PFDI_OPEN(hfdi, fullpath, _O_RDONLY|_O_BINARY, _S_IREAD | _S_IWRITE); if (cabhf == -1) { PFDI_INT(hfdi)->perf->erfOper = FDIERROR_CABINET_NOT_FOUND; - PFDI_INT(hfdi)->perf->erfType = ERROR_FILE_NOT_FOUND; PFDI_INT(hfdi)->perf->fError = TRUE; SetLastError(ERROR_FILE_NOT_FOUND); return FALSE; diff --git a/dlls/cabinet/tests/extract.c b/dlls/cabinet/tests/extract.c index ad93fb82ecc..5ce5ba8608e 100644 --- a/dlls/cabinet/tests/extract.c +++ b/dlls/cabinet/tests/extract.c @@ -39,7 +39,7 @@ struct FILELIST{ LPSTR FileName; struct FILELIST *next; - BOOL Extracted; + BOOL DoExtract; }; typedef struct { @@ -314,21 +314,26 @@ static void create_cab_file(void) ok(res, "Failed to destroy the cabinet\n"); } -static BOOL check_list(struct FILELIST *filelist, const char *filename, BOOL extracted) +static BOOL check_list(struct FILELIST **node, const char *filename, BOOL do_extract) { - struct FILELIST *fl; + if (!*node) + return FALSE; - for (fl = filelist; fl; fl = fl->next) - if (!lstrcmp(filename, fl->FileName)) - return (extracted == fl->Extracted); + if (lstrcmpA((*node)->FileName, filename)) + return FALSE; - return FALSE; + if ((*node)->DoExtract != do_extract) + return FALSE; + + *node = (*node)->next; + return TRUE; } static void test_Extract(void) { SESSION session; HRESULT res; + struct FILELIST *node; /* native windows crashes if * - invalid parameters are sent in @@ -341,11 +346,9 @@ static void test_Extract(void) lstrcpyA(session.Destination, "dest"); session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; res = pExtract(&session, "extract.cab"); + node = session.FileList; ok(res == S_OK, "Expected S_OK, got %d\n", res); - todo_wine - { - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - } + ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); @@ -363,21 +366,19 @@ static void test_Extract(void) ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); - ok(check_list(session.FileList, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "a.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); /* try fill file list operation */ ZeroMemory(&session, sizeof(SESSION)); lstrcpyA(session.Destination, "dest"); session.Operation = EXTRACT_FILLFILELIST; res = pExtract(&session, "extract.cab"); + node = session.FileList; ok(res == S_OK, "Expected S_OK, got %d\n", res); - todo_wine - { - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - } + ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); @@ -392,22 +393,17 @@ static void test_Extract(void) ok(!session.FilterList, "Expected empty filter list\n"); ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - todo_wine - { - ok(check_list(session.FileList, "testdir\\d.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "testdir\\c.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "b.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "a.txt", TRUE), "list entry wrong\n"); - } + ok(check_list(&node, "testdir\\d.txt", TRUE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\c.txt", TRUE), "list entry wrong\n"); + ok(check_list(&node, "b.txt", TRUE), "list entry wrong\n"); + ok(check_list(&node, "a.txt", TRUE), "list entry wrong\n"); /* try extract files operation once file list is filled */ session.Operation = EXTRACT_EXTRACTFILES; res = pExtract(&session, "extract.cab"); + node = session.FileList; ok(res == S_OK, "Expected S_OK, got %d\n", res); - todo_wine - { - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - } + ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); @@ -426,18 +422,16 @@ static void test_Extract(void) ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n"); ok(RemoveDirectoryA("dest"), "Expected dest to exist\n"); - ok(check_list(session.FileList, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "a.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); /* Extract does not extract files if the dest dir does not exist */ res = pExtract(&session, "extract.cab"); + node = session.FileList; ok(res == S_OK, "Expected S_OK, got %d\n", res); - todo_wine - { - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - } + ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); @@ -451,11 +445,13 @@ static void test_Extract(void) ok(!*session.Reserved, "Expected empty string, got %s\n", session.Reserved); ok(!session.FilterList, "Expected empty filter list\n"); ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n"); + ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); - ok(check_list(session.FileList, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "a.txt", FALSE), "list entry wrong\n"); + ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); + ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); /* remove two of the files in the list */ session.FileList->next = session.FileList->next->next; @@ -463,11 +459,9 @@ static void test_Extract(void) session.FilterList = NULL; CreateDirectoryA("dest", NULL); res = pExtract(&session, "extract.cab"); + node = session.FileList; ok(res == S_OK, "Expected S_OK, got %d\n", res); - todo_wine - { - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - } + ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); @@ -484,22 +478,17 @@ static void test_Extract(void) ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - - todo_wine { - ok(check_list(session.FileList, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(!check_list(session.FileList, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "b.txt", FALSE), "list entry wrong\n"); - ok(!check_list(session.FileList, "a.txt", FALSE), "list entry wrong\n"); - } + ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); + ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); + ok(!check_list(&node, "a.txt", FALSE), "list entry wrong\n"); session.Operation = EXTRACT_FILLFILELIST; session.FileList = NULL; res = pExtract(&session, "extract.cab"); + node = session.FileList; ok(res == S_OK, "Expected S_OK, got %d\n", res); - todo_wine - { - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - } + ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); @@ -516,21 +505,16 @@ static void test_Extract(void) ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - - todo_wine { - ok(check_list(session.FileList, "testdir\\d.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "testdir\\c.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "b.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "a.txt", TRUE), "list entry wrong\n"); - } + ok(check_list(&node, "testdir\\d.txt", TRUE), "list entry wrong\n"); + ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); + ok(!check_list(&node, "b.txt", FALSE), "list entry wrong\n"); + ok(!check_list(&node, "a.txt", FALSE), "list entry wrong\n"); session.Operation = 0; res = pExtract(&session, "extract.cab"); + node = session.FileList; ok(res == S_OK, "Expected S_OK, got %d\n", res); - todo_wine - { - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - } + ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); @@ -546,22 +530,17 @@ static void test_Extract(void) ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); - - todo_wine { - ok(check_list(session.FileList, "testdir\\d.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "testdir\\c.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "b.txt", TRUE), "list entry wrong\n"); - ok(check_list(session.FileList, "a.txt", TRUE), "list entry wrong\n"); - } + ok(check_list(&node, "testdir\\d.txt", TRUE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\c.txt", TRUE), "list entry wrong\n"); + ok(check_list(&node, "b.txt", TRUE), "list entry wrong\n"); + ok(check_list(&node, "a.txt", TRUE), "list entry wrong\n"); session.Operation = 0; session.FilterList = session.FileList; res = pExtract(&session, "extract.cab"); + node = session.FileList; ok(res == S_OK, "Expected S_OK, got %d\n", res); - todo_wine - { - ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); - } + ok(session.FileSize == 40, "Expected 40, got %d\n", session.FileSize); ok(session.Error.erfOper == FDIERROR_NONE, "Expected FDIERROR_NONE, got %d\n", session.Error.erfOper); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); @@ -576,31 +555,29 @@ static void test_Extract(void) ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n"); ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n"); ok(DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to exist\n"); - - ok(check_list(session.FileList, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "a.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FilterList, "testdir\\d.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FilterList, "testdir\\c.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FilterList, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FilterList, "a.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); + node = session.FilterList; + ok(check_list(&node, "testdir\\d.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "b.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "a.txt", FALSE), "list entry wrong\n"); /* cabinet does not exist */ ZeroMemory(&session, sizeof(SESSION)); lstrcpyA(session.Destination, "dest"); session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; res = pExtract(&session, "nonexistent.cab"); - todo_wine - { - ok(res == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", res); - ok(session.Error.erfOper == FDIERROR_CABINET_NOT_FOUND, - "Expected FDIERROR_CABINET_NOT_FOUND, got %d\n", session.Error.erfOper); - ok(session.Error.fError == TRUE, "Expected TRUE, got %d\n", session.Error.fError); - } + node = session.FileList; + ok(res == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", res); + ok(session.Error.erfOper == FDIERROR_CABINET_NOT_FOUND, + "Expected FDIERROR_CABINET_NOT_FOUND, got %d\n", session.Error.erfOper); ok(session.FileSize == 0, "Expected 0, got %d\n", session.FileSize); ok(session.Error.erfType == 0, "Expected 0, got %d\n", session.Error.erfType); + ok(session.Error.fError == TRUE, "Expected TRUE, got %d\n", session.Error.fError); ok(session.FileCount == 0, "Expected 0, got %d\n", session.FileCount); ok(session.Operation == (EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES), "Expected EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES, got %d\n", session.Operation); @@ -612,10 +589,10 @@ static void test_Extract(void) ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(!check_list(session.FileList, "testdir\\d.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(session.FileList, "testdir\\c.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(session.FileList, "b.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(session.FileList, "a.txt", FALSE), "list entry should not exist\n"); + ok(!check_list(&node, "testdir\\d.txt", FALSE), "list entry should not exist\n"); + ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry should not exist\n"); + ok(!check_list(&node, "b.txt", FALSE), "list entry should not exist\n"); + ok(!check_list(&node, "a.txt", FALSE), "list entry should not exist\n"); /* first file exists */ createTestFile("dest\\a.txt"); @@ -624,6 +601,7 @@ static void test_Extract(void) lstrcpyA(session.Destination, "dest"); session.Operation = EXTRACT_FILLFILELIST | EXTRACT_EXTRACTFILES; res = pExtract(&session, "extract.cab"); + node = session.FileList; todo_wine { ok(res == HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED), @@ -648,11 +626,11 @@ static void test_Extract(void) ok(!DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to not exist\n"); ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n"); ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(!check_list(session.FileList, "testdir\\d.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(session.FileList, "testdir\\c.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(session.FileList, "b.txt", FALSE), "list entry should not exist\n"); - ok(!check_list(session.FileList, "a.txt", FALSE), "list entry should not exist\n"); + ok(!check_list(&node, "testdir\\d.txt", FALSE), "list entry should not exist\n"); + ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry should not exist\n"); + ok(!check_list(&node, "b.txt", FALSE), "list entry should not exist\n"); } + ok(!check_list(&node, "a.txt", FALSE), "list entry should not exist\n"); SetFileAttributesA("dest\\a.txt", FILE_ATTRIBUTE_NORMAL); DeleteFileA("dest\\a.txt"); @@ -688,11 +666,11 @@ static void test_Extract(void) todo_wine { ok(!DeleteFileA("dest\\testdir\\d.txt"), "Expected dest\\testdir\\d.txt to not exist\n"); - ok(!check_list(session.FileList, "testdir\\d.txt", FALSE), "list entry should not exist\n"); - ok(check_list(session.FileList, "testdir\\c.txt", TRUE), "list entry wrong\n"); } - ok(check_list(session.FileList, "b.txt", FALSE), "list entry wrong\n"); - ok(check_list(session.FileList, "a.txt", FALSE), "list entry wrong\n"); + ok(!check_list(&node, "testdir\\d.txt", FALSE), "list entry should not exist\n"); + ok(!check_list(&node, "testdir\\c.txt", FALSE), "list entry wrong\n"); + ok(!check_list(&node, "b.txt", FALSE), "list entry wrong\n"); + ok(check_list(&node, "a.txt", TRUE), "list entry wrong\n"); SetFileAttributesA("dest\\testdir\\c.txt", FILE_ATTRIBUTE_NORMAL); DeleteFileA("dest\\testdir\\c.txt"); diff --git a/dlls/comdlg32/cdlg_No.rc b/dlls/comdlg32/cdlg_No.rc index 8a0b79f18e0..ce8013cb3cd 100644 --- a/dlls/comdlg32/cdlg_No.rc +++ b/dlls/comdlg32/cdlg_No.rc @@ -1,5 +1,5 @@ /* - * Copyright 2005 Alexander N. Sørnes + * Copyright 2005-2007 Alexander N. Sørnes * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -134,8 +134,8 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "&Bruk", psh3,218,40,40,14,WS_GROUP | WS_TABSTOP PUSHBUTTON "&Hjelp" , pshHelp,218,57,40,14,WS_GROUP | WS_TABSTOP GROUPBOX "Effekter",grp1,6,72,84,34,WS_GROUP - CHECKBOX "Gjennomstre&ket", chx1, 10,82,50,10, BS_AUTOCHECKBOX | WS_TABSTOP - CHECKBOX "&Understreket", chx2, 10,94,50,10, BS_AUTOCHECKBOX + CHECKBOX "Gjennomstre&ket", chx1, 10,82,70,10, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "&Understreket", chx2, 10,94,70,10, BS_AUTOCHECKBOX LTEXT "&Farge:", stc4 ,6,110,30,9 COMBOBOX cmb4,6,120,84,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP @@ -189,10 +189,10 @@ FONT 8, "MS Shell Dlg" LTEXT "Fi&nn:", -1, 4, 8, 42, 8 EDITTEXT edt1, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP CHECKBOX "Finn &kun hele ord", chx1, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "Skill &mellom store/små bokstaver", chx2, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP - GROUPBOX "Retning", grp1, 107, 26, 68, 28 - CONTROL "&Opp", rad1, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 111, 38, 20, 12 - CONTROL "&Ned", rad2, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 138, 38, 30, 12 + CHECKBOX "Skill &mellom store og små bokstaver", chx2, 4, 42, 125, 12, BS_AUTOCHECKBOX | WS_TABSTOP + GROUPBOX "Retning", grp1, 137, 23, 40, 36 + CONTROL "&Opp", rad1, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 141, 31, 30, 12 + CONTROL "&Ned", rad2, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 141, 44, 30, 12 DEFPUSHBUTTON "&Finn neste", IDOK, 182, 5, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Avbryt", IDCANCEL , 182, 23, 50, 14, WS_GROUP | WS_TABSTOP @@ -210,7 +210,7 @@ FONT 8, "MS Shell Dlg" LTEXT "&Erstatt med:", -1, 4, 26, 48, 8 EDITTEXT edt2, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP CHECKBOX "Finn kun &hele ord", chx1, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "Skill mellom store og små bokstaver", chx2, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Skill mellom store og små bokstaver", chx2, 5, 62, 125, 12, BS_AUTOCHECKBOX | WS_TABSTOP DEFPUSHBUTTON "&Finn neste", IDOK, 174, 4, 50, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "E&rsatt", psh1 , 174, 21, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index 714f09cf6c6..f3736ce8e6c 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -3167,12 +3167,15 @@ PRINTDLG_PageDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hDlg, edt7), FALSE); } /* Set orientation radiobutton properly */ - dm = GlobalLock(pda->dlga->hDevMode); - if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE) - CheckRadioButton(hDlg, rad1, rad2, rad2); - else /* this is default if papersize is not set */ - CheckRadioButton(hDlg, rad1, rad2, rad1); - GlobalUnlock(pda->dlga->hDevMode); + if(pda->dlga->hDevMode) + { + dm = GlobalLock(pda->dlga->hDevMode); + if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE) + CheckRadioButton(hDlg, rad1, rad2, rad2); + else /* this is default if papersize is not set */ + CheckRadioButton(hDlg, rad1, rad2, rad1); + GlobalUnlock(pda->dlga->hDevMode); + } /* if orientation disabled */ if (pda->dlga->Flags & PSD_DISABLEORIENTATION) { @@ -3280,13 +3283,17 @@ PageDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hDlg, edt7), FALSE); } - dm = GlobalLock(pda->dlga->hDevMode); - /* Landscape orientation */ - if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE) - CheckRadioButton(hDlg, rad1, rad2, rad2); - else /* this is default if papersize is not set */ - CheckRadioButton(hDlg, rad1, rad2, rad1); - GlobalUnlock(pda->dlga->hDevMode); + if(pda->dlga->hDevMode) + { + dm = GlobalLock(pda->dlga->hDevMode); + /* Landscape orientation */ + if (dm->u1.s1.dmOrientation == DMORIENT_LANDSCAPE) + CheckRadioButton(hDlg, rad1, rad2, rad2); + else /* this is default if papersize is not set */ + CheckRadioButton(hDlg, rad1, rad2, rad1); + GlobalUnlock(pda->dlga->hDevMode); + } + if (pda->dlga->Flags & PSD_DISABLEORIENTATION) { EnableWindow(GetDlgItem(hDlg,rad1),FALSE); EnableWindow(GetDlgItem(hDlg,rad2),FALSE); diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 7cf1a301a2d..4e608bc2f7d 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -2087,6 +2087,38 @@ static BOOL CDecodeHashMsg_VerifyHash(CDecodeMsg *msg) return ret; } +static BOOL CDecodeSignedMsg_VerifySignatureWithKey(CDecodeMsg *msg, + HCRYPTPROV prov, DWORD signerIndex, PCERT_PUBLIC_KEY_INFO keyInfo) +{ + HCRYPTKEY key; + BOOL ret; + + if (!prov) + prov = msg->crypt_prov; + ret = CryptImportPublicKeyInfo(prov, X509_ASN_ENCODING, keyInfo, &key); + if (ret) + { + HCRYPTHASH hash; + CRYPT_HASH_BLOB reversedHash; + + if (msg->u.signed_data.info->rgSignerInfo[signerIndex].AuthAttrs.cAttr) + hash = msg->u.signed_data.signerHandles[signerIndex].authAttrHash; + else + hash = msg->u.signed_data.signerHandles[signerIndex].contentHash; + ret = CRYPT_ConstructBlob(&reversedHash, + &msg->u.signed_data.info->rgSignerInfo[signerIndex].EncryptedHash); + if (ret) + { + CRYPT_ReverseBytes(&reversedHash); + ret = CryptVerifySignatureW(hash, reversedHash.pbData, + reversedHash.cbData, key, NULL, 0); + CryptMemFree(reversedHash.pbData); + } + CryptDestroyKey(key); + } + return ret; +} + static BOOL CDecodeSignedMsg_VerifySignature(CDecodeMsg *msg, PCERT_INFO info) { BOOL ret = FALSE; @@ -2106,35 +2138,45 @@ static BOOL CDecodeSignedMsg_VerifySignature(CDecodeMsg *msg, PCERT_INFO info) } } if (ret) - { - HCRYPTKEY key; + ret = CDecodeSignedMsg_VerifySignatureWithKey(msg, 0, i, + &info->SubjectPublicKeyInfo); + else + SetLastError(CRYPT_E_SIGNER_NOT_FOUND); - ret = CryptImportPublicKeyInfo(msg->crypt_prov, X509_ASN_ENCODING, - &info->SubjectPublicKeyInfo, &key); - if (ret) + return ret; +} + +static BOOL CDecodeSignedMsg_VerifySignatureEx(CDecodeMsg *msg, + PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA para) +{ + BOOL ret = FALSE; + + if (para->cbSize != sizeof(CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA)) + SetLastError(ERROR_INVALID_PARAMETER); + else if (para->dwSignerIndex >= msg->u.signed_data.info->cSignerInfo) + SetLastError(CRYPT_E_SIGNER_NOT_FOUND); + else + { + switch (para->dwSignerType) + { + case CMSG_VERIFY_SIGNER_PUBKEY: + ret = CDecodeSignedMsg_VerifySignatureWithKey(msg, + para->hCryptProv, para->dwSignerIndex, + (PCERT_PUBLIC_KEY_INFO)para->pvSigner); + break; + case CMSG_VERIFY_SIGNER_CERT: { - HCRYPTHASH hash; - CRYPT_HASH_BLOB reversedHash; + PCCERT_CONTEXT cert = (PCCERT_CONTEXT)para->pvSigner; - if (msg->u.signed_data.info->rgSignerInfo[i].AuthAttrs.cAttr) - hash = msg->u.signed_data.signerHandles[i].authAttrHash; - else - hash = msg->u.signed_data.signerHandles[i].contentHash; - ret = CRYPT_ConstructBlob(&reversedHash, - &msg->u.signed_data.info->rgSignerInfo[i].EncryptedHash); - if (ret) - { - CRYPT_ReverseBytes(&reversedHash); - ret = CryptVerifySignatureW(hash, reversedHash.pbData, - reversedHash.cbData, key, NULL, 0); - CryptMemFree(reversedHash.pbData); - } - CryptDestroyKey(key); + ret = CDecodeSignedMsg_VerifySignatureWithKey(msg, para->hCryptProv, + para->dwSignerIndex, &cert->pCertInfo->SubjectPublicKeyInfo); + break; + } + default: + FIXME("unimplemented for signer type %d\n", para->dwSignerType); + SetLastError(CRYPT_E_SIGNER_NOT_FOUND); } } - else - SetLastError(CRYPT_E_SIGNER_NOT_FOUND); - return ret; } @@ -2173,6 +2215,17 @@ static BOOL CDecodeMsg_Control(HCRYPTMSG hCryptMsg, DWORD dwFlags, SetLastError(CRYPT_E_INVALID_MSG_TYPE); } break; + case CMSG_CTRL_VERIFY_SIGNATURE_EX: + switch (msg->type) + { + case CMSG_SIGNED: + ret = CDecodeSignedMsg_VerifySignatureEx(msg, + (PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA)pvCtrlPara); + break; + default: + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + } + break; default: SetLastError(CRYPT_E_CONTROL_TYPE); } diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 74a0d13cd28..205120e46c7 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1803,6 +1803,12 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface, I TRACE("(%p) Relay\n", This); EnterCriticalSection(&d3d8_cs); + /* WineD3D takes an INT(due to d3d9), but d3d8 uses UINTs. Do I have to add a check here that + * the UINT doesn't cause an overflow in the INT? It seems rather unlikely because such large + * vertex buffers can't be created to address them with an index that requires the 32nd bit + * (4 Byte minimum vertex size * 2^31-1 -> 8 gb buffer. The index sign would be the least + * problem) + */ IWineD3DDevice_SetBaseVertexIndex(This->WineD3DDevice, baseVertexIndex); hr = IWineD3DDevice_SetIndices(This->WineD3DDevice, pIndexData ? ((IDirect3DIndexBuffer8Impl *)pIndexData)->wineD3DIndexBuffer : NULL); @@ -1822,7 +1828,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, I } EnterCriticalSection(&d3d8_cs); - IWineD3DDevice_GetBaseVertexIndex(This->WineD3DDevice, pBaseVertexIndex); + /* The case from UINT to INT is safe because d3d8 will never set negative values */ + IWineD3DDevice_GetBaseVertexIndex(This->WineD3DDevice, (INT *) pBaseVertexIndex); rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData); if (SUCCEEDED(rc) && retIndexData) { IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData); diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index aa65c7e50da..d48587fba00 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -593,16 +593,19 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDepthStencilSurface(LPDIRECT3DDE } EnterCriticalSection(&d3d9_cs); - hr=IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface); - if(hr == D3D_OK && pZStencilSurface != NULL){ - IWineD3DSurface_GetParent(pZStencilSurface,(IUnknown**)ppZStencilSurface); - IWineD3DSurface_Release(pZStencilSurface); - }else{ - FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n"); - *ppZStencilSurface = NULL; + hr = IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface); + if(hr == D3D_OK) { + if(pZStencilSurface != NULL){ + IWineD3DSurface_GetParent(pZStencilSurface,(IUnknown**)ppZStencilSurface); + IWineD3DSurface_Release(pZStencilSurface); + } else { + *ppZStencilSurface = NULL; + } + } else { + WARN("Call to IWineD3DDevice_GetDepthStencilSurface failed\n"); } LeaveCriticalSection(&d3d9_cs); - return D3D_OK; + return hr; } static HRESULT WINAPI IDirect3DDevice9Impl_BeginScene(LPDIRECT3DDEVICE9 iface) { diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index ed7266e565a..a2744e5d5ab 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -1700,6 +1700,508 @@ out: IDirect3D9_Release(d3d); } +static void texture_transform_flags_test(IDirect3DDevice9 *device) +{ + HRESULT hr; + IDirect3D9 *d3d; + D3DFORMAT fmt = D3DFMT_X8R8G8B8; + D3DCAPS9 caps; + IDirect3DTexture9 *texture = NULL; + IDirect3DVolumeTexture9 *volume = NULL; + unsigned int x, y, z; + D3DLOCKED_RECT lr; + D3DLOCKED_BOX lb; + DWORD color; + IDirect3DVertexDeclaration9 *decl, *decl2; + float identity[16] = {1.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0, + 0.0, 0.0, 0.0, 1.0}; + static const D3DVERTEXELEMENT9 decl_elements[] = { + {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + {0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, + D3DDECL_END() + }; + static const D3DVERTEXELEMENT9 decl_elements2[] = { + {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + {0, 12, D3DDECLTYPE_FLOAT1, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, + D3DDECL_END() + }; + + memset(&lr, 0, sizeof(lr)); + memset(&lb, 0, sizeof(lb)); + IDirect3DDevice9_GetDirect3D(device, &d3d); + if(IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, 0, + D3DRTYPE_TEXTURE, D3DFMT_A16B16G16R16) == D3D_OK) { + fmt = D3DFMT_A16B16G16R16; + } + IDirect3D9_Release(d3d); + + hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &decl); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements2, &decl2); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, FALSE); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_SRGBTEXTURE) returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAGFILTER, D3DTEXF_POINT); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MAGFILTER) returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MINFILTER, D3DTEXF_POINT); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MINFILTER) returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_MIPFILTER) returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSU) returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSV) returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSW, D3DTADDRESS_CLAMP); + ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState(D3DSAMP_ADDRESSW) returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState(D3DRS_LIGHTING) returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_CreateTexture(device, caps.MaxTextureWidth, caps.MaxTextureHeight, 1, + 0, fmt, D3DPOOL_MANAGED, &texture, NULL); + ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture returned %s\n", DXGetErrorString9(hr)); + if(!texture) { + skip("Failed to create the test texture\n"); + return; + } + + /* Unfortunately there is no easy way to set up a texture coordinate passthrough + * in d3d fixed function pipeline, so create a texture that has a gradient from 0.0 to + * 1.0 in red and green for the x and y coords + */ + hr = IDirect3DTexture9_LockRect(texture, 0, &lr, NULL, 0); + ok(hr == D3D_OK, "IDirect3DTexture9_LockRect returned %s\n", DXGetErrorString9(hr)); + for(y = 0; y < caps.MaxTextureHeight; y++) { + for(x = 0; x < caps.MaxTextureWidth; x++) { + double r_f = (double) y / (double) caps.MaxTextureHeight; + double g_f = (double) x / (double) caps.MaxTextureWidth; + if(fmt == D3DFMT_A16B16G16R16) { + unsigned short r, g; + unsigned short *dst = (unsigned short *) (((char *) lr.pBits) + y * lr.Pitch + x * 8); + r = (unsigned short) (r_f * 65536.0); + g = (unsigned short) (g_f * 65536.0); + dst[0] = r; + dst[1] = g; + dst[2] = 0; + dst[3] = 65535; + } else { + unsigned char *dst = ((unsigned char *) lr.pBits) + y * lr.Pitch + x * 4; + unsigned char r = (unsigned char) (r_f * 255.0); + unsigned char g = (unsigned char) (g_f * 255.0); + dst[0] = 0; + dst[1] = g; + dst[2] = r; + dst[3] = 255; + } + } + } + hr = IDirect3DTexture9_UnlockRect(texture, 0); + ok(hr == D3D_OK, "IDirect3DTexture9_UnlockRect returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %s\n", DXGetErrorString9(hr)); + + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + if(SUCCEEDED(hr)) + { + float quad1[] = { + -1.0, -1.0, 0.1, 1.0, 1.0, + -1.0, 0.0, 0.1, 1.0, 1.0, + 0.0, -1.0, 0.1, 1.0, 1.0, + 0.0, 0.0, 0.1, 1.0, 1.0, + }; + float quad2[] = { + -1.0, 0.0, 0.1, 1.0, 1.0, + -1.0, 1.0, 0.1, 1.0, 1.0, + 0.0, 0.0, 0.1, 1.0, 1.0, + 0.0, 1.0, 0.1, 1.0, 1.0, + }; + float quad3[] = { + 0.0, 0.0, 0.1, 0.5, 0.5, + 0.0, 1.0, 0.1, 0.5, 0.5, + 1.0, 0.0, 0.1, 0.5, 0.5, + 1.0, 1.0, 0.1, 0.5, 0.5, + }; + float quad4[] = { + 320, 480, 0.1, 1.0, 0.0, 1.0, + 320, 240, 0.1, 1.0, 0.0, 1.0, + 640, 480, 0.1, 1.0, 0.0, 1.0, + 640, 240, 0.1, 1.0, 0.0, 1.0, + }; + float mat[16] = {0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0}; + + /* What happens with the texture matrix if D3DTSS_TEXTURETRANSFORMFLAGS is disabled? */ + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 5 * sizeof(float)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); + + /* What happens with transforms enabled? */ + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 5 * sizeof(float)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); + + /* What happens if 4 coords are used, but only 2 given ?*/ + mat[8] = 1.0; + mat[13] = 1.0; + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 5 * sizeof(float)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); + + /* What happens with transformed geometry? This setup lead to 0/0 coords with untransformed + * geometry. If the same applies to transformed vertices, the quad will be black, otherwise red, + * due to the coords in the vertices. (turns out red, indeed) + */ + memset(mat, 0, sizeof(mat)); + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZRHW | D3DFVF_TEX1); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 6 * sizeof(float)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); + + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + } + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + color = getPixelColor(device, 160, 360); + ok(color == 0x00FFFF00 || color == 0x00FEFE00, "quad 1 has color %08x, expected 0x00FFFF00\n", color); + color = getPixelColor(device, 160, 120); + ok(color == 0x00000000, "quad 2 has color %08x, expected 0x0000000\n", color); + color = getPixelColor(device, 480, 120); + ok(color == 0x0000FF00 || color == 0x0000FE00, "quad 3 has color %08x, expected 0x0000FF00\n", color); + color = getPixelColor(device, 480, 360); + ok(color == 0x00FF0000 || 0x00FE0000, "quad 4 has color %08x, expected 0x00FF0000\n", color); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + if(SUCCEEDED(hr)) + { + float quad1[] = { + -1.0, -1.0, 0.1, 0.8, 0.2, + -1.0, 0.0, 0.1, 0.8, 0.2, + 0.0, -1.0, 0.1, 0.8, 0.2, + 0.0, 0.0, 0.1, 0.8, 0.2, + }; + float quad2[] = { + -1.0, 0.0, 0.1, 0.5, 1.0, + -1.0, 1.0, 0.1, 0.5, 1.0, + 0.0, 0.0, 0.1, 0.5, 1.0, + 0.0, 1.0, 0.1, 0.5, 1.0, + }; + float quad3[] = { + 0.0, 0.0, 0.1, 0.5, 1.0, + 0.0, 1.0, 0.1, 0.5, 1.0, + 1.0, 0.0, 0.1, 0.5, 1.0, + 1.0, 1.0, 0.1, 0.5, 1.0, + }; + float quad4[] = { + 0.0, -1.0, 0.1, 0.8, 0.2, + 0.0, 0.0, 0.1, 0.8, 0.2, + 1.0, -1.0, 0.1, 0.8, 0.2, + 1.0, 0.0, 0.1, 0.8, 0.2, + }; + float mat[16] = {0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0}; + + /* What happens to the default 1 in the 3rd coordinate if it is disabled? + */ + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 5 * sizeof(float)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); + + /* What does this mean? Not sure... */ + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT1); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 5 * sizeof(float)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); + + /* Just to be sure, the same as quad2 above */ + memset(mat, 0, sizeof(mat)); + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &mat); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 5 * sizeof(float)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); + + /* Now, what happens to the 2nd coordinate(that is disabled in the matrix) if it is not + * used? And what happens to the first? + */ + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT1); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 5 * sizeof(float)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); + + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + } + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + color = getPixelColor(device, 160, 360); + ok(color == 0x00FF0000 || color == 0x00FE0000, "quad 1 has color %08x, expected 0x00FF0000\n", color); + color = getPixelColor(device, 160, 120); + ok(color == 0x00000000, "quad 2 has color %08x, expected 0x0000000\n", color); + color = getPixelColor(device, 480, 120); + ok(color == 0x00ff8000 || color == 0x00fe7f00, "quad 3 has color %08x, expected 0x00ff8000\n", color); + color = getPixelColor(device, 480, 360); + ok(color == 0x0033cc00 || color == 0x0032cb00, "quad 4 has color %08x, expected 0x0033cc00\n", color); + + IDirect3DTexture9_Release(texture); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff203040, 0.0, 0); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + /* Use a smaller volume texture than the biggest possible size for memory and performance reasons + * Thus watch out if sampling from texels between 0 and 1. + */ + hr = IDirect3DDevice9_CreateVolumeTexture(device, 32, 32, 32, 1, 0, fmt, D3DPOOL_MANAGED, &volume, 0); + ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, + "IDirect3DDevice9_CreateVolumeTexture failed with %s\n", DXGetErrorString9(hr)); + if(!volume) { + skip("Failed to create a volume texture\n"); + goto out; + } + + hr = IDirect3DVolumeTexture9_LockBox(volume, 0, &lb, NULL, 0); + ok(hr == D3D_OK, "IDirect3DVolumeTexture9_LockBox failed with %s\n", DXGetErrorString9(hr)); + for(z = 0; z < 32; z++) { + for(y = 0; y < 32; y++) { + for(x = 0; x < 32; x++) { + char size = (fmt == D3DFMT_A16B16G16R16 ? 8 : 4); + void *mem = ((char *) lb.pBits) + y * lb.RowPitch + z * lb.SlicePitch + x * size; + float r_f = (float) x / 31.0; + float g_f = (float) y / 31.0; + float b_f = (float) z / 31.0; + + if(fmt == D3DFMT_A16B16G16R16) { + unsigned short *mem_s = mem; + mem_s[0] = r_f * 65535.0; + mem_s[1] = g_f * 65535.0; + mem_s[2] = b_f * 65535.0; + mem_s[3] = 65535; + } else { + unsigned char *mem_c = mem; + mem_c[0] = b_f * 255.0; + mem_c[1] = g_f * 255.0; + mem_c[2] = r_f * 255.0; + mem_c[3] = 255; + } + } + } + } + hr = IDirect3DVolumeTexture9_UnlockBox(volume, 0); + ok(hr == D3D_OK, "IDirect3DVolumeTexture9_UnlockBox failed with %s\n", DXGetErrorString9(hr)); + + hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) volume); + ok(hr == D3D_OK, "IDirect3DVolumeTexture9_UnlockBox failed with %s\n", DXGetErrorString9(hr)); + + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + if(SUCCEEDED(hr)) + { + float quad1[] = { + -1.0, -1.0, 0.1, 1.0, 1.0, 1.0, + -1.0, 0.0, 0.1, 1.0, 1.0, 1.0, + 0.0, -1.0, 0.1, 1.0, 1.0, 1.0, + 0.0, 0.0, 0.1, 1.0, 1.0, 1.0 + }; + float quad2[] = { + -1.0, 0.0, 0.1, 1.0, 1.0, 1.0, + -1.0, 1.0, 0.1, 1.0, 1.0, 1.0, + 0.0, 0.0, 0.1, 1.0, 1.0, 1.0, + 0.0, 1.0, 0.1, 1.0, 1.0, 1.0 + }; + float quad3[] = { + 0.0, 0.0, 0.1, 0.0, 0.0, + 0.0, 1.0, 0.1, 0.0, 0.0, + 1.0, 0.0, 0.1, 0.0, 0.0, + 1.0, 1.0, 0.1, 0.0, 0.0 + }; + float quad4[] = { + 0.0, -1.0, 0.1, 1.0, 1.0, 1.0, + 0.0, 0.0, 0.1, 1.0, 1.0, 1.0, + 1.0, -1.0, 0.1, 1.0, 1.0, 1.0, + 1.0, 0.0, 0.1, 1.0, 1.0, 1.0 + }; + float mat[16] = {1.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 1.0}; + hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + + /* Draw a quad with all 3 coords enabled. Nothing fancy. v and w are swapped, but have the same + * values + */ + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT3); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 6 * sizeof(float)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); + + /* Now disable the w coordinate. Does that change the input, or the output. The coordinates + * are swapped by the matrix. If it changes the input, the v coord will be missing(green), + * otherwise the w will be missing(blue). + * turns out that the blue color is missing, so it is an output modification + */ + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT2); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 6 * sizeof(float)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); + + /* default values? Set up the identity matrix, pass in 2 vertex coords, and enable 4 */ + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) identity); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 5 * sizeof(float)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); + + /* D3DTTFF_COUNT1. Set a NULL matrix, and count1, pass in all values as 1.0 */ + memset(mat, 0, sizeof(mat)); + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT1); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad4, 6 * sizeof(float)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); + + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + } + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + + color = getPixelColor(device, 160, 360); + ok(color == 0x00ffffff, "quad 1 has color %08x, expected 0x00ffffff\n", color); + color = getPixelColor(device, 160, 120); + ok(color == 0x00ffff00, "quad 2 has color %08x, expected 0x00ffff00\n", color); + color = getPixelColor(device, 480, 120); + ok(color == 0x000000ff, "quad 3 has color %08x, expected 0x000000ff\n", color); + color = getPixelColor(device, 480, 360); + ok(color == 0x00ffffff, "quad 4 has color %08x, expected 0x00ffffff\n", color); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff303030, 0.0, 0); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with %s\n", DXGetErrorString9(hr)); + if(SUCCEEDED(hr)) + { + float quad1[] = { + -1.0, -1.0, 0.1, 1.0, 1.0, 1.0, + -1.0, 0.0, 0.1, 1.0, 1.0, 1.0, + 0.0, -1.0, 0.1, 1.0, 1.0, 1.0, + 0.0, 0.0, 0.1, 1.0, 1.0, 1.0 + }; + float quad2[] = { + -1.0, 0.0, 0.1, + -1.0, 1.0, 0.1, + 0.0, 0.0, 0.1, + 0.0, 1.0, 0.1, + }; + float quad3[] = { + 0.0, 0.0, 0.1, 1.0, + 0.0, 1.0, 0.1, 1.0, + 1.0, 0.0, 0.1, 1.0, + 1.0, 1.0, 0.1, 1.0 + }; + float mat[16] = {0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0}; + float mat2[16] = {0.0, 0.0, 0.0, 1.0, + 1.0, 0.0, 0.0, 0.0, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 0.0}; + hr = IDirect3DDevice9_SetVertexDeclaration(device, decl); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + + /* Default values? 4 coords used, 3 passed. What happens to the 4th? + */ + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, 6 * sizeof(float)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); + + /* None passed */ + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) identity); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); + ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, 3 * sizeof(float)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); + + /* 4 used, 1 passed */ + hr = IDirect3DDevice9_SetVertexDeclaration(device, decl2); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) mat2); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, 4 * sizeof(float)); + ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr); + + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %s\n", DXGetErrorString9(hr)); + } + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr)); + color = getPixelColor(device, 160, 360); + ok(color == 0x0000ff00, "quad 1 has color %08x, expected 0x0000ff00\n", color); + color = getPixelColor(device, 160, 120); + ok(color == 0x00000000, "quad 2 has color %08x, expected 0x00000000\n", color); + color = getPixelColor(device, 480, 120); + ok(color == 0x00ff0000, "quad 3 has color %08x, expected 0x00ff0000\n", color); + /* Quad4: unused */ + + IDirect3DVolumeTexture9_Release(volume); + + out: + hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL); + ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed with %s\n", DXGetErrorString9(hr)); + IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStageState failed (%08x)\n", hr); + hr = IDirect3DDevice9_SetTransform(device, D3DTS_TEXTURE0, (D3DMATRIX *) &identity); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTransform failed with %s\n", DXGetErrorString9(hr)); + hr = IDirect3DDevice9_SetTexture(device, 0, NULL); + ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture returned %s\n", DXGetErrorString9(hr)); + IDirect3DVertexDeclaration9_Release(decl); + IDirect3DVertexDeclaration9_Release(decl2); +} + START_TEST(visual) { IDirect3DDevice9 *device_ptr; @@ -1776,6 +2278,8 @@ START_TEST(visual) offscreen_test(device_ptr); release_buffer_test(device_ptr); float_texture_test(device_ptr); + texture_transform_flags_test(device_ptr); + if (caps.VertexShaderVersion >= D3DVS_VERSION(2, 0)) { diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index ef5b9f39d27..e15e32e128b 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -138,6 +138,7 @@ static INT find_joystick_devices(void) if (joystick_devices_count != -1) return joystick_devices_count; + joystick_devices_count = 0; for (i = 0; i < MAX_JOYSTICKS; i++) { CHAR device_name[MAX_PATH], *str; @@ -154,7 +155,7 @@ static INT find_joystick_devices(void) if (!(str = HeapAlloc(GetProcessHeap(), 0, len))) break; memcpy(str, device_name, len); - joystick_devices[++joystick_devices_count] = str; + joystick_devices[joystick_devices_count++] = str; } return joystick_devices_count; @@ -164,7 +165,7 @@ static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN { int fd = -1; - if (id > find_joystick_devices()) return FALSE; + if (id >= find_joystick_devices()) return FALSE; if (dwFlags & DIEDFL_FORCEFEEDBACK) { WARN("force feedback not supported\n"); @@ -215,7 +216,7 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN char name[MAX_PATH]; char friendly[32]; - if (id > find_joystick_devices()) return FALSE; + if (id >= find_joystick_devices()) return FALSE; if (dwFlags & DIEDFL_FORCEFEEDBACK) { WARN("force feedback not supported\n"); diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index 41944032987..1a999279c24 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -725,7 +725,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_Unlock( if (!p2) x2 = 0; - if (x1 || x2) + if (!This->hwbuf && (x1 || x2)) { RtlAcquireResourceShared(&This->device->buffer_list_lock, TRUE); LIST_FOR_EACH_ENTRY(iter, &This->buffer->buffers, IDirectSoundBufferImpl, entry ) @@ -1021,8 +1021,16 @@ HRESULT IDirectSoundBufferImpl_Create( if (wfex->wBitsPerSample==16) capf |= DSCAPS_SECONDARY16BIT; else capf |= DSCAPS_SECONDARY8BIT; - use_hw = (device->drvcaps.dwFlags & capf) == capf; - TRACE("use_hw = 0x%08x, capf = 0x%08x, device->drvcaps.dwFlags = 0x%08x\n", use_hw, capf, device->drvcaps.dwFlags); + use_hw = !!(dsbd->dwFlags & DSBCAPS_LOCHARDWARE); + TRACE("use_hw = %d, capf = 0x%08x, device->drvcaps.dwFlags = 0x%08x\n", use_hw, capf, device->drvcaps.dwFlags); + if (use_hw && (device->drvcaps.dwFlags & capf) != capf) + { + WARN("Format not supported for hardware buffer\n"); + HeapFree(GetProcessHeap(),0,dsb->pwfx); + HeapFree(GetProcessHeap(),0,dsb); + *pdsb = NULL; + return DSERR_BADFORMAT; + } /* FIXME: check hardware sample rate mixing capabilities */ /* FIXME: check app hints for software/hardware buffer (STATIC, LOCHARDWARE, etc) */ @@ -1050,10 +1058,6 @@ HRESULT IDirectSoundBufferImpl_Create( *pdsb = NULL; return DSERR_OUTOFMEMORY; } - dsb->buffer->ref = 1; - list_init(&dsb->buffer->buffers); - list_add_head(&dsb->buffer->buffers, &dsb->entry); - FillMemory(dsb->buffer->memory, dsb->buflen, dsbd->lpwfxFormat->wBitsPerSample == 8 ? 128 : 0); } /* Allocate the hardware buffer */ @@ -1061,29 +1065,24 @@ HRESULT IDirectSoundBufferImpl_Create( err = IDsDriver_CreateSoundBuffer(device->driver,wfex,dsbd->dwFlags,0, &(dsb->buflen),&(dsb->buffer->memory), (LPVOID*)&(dsb->hwbuf)); - /* fall back to software buffer on failure */ - if (err != DS_OK) { - TRACE("IDsDriver_CreateSoundBuffer failed, falling back to software buffer\n"); - use_hw = 0; - if (device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY) { - dsb->buffer->memory = HeapAlloc(GetProcessHeap(),0,dsb->buflen); - if (dsb->buffer->memory == NULL) { - WARN("out of memory\n"); - HeapFree(GetProcessHeap(),0,dsb->buffer); - HeapFree(GetProcessHeap(),0,dsb->pwfx); - HeapFree(GetProcessHeap(),0,dsb); - *pdsb = NULL; - return DSERR_OUTOFMEMORY; - } - dsb->buffer->ref = 1; - list_init(&dsb->buffer->buffers); - list_add_head(&dsb->buffer->buffers, &dsb->entry); - FillMemory(dsb->buffer->memory, dsb->buflen, dsbd->lpwfxFormat->wBitsPerSample == 8 ? 128 : 0); - } - err = DS_OK; + if (FAILED(err)) + { + WARN("Failed to create hardware secondary buffer: %08x\n", err); + if (device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY) + HeapFree(GetProcessHeap(),0,dsb->buffer->memory); + HeapFree(GetProcessHeap(),0,dsb->buffer); + HeapFree(GetProcessHeap(),0,dsb->pwfx); + HeapFree(GetProcessHeap(),0,dsb); + *pdsb = NULL; + return DSERR_GENERIC; } } + dsb->buffer->ref = 1; + list_init(&dsb->buffer->buffers); + list_add_head(&dsb->buffer->buffers, &dsb->entry); + FillMemory(dsb->buffer->memory, dsb->buflen, dsbd->lpwfxFormat->wBitsPerSample == 8 ? 128 : 0); + /* It's not necessary to initialize values to zero since */ /* we allocated this structure with HEAP_ZERO_MEMORY... */ dsb->buf_mixpos = dsb->sec_mixpos = 0; @@ -1201,40 +1200,16 @@ HRESULT IDirectSoundBufferImpl_Duplicate( hres = IDsDriver_DuplicateSoundBuffer(device->driver, pdsb->hwbuf, (LPVOID *)&dsb->hwbuf); - if (hres != DS_OK) { - TRACE("IDsDriver_DuplicateSoundBuffer failed, falling back to " - "software buffer\n"); - dsb->hwbuf = NULL; - /* allocate buffer */ - if (device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY) { - dsb->buffer = HeapAlloc(GetProcessHeap(),0,sizeof(*(dsb->buffer))); - if (dsb->buffer == NULL) { - WARN("out of memory\n"); - HeapFree(GetProcessHeap(),0,dsb); - *ppdsb = NULL; - return DSERR_OUTOFMEMORY; - } - - dsb->buffer->memory = HeapAlloc(GetProcessHeap(),0,dsb->buflen); - if (dsb->buffer->memory == NULL) { - WARN("out of memory\n"); - HeapFree(GetProcessHeap(),0,dsb->buffer); - HeapFree(GetProcessHeap(),0,dsb); - *ppdsb = NULL; - return DSERR_OUTOFMEMORY; - } - dsb->buffer->ref = 1; - list_init(&dsb->buffer->buffers); - list_add_head(&dsb->buffer->buffers, &dsb->entry); - /* FIXME: copy buffer ? */ - } + if (FAILED(hres)) { + WARN("IDsDriver_DuplicateSoundBuffer failed (%08x)\n", hres); + HeapFree(GetProcessHeap(),0,dsb); + *ppdsb = NULL; + return hres; } - } else { - dsb->hwbuf = NULL; - dsb->buffer->ref++; - list_add_head(&dsb->buffer->buffers, &dsb->entry); } + dsb->buffer->ref++; + list_add_head(&dsb->buffer->buffers, &dsb->entry); dsb->ref = 0; dsb->state = STATE_STOPPED; dsb->buf_mixpos = dsb->sec_mixpos = 0; diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index bbbbd0dad7c..7d6dc93497c 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -1413,52 +1413,15 @@ HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGUID lpcG device->guid = devGUID; device->driver = NULL; - /* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */ - if (ds_hw_accel != DS_HW_ACCEL_EMULATION) - waveOutMessage((HWAVEOUT)wod, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&device->driver, 0); - - /* Get driver description */ - if (device->driver) { - hr = IDsDriver_GetDriverDesc(device->driver,&(device->drvdesc)); - if (hr != DS_OK) { - WARN("IDsDriver_GetDriverDesc failed\n"); - return hr; - } - } else { - /* if no DirectSound interface available, use WINMM API instead */ - device->drvdesc.dwFlags = DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT; - } - device->drvdesc.dnDevNode = wod; - - /* If the driver requests being opened through MMSYSTEM - * (which is recommended by the DDK), it is supposed to happen - * before the DirectSound interface is opened */ - if (device->drvdesc.dwFlags & DSDDESC_DOMMSYSTEMOPEN) + hr = DSOUND_ReopenDevice(device, FALSE); + if (FAILED(hr)) { - DWORD flags = CALLBACK_FUNCTION; - - /* disable direct sound if requested */ - if (device->driver) - flags |= WAVE_DIRECTSOUND; - - hr = mmErr(waveOutOpen(&(device->hwo), - device->drvdesc.dnDevNode, device->pwfx, - (DWORD_PTR)DSOUND_callback, (DWORD)device, - flags)); - if (hr != DS_OK) { - WARN("waveOutOpen failed\n"); - return hr; - } + WARN("DSOUND_ReopenDevice failed: %08x\n", hr); + return hr; } if (device->driver) { - hr = IDsDriver_Open(device->driver); - if (hr != DS_OK) { - WARN("IDsDriver_Open failed\n"); - return hr; - } - /* the driver is now open, so it's now allowed to call GetCaps */ hr = IDsDriver_GetCaps(device->driver,&(device->drvcaps)); if (hr != DS_OK) { diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index f3032e8e5cc..dc21a628069 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -425,7 +425,8 @@ HRESULT DSOUND_PrimaryDestroy(DirectSoundDevice *device); HRESULT DSOUND_PrimaryPlay(DirectSoundDevice *device); HRESULT DSOUND_PrimaryStop(DirectSoundDevice *device); HRESULT DSOUND_PrimaryGetPosition(DirectSoundDevice *device, LPDWORD playpos, LPDWORD writepos); -HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex); +HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex, BOOL forced); +HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave); /* duplex.c */ diff --git a/dlls/dsound/duplex.c b/dlls/dsound/duplex.c index c61432dc71b..32002a8992c 100644 --- a/dlls/dsound/duplex.c +++ b/dlls/dsound/duplex.c @@ -702,7 +702,7 @@ IDirectSoundFullDuplexImpl_Initialize( } This->renderer_device->priolevel = dwLevel; - hr = DSOUND_PrimarySetFormat(This->renderer_device, lpDsBufferDesc->lpwfxFormat); + hr = DSOUND_PrimarySetFormat(This->renderer_device, lpDsBufferDesc->lpwfxFormat, dwLevel == DSSCL_EXCLUSIVE); if (hr != DS_OK) { WARN("DSOUND_PrimarySetFormat() failed\n"); *lplpDirectSoundCaptureBuffer8 = NULL; diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 2470675ff02..c3b9d91b874 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -68,6 +68,67 @@ static void DSOUND_RecalcPrimary(DirectSoundDevice *device) device->writelead = (device->pwfx->nSamplesPerSec / 100) * nBlockAlign; } +HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave) +{ + HRESULT hres = DS_OK; + if (device->driver) + { + IDsDriver_Close(device->driver); + if (device->drvdesc.dwFlags & DSDDESC_DOMMSYSTEMOPEN) + waveOutClose(device->hwo); + IDsDriver_Release(device->driver); + device->driver = NULL; + device->buffer = NULL; + device->hwo = 0; + } + else if (device->drvdesc.dwFlags & DSDDESC_DOMMSYSTEMOPEN) + waveOutClose(device->hwo); + + /* DRV_QUERYDSOUNDIFACE is a "Wine extension" to get the DSound interface */ + if (ds_hw_accel != DS_HW_ACCEL_EMULATION && !forcewave) + waveOutMessage((HWAVEOUT)device->drvdesc.dnDevNode, DRV_QUERYDSOUNDIFACE, (DWORD_PTR)&device->driver, 0); + + /* Get driver description */ + if (device->driver) { + DWORD wod = device->drvdesc.dnDevNode; + hres = IDsDriver_GetDriverDesc(device->driver,&(device->drvdesc)); + device->drvdesc.dnDevNode = wod; + if (FAILED(hres)) { + WARN("IDsDriver_GetDriverDesc failed: %08x\n", hres); + IDsDriver_Release(device->driver); + device->driver = NULL; + } + } + + /* if no DirectSound interface available, use WINMM API instead */ + if (!device->driver) + device->drvdesc.dwFlags = DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT; + + if (device->drvdesc.dwFlags & DSDDESC_DOMMSYSTEMOPEN) + { + DWORD flags = CALLBACK_FUNCTION; + + if (device->driver) + flags |= WAVE_DIRECTSOUND; + + hres = mmErr(waveOutOpen(&(device->hwo), device->drvdesc.dnDevNode, device->pwfx, (DWORD_PTR)DSOUND_callback, (DWORD)device, flags)); + if (FAILED(hres)) { + WARN("waveOutOpen failed\n"); + if (device->driver) + { + IDsDriver_Release(device->driver); + device->driver = NULL; + } + return hres; + } + } + + if (device->driver) + hres = IDsDriver_Open(device->driver); + + return hres; +} + static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device) { HRESULT err = DS_OK; @@ -81,17 +142,9 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device) (LPVOID*)&(device->hwbuf)); if (err != DS_OK) { - WARN("IDsDriver_CreateSoundBuffer failed, falling back to waveout\n"); - /* Wine-only: close wine directsound driver, then reopen without WAVE_DIRECTSOUND */ - device->drvdesc.dwFlags = DSDDESC_DOMMSYSTEMOPEN | DSDDESC_DOMMSYSTEMSETFORMAT; - IDsDriver_Close(device->driver); - waveOutClose(device->hwo); - IDsDriver_Release(device->driver); - device->driver = NULL; - device->buffer = NULL; - device->hwo = 0; - err = mmErr(waveOutOpen(&(device->hwo), device->drvdesc.dnDevNode, device->pwfx, (DWORD_PTR)DSOUND_callback, (DWORD)device, CALLBACK_FUNCTION)); - if (err != DS_OK) + WARN("IDsDriver_CreateSoundBuffer failed (%08x), falling back to waveout\n", err); + err = DSOUND_ReopenDevice(device, TRUE); + if (FAILED(err)) { WARN("Falling back to waveout failed too! Giving up\n"); return err; @@ -207,8 +260,11 @@ static void DSOUND_PrimaryClose(DirectSoundDevice *device) /* clear the queue */ device->pwqueue = 0; } else { - if (IDsDriverBuffer_Release(device->hwbuf) == 0) + ULONG ref = IDsDriverBuffer_Release(device->hwbuf); + if (!ref) device->hwbuf = 0; + else + ERR("Still %d references on primary buffer, refcount leak?\n", ref); } } @@ -280,9 +336,15 @@ HRESULT DSOUND_PrimaryStop(DirectSoundDevice *device) err = IDsDriverBuffer_Stop(device->hwbuf); if (err == DSERR_BUFFERLOST) { DSOUND_PrimaryClose(device); - err = DSOUND_PrimaryOpen(device); + err = DSOUND_ReopenDevice(device, !device->driver); if (FAILED(err)) - WARN("DSOUND_PrimaryOpen failed\n"); + ERR("DSOUND_ReopenDevice failed\n"); + else + { + err = DSOUND_PrimaryOpen(device); + if (FAILED(err)) + WARN("DSOUND_PrimaryOpen failed\n"); + } } else if (err != DS_OK) { WARN("IDsDriverBuffer_Stop failed\n"); } @@ -335,9 +397,9 @@ HRESULT DSOUND_PrimaryGetPosition(DirectSoundDevice *device, LPDWORD playpos, LP return DS_OK; } -HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex) +HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex, BOOL forced) { - HRESULT err = DS_OK; + HRESULT err = DSERR_BUFFERLOST; int i, alloc_size, cp_size; DWORD nSamplesPerSec, bpp, chans; TRACE("(%p,%p)\n", device, wfex); @@ -378,29 +440,51 @@ HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex) if (!(device->drvdesc.dwFlags & DSDDESC_DOMMSYSTEMSETFORMAT) && device->hwbuf) { err = IDsDriverBuffer_SetFormat(device->hwbuf, device->pwfx); + + /* On bad format, try to re-create, big chance it will work then, only do this if we to */ + if (forced && (device->pwfx->nSamplesPerSec/100 != wfex->nSamplesPerSec/100 || err == DSERR_BADFORMAT)) + { + err = DSERR_BUFFERLOST; + CopyMemory(device->pwfx, wfex, cp_size); + } + if (err != DSERR_BUFFERLOST && FAILED(err)) { WARN("IDsDriverBuffer_SetFormat failed\n"); + if (!forced) + err = DS_OK; goto done; } - else DSOUND_RecalcPrimary(device); + if (err == S_FALSE) + { + /* ALSA specific: S_FALSE tells that recreation was succesful, + * 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 + * and the entire re-initialization will occur anyway + */ + IDsDriverBuffer_Lock(device->hwbuf, (LPVOID *)&device->buffer, &device->buflen, NULL, NULL, 0, 0, DSBLOCK_ENTIREBUFFER); + IDsDriverBuffer_Unlock(device->hwbuf, device->buffer, 0, NULL, 0); + + if (device->state == STATE_PLAYING) device->state = STATE_STARTING; + else if (device->state == STATE_STOPPING) device->state = STATE_STOPPED; + device->pwplay = device->pwqueue = device->playpos = device->mixpos = 0; + err = DS_OK; + } + DSOUND_RecalcPrimary(device); } - if (err == DSERR_BUFFERLOST || device->drvdesc.dwFlags & DSDDESC_DOMMSYSTEMSETFORMAT) + if (err == DSERR_BUFFERLOST) { DSOUND_PrimaryClose(device); - if (!device->driver) + if (device->drvdesc.dwFlags & DSDDESC_DOMMSYSTEMSETFORMAT) { - waveOutClose(device->hwo); - device->hwo = 0; - err = mmErr(waveOutOpen(&(device->hwo), device->drvdesc.dnDevNode, device->pwfx, (DWORD_PTR)DSOUND_callback, (DWORD)device, CALLBACK_FUNCTION)); + err = DSOUND_ReopenDevice(device, FALSE); if (FAILED(err)) { - WARN("waveOutOpen failed\n"); + WARN("DSOUND_ReopenDevice failed: %08x\n", err); goto done; } } - err = DSOUND_PrimaryOpen(device); if (err != DS_OK) { WARN("DSOUND_PrimaryOpen failed\n"); @@ -417,6 +501,7 @@ HRESULT DSOUND_PrimarySetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX wfex) (*dsb)->freqAdjust = ((DWORD64)(*dsb)->freq << DSOUND_FREQSHIFT) / device->pwfx->nSamplesPerSec; DSOUND_RecalcFormat((*dsb)); DSOUND_MixToTemporary((*dsb), 0, (*dsb)->buflen); + (*dsb)->primary_mixpos = 0; RtlReleaseResource(&(*dsb)->lock); /* **** */ @@ -440,8 +525,9 @@ static HRESULT WINAPI PrimaryBufferImpl_SetFormat( LPDIRECTSOUNDBUFFER iface, LPCWAVEFORMATEX wfex) { + DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device; TRACE("(%p,%p)\n", iface, wfex); - return DSOUND_PrimarySetFormat(((PrimaryBufferImpl *)iface)->device, wfex); + return DSOUND_PrimarySetFormat(device, wfex, device->priolevel == DSSCL_WRITEPRIMARY); } static HRESULT WINAPI PrimaryBufferImpl_SetVolume( diff --git a/dlls/gphoto2.ds/ds_ctrl.c b/dlls/gphoto2.ds/ds_ctrl.c index 1b439b3b246..9644f8a1867 100644 --- a/dlls/gphoto2.ds/ds_ctrl.c +++ b/dlls/gphoto2.ds/ds_ctrl.c @@ -63,7 +63,7 @@ load_filesystem(const char *folder) { gpfile->folder = strdup(folder); gpfile->filename = strdup(name); gpfile->download = FALSE; - list_add_head( &activeDS.files, &gpfile->entry ); + list_add_tail( &activeDS.files, &gpfile->entry ); } gp_list_reset (list); diff --git a/dlls/gphoto2.ds/gphoto2_Ko.rc b/dlls/gphoto2.ds/gphoto2_Ko.rc index daaf24c3b5e..e1b5945ede9 100644 --- a/dlls/gphoto2.ds/gphoto2_Ko.rc +++ b/dlls/gphoto2.ds/gphoto2_Ko.rc @@ -2,7 +2,7 @@ * Korean resources for Twain * * Copyright 2006 CodeWeavers, Aric Stewart - * Copyright 2006 YunSong Hwang + * Copyright 2006,2007 YunSong Hwang * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -31,9 +31,9 @@ BEGIN CONTROL "List1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER | WS_TABSTOP,7,7,358,229 DEFPUSHBUTTON "¼±ÅÃµÈ °ÍÀ» ºÒ·¯¿À±â",IDC_IMPORT,152,252,72,14 - PUSHBUTTON "Preview",IDC_FETCH,7,252,64,14 + PUSHBUTTON " ¹Ì¸® º¸±â",IDC_FETCH,7,252,64,14 PUSHBUTTON "¸ðµÎ ºÒ·¯¿À±â",IDC_IMPORTALL,80,252,64,14 - CONTROL "Skip This Dialog",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14 + CONTROL "´ëÈ­»óÀÚ Áö³ªÄ¡±â",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14 PUSHBUTTON "³ª°¡±â",IDC_EXIT,315,252,50,14 END diff --git a/dlls/gphoto2.ds/ui.c b/dlls/gphoto2.ds/ui.c index 7d43744765d..dd802fd8dee 100644 --- a/dlls/gphoto2.ds/ui.c +++ b/dlls/gphoto2.ds/ui.c @@ -80,8 +80,10 @@ static int GetAllImages() LIST_FOR_EACH_ENTRY( file, &activeDS.files, struct gphoto2_file, entry) { if (strstr(file->filename,".JPG") || strstr(file->filename,".jpg")) + { file->download = TRUE; has_images = 1; + } } return has_images; } diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 26d0b514d68..2bb1a477a4a 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -74,7 +74,7 @@ static UINT WM_MSIME_DOCUMENTFEED; */ static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); -static void UpdateDataInDefaultIMEWindow(HWND hwnd); +static void UpdateDataInDefaultIMEWindow(HWND hwnd, BOOL showable); static void ImmInternalPostIMEMessage(UINT, WPARAM, LPARAM); static void ImmInternalSetOpenStatus(BOOL fOpen); static HIMCC updateResultStr(HIMCC old, LPWSTR resultstr, DWORD len); @@ -1672,7 +1672,7 @@ BOOL WINAPI ImmSetCompositionStringW( } } - UpdateDataInDefaultIMEWindow(hwndDefault); + UpdateDataInDefaultIMEWindow(hwndDefault,FALSE); ImmInternalPostIMEMessage(WM_IME_COMPOSITION, wParam, flags); @@ -1967,6 +1967,8 @@ static void PaintDefaultIMEWnd(HWND hwnd) HDC hdc = BeginPaint(hwnd,&ps); LPCOMPOSITIONSTRING compstr; LPBYTE compdata = NULL; + HMONITOR monitor; + MONITORINFO mon_info; GetClientRect(hwnd,&rect); FillRect(hdc, &rect, (HBRUSH)(COLOR_WINDOW + 1)); @@ -2000,28 +2002,51 @@ static void PaintDefaultIMEWnd(HWND hwnd) rect.top = cpt.y; rect.right = rect.left + pt.x + 20; rect.bottom = rect.top + pt.y + 20; + monitor = MonitorFromPoint(cpt, MONITOR_DEFAULTTOPRIMARY); } else if (root_context->IMC.cfCompForm.dwStyle == CFS_RECT) { - POINT cpt; - cpt.x = root_context->IMC.cfCompForm.rcArea.left; - cpt.y = root_context->IMC.cfCompForm.rcArea.top; - ClientToScreen(root_context->IMC.hWnd,&cpt); - rect.left = cpt.x; - rect.top = cpt.y; - cpt.x = root_context->IMC.cfCompForm.rcArea.right; - cpt.y = root_context->IMC.cfCompForm.rcArea.bottom; - ClientToScreen(root_context->IMC.hWnd,&cpt); - rect.right = cpt.x; - rect.bottom = cpt.y; + rect = root_context->IMC.cfCompForm.rcArea; + MapWindowPoints( root_context->IMC.hWnd, 0, (POINT *)&rect, 2 ); + monitor = MonitorFromRect(&rect, MONITOR_DEFAULTTOPRIMARY); } else { + /* Windows places the default IME window in the bottom left */ + HWND target = root_context->IMC.hWnd; + if (!target) target = GetFocus(); + + GetWindowRect(target,&rect); + rect.top = rect.bottom; rect.right = rect.left + pt.x + 20; rect.bottom = rect.top + pt.y + 20; + monitor = MonitorFromWindow(target, MONITOR_DEFAULTTOPRIMARY); + } + + /* make sure we are on the desktop */ + mon_info.cbSize = sizeof(mon_info); + GetMonitorInfoW(monitor, &mon_info); + + if (rect.bottom > mon_info.rcWork.bottom) + { + int shift = rect.bottom - mon_info.rcWork.bottom; + rect.top -= shift; + rect.bottom -= shift; } - MoveWindow(hwnd, rect.left, rect.top, rect.right - rect.left , - rect.bottom - rect.top, FALSE); + if (rect.left < 0) + { + rect.right -= rect.left; + rect.left = 0; + } + if (rect.right > mon_info.rcWork.right) + { + int shift = rect.right - mon_info.rcWork.right; + rect.left -= shift; + rect.right -= shift; + } + + SetWindowPos(hwnd, HWND_TOPMOST, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOACTIVATE); + TextOutW(hdc, 10,10, CompString, compstr->dwCompStrLen); if (oldfont) @@ -2033,9 +2058,24 @@ static void PaintDefaultIMEWnd(HWND hwnd) EndPaint(hwnd,&ps); } -static void UpdateDataInDefaultIMEWindow(HWND hwnd) +static void UpdateDataInDefaultIMEWindow(HWND hwnd, BOOL showable) { + LPCOMPOSITIONSTRING compstr; + + if (root_context->IMC.hCompStr) + compstr = ImmLockIMCC(root_context->IMC.hCompStr); + else + compstr = NULL; + + if (compstr == NULL || compstr->dwCompStrLen == 0) + ShowWindow(hwndDefault,SW_HIDE); + else if (showable) + ShowWindow(hwndDefault,SW_SHOWNOACTIVATE); + RedrawWindow(hwnd,NULL,NULL,RDW_ERASENOW|RDW_INVALIDATE); + + if (compstr != NULL) + ImmUnlockIMCC(root_context->IMC.hCompStr); } /* @@ -2075,7 +2115,7 @@ static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, if (lParam & GCS_RESULTSTR) IMM_PostResult(root_context); else - UpdateDataInDefaultIMEWindow(hwnd); + UpdateDataInDefaultIMEWindow(hwnd,TRUE); break; case WM_IME_STARTCOMPOSITION: TRACE("IME message %s, 0x%x, 0x%x\n", diff --git a/dlls/inseng/regsvr.c b/dlls/inseng/regsvr.c index 823a3dc9faa..54eee1e6b40 100644 --- a/dlls/inseng/regsvr.c +++ b/dlls/inseng/regsvr.c @@ -120,9 +120,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 @@ -211,7 +208,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); @@ -318,16 +316,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; } } @@ -440,70 +441,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/kernel32/console.c b/dlls/kernel32/console.c index 8da9f8cdc2e..32d02146efc 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -125,8 +125,16 @@ static void char_info_AtoW( CHAR_INFO *buffer, int count ) */ HWND WINAPI GetConsoleWindow(VOID) { - FIXME("stub\n"); - return NULL; + HWND hWnd = NULL; + + SERVER_START_REQ(get_console_input_info) + { + req->handle = 0; + if (!wine_server_call_err(req)) hWnd = reply->win; + } + SERVER_END_REQ; + + return hWnd; } diff --git a/dlls/mlang/regsvr.c b/dlls/mlang/regsvr.c index 35a80a9dac5..f5292bff704 100644 --- a/dlls/mlang/regsvr.c +++ b/dlls/mlang/regsvr.c @@ -121,9 +121,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 @@ -212,7 +209,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); @@ -319,16 +317,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; } } @@ -441,70 +442,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/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c index 678b34680eb..b3879c026b7 100644 --- a/dlls/mscoree/mscoree_main.c +++ b/dlls/mscoree/mscoree_main.c @@ -34,50 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL( mscoree ); -HRESULT WINAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor, - LPCWSTR pwszHostConfigFile, VOID *pReserved, - DWORD startupFlags, REFCLSID rclsid, - REFIID riid, LPVOID *ppv) -{ - FIXME("(%s, %s, %s, %p, %d, %p, %p, %p): stub!\n", debugstr_w(pwszVersion), - debugstr_w(pwszBuildFlavor), debugstr_w(pwszHostConfigFile), pReserved, - startupFlags, rclsid, riid, ppv); - - return E_FAIL; -} - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - break; - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - -BOOL WINAPI _CorDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - FIXME("(%p, %d, %p): stub\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - break; - case DLL_PROCESS_DETACH: - break; - } - return TRUE; -} - static LPWSTR get_mono_exe(void) { static const WCHAR mono_exe[] = {'b','i','n','\\','m','o','n','o','.','e','x','e',' ',0}; @@ -126,6 +82,58 @@ static LPWSTR get_mono_exe(void) return ret; } +HRESULT WINAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor, + LPCWSTR pwszHostConfigFile, VOID *pReserved, + DWORD startupFlags, REFCLSID rclsid, + REFIID riid, LPVOID *ppv) +{ + WCHAR *mono_exe; + + FIXME("(%s, %s, %s, %p, %d, %p, %p, %p): semi-stub!\n", debugstr_w(pwszVersion), + debugstr_w(pwszBuildFlavor), debugstr_w(pwszHostConfigFile), pReserved, + startupFlags, rclsid, riid, ppv); + + if (!(mono_exe = get_mono_exe())) + { + MESSAGE("wine: Install the Windows version of Mono to run .NET executables\n"); + return E_FAIL; + } + + return S_OK; +} + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + break; + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + +BOOL WINAPI _CorDllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + FIXME("(%p, %d, %p): stub\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + break; + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + __int32 WINAPI _CorExeMain(void) { STARTUPINFOW si; diff --git a/dlls/msi/regsvr.c b/dlls/msi/regsvr.c index 6aa73d19acc..df8955a5168 100644 --- a/dlls/msi/regsvr.c +++ b/dlls/msi/regsvr.c @@ -135,9 +135,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 @@ -224,7 +221,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); @@ -346,16 +344,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; } } @@ -464,67 +465,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/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 718e3871332..3643fdac9cb 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -27,7 +27,6 @@ #include "wine/unicode.h" #include "wine/debug.h" #include "msvcrt/mbctype.h" -#include "msvcrt/mbstring.h" WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); @@ -332,6 +331,14 @@ unsigned char* CDECL _mbsdec(const unsigned char* start, const unsigned char* cu } /********************************************************************* + * _mbclen(MSVCRT.@) + */ +unsigned int CDECL _mbclen(const unsigned char* str) +{ + return _ismbblead(*str) ? 2 : 1; +} + +/********************************************************************* * _mbsinc(MSVCRT.@) */ unsigned char* CDECL _mbsinc(const unsigned char* str) @@ -363,14 +370,6 @@ unsigned char* CDECL _mbsninc(const unsigned char* str, MSVCRT_size_t num) } /********************************************************************* - * _mbclen(MSVCRT.@) - */ -unsigned int CDECL _mbclen(const unsigned char* str) -{ - return _ismbblead(*str) ? 2 : 1; -} - -/********************************************************************* * _mbslen(MSVCRT.@) */ MSVCRT_size_t CDECL _mbslen(const unsigned char* str) @@ -1058,18 +1057,22 @@ int CDECL _ismbbtrail(unsigned int c) */ int CDECL _ismbslead(const unsigned char* start, const unsigned char* str) { - /* Lead bytes can also be trail bytes if caller messed up - * iterating through the string... + int lead = 0; + + if(!g_mbcp_is_multibyte) + return 0; + + /* Lead bytes can also be trail bytes so we need to analise the string */ - if(MSVCRT___mb_cur_max > 1) + while (start <= str) { - while(start < str) - start += MSVCRT_isleadbyte(*str) ? 2 : 1; - - if(start == str) - return MSVCRT_isleadbyte(*str); + if (!*start) + return 0; + lead = !lead && _ismbblead(*start); + start++; } - return 0; /* Must have been a trail, we skipped it */ + + return lead ? -1 : 0; } /********************************************************************* @@ -1077,8 +1080,43 @@ int CDECL _ismbslead(const unsigned char* start, const unsigned char* str) */ int CDECL _ismbstrail(const unsigned char* start, const unsigned char* str) { - /* Must not be a lead, and must be preceded by one */ - return !_ismbslead(start, str) && MSVCRT_isleadbyte(str[-1]); + /* Note: this function doesn't check _ismbbtrail */ + if ((str > start) && _ismbslead(start, str-1)) + return -1; + else + return 0; +} + +/********************************************************************* + * _mbsbtype (MSVCRT.@) + */ +int CDECL _mbsbtype(const unsigned char *str, MSVCRT_size_t count) +{ + int lead = 0; + const unsigned char *end = str + count; + int mbcp = g_mbcp_is_multibyte; + + /* Lead bytes can also be trail bytes so we need to analyse the string. + * Also we must return _MBC_ILLEGAL for chars past the end of the string + */ + while (str < end) /* Note: we skip the last byte - will check after the loop */ + { + if (!*str) + return _MBC_ILLEGAL; + lead = mbcp && !lead && _ismbblead(*str); + str++; + } + + if (lead) + if (_ismbbtrail(*str)) + return _MBC_TRAIL; + else + return _MBC_ILLEGAL; + else + if (_ismbblead(*str)) + return _MBC_LEAD; + else + return _MBC_SINGLE; } /********************************************************************* diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index fc818986e87..1a516f0456f 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -355,7 +355,7 @@ @ stub _mbctombb #(long) @ cdecl _mbctoupper(long) @ extern _mbctype MSVCRT_mbctype -@ stub _mbsbtype #(str long) +@ cdecl _mbsbtype(str long) @ cdecl _mbscat(str str) @ cdecl _mbschr(str long) @ cdecl _mbscmp(str str) diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index 004d059c6f8..6dabc615392 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -183,7 +183,7 @@ static void test_mbcp(void) int curr_mbcp = _getmbcp(); unsigned char *mbstring = (unsigned char *)"\xb0\xb1\xb2 \xb3\xb4 \xb5"; /* incorrect string */ unsigned char *mbstring2 = (unsigned char *)"\xb0\xb1\xb2\xb3Q\xb4\xb5"; /* correct string */ - unsigned char *mbsonlylead = (unsigned char *)"\xb0\0\xb1\xb2"; + unsigned char *mbsonlylead = (unsigned char *)"\xb0\0\xb1\xb2 \xb3"; unsigned char buf[16]; int step; @@ -205,6 +205,58 @@ static void test_mbcp(void) ok(_ismbbtrail('\xb0'), "\xa0 should be a trail byte\n"); ok(_ismbbtrail(' ') == FALSE, "' ' should not be a trail byte\n"); + /* _ismbslead */ + expect_eq(_ismbslead(mbstring, &mbstring[0]), -1, int, "%d"); + expect_eq(_ismbslead(mbstring, &mbstring[1]), FALSE, int, "%d"); + expect_eq(_ismbslead(mbstring, &mbstring[2]), -1, int, "%d"); + expect_eq(_ismbslead(mbstring, &mbstring[3]), FALSE, int, "%d"); + expect_eq(_ismbslead(mbstring, &mbstring[4]), -1, int, "%d"); + expect_eq(_ismbslead(mbstring, &mbstring[5]), FALSE, int, "%d"); + expect_eq(_ismbslead(mbstring, &mbstring[6]), FALSE, int, "%d"); + expect_eq(_ismbslead(mbstring, &mbstring[7]), -1, int, "%d"); + expect_eq(_ismbslead(mbstring, &mbstring[8]), FALSE, int, "%d"); + + expect_eq(_ismbslead(mbsonlylead, &mbsonlylead[0]), -1, int, "%d"); + expect_eq(_ismbslead(mbsonlylead, &mbsonlylead[1]), FALSE, int, "%d"); + expect_eq(_ismbslead(mbsonlylead, &mbsonlylead[2]), FALSE, int, "%d"); + expect_eq(_ismbslead(mbsonlylead, &mbsonlylead[5]), FALSE, int, "%d"); + + /* _ismbstrail */ + expect_eq(_ismbstrail(mbstring, &mbstring[0]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbstring, &mbstring[1]), -1, int, "%d"); + expect_eq(_ismbstrail(mbstring, &mbstring[2]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbstring, &mbstring[3]), -1, int, "%d"); + expect_eq(_ismbstrail(mbstring, &mbstring[4]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbstring, &mbstring[5]), -1, int, "%d"); + expect_eq(_ismbstrail(mbstring, &mbstring[6]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbstring, &mbstring[7]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbstring, &mbstring[8]), -1, int, "%d"); + + expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[0]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[1]), -1, int, "%d"); + expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[2]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[3]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[4]), FALSE, int, "%d"); + expect_eq(_ismbstrail(mbsonlylead, &mbsonlylead[5]), FALSE, int, "%d"); + + /* _mbsbtype */ + expect_eq(_mbsbtype(mbstring, 0), _MBC_LEAD, int, "%d"); + expect_eq(_mbsbtype(mbstring, 1), _MBC_TRAIL, int, "%d"); + expect_eq(_mbsbtype(mbstring, 2), _MBC_LEAD, int, "%d"); + expect_eq(_mbsbtype(mbstring, 3), _MBC_ILLEGAL, int, "%d"); + expect_eq(_mbsbtype(mbstring, 4), _MBC_LEAD, int, "%d"); + expect_eq(_mbsbtype(mbstring, 5), _MBC_TRAIL, int, "%d"); + expect_eq(_mbsbtype(mbstring, 6), _MBC_SINGLE, int, "%d"); + expect_eq(_mbsbtype(mbstring, 7), _MBC_LEAD, int, "%d"); + expect_eq(_mbsbtype(mbstring, 8), _MBC_ILLEGAL, int, "%d"); + + expect_eq(_mbsbtype(mbsonlylead, 0), _MBC_LEAD, int, "%d"); + expect_eq(_mbsbtype(mbsonlylead, 1), _MBC_ILLEGAL, int, "%d"); + expect_eq(_mbsbtype(mbsonlylead, 2), _MBC_ILLEGAL, int, "%d"); + expect_eq(_mbsbtype(mbsonlylead, 3), _MBC_ILLEGAL, int, "%d"); + expect_eq(_mbsbtype(mbsonlylead, 4), _MBC_ILLEGAL, int, "%d"); + expect_eq(_mbsbtype(mbsonlylead, 5), _MBC_ILLEGAL, int, "%d"); + /* _mbsnextc */ expect_eq(_mbsnextc(mbstring), 0xb0b1, int, "%x"); expect_eq(_mbsnextc(&mbstring[2]), 0xb220, int, "%x"); /* lead + invalid tail */ diff --git a/dlls/msxml3/regsvr.c b/dlls/msxml3/regsvr.c index 24514dff9e8..9a0d9382b80 100644 --- a/dlls/msxml3/regsvr.c +++ b/dlls/msxml3/regsvr.c @@ -135,9 +135,6 @@ static LONG register_key_defvalueW(HKEY base, WCHAR const *name, WCHAR const *value); static LONG register_key_defvalueA(HKEY base, WCHAR const *name, char const *value); -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 @@ -226,7 +223,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); @@ -347,7 +345,8 @@ 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; } @@ -403,7 +402,8 @@ static HRESULT unregister_progids(struct progid const *list) LONG res = ERROR_SUCCESS; for (; res == ERROR_SUCCESS && list->name; ++list) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->name); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->name); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; } return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; @@ -461,70 +461,6 @@ static LONG register_key_defvalueA( } /*********************************************************************** - * 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/objsel/regsvr.c b/dlls/objsel/regsvr.c index 17c9fd3ec47..bfb4dd1310d 100644 --- a/dlls/objsel/regsvr.c +++ b/dlls/objsel/regsvr.c @@ -127,9 +127,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 @@ -216,7 +213,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); @@ -336,16 +334,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; } } @@ -454,67 +455,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/ole32/defaulthandler.c b/dlls/ole32/defaulthandler.c index ba70e0f4b25..33e80cee80d 100644 --- a/dlls/ole32/defaulthandler.c +++ b/dlls/ole32/defaulthandler.c @@ -1672,7 +1672,7 @@ static const IAdviseSinkVtbl DefaultHandler_IAdviseSink_VTable = DefaultHandler_IAdviseSink_OnClose }; -static const IPersistStorageVtbl DefaultHander_IPersistStorage_VTable = +static const IPersistStorageVtbl DefaultHandler_IPersistStorage_VTable = { DefaultHandler_IPersistStorage_QueryInterface, DefaultHandler_IPersistStorage_AddRef, @@ -1709,6 +1709,7 @@ static DefaultHandler* DefaultHandler_Construct( This->lpvtblIDataObject = &DefaultHandler_IDataObject_VTable; This->lpvtblIRunnableObject = &DefaultHandler_IRunnableObject_VTable; This->lpvtblIAdviseSink = &DefaultHandler_IAdviseSink_VTable; + This->lpvtblIPersistStorage = &DefaultHandler_IPersistStorage_VTable; /* * Start with one reference count. The caller of this function diff --git a/dlls/ole32/regsvr.c b/dlls/ole32/regsvr.c index fdb45c8a82f..51b4f0644b6 100644 --- a/dlls/ole32/regsvr.c +++ b/dlls/ole32/regsvr.c @@ -112,9 +112,6 @@ static LONG register_key_defvalueA(HKEY base, WCHAR const *name, char const *value); static LONG register_progid(WCHAR const *clsid, char const *progid, char const *name); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); - /*********************************************************************** * register_interfaces @@ -201,22 +198,12 @@ static HRESULT unregister_interfaces(struct regsvr_interface const *list) for (; res == ERROR_SUCCESS && list->iid; ++list) { WCHAR buf[39]; - HKEY iid_key; StringFromGUID2(list->iid, buf, 39); - res = RegOpenKeyExW(interface_key, buf, 0, - KEY_READ | KEY_WRITE, &iid_key); - if (res == ERROR_FILE_NOT_FOUND) { - res = ERROR_SUCCESS; - continue; - } - if (res != ERROR_SUCCESS) goto error_close_interface_key; - res = recursive_delete_key(iid_key); - RegCloseKey(iid_key); - if (res != ERROR_SUCCESS) goto error_close_interface_key; + res = RegDeleteTreeW(interface_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; } -error_close_interface_key: RegCloseKey(interface_key); error_return: return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; @@ -308,22 +295,15 @@ static HRESULT unregister_coclasses(struct regsvr_coclass const *list) for (; res == ERROR_SUCCESS && list->clsid; ++list) { WCHAR buf[39]; - HKEY clsid_key; StringFromGUID2(list->clsid, buf, 39); - res = RegOpenKeyExW(coclass_key, buf, 0, - KEY_READ | KEY_WRITE, &clsid_key); - if (res == ERROR_FILE_NOT_FOUND) { - res = ERROR_SUCCESS; - continue; - } - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - res = recursive_delete_key(clsid_key); - RegCloseKey(clsid_key); + 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; } } @@ -418,54 +398,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; -} - -/*********************************************************************** * coclass list */ static GUID const CLSID_StdOleLink = { diff --git a/dlls/rsaenh/implglue.c b/dlls/rsaenh/implglue.c index 32268a14f73..6953161ee25 100644 --- a/dlls/rsaenh/implglue.c +++ b/dlls/rsaenh/implglue.c @@ -328,7 +328,7 @@ BOOL gen_rand_impl(BYTE *pbBuffer, DWORD dwLen) return SystemFunction036(pbBuffer, dwLen); } -BOOL export_public_key_impl(BYTE *pbDest, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,DWORD *pdwPubExp) +BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen,DWORD *pdwPubExp) { mp_to_unsigned_bin(&pKeyContext->rsa.N, pbDest); reverse_bytes(pbDest, dwKeyLen); @@ -362,7 +362,7 @@ BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD d return TRUE; } -BOOL export_private_key_impl(BYTE *pbDest, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, +BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD *pdwPubExp) { mp_to_unsigned_bin(&pKeyContext->rsa.N, pbDest); diff --git a/dlls/rsaenh/implglue.h b/dlls/rsaenh/implglue.h index 5c829566162..597ca1ebd1c 100644 --- a/dlls/rsaenh/implglue.h +++ b/dlls/rsaenh/implglue.h @@ -86,11 +86,11 @@ BOOL encrypt_block_impl(ALG_ID aiAlgid, DWORD dwKeySpec, KEY_CONTEXT *pKeyContex DWORD enc); BOOL encrypt_stream_impl(ALG_ID aiAlgid, KEY_CONTEXT *pKeyContext, BYTE *pbInOut, DWORD dwLen); -BOOL export_public_key_impl(BYTE *pbDest, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, +BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD *pdwPubExp); BOOL import_public_key_impl(CONST BYTE *pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD dwPubExp); -BOOL export_private_key_impl(BYTE *pbDest, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, +BOOL export_private_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD *pdwPubExp); BOOL import_private_key_impl(CONST BYTE* pbSrc, KEY_CONTEXT *pKeyContext, DWORD dwKeyLen, DWORD dwPubExp); diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 1ff137019e8..8a27e2cda43 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -521,7 +521,7 @@ static inline void free_hmac_info(PHMAC_INFO hmac_info) { * NOTES * See Internet RFC 2104 for details on the HMAC algorithm. */ -static BOOL copy_hmac_info(PHMAC_INFO *dst, PHMAC_INFO src) { +static BOOL copy_hmac_info(PHMAC_INFO *dst, const HMAC_INFO *src) { if (!src) return FALSE; *dst = HeapAlloc(GetProcessHeap(), 0, sizeof(HMAC_INFO)); if (!*dst) return FALSE; @@ -974,7 +974,7 @@ static void destroy_key_container(OBJECTHDR *pObjectHdr) * Success: Handle to the new key container. * Failure: INVALID_HANDLE_VALUE */ -static HCRYPTPROV new_key_container(PCCH pszContainerName, DWORD dwFlags, PVTableProvStruc pVTable) +static HCRYPTPROV new_key_container(PCCH pszContainerName, DWORD dwFlags, const VTableProvStruc *pVTable) { KEYCONTAINER *pKeyContainer; HCRYPTPROV hKeyContainer; @@ -1039,7 +1039,7 @@ static HCRYPTPROV new_key_container(PCCH pszContainerName, DWORD dwFlags, PVTabl * Success: Handle to the key container read from the registry * Failure: INVALID_HANDLE_VALUE */ -static HCRYPTPROV read_key_container(PCHAR pszContainerName, DWORD dwFlags, PVTableProvStruc pVTable) +static HCRYPTPROV read_key_container(PCHAR pszContainerName, DWORD dwFlags, const VTableProvStruc *pVTable) { CHAR szRSABase[MAX_PATH]; BYTE *pbKey; diff --git a/dlls/secur32/dispatcher.c b/dlls/secur32/dispatcher.c index 08b1b74b610..226de79ccab 100644 --- a/dlls/secur32/dispatcher.c +++ b/dlls/secur32/dispatcher.c @@ -117,8 +117,10 @@ SECURITY_STATUS fork_helper(PNegoHelper *new_helper, const char *prog, helper->session_key = NULL; helper->neg_flags = 0; helper->pipe_in = pipe_in[0]; + fcntl( pipe_in[0], F_SETFD, 1 ); close(pipe_in[1]); helper->pipe_out = pipe_out[1]; + fcntl( pipe_out[1], F_SETFD, 1 ); close(pipe_out[0]); } diff --git a/dlls/secur32/hmac_md5.c b/dlls/secur32/hmac_md5.c index 1b186598da2..6dafa312e4d 100644 --- a/dlls/secur32/hmac_md5.c +++ b/dlls/secur32/hmac_md5.c @@ -21,7 +21,7 @@ #include "hmac_md5.h" -void HMACMD5Init(HMAC_MD5_CTX *ctx, unsigned char *key, unsigned int key_len) +void HMACMD5Init(HMAC_MD5_CTX *ctx, const unsigned char *key, unsigned int key_len) { int i; unsigned char inner_padding[64]; @@ -55,7 +55,7 @@ void HMACMD5Init(HMAC_MD5_CTX *ctx, unsigned char *key, unsigned int key_len) MD5Update(&(ctx->ctx), inner_padding, 64); } -void HMACMD5Update(HMAC_MD5_CTX *ctx, unsigned char *data, unsigned int data_len) +void HMACMD5Update(HMAC_MD5_CTX *ctx, const unsigned char *data, unsigned int data_len) { MD5Update(&(ctx->ctx), data, data_len); } diff --git a/dlls/secur32/hmac_md5.h b/dlls/secur32/hmac_md5.h index 3a94bb06680..8fc2a444c13 100644 --- a/dlls/secur32/hmac_md5.h +++ b/dlls/secur32/hmac_md5.h @@ -42,7 +42,7 @@ void WINAPI MD5Init( MD5_CTX *ctx ); void WINAPI MD5Update( MD5_CTX *ctx, const unsigned char *buf, unsigned int len ); void WINAPI MD5Final( MD5_CTX *ctx ); -void HMACMD5Init(HMAC_MD5_CTX *ctx, unsigned char *key, unsigned int key_len); -void HMACMD5Update(HMAC_MD5_CTX *ctx, unsigned char *data, unsigned int data_len); +void HMACMD5Init(HMAC_MD5_CTX *ctx, const unsigned char *key, unsigned int key_len); +void HMACMD5Update(HMAC_MD5_CTX *ctx, const unsigned char *data, unsigned int data_len); void HMACMD5Final(HMAC_MD5_CTX *ctx, unsigned char *digest); #endif /*_HMAC_MD5_H_*/ diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index a8f50b6f647..b74e54ca185 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(secur32); static SECURITY_STATUS schan_QueryCredentialsAttributes( - PCredHandle phCredential, ULONG ulAttribute, PVOID pBuffer) + PCredHandle phCredential, ULONG ulAttribute, const VOID *pBuffer) { SECURITY_STATUS ret; @@ -111,7 +111,7 @@ static SECURITY_STATUS SEC_ENTRY schan_QueryCredentialsAttributesW( return ret; } -static SECURITY_STATUS schan_CheckCreds(PSCHANNEL_CRED schanCred) +static SECURITY_STATUS schan_CheckCreds(const SCHANNEL_CRED *schanCred) { SECURITY_STATUS st; @@ -149,7 +149,7 @@ static SECURITY_STATUS schan_CheckCreds(PSCHANNEL_CRED schanCred) return st; } -static SECURITY_STATUS schan_AcquireClientCredentials(PSCHANNEL_CRED schanCred, +static SECURITY_STATUS schan_AcquireClientCredentials(const SCHANNEL_CRED *schanCred, PCredHandle phCredential, PTimeStamp ptsExpiry) { SECURITY_STATUS st = SEC_E_OK; @@ -177,7 +177,7 @@ static SECURITY_STATUS schan_AcquireClientCredentials(PSCHANNEL_CRED schanCred, return st; } -static SECURITY_STATUS schan_AcquireServerCredentials(PSCHANNEL_CRED schanCred, +static SECURITY_STATUS schan_AcquireServerCredentials(const SCHANNEL_CRED *schanCred, PCredHandle phCredential, PTimeStamp ptsExpiry) { SECURITY_STATUS st; @@ -194,7 +194,7 @@ static SECURITY_STATUS schan_AcquireServerCredentials(PSCHANNEL_CRED schanCred, } static SECURITY_STATUS schan_AcquireCredentialsHandle(ULONG fCredentialUse, - PSCHANNEL_CRED schanCred, PCredHandle phCredential, PTimeStamp ptsExpiry) + const SCHANNEL_CRED *schanCred, PCredHandle phCredential, PTimeStamp ptsExpiry) { SECURITY_STATUS ret; diff --git a/dlls/secur32/secur32.c b/dlls/secur32/secur32.c index aabb56c392f..2e12c66b728 100644 --- a/dlls/secur32/secur32.c +++ b/dlls/secur32/secur32.c @@ -588,7 +588,7 @@ static void SECUR32_initializeProviders(void) } } -SecurePackage *SECUR32_findPackageW(PWSTR packageName) +SecurePackage *SECUR32_findPackageW(PCWSTR packageName) { SecurePackage *ret = NULL; BOOL matched = FALSE; @@ -634,7 +634,7 @@ SecurePackage *SECUR32_findPackageW(PWSTR packageName) return ret; } -SecurePackage *SECUR32_findPackageA(PSTR packageName) +SecurePackage *SECUR32_findPackageA(PCSTR packageName) { SecurePackage *ret; @@ -778,7 +778,7 @@ SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(PULONG pcPackages, * structures) into an array of SecPkgInfoA structures, which it returns. */ static PSecPkgInfoA thunk_PSecPkgInfoWToA(ULONG cPackages, - const PSecPkgInfoW info) + const SecPkgInfoW *info) { PSecPkgInfoA ret; diff --git a/dlls/secur32/secur32_priv.h b/dlls/secur32/secur32_priv.h index 303d8fc1b82..4835525f150 100644 --- a/dlls/secur32/secur32_priv.h +++ b/dlls/secur32/secur32_priv.h @@ -112,11 +112,11 @@ void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd, /* Tries to find the package named packageName. If it finds it, implicitly * loads the package if it isn't already loaded. */ -SecurePackage *SECUR32_findPackageW(PWSTR packageName); +SecurePackage *SECUR32_findPackageW(PCWSTR packageName); /* Tries to find the package named packageName. (Thunks to _findPackageW) */ -SecurePackage *SECUR32_findPackageA(PSTR packageName); +SecurePackage *SECUR32_findPackageA(PCSTR packageName); /* A few string helpers; will return NULL if str is NULL. Free return with * SECUR32_FREE */ diff --git a/dlls/secur32/thunks.c b/dlls/secur32/thunks.c index f21f3511c13..b56507dc70a 100644 --- a/dlls/secur32/thunks.c +++ b/dlls/secur32/thunks.c @@ -351,7 +351,7 @@ SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsW(PCredHandle hCredentials, return ret; } -static PSecPkgInfoA _copyPackageInfoFlatWToA(PSecPkgInfoW infoW) +static PSecPkgInfoA _copyPackageInfoFlatWToA(const SecPkgInfoW *infoW) { PSecPkgInfoA ret; @@ -576,7 +576,7 @@ SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA(PCtxtHandle phContext, return ret; } -static PSecPkgInfoW _copyPackageInfoFlatAToW(PSecPkgInfoA infoA) +static PSecPkgInfoW _copyPackageInfoFlatAToW(const SecPkgInfoA *infoA) { PSecPkgInfoW ret; diff --git a/dlls/secur32/util.c b/dlls/secur32/util.c index 6d36e2016e4..15d3a2a1b25 100644 --- a/dlls/secur32/util.c +++ b/dlls/secur32/util.c @@ -143,7 +143,7 @@ SECURITY_STATUS SECUR32_CreateNTLMv1SessionKey(PBYTE password, int len, PBYTE se return SEC_E_OK; } -static void SECUR32_CalcNTLMv2Subkey(PBYTE session_key, const char *magic, PBYTE subkey) +static void SECUR32_CalcNTLMv2Subkey(const BYTE *session_key, const char *magic, PBYTE subkey) { MD5_CTX ctx; diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c index d5b76430874..f7a9bd4308f 100644 --- a/dlls/setupapi/parser.c +++ b/dlls/setupapi/parser.c @@ -175,7 +175,7 @@ static void *grow_array( void *array, unsigned int *count, size_t elem ) /* get the directory of the inf file (as counted string, not null-terminated) */ -static const WCHAR *get_inf_dir( struct inf_file *file, unsigned int *len ) +static const WCHAR *get_inf_dir( const struct inf_file *file, unsigned int *len ) { const WCHAR *p = strrchrW( file->filename, '\\' ); *len = p ? (p + 1 - file->filename) : 0; @@ -184,7 +184,7 @@ static const WCHAR *get_inf_dir( struct inf_file *file, unsigned int *len ) /* find a section by name */ -static int find_section( struct inf_file *file, const WCHAR *name ) +static int find_section( const struct inf_file *file, const WCHAR *name ) { unsigned int i; @@ -303,7 +303,7 @@ static struct field *add_field( struct inf_file *file, const WCHAR *text ) /* retrieve the string substitution for a directory id */ -static const WCHAR *get_dirid_subst( struct inf_file *file, int dirid, unsigned int *len ) +static const WCHAR *get_dirid_subst( const struct inf_file *file, int dirid, unsigned int *len ) { const WCHAR *ret; @@ -316,7 +316,7 @@ static const WCHAR *get_dirid_subst( struct inf_file *file, int dirid, unsigned /* retrieve the string substitution for a given string, or NULL if not found */ /* if found, len is set to the substitution length */ -static const WCHAR *get_string_subst( struct inf_file *file, const WCHAR *str, unsigned int *len, +static const WCHAR *get_string_subst( const struct inf_file *file, const WCHAR *str, unsigned int *len, BOOL no_trailing_slash ) { static const WCHAR percent = '%'; @@ -365,7 +365,7 @@ static const WCHAR *get_string_subst( struct inf_file *file, const WCHAR *str, u /* do string substitutions on the specified text */ /* the buffer is assumed to be large enough */ /* returns necessary length not including terminating null */ -unsigned int PARSER_string_substW( struct inf_file *file, const WCHAR *text, WCHAR *buffer, +unsigned int PARSER_string_substW( const struct inf_file *file, const WCHAR *text, WCHAR *buffer, unsigned int size ) { const WCHAR *start, *subst, *p; @@ -418,7 +418,7 @@ unsigned int PARSER_string_substW( struct inf_file *file, const WCHAR *text, WCH /* do string substitutions on the specified text */ /* the buffer is assumed to be large enough */ /* returns necessary length not including terminating null */ -unsigned int PARSER_string_substA( struct inf_file *file, const WCHAR *text, char *buffer, +unsigned int PARSER_string_substA( const struct inf_file *file, const WCHAR *text, char *buffer, unsigned int size ) { WCHAR buffW[MAX_STRING_LEN+1]; @@ -471,14 +471,14 @@ static inline enum parser_state set_state( struct parser *parser, enum parser_st /* check if the pointer points to an end of file */ -static inline int is_eof( struct parser *parser, const WCHAR *ptr ) +static inline int is_eof( const struct parser *parser, const WCHAR *ptr ) { return (ptr >= parser->end || *ptr == CONTROL_Z); } /* check if the pointer points to an end of line */ -static inline int is_eol( struct parser *parser, const WCHAR *ptr ) +static inline int is_eol( const struct parser *parser, const WCHAR *ptr ) { return (ptr >= parser->end || *ptr == CONTROL_Z || *ptr == '\n'); } diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h index 32f1661e247..a3fe223390b 100644 --- a/dlls/setupapi/setupapi_private.h +++ b/dlls/setupapi/setupapi_private.h @@ -45,9 +45,9 @@ static inline WCHAR *strdupAtoW( const char *str ) struct inf_file; extern const WCHAR *DIRID_get_string( int dirid ); -extern unsigned int PARSER_string_substA( struct inf_file *file, const WCHAR *text, +extern unsigned int PARSER_string_substA( const struct inf_file *file, const WCHAR *text, char *buffer, unsigned int size ); -extern unsigned int PARSER_string_substW( struct inf_file *file, const WCHAR *text, +extern unsigned int PARSER_string_substW( const struct inf_file *file, const WCHAR *text, WCHAR *buffer, unsigned int size ); extern const WCHAR *PARSER_get_inf_filename( HINF hinf ); extern WCHAR *PARSER_get_src_root( HINF hinf ); diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index 62321052556..409e6e3ff50 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -130,10 +130,10 @@ START_TEST(devinst) if (pSetupDiCreateDeviceInfoListExW && pSetupDiDestroyDeviceInfoList) test_SetupDiCreateDeviceInfoListEx(); else - trace("Needed calls for SetupDiCreateDeviceInfoListEx not all available, skipping test.\n"); + skip("SetupDiCreateDeviceInfoListExW and/or SetupDiDestroyDeviceInfoList not available\n"); if (pSetupDiOpenClassRegKeyExA) test_SetupDiOpenClassRegKeyExA(); else - trace("Needed call for SetupDiOpenClassRegKeyExA not available, skipping test.\n"); + skip("SetupDiOpenClassRegKeyExA is not available\n"); } diff --git a/dlls/shdocvw/iexplore.c b/dlls/shdocvw/iexplore.c index 4f737de4c98..3ab39eeafb1 100644 --- a/dlls/shdocvw/iexplore.c +++ b/dlls/shdocvw/iexplore.c @@ -190,6 +190,12 @@ DWORD WINAPI IEWinMain(LPSTR szCommandLine, int nShowWindow) ExitProcess(1); } + /* FIXME: there are lots of other commandline options we need to parse */ + if(!strncasecmp(szCommandLine, "-nohome", 7)) { + FIXME("skipping -nohome option\n"); + szCommandLine += 8; + } + if(strcmp(szCommandLine, "-Embedding")) { LPWSTR url; DWORD len; diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c index d4ed84d896b..7eb02b2c42f 100644 --- a/dlls/shlwapi/tests/path.c +++ b/dlls/shlwapi/tests/path.c @@ -205,6 +205,10 @@ const TEST_URL_COMBINE TEST_COMBINE[] = { {"xxx:@MSITStore:file.chm/file.html", "dir/file", 0, S_OK, "xxx:dir/file"}, {"mk:@MSITStore:file.chm::/file.html", "/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"}, {"mk:@MSITStore:file.chm::/file.html", "mk:@MSITStore:file.chm::/dir/file", 0, S_OK, "mk:@MSITStore:file.chm::/dir/file"}, + {"foo:today", "foo:calendar", 0, S_OK, "foo:calendar"}, + {"foo:today", "bar:calendar", 0, S_OK, "bar:calendar"}, + {"foo:/today", "foo:calendar", 0, S_OK, "foo:/calendar"}, + {"foo:/today/", "foo:calendar", 0, S_OK, "foo:/today/calendar"}, }; struct { diff --git a/dlls/shlwapi/url.c b/dlls/shlwapi/url.c index e1c0aa6cd48..e7701da3a35 100644 --- a/dlls/shlwapi/url.c +++ b/dlls/shlwapi/url.c @@ -736,8 +736,9 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, process_case = 4; break; } - /* case where scheme is followed by document path */ - process_case = 5; + /* replace either just location if base's location starts with a + * slash or otherwise everything */ + process_case = (*base.pszSuffix == '/') ? 5 : 1; break; } if ((*relative.pszSuffix == '/') && (*(relative.pszSuffix+1) == '/')) { diff --git a/dlls/user32/message.c b/dlls/user32/message.c index c89a7ff802e..e87c4281653 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -303,7 +303,7 @@ static inline BOOL is_mouse_message( UINT message ) /* check whether message matches the specified hwnd filter */ static inline BOOL check_hwnd_filter( const MSG *msg, HWND hwnd_filter ) { - if (!hwnd_filter) return TRUE; + if (!hwnd_filter || hwnd_filter == GetDesktopWindow()) return TRUE; return (msg->hwnd == hwnd_filter || IsChild( hwnd_filter, msg->hwnd )); } diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index 862c75f7371..9ba4a7a863a 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -160,6 +160,9 @@ static BOOL redraw_window_rects( HWND hwnd, UINT flags, const RECT *rects, UINT { BOOL ret; + if (!(flags & (RDW_INVALIDATE|RDW_VALIDATE|RDW_INTERNALPAINT|RDW_NOINTERNALPAINT))) + return TRUE; /* nothing to do */ + SERVER_START_REQ( redraw_window ) { req->window = hwnd; @@ -240,7 +243,7 @@ static HRGN send_ncpaint( HWND hwnd, HWND *child, UINT *flags ) static BOOL send_erase( HWND hwnd, UINT flags, HRGN client_rgn, RECT *clip_rect, HDC *hdc_ret ) { - BOOL need_erase = FALSE; + BOOL need_erase = (flags & UPDATE_DELAYED_ERASE) != 0; HDC hdc = 0; RECT dummy; @@ -260,12 +263,7 @@ static BOOL send_erase( HWND hwnd, UINT flags, HRGN client_rgn, if (type != NULLREGION) need_erase = !SendMessageW( hwnd, WM_ERASEBKGND, (WPARAM)hdc, 0 ); } - if (!hdc_ret) - { - if (need_erase && hwnd != GetDesktopWindow()) /* FIXME: mark it as needing erase again */ - RedrawWindow( hwnd, clip_rect, 0, RDW_INVALIDATE | RDW_ERASE | RDW_NOCHILDREN ); - USER_Driver->pReleaseDC( hwnd, hdc, TRUE ); - } + if (!hdc_ret) USER_Driver->pReleaseDC( hwnd, hdc, TRUE ); } if (hdc_ret) *hdc_ret = hdc; @@ -284,6 +282,7 @@ void erase_now( HWND hwnd, UINT rdw_flags ) { HWND child = 0; HRGN hrgn; + BOOL need_erase = FALSE; /* loop while we find a child to repaint */ for (;;) @@ -292,12 +291,13 @@ void erase_now( HWND hwnd, UINT rdw_flags ) if (rdw_flags & RDW_NOCHILDREN) flags |= UPDATE_NOCHILDREN; else if (rdw_flags & RDW_ALLCHILDREN) flags |= UPDATE_ALLCHILDREN; + if (need_erase) flags |= UPDATE_DELAYED_ERASE; if (!(hrgn = send_ncpaint( hwnd, &child, &flags ))) break; - send_erase( child, flags, hrgn, NULL, NULL ); + need_erase = send_erase( child, flags, hrgn, NULL, NULL ); if (!flags) break; /* nothing more to do */ - if (rdw_flags & RDW_NOCHILDREN) break; + if ((rdw_flags & RDW_NOCHILDREN) && !need_erase) break; } } @@ -733,7 +733,11 @@ INT WINAPI GetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase ) POINT offset; retval = CombineRgn( hrgn, update_rgn, 0, RGN_COPY ); - send_erase( hwnd, flags, update_rgn, NULL, NULL ); + if (send_erase( hwnd, flags, update_rgn, NULL, NULL )) + { + flags = UPDATE_DELAYED_ERASE; + get_update_flags( hwnd, NULL, &flags ); + } /* map region to client coordinates */ offset.x = offset.y = 0; ScreenToClient( hwnd, &offset ); @@ -750,6 +754,7 @@ BOOL WINAPI GetUpdateRect( HWND hwnd, LPRECT rect, BOOL erase ) { UINT flags = UPDATE_NOCHILDREN; HRGN update_rgn; + BOOL need_erase; if (erase) flags |= UPDATE_NONCLIENT | UPDATE_ERASE; @@ -765,10 +770,11 @@ BOOL WINAPI GetUpdateRect( HWND hwnd, LPRECT rect, BOOL erase ) ReleaseDC( hwnd, hdc ); } } - send_erase( hwnd, flags, update_rgn, NULL, NULL ); + need_erase = send_erase( hwnd, flags, update_rgn, NULL, NULL ); /* check if we still have an update region */ flags = UPDATE_PAINT | UPDATE_NOCHILDREN; + if (need_erase) flags |= UPDATE_DELAYED_ERASE; return (get_update_flags( hwnd, NULL, &flags ) && (flags & UPDATE_PAINT)); } diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index af05f7baa27..e6443e6e044 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -941,6 +941,7 @@ static const struct message WmDragThickBordersBarSeq[] = { /* FIXME: add */ static const struct message WmResizingChildWithMoveWindowSeq[] = { { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE }, { WM_NCCALCSIZE, sent|wparam, 1 }, + { WM_ERASEBKGND, sent|parent|optional }, { WM_ERASEBKGND, sent|optional }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE }, { WM_MOVE, sent|defwinproc }, @@ -4020,8 +4021,10 @@ static void test_messages(void) /* test WM_SETREDRAW on a visible child window */ test_WM_SETREDRAW(hchild); + log_all_parent_messages++; MoveWindow(hchild, 10, 10, 20, 20, TRUE); ok_sequence(WmResizingChildWithMoveWindowSeq, "MoveWindow:child", FALSE); + log_all_parent_messages--; ShowWindow(hchild, SW_HIDE); flush_sequence(); @@ -7476,9 +7479,7 @@ static void test_DestroyWindow(void) /* test owner/parent of the parent */ test = GetParent(parent); ok(!test, "wrong parent %p\n", test); -todo_wine { ok(!IsChild(GetDesktopWindow(), parent), "wrong parent/child %p/%p\n", GetDesktopWindow(), parent); -} if(pGetAncestor) { test = pGetAncestor(parent, GA_PARENT); ok(test == GetDesktopWindow(), "wrong parent %p\n", test); diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 3688bea6f24..f3a2ac35631 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -2758,27 +2758,21 @@ static void test_SetParent(void) check_parents(child3, child2, child2, child2, 0, child2, parent); check_parents(child4, desktop, child2, child2, child2, child4, parent); -todo_wine { ok(!IsChild(desktop, parent), "wrong parent/child %p/%p\n", desktop, parent); ok(!IsChild(desktop, child1), "wrong parent/child %p/%p\n", desktop, child1); ok(!IsChild(desktop, child2), "wrong parent/child %p/%p\n", desktop, child2); ok(!IsChild(desktop, child3), "wrong parent/child %p/%p\n", desktop, child3); ok(!IsChild(desktop, child4), "wrong parent/child %p/%p\n", desktop, child4); -} ok(IsChild(parent, child1), "wrong parent/child %p/%p\n", parent, child1); -todo_wine { ok(!IsChild(desktop, child2), "wrong parent/child %p/%p\n", desktop, child2); -} ok(!IsChild(parent, child2), "wrong parent/child %p/%p\n", parent, child2); ok(!IsChild(child1, child2), "wrong parent/child %p/%p\n", child1, child2); ok(!IsChild(parent, child3), "wrong parent/child %p/%p\n", parent, child3); ok(IsChild(child2, child3), "wrong parent/child %p/%p\n", child2, child3); ok(!IsChild(parent, child4), "wrong parent/child %p/%p\n", parent, child4); ok(!IsChild(child3, child4), "wrong parent/child %p/%p\n", child3, child4); -todo_wine { ok(!IsChild(desktop, child4), "wrong parent/child %p/%p\n", desktop, child4); -} if (!is_win9x) /* Win9x doesn't survive this test */ { @@ -4237,12 +4231,9 @@ static void test_GetUpdateRect(void) ShowWindow(hchild, SW_HIDE); SetRect(&rc2, 0, 0, 0, 0); GetUpdateRect(hgrandparent, &rc1, FALSE); - todo_wine - { - ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, - rc2.left, rc2.top, rc2.right, rc2.bottom); - } + ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n", + rc1.left, rc1.top, rc1.right, rc1.bottom, + rc2.left, rc2.top, rc2.right, rc2.bottom); SetRect(&rc2, 10, 10, 40, 40); GetUpdateRect(hparent, &rc1, FALSE); @@ -4283,12 +4274,9 @@ static void test_GetUpdateRect(void) ShowWindow(hchild, SW_HIDE); SetRect(&rc2, 0, 0, 0, 0); GetUpdateRect(hgrandparent, &rc1, FALSE); - todo_wine - { - ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n", - rc1.left, rc1.top, rc1.right, rc1.bottom, - rc2.left, rc2.top, rc2.right, rc2.bottom); - } + ok(EqualRect(&rc1, &rc2), "rects do not match (%d,%d,%d,%d) / (%d,%d,%d,%d)\n", + rc1.left, rc1.top, rc1.right, rc1.bottom, + rc2.left, rc2.top, rc2.right, rc2.bottom); SetRect(&rc2, 10, 10, 40, 40); GetUpdateRect(hparent, &rc1, FALSE); diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 0ef021afcf7..41eb108470f 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2609,7 +2609,7 @@ BOOL WINAPI IsChild( HWND parent, HWND child ) if (!list) return FALSE; parent = WIN_GetFullHandle( parent ); for (i = 0; list[i]; i++) if (list[i] == parent) break; - ret = (list[i] != 0); + ret = list[i] && list[i+1]; HeapFree( GetProcessHeap(), 0, list ); return ret; } diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index a13753c7461..8878c67a1c8 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -1604,19 +1604,15 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos ) &newWindowRect, &newClientRect, orig_flags, valid_rects )) return FALSE; - /* erase parent if hiding child */ - if (!(orig_flags & SWP_DEFERERASE)) - { - if (orig_flags & SWP_HIDEWINDOW) - { - HWND parent = GetAncestor( winpos->hwnd, GA_PARENT ); - erase_now( parent, RDW_NOCHILDREN ); - } - else if (!(orig_flags & SWP_SHOWWINDOW) && - (winpos->flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOGEOMETRYCHANGE) - { - erase_now( winpos->hwnd, 0 ); - } + /* erase parent when hiding or resizing child */ + if (!(orig_flags & SWP_DEFERERASE) && + ((orig_flags & SWP_HIDEWINDOW) || + (!(orig_flags & SWP_SHOWWINDOW) && + (winpos->flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOGEOMETRYCHANGE))) + { + HWND parent = GetAncestor( winpos->hwnd, GA_PARENT ); + if (!parent || parent == GetDesktopWindow()) parent = winpos->hwnd; + erase_now( parent, 0 ); } if( winpos->flags & SWP_HIDEWINDOW ) diff --git a/dlls/winealsa.drv/dsoutput.c b/dlls/winealsa.drv/dsoutput.c index 87907b3cf27..c1cd0392f19 100644 --- a/dlls/winealsa.drv/dsoutput.c +++ b/dlls/winealsa.drv/dsoutput.c @@ -73,6 +73,7 @@ struct IDsDriverImpl /* IDsDriverImpl fields */ IDsDriverBufferImpl* primary; UINT wDevID; + DWORD forceformat; }; struct IDsDriverBufferImpl @@ -292,6 +293,9 @@ static HRESULT WINAPI IDsDriverBufferImpl_Lock(PIDSDRIVERBUFFER iface, /* **** */ EnterCriticalSection(&This->pcm_crst); + if (dwFlags & DSBLOCK_ENTIREBUFFER) + dwWriteLen = This->mmap_buflen_bytes; + if (dwWriteLen > This->mmap_buflen_bytes || dwWritePosition >= This->mmap_buflen_bytes) { /* **** */ @@ -368,7 +372,7 @@ static HRESULT WINAPI IDsDriverBufferImpl_Unlock(PIDSDRIVERBUFFER iface, return DS_OK; } -static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx, BOOL forced) +static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx) { snd_pcm_t *pcm = NULL; snd_pcm_hw_params_t *hw_params = This->hw_params; @@ -387,11 +391,7 @@ static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx, BOOL fo default: FIXME("Unsupported bpp: %d\n", pwfx->wBitsPerSample); return DSERR_GENERIC; } - /* **** */ - EnterCriticalSection(&This->pcm_crst); - err = snd_pcm_open(&pcm, WOutDev[This->drv->wDevID].pcmname, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK); - if (err < 0) { if (errno != EBUSY || !This->pcm) @@ -427,13 +427,18 @@ static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx, BOOL fo * side effects, which may include: Less granular pointer, changing buffer sizes, etc */ #if SND_LIB_VERSION >= 0x010009 - snd_pcm_hw_params_set_rate_resample(pcm, hw_params, 0 && forced); + snd_pcm_hw_params_set_rate_resample(pcm, hw_params, 0); #endif err = snd_pcm_hw_params_set_rate_near(pcm, hw_params, &rate, NULL); if (err < 0) { rate = pwfx->nSamplesPerSec; WARN("Could not set rate\n"); goto err; } - if (!ALSA_NearMatch(rate, pwfx->nSamplesPerSec)) + if (!ALSA_NearMatch(rate, pwfx->nSamplesPerSec) && (This->drv->forceformat++)) + { + WARN("Could not set exact rate %d, instead %d, bombing out\n", pwfx->nSamplesPerSec, rate); + goto err; + } + else if (!ALSA_NearMatch(rate, pwfx->nSamplesPerSec)) { WARN("Could not set sound rate to %d, but instead to %d\n", pwfx->nSamplesPerSec, rate); pwfx->nSamplesPerSec = rate; @@ -463,12 +468,8 @@ static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx, BOOL fo snd_pcm_close(This->pcm); } This->pcm = pcm; - snd_pcm_prepare(This->pcm); DSDB_CreateMMAP(This); - - /* **** */ - LeaveCriticalSection(&This->pcm_crst); return S_OK; err: @@ -483,8 +484,6 @@ static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx, BOOL fo if (This->pcm) snd_pcm_hw_params_current(This->pcm, This->hw_params); - /* **** */ - LeaveCriticalSection(&This->pcm_crst); return DSERR_BADFORMAT; } @@ -495,11 +494,15 @@ static HRESULT WINAPI IDsDriverBufferImpl_SetFormat(PIDSDRIVERBUFFER iface, LPWA TRACE("(%p, %p)\n", iface, pwfx); - hr = SetFormat(This, pwfx, TRUE); + /* **** */ + EnterCriticalSection(&This->pcm_crst); + This->drv->forceformat = FALSE; + hr = SetFormat(This, pwfx); + /* **** */ + LeaveCriticalSection(&This->pcm_crst); - if (hr == S_OK) - /* Buffer size / Location changed, so tell dsound to recreate */ - return DSERR_BUFFERLOST; + if (hr == DS_OK) + return S_FALSE; return hr; } @@ -778,7 +781,7 @@ static HRESULT WINAPI IDsDriverImpl_CreateSoundBuffer(PIDSDRIVER iface, (*ippdsdb)->pcm_crst.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ALSA_DSOUTPUT.pcm_crst"); /* SetFormat has to re-initialize pcm here anyway */ - err = SetFormat(*ippdsdb, pwfx, FALSE); + err = SetFormat(*ippdsdb, pwfx); if (FAILED(err)) { WARN("Error occurred: %08x\n", err); diff --git a/dlls/winealsa.drv/waveinit.c b/dlls/winealsa.drv/waveinit.c index 0de133567bf..dae6ab45d40 100644 --- a/dlls/winealsa.drv/waveinit.c +++ b/dlls/winealsa.drv/waveinit.c @@ -325,6 +325,10 @@ static int ALSA_ComputeCaps(snd_ctl_t *ctl, snd_pcm_t *pcm, } } + *flags = DSCAPS_CERTIFIED | DSCAPS_CONTINUOUSRATE; + *flags |= DSCAPS_SECONDARYMONO | DSCAPS_SECONDARYSTEREO; + *flags |= DSCAPS_SECONDARY8BIT | DSCAPS_SECONDARY16BIT; + if (*formats & (WAVE_FORMAT_1M08 | WAVE_FORMAT_2M08 | WAVE_FORMAT_4M08 | WAVE_FORMAT_48M08 | WAVE_FORMAT_96M08 | WAVE_FORMAT_1M16 | diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 25078353e23..6dce22882ec 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -131,6 +131,8 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar TRACE("(%p): Creating a %s context for render target %p\n", This, create_pbuffer ? "offscreen" : "onscreen", target); +#define PUSH1(att) attribs[nAttribs++] = (att); +#define PUSH2(att,value) attribs[nAttribs++] = (att); attribs[nAttribs++] = (value); if(create_pbuffer) { HDC hdc_parent = GetDC(win_handle); int iPixelFormat = 0; @@ -144,9 +146,6 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar int nAttribs = 0; unsigned int nFormats; -#define PUSH1(att) attribs[nAttribs++] = (att); -#define PUSH2(att,value) attribs[nAttribs++] = (att); attribs[nAttribs++] = (value); - /* Retrieve the specifications for the pixelformat from the backbuffer / stencilbuffer */ getColorBits(target->resource.format, &red, &green, &blue, &alphaBits, &colorBits); getDepthStencilBits(StencilBufferFormat, &depthBits, &stencilBits); @@ -158,9 +157,6 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar PUSH2(WGL_STENCIL_BITS_ARB, stencilBits); PUSH1(0); /* end the list */ -#undef PUSH1 -#undef PUSH2 - /* Try to find a pixelformat that matches exactly. If that fails let ChoosePixelFormat try to find a close match */ if(!GL_EXTCALL(wglChoosePixelFormatARB(hdc_parent, (const int*)&attribs, NULL, 1, &iPixelFormat, &nFormats))) { @@ -205,10 +201,12 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar } else { PIXELFORMATDESCRIPTOR pfd; int iPixelFormat; - short red, green, blue, alpha; - short colorBits; - short depthBits, stencilBits; + short redBits, greenBits, blueBits, alphaBits, colorBits; + short depthBits=0, stencilBits=0; int res; + int attribs[256]; + int nAttribs = 0; + unsigned int nFormats; hdc = GetDC(win_handle); if(hdc == NULL) { @@ -217,36 +215,56 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar } /* PixelFormat selection */ - /* TODO: fill cColorBits/cDepthBits with target->resource.format */ - ZeroMemory(&pfd, sizeof(pfd)); - pfd.nSize = sizeof(pfd); - pfd.nVersion = 1; - pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW;/*PFD_GENERIC_ACCELERATED*/ - pfd.iPixelType = PFD_TYPE_RGBA; - pfd.cColorBits = 32; - pfd.cDepthBits = 0; - pfd.cStencilBits = 0; - pfd.iLayerType = PFD_MAIN_PLANE; - - /* Try to match the colorBits of the d3d format */ - if(getColorBits(target->resource.format, &red, &green, &blue, &alpha, &colorBits)) - pfd.cColorBits = colorBits; + PUSH2(WGL_DRAW_TO_WINDOW_ARB, GL_TRUE); /* We want to draw to a window */ + PUSH2(WGL_DOUBLE_BUFFER_ARB, GL_TRUE); + PUSH2(WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB); /* Make sure we don't get a float or color index format */ + + if(!getColorBits(target->resource.format, &redBits, &greenBits, &blueBits, &alphaBits, &colorBits)) { + ERR("Unable to get color bits for format %#x!\n", target->resource.format); + return FALSE; + } + PUSH2(WGL_COLOR_BITS_ARB, colorBits); + PUSH2(WGL_RED_BITS_ARB, redBits); + PUSH2(WGL_GREEN_BITS_ARB, greenBits); + PUSH2(WGL_BLUE_BITS_ARB, blueBits); + PUSH2(WGL_ALPHA_BITS_ARB, alphaBits); /* Retrieve the depth stencil format from the present parameters. * The choice of the proper format can give a nice performance boost * in case of GPU limited programs. */ if(pPresentParms->EnableAutoDepthStencil) { TRACE("pPresentParms->EnableAutoDepthStencil=enabled; using AutoDepthStencilFormat=%s\n", debug_d3dformat(pPresentParms->AutoDepthStencilFormat)); - if(getDepthStencilBits(pPresentParms->AutoDepthStencilFormat, &depthBits, &stencilBits)) { - pfd.cDepthBits = depthBits; - pfd.cStencilBits = stencilBits; + if(!getDepthStencilBits(pPresentParms->AutoDepthStencilFormat, &depthBits, &stencilBits)) { + ERR("Unable to get depth / stencil bits for AutoDepthStencilFormat %#x!\n", pPresentParms->AutoDepthStencilFormat); + return FALSE; } + PUSH2(WGL_DEPTH_BITS_ARB, depthBits); + PUSH2(WGL_STENCIL_BITS_ARB, stencilBits); } + PUSH1(0); /* end the list */ iPixelFormat = ChoosePixelFormat(hdc, &pfd); - if(!iPixelFormat) { - /* If this happens something is very wrong as ChoosePixelFormat barely fails */ - ERR("Can't find a suitable iPixelFormat\n"); + + /* In case of failure hope that standard ChooosePixelFormat will find something suitable */ + if(!GL_EXTCALL(wglChoosePixelFormatARB(hdc, (const int*)&attribs, NULL, 1, &iPixelFormat, &nFormats))) + { + /* PixelFormat selection */ + ZeroMemory(&pfd, sizeof(pfd)); + pfd.nSize = sizeof(pfd); + pfd.nVersion = 1; + pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER | PFD_DRAW_TO_WINDOW;/*PFD_GENERIC_ACCELERATED*/ + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.cAlphaBits = alphaBits; + pfd.cColorBits = colorBits; + pfd.cDepthBits = depthBits; + pfd.cStencilBits = stencilBits; + pfd.iLayerType = PFD_MAIN_PLANE; + + iPixelFormat = ChoosePixelFormat(hdc, &pfd); + if(!iPixelFormat) { + /* If this happens something is very wrong as ChoosePixelFormat barely fails */ + ERR("Can't find a suitable iPixelFormat\n"); + } } DescribePixelFormat(hdc, iPixelFormat, sizeof(pfd), &pfd); @@ -265,6 +283,8 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar } } } +#undef PUSH1 +#undef PUSH2 ctx = pwglCreateContext(hdc); if(This->numContexts) pwglShareLists(This->contexts[0]->glCtx, ctx); @@ -568,6 +588,16 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex glColorMask(GL_TRUE, GL_TRUE,GL_TRUE,GL_TRUE); checkGLcall("glColorMask"); Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_CLIPPING)); + if (GL_SUPPORT(EXT_SECONDARY_COLOR)) { + glDisable(GL_COLOR_SUM_EXT); + Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_SPECULARENABLE)); + checkGLcall("glDisable(GL_COLOR_SUM_EXT)"); + } + if (GL_SUPPORT(NV_REGISTER_COMBINERS)) { + GL_EXTCALL(glFinalCombinerInputNV(GL_VARIABLE_B_NV, GL_SPARE0_NV, GL_UNSIGNED_IDENTITY_NV, GL_RGB)); + Context_MarkStateDirty(context, STATE_RENDER(WINED3DRS_SPECULARENABLE)); + checkGLcall("glFinalCombinerInputNV"); + } /* Setup transforms */ glMatrixMode(GL_MODELVIEW); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 0a5091d5b29..da9fbc61417 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -514,6 +514,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, } } + for(i = 0; i < MAX_STREAMS; i++) { + if(object->streamSource[i]) { + IWineD3DVertexBuffer_AddRef(object->streamSource[i]); + } + } + if(object->pIndexData) { + IWineD3DIndexBuffer_AddRef(object->pIndexData); + } + } else if (Type == WINED3DSBT_PIXELSTATE) { TRACE("PIXELSTATE => Pretend all pixel shates have changed\n"); @@ -560,6 +569,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, } } + /* Pixel state blocks do not contain vertex buffers. Set them to NULL to avoid wrong refcounting + * on them. This makes releasing the buffer easier + */ + for(i = 0; i < MAX_STREAMS; i++) { + object->streamSource[i] = NULL; + } + object->pIndexData = NULL; + } else if (Type == WINED3DSBT_VERTEXSTATE) { TRACE("VERTEXSTATE => Pretend all vertex shates have changed\n"); @@ -613,6 +630,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface, light->enabledChanged = TRUE; } } + + for(i = 0; i < MAX_STREAMS; i++) { + if(object->streamSource[i]) { + IWineD3DVertexBuffer_AddRef(object->streamSource[i]); + } + } + object->pIndexData = NULL; } else { FIXME("Unrecognized state block type %d\n", Type); } @@ -1336,6 +1360,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic pPresentationParameters->BackBufferHeight = Rect.bottom; TRACE("Updating height to %d\n", pPresentationParameters->BackBufferHeight); } + if (pPresentationParameters->BackBufferFormat == WINED3DFMT_UNKNOWN) { + pPresentationParameters->BackBufferFormat = object->orig_fmt; + TRACE("Updating format to %s\n", debug_d3dformat(object->orig_fmt)); + } } /* Put the correct figures in the presentation parameters */ @@ -2233,6 +2261,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface, /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); + if(pStreamData) IWineD3DVertexBuffer_AddRef(pStreamData); + if(oldSrc) IWineD3DVertexBuffer_Release(oldSrc); return WINED3D_OK; } @@ -2796,6 +2826,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWine /* Handle recording of state blocks */ if (This->isRecordingState) { TRACE("Recording... not performing anything\n"); + if(pIndexData) IWineD3DIndexBuffer_AddRef(pIndexData); + if(oldIdxs) IWineD3DIndexBuffer_Release(oldIdxs); return WINED3D_OK; } @@ -2825,7 +2857,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWine } /* Method to offer d3d9 a simple way to set the base vertex index without messing with the index buffer */ -static HRESULT WINAPI IWineD3DDeviceImpl_SetBaseVertexIndex(IWineD3DDevice *iface, UINT BaseIndex) { +static HRESULT WINAPI IWineD3DDeviceImpl_SetBaseVertexIndex(IWineD3DDevice *iface, INT BaseIndex) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p)->(%d)\n", This, BaseIndex); @@ -2845,7 +2877,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetBaseVertexIndex(IWineD3DDevice *ifac return WINED3D_OK; } -static HRESULT WINAPI IWineD3DDeviceImpl_GetBaseVertexIndex(IWineD3DDevice *iface, UINT* base_index) { +static HRESULT WINAPI IWineD3DDeviceImpl_GetBaseVertexIndex(IWineD3DDevice *iface, INT* base_index) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; TRACE("(%p) : base_index %p\n", This, base_index); @@ -6929,7 +6961,9 @@ const DWORD SavedVertexStates_R[NUM_SAVEDVERTEXSTATES_R] = { WINED3DRS_RANGEFOGENABLE , WINED3DRS_SPECULARMATERIALSOURCE , WINED3DRS_TWEENFACTOR , - WINED3DRS_VERTEXBLEND + WINED3DRS_VERTEXBLEND , + WINED3DRS_CULLMODE , + WINED3DRS_FOGCOLOR }; const DWORD SavedVertexStates_T[NUM_SAVEDVERTEXSTATES_T] = { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 01e6138c197..29d54eeb66e 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -403,40 +403,6 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { BOOL return_value = TRUE; int i; HDC hdc; - HMODULE mod_gl; - -#ifdef USE_WIN32_OPENGL -#define USE_GL_FUNC(pfn) pfn = (void*)GetProcAddress(mod_gl, #pfn); - mod_gl = LoadLibraryA("opengl32.dll"); - if(!mod_gl) { - ERR("Can't load opengl32.dll!\n"); - return FALSE; - } -#else -#define USE_GL_FUNC(pfn) pfn = (void*)pwglGetProcAddress(#pfn); - /* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 (glXGetProcAddress wrapper) instead of opengl32's */ - mod_gl = GetModuleHandleA("gdi32.dll"); -#endif - -/* Load WGL core functions from opengl32.dll */ -#define USE_WGL_FUNC(pfn) p##pfn = (void*)GetProcAddress(mod_gl, #pfn); - WGL_FUNCS_GEN; -#undef USE_WGL_FUNC - - if(!pwglGetProcAddress) { - ERR("Unable to load wglGetProcAddress!\n"); - return FALSE; - } - -/* Dynamicly load all GL core functions */ - GL_FUNCS_GEN; -#undef USE_GL_FUNC - - /* Make sure that we've got a context */ - /* TODO: CreateFakeGLContext should really take a display as a parameter */ - /* Only save the values obtained when a display is provided */ - if (!WineD3D_CreateFakeGLContext() || wined3d_fake_gl_context_foreign) - return_value = FALSE; TRACE_(d3d_caps)("(%p)\n", gl_info); @@ -850,12 +816,21 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { * shader capabilities, so we use the shader capabilities to distinguish between FX and 6xxx/7xxx. */ if(WINE_D3D9_CAPABLE(gl_info) && (gl_info->vs_nv_version == VS_VERSION_30)) { - if (strstr(gl_info->gl_renderer, "7800") || - strstr(gl_info->gl_renderer, "7900") || - strstr(gl_info->gl_renderer, "7950") || - strstr(gl_info->gl_renderer, "Quadro FX 4") || - strstr(gl_info->gl_renderer, "Quadro FX 5")) - gl_info->gl_card = CARD_NVIDIA_GEFORCE_7800GT; + if (strstr(gl_info->gl_renderer, "8800")) + gl_info->gl_card = CARD_NVIDIA_GEFORCE_8800GTS; + else if(strstr(gl_info->gl_renderer, "8600") || + strstr(gl_info->gl_renderer, "8700")) + gl_info->gl_card = CARD_NVIDIA_GEFORCE_8600GT; + else if(strstr(gl_info->gl_renderer, "8300") || + strstr(gl_info->gl_renderer, "8400") || + strstr(gl_info->gl_renderer, "8500")) + gl_info->gl_card = CARD_NVIDIA_GEFORCE_8300GS; + else if(strstr(gl_info->gl_renderer, "7800") || + strstr(gl_info->gl_renderer, "7900") || + strstr(gl_info->gl_renderer, "7950") || + strstr(gl_info->gl_renderer, "Quadro FX 4") || + strstr(gl_info->gl_renderer, "Quadro FX 5")) + gl_info->gl_card = CARD_NVIDIA_GEFORCE_7800GT; else if(strstr(gl_info->gl_renderer, "6800") || strstr(gl_info->gl_renderer, "7600")) gl_info->gl_card = CARD_NVIDIA_GEFORCE_6800; @@ -1043,8 +1018,6 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { } } - - WineD3D_ReleaseFakeGLContext(); return return_value; } #undef GLINFO_LOCATION @@ -2489,6 +2462,7 @@ ULONG WINAPI D3DCB_DefaultDestroyVolume(IWineD3DVolume *pVolume) { #define PUSH1(att) attribs[nAttribs++] = (att); #define GLINFO_LOCATION (Adapters[0].gl_info) BOOL InitAdapters(void) { + static HMODULE mod_gl; BOOL ret; int ps_selected_mode, vs_selected_mode; @@ -2498,8 +2472,44 @@ BOOL InitAdapters(void) { if(numAdapters > 0) return TRUE; TRACE("Initializing adapters\n"); + + if(!mod_gl) { +#ifdef USE_WIN32_OPENGL +#define USE_GL_FUNC(pfn) pfn = (void*)GetProcAddress(mod_gl, #pfn); + mod_gl = LoadLibraryA("opengl32.dll"); + if(!mod_gl) { + ERR("Can't load opengl32.dll!\n"); + return FALSE; + } +#else +#define USE_GL_FUNC(pfn) pfn = (void*)pwglGetProcAddress(#pfn); + /* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 (glXGetProcAddress wrapper) instead of opengl32's */ + mod_gl = GetModuleHandleA("gdi32.dll"); +#endif + } + +/* Load WGL core functions from opengl32.dll */ +#define USE_WGL_FUNC(pfn) p##pfn = (void*)GetProcAddress(mod_gl, #pfn); + WGL_FUNCS_GEN; +#undef USE_WGL_FUNC + + if(!pwglGetProcAddress) { + ERR("Unable to load wglGetProcAddress!\n"); + return FALSE; + } + +/* Dynamicly load all GL core functions */ + GL_FUNCS_GEN; +#undef USE_GL_FUNC + /* For now only one default adapter */ { + int iPixelFormat; + int attribs[8]; + int values[8]; + int nAttribs = 0; + int res; + WineD3D_PixelFormat *cfgs; int attribute; DISPLAY_DEVICEW DisplayDevice; @@ -2507,16 +2517,25 @@ BOOL InitAdapters(void) { Adapters[0].monitorPoint.x = -1; Adapters[0].monitorPoint.y = -1; + if (!WineD3D_CreateFakeGLContext()) { + ERR("Failed to get a gl context for default adapter\n"); + HeapFree(GetProcessHeap(), 0, Adapters); + WineD3D_ReleaseFakeGLContext(); + return FALSE; + } + ret = IWineD3DImpl_FillGLCaps(&Adapters[0].gl_info); if(!ret) { ERR("Failed to initialize gl caps for default adapter\n"); HeapFree(GetProcessHeap(), 0, Adapters); + WineD3D_ReleaseFakeGLContext(); return FALSE; } ret = initPixelFormats(&Adapters[0].gl_info); if(!ret) { ERR("Failed to init gl formats\n"); HeapFree(GetProcessHeap(), 0, Adapters); + WineD3D_ReleaseFakeGLContext(); return FALSE; } @@ -2529,46 +2548,37 @@ BOOL InitAdapters(void) { TRACE("DeviceName: %s\n", debugstr_w(DisplayDevice.DeviceName)); strcpyW(Adapters[0].DeviceName, DisplayDevice.DeviceName); - if (WineD3D_CreateFakeGLContext()) { - int iPixelFormat; - int attribs[8]; - int values[8]; - int nAttribs = 0; - int res; - WineD3D_PixelFormat *cfgs; - - attribute = WGL_NUMBER_PIXEL_FORMATS_ARB; - GL_EXTCALL(wglGetPixelFormatAttribivARB(wined3d_fake_gl_context_hdc, 0, 0, 1, &attribute, &Adapters[0].nCfgs)); - - Adapters[0].cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Adapters[0].nCfgs *sizeof(WineD3D_PixelFormat)); - cfgs = Adapters[0].cfgs; - PUSH1(WGL_RED_BITS_ARB) - PUSH1(WGL_GREEN_BITS_ARB) - PUSH1(WGL_BLUE_BITS_ARB) - PUSH1(WGL_ALPHA_BITS_ARB) - PUSH1(WGL_DEPTH_BITS_ARB) - PUSH1(WGL_STENCIL_BITS_ARB) - - for(iPixelFormat=1; iPixelFormat<=Adapters[0].nCfgs; iPixelFormat++) { - res = GL_EXTCALL(wglGetPixelFormatAttribivARB(wined3d_fake_gl_context_hdc, iPixelFormat, 0, nAttribs, attribs, values)); - - if(!res) - continue; + attribute = WGL_NUMBER_PIXEL_FORMATS_ARB; + GL_EXTCALL(wglGetPixelFormatAttribivARB(wined3d_fake_gl_context_hdc, 0, 0, 1, &attribute, &Adapters[0].nCfgs)); - /* Cache the pixel format */ - cfgs->iPixelFormat = iPixelFormat; - cfgs->redSize = values[0]; - cfgs->greenSize = values[1]; - cfgs->blueSize = values[2]; - cfgs->alphaSize = values[3]; - cfgs->depthSize = values[4]; - cfgs->stencilSize = values[5]; - - TRACE("iPixelFormat=%d, RGBA=%d/%d/%d/%d, depth=%d, stencil=%d\n", cfgs->iPixelFormat, cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, cfgs->depthSize, cfgs->stencilSize); - cfgs++; - } - WineD3D_ReleaseFakeGLContext(); + Adapters[0].cfgs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Adapters[0].nCfgs *sizeof(WineD3D_PixelFormat)); + cfgs = Adapters[0].cfgs; + PUSH1(WGL_RED_BITS_ARB) + PUSH1(WGL_GREEN_BITS_ARB) + PUSH1(WGL_BLUE_BITS_ARB) + PUSH1(WGL_ALPHA_BITS_ARB) + PUSH1(WGL_DEPTH_BITS_ARB) + PUSH1(WGL_STENCIL_BITS_ARB) + + for(iPixelFormat=1; iPixelFormat<=Adapters[0].nCfgs; iPixelFormat++) { + res = GL_EXTCALL(wglGetPixelFormatAttribivARB(wined3d_fake_gl_context_hdc, iPixelFormat, 0, nAttribs, attribs, values)); + + if(!res) + continue; + + /* Cache the pixel format */ + cfgs->iPixelFormat = iPixelFormat; + cfgs->redSize = values[0]; + cfgs->greenSize = values[1]; + cfgs->blueSize = values[2]; + cfgs->alphaSize = values[3]; + cfgs->depthSize = values[4]; + cfgs->stencilSize = values[5]; + + TRACE("iPixelFormat=%d, RGBA=%d/%d/%d/%d, depth=%d, stencil=%d\n", cfgs->iPixelFormat, cfgs->redSize, cfgs->greenSize, cfgs->blueSize, cfgs->alphaSize, cfgs->depthSize, cfgs->stencilSize); + cfgs++; } + WineD3D_ReleaseFakeGLContext(); select_shader_mode(&Adapters[0].gl_info, WINED3DDEVTYPE_HAL, &ps_selected_mode, &vs_selected_mode); select_shader_max_constants(ps_selected_mode, vs_selected_mode, &Adapters[0].gl_info); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 3a47912aa08..4eb6786e7f4 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -178,6 +178,7 @@ void primitiveDeclarationConvertToStridedData( if (This->stateBlock->streamSource[element->Stream] == NULL) continue; + stride = This->stateBlock->streamStride[element->Stream]; if (This->stateBlock->streamIsUP) { TRACE("Stream is up %d, %p\n", element->Stream, This->stateBlock->streamSource[element->Stream]); streamVBO = 0; @@ -185,6 +186,22 @@ void primitiveDeclarationConvertToStridedData( } else { TRACE("Stream isn't up %d, %p\n", element->Stream, This->stateBlock->streamSource[element->Stream]); data = IWineD3DVertexBufferImpl_GetMemory(This->stateBlock->streamSource[element->Stream], 0, &streamVBO); + + /* Can't use vbo's if the base vertex index is negative. OpenGL doesn't accept negative offsets + * (or rather offsets bigger than the vbo, because the pointer is unsigned), so use system memory + * sources. In most sane cases the pointer - offset will still be > 0, otherwise it will wrap + * around to some big value. Hope that with the indices, the driver wraps it back internally. If + * not, drawStridedSlow is needed, including a vertex buffer path. + */ + if(This->stateBlock->loadBaseVertexIndex < 0) { + WARN("loadBaseVertexIndex is < 0 (%d), not using vbos\n", This->stateBlock->loadBaseVertexIndex); + streamVBO = 0; + data = ((IWineD3DVertexBufferImpl *) This->stateBlock->streamSource[element->Stream])->resource.allocatedMemory; + if(data + This->stateBlock->loadBaseVertexIndex * stride < 0) { + FIXME("System memory vertex data load offset is negative!\n"); + } + } + if(fixup) { if( streamVBO != 0) *fixup = TRUE; else if(*fixup && !useVertexShaderFunction && @@ -195,7 +212,6 @@ void primitiveDeclarationConvertToStridedData( } } } - stride = This->stateBlock->streamStride[element->Stream]; data += element->Offset; reg = element->Reg; @@ -284,7 +300,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData DWORD specularColor = 0; /* Specular Color */ IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; UINT *streamOffset = This->stateBlock->streamOffset; - DWORD SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex; + long SkipnStrides = startVertex + This->stateBlock->loadBaseVertexIndex; BYTE *texCoords[WINED3DDP_MAXTEXCOORD]; BYTE *diffuse = NULL, *specular = NULL, *normal = NULL, *position = NULL; @@ -398,6 +414,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, WineDirect3DVertexStridedData ptrToCoords = (float *)(texCoords[coordIdx] + (SkipnStrides * sd->u.s.texCoords[coordIdx].dwStride)); if (texCoords[coordIdx] == NULL) { TRACE("tex: %d - Skipping tex coords, as no data supplied\n", textureNo); + glTexCoord4f(0, 0, 0, 1); continue; } else { int texture_idx = This->texUnitMap[textureNo]; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 20a7fa56e3f..900e366fc93 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1859,6 +1859,13 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W DWORD texUnit = state - STATE_TRANSFORM(WINED3DTS_TEXTURE0); DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[texUnit]; + /* Ignore this when a vertex shader is used, or if the streams aren't sorted out yet */ + if(stateblock->vertexShader || + isStateDirty(context, STATE_VDECL)) { + TRACE("Using a vertex shader, or stream sources not sorted out yet, skipping\n"); + return; + } + if (mapped_stage < 0) return; if (GL_SUPPORT(ARB_MULTITEXTURE)) { @@ -1875,7 +1882,11 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W set_texture_matrix((float *)&stateblock->transforms[WINED3DTS_TEXTURE0 + texUnit].u.m[0][0], stateblock->textureState[texUnit][WINED3DTSS_TEXTURETRANSFORMFLAGS], - (stateblock->textureState[texUnit][WINED3DTSS_TEXCOORDINDEX] & 0xFFFF0000) != WINED3DTSS_TCI_PASSTHRU); + (stateblock->textureState[texUnit][WINED3DTSS_TEXCOORDINDEX] & 0xFFFF0000) != WINED3DTSS_TCI_PASSTHRU, + context->last_was_rhw, + stateblock->wineD3DDevice->strided_streams.u.s.texCoords[texUnit].dwStride ? + stateblock->wineD3DDevice->strided_streams.u.s.texCoords[texUnit].dwType: + WINED3DDECLTYPE_UNUSED); } @@ -3331,6 +3342,14 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W if(updateFog) { state_fog(STATE_RENDER(WINED3DRS_FOGENABLE), stateblock, context); } + if(!useVertexShaderFunction) { + int i; + for(i = 0; i < MAX_TEXTURES; i++) { + if(!isStateDirty(context, STATE_TRANSFORM(WINED3DTS_TEXTURE0 + i))) { + transform_texture(STATE_TRANSFORM(WINED3DTS_TEXTURE0 + i), stateblock, context); + } + } + } } static void viewport(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 6ab6247d51f..5b50e0fd97e 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -186,8 +186,8 @@ void stateblock_copy( PLIGHTINFOEL *light = LIST_ENTRY(e1, PLIGHTINFOEL, entry), *light2; light2 = HeapAlloc(GetProcessHeap(), 0, sizeof(*light)); memcpy(light2, light, sizeof(*light)); - list_add_tail(&This->lightMap[l], &light2->entry); - if(light2->glIndex != -1) This->activeLights[light2->glIndex] = light2; + list_add_tail(&Dest->lightMap[l], &light2->entry); + if(light2->glIndex != -1) Dest->activeLights[light2->glIndex] = light2; } } @@ -262,16 +262,16 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) { } } } - for (counter = 0; counter < MAX_STREAMS; counter++) { - if(This->streamSource[counter]) { - if(0 != IWineD3DVertexBuffer_Release(This->streamSource[counter])) { - TRACE("Vertex buffer still referenced by stateblock, applications has leaked Stream %u, buffer %p\n", counter, This->streamSource[counter]); - } + } + + for (counter = 0; counter < MAX_STREAMS; counter++) { + if(This->streamSource[counter]) { + if(0 != IWineD3DVertexBuffer_Release(This->streamSource[counter])) { + TRACE("Vertex buffer still referenced by stateblock, applications has leaked Stream %u, buffer %p\n", counter, This->streamSource[counter]); } } - if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData); - } + if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData); for(counter = 0; counter < LIGHTMAP_SIZE; counter++) { struct list *e1, *e2; @@ -488,7 +488,9 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) if (This->changed.indices && ((This->pIndexData != targetStateBlock->pIndexData) || (This->baseVertexIndex != targetStateBlock->baseVertexIndex))) { TRACE("Updating pindexData to %p, baseVertexIndex to %d\n", - targetStateBlock->pIndexData, targetStateBlock->baseVertexIndex); + targetStateBlock->pIndexData, targetStateBlock->baseVertexIndex); + if(targetStateBlock->pIndexData) IWineD3DIndexBuffer_AddRef(targetStateBlock->pIndexData); + if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData); This->pIndexData = targetStateBlock->pIndexData; This->baseVertexIndex = targetStateBlock->baseVertexIndex; } @@ -532,6 +534,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) TRACE("Updating stream source %d to %p, stride to %d\n", i, targetStateBlock->streamSource[i], targetStateBlock->streamStride[i]); This->streamStride[i] = targetStateBlock->streamStride[i]; + if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]); + if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]); This->streamSource[i] = targetStateBlock->streamSource[i]; } @@ -600,10 +604,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) memcpy(This->vertexShaderConstantF, targetStateBlock->vertexShaderConstantF, sizeof(float) * GL_LIMITS(vshader_constantsF) * 4); memcpy(This->streamStride, targetStateBlock->streamStride, sizeof(This->streamStride)); memcpy(This->streamOffset, targetStateBlock->streamOffset, sizeof(This->streamOffset)); - memcpy(This->streamSource, targetStateBlock->streamSource, sizeof(This->streamSource)); memcpy(This->streamFreq, targetStateBlock->streamFreq, sizeof(This->streamFreq)); memcpy(This->streamFlags, targetStateBlock->streamFlags, sizeof(This->streamFlags)); - This->pIndexData = targetStateBlock->pIndexData; This->baseVertexIndex = targetStateBlock->baseVertexIndex; memcpy(This->transforms, targetStateBlock->transforms, sizeof(This->transforms)); record_lights(This, targetStateBlock); @@ -621,6 +623,19 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) memcpy(This->textureState, targetStateBlock->textureState, sizeof(This->textureState)); memcpy(This->samplerState, targetStateBlock->samplerState, sizeof(This->samplerState)); This->scissorRect = targetStateBlock->scissorRect; + + if(targetStateBlock->pIndexData != This->pIndexData) { + if(targetStateBlock->pIndexData) IWineD3DIndexBuffer_AddRef(targetStateBlock->pIndexData); + if(This->pIndexData) IWineD3DIndexBuffer_Release(This->pIndexData); + This->pIndexData = targetStateBlock->pIndexData; + } + for(i = 0; i < MAX_STREAMS; i++) { + if(targetStateBlock->streamSource[i] != This->streamSource[i]) { + if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]); + if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]); + This->streamSource[i] = targetStateBlock->streamSource[i]; + } + } } else if(This->blockType == WINED3DSBT_VERTEXSTATE) { This->vertexShader = targetStateBlock->vertexShader; memcpy(This->vertexShaderConstantB, targetStateBlock->vertexShaderConstantB, sizeof(This->vertexShaderConstantI)); @@ -640,6 +655,13 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface) This->textureState[j][SavedVertexStates_R[i]] = targetStateBlock->textureState[j][SavedVertexStates_R[i]]; } } + for(i = 0; i < MAX_STREAMS; i++) { + if(targetStateBlock->streamSource[i] != This->streamSource[i]) { + if(targetStateBlock->streamSource[i]) IWineD3DVertexBuffer_AddRef(targetStateBlock->streamSource[i]); + if(This->streamSource[i]) IWineD3DVertexBuffer_Release(This->streamSource[i]); + This->streamSource[i] = targetStateBlock->streamSource[i]; + } + } } else if(This->blockType == WINED3DSBT_PIXELSTATE) { This->pixelShader = targetStateBlock->pixelShader; memcpy(This->pixelShaderConstantB, targetStateBlock->pixelShaderConstantB, sizeof(This->pixelShaderConstantI)); diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index abb5eb3256e..941705598de 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2418,14 +2418,14 @@ void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, WINED3DTEXTUREOP #endif /* Setup this textures matrix according to the texture flags*/ -void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords) +void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed, DWORD coordtype) { float mat[16]; glMatrixMode(GL_TEXTURE); checkGLcall("glMatrixMode(GL_TEXTURE)"); - if (flags == WINED3DTTFF_DISABLE) { + if (flags == WINED3DTTFF_DISABLE || flags == WINED3DTTFF_COUNT1 || transformed) { glLoadIdentity(); checkGLcall("glLoadIdentity()"); return; @@ -2438,12 +2438,6 @@ void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords) memcpy(mat, smat, 16 * sizeof(float)); - switch (flags & ~WINED3DTTFF_PROJECTED) { - case WINED3DTTFF_COUNT1: mat[1] = mat[5] = mat[13] = 0; - case WINED3DTTFF_COUNT2: mat[2] = mat[6] = mat[10] = mat[14] = 0; - default: mat[3] = mat[7] = mat[11] = 0, mat[15] = 1; - } - if (flags & WINED3DTTFF_PROJECTED) { switch (flags & ~WINED3DTTFF_PROJECTED) { case WINED3DTTFF_COUNT2: @@ -2456,8 +2450,55 @@ void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords) break; } } else if(!calculatedCoords) { /* under directx the R/Z coord can be used for translation, under opengl we use the Q coord instead */ - mat[12] = mat[8]; - mat[13] = mat[9]; + switch(coordtype) { + case WINED3DDECLTYPE_FLOAT1: + /* Direct3D passes the default 1.0 in the 2nd coord, while gl passes it in the 4th. + * swap 2nd and 4th coord. No need to store the value of mat[12] in mat[4] because + * the input value to the transformation will be 0, so the matrix value is irrelevant + */ + mat[12] = mat[4]; + mat[13] = mat[5]; + mat[14] = mat[6]; + mat[15] = mat[7]; + break; + case WINED3DDECLTYPE_FLOAT2: + /* See above, just 3rd and 4th coord + */ + mat[12] = mat[8]; + mat[13] = mat[9]; + mat[14] = mat[10]; + mat[15] = mat[11]; + break; + case WINED3DDECLTYPE_FLOAT3: /* Opengl defaults match dx defaults */ + case WINED3DDECLTYPE_FLOAT4: /* No defaults apply, all app defined */ + + /* This is to prevent swaping the matrix lines and put the default 4th coord = 1.0 + * into a bad place. The division elimination below will apply to make sure the + * 1.0 doesn't do anything bad. The caller will set this value if the stride is 0 + */ + case WINED3DDECLTYPE_UNUSED: /* No texture coords, 0/0/0/1 defaults are passed */ + break; + default: + FIXME("Unexpected fixed function texture coord input\n"); + } + switch (flags & ~WINED3DTTFF_PROJECTED) { + /* case WINED3DTTFF_COUNT1: Won't ever get here */ + case WINED3DTTFF_COUNT2: mat[2] = mat[6] = mat[10] = mat[14] = 0; + /* OpenGL divides the first 3 vertex coord by the 4th by default, + * which is essentially the same as D3DTTFF_PROJECTED. Make sure that + * the 4th coord evaluates to 1.0 to eliminate that. + * + * If the fixed function pipeline is used, the 4th value remains unused, + * so there is no danger in doing this. With vertex shaders we have a + * problem. Should an app hit that problem, the code here would have to + * check for pixel shaders, and the shader has to undo the default gl divide. + * + * A more serious problem occurs if the app passes 4 coordinates in, and the + * 4th is != 1.0(opengl default). This would have to be fixed in drawStridedSlow + * or a replacement shader + */ + default: mat[3] = mat[7] = mat[11] = 0; mat[15] = 1; + } } glLoadMatrixf(mat); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 032878090e6..e02aabb9f5d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -91,7 +91,7 @@ void hash_table_remove(hash_table_t *table, void *key); #define NUM_SAVEDPIXELSTATES_R 35 #define NUM_SAVEDPIXELSTATES_T 18 #define NUM_SAVEDPIXELSTATES_S 12 -#define NUM_SAVEDVERTEXSTATES_R 31 +#define NUM_SAVEDVERTEXSTATES_R 34 #define NUM_SAVEDVERTEXSTATES_T 2 #define NUM_SAVEDVERTEXSTATES_S 1 @@ -1343,8 +1343,8 @@ struct IWineD3DStateBlockImpl /* Indices */ IWineD3DIndexBuffer* pIndexData; - UINT baseVertexIndex; - UINT loadBaseVertexIndex; /* non-indexed drawing needs 0 here, indexed baseVertexIndex */ + INT baseVertexIndex; + INT loadBaseVertexIndex; /* non-indexed drawing needs 0 here, indexed baseVertexIndex */ /* Transform */ WINED3DMATRIX transforms[HIGHEST_TRANSFORMSTATE + 1]; @@ -1532,7 +1532,7 @@ GLenum StencilOp(DWORD op); GLenum CompareFunc(DWORD func); void set_tex_op(IWineD3DDevice *iface, BOOL isAlpha, int Stage, WINED3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3); void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3, INT texture_idx); -void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords); +void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed, DWORD coordtype); void surface_set_compatible_renderbuffer(IWineD3DSurface *iface, unsigned int width, unsigned int height); GLenum surface_get_gl_buffer(IWineD3DSurface *iface, IWineD3DSwapChain *swapchain); diff --git a/dlls/wineoss.drv/audio.c b/dlls/wineoss.drv/audio.c index 4deee4b3963..f3360cf60e9 100644 --- a/dlls/wineoss.drv/audio.c +++ b/dlls/wineoss.drv/audio.c @@ -774,6 +774,12 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev) /* direct sound caps */ ossdev->ds_caps.dwFlags = DSCAPS_CERTIFIED; + ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARY8BIT; + ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARY16BIT; + ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARYMONO; + ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARYSTEREO; + ossdev->ds_caps.dwFlags |= DSCAPS_CONTINUOUSRATE; + ossdev->ds_caps.dwPrimaryBuffers = 1; ossdev->ds_caps.dwMinSecondarySampleRate = DSBFREQUENCY_MIN; ossdev->ds_caps.dwMaxSecondarySampleRate = DSBFREQUENCY_MAX; @@ -845,14 +851,6 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev) if ((arg & DSP_CAP_MULTI) && (ossdev->out_caps.dwSupport & WAVECAPS_DIRECTSOUND)) { TRACE("hardware secondary buffer support available\n"); - if (ossdev->ds_caps.dwFlags & DSCAPS_PRIMARY8BIT) - ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARY8BIT; - if (ossdev->ds_caps.dwFlags & DSCAPS_PRIMARY16BIT) - ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARY16BIT; - if (ossdev->ds_caps.dwFlags & DSCAPS_PRIMARYMONO) - ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARYMONO; - if (ossdev->ds_caps.dwFlags & DSCAPS_PRIMARYSTEREO) - ossdev->ds_caps.dwFlags |= DSCAPS_SECONDARYSTEREO; ossdev->ds_caps.dwMaxHwMixingAllBuffers = 16; ossdev->ds_caps.dwMaxHwMixingStaticBuffers = 0; diff --git a/dlls/winex11.drv/dce.c b/dlls/winex11.drv/dce.c index 3b803083c8c..72c54299139 100644 --- a/dlls/winex11.drv/dce.c +++ b/dlls/winex11.drv/dce.c @@ -391,7 +391,7 @@ void invalidate_dce( HWND hwnd, const RECT *rect ) /* check if DCE window is within the z-order scope */ - if (hwndScope == dce->hwnd || IsChild( hwndScope, dce->hwnd )) + if (hwndScope == dce->hwnd || hwndScope == GetDesktopWindow() || IsChild( hwndScope, dce->hwnd )) { if (hwnd != dce->hwnd) { diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 8364460c546..d4c4a60166b 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -66,7 +66,7 @@ static const char visual_id_prop[] = "__wine_x11_visual_id"; * * Check if a given window should be managed */ -BOOL is_window_managed( HWND hwnd, const RECT *window_rect ) +BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ) { DWORD style, ex_style; @@ -81,6 +81,9 @@ BOOL is_window_managed( HWND hwnd, const RECT *window_rect ) #define DEFAULTMANAGED 0 #endif if(!DEFAULTMANAGED){ + /* activated windows are managed */ + if (!(swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW))) return TRUE; + if (hwnd == GetActiveWindow()) return TRUE; /* windows with caption are managed */ if ((style & WS_CAPTION) == WS_CAPTION) return TRUE; /* tool windows are not managed */ @@ -357,7 +360,7 @@ static void systray_dock_window( Display *display, struct x11drv_win_data *data * http://standards.freedesktop.org/xembed-spec/latest/ar01s04.html */ SetWindowPos( data->hwnd, NULL, virtual_screen_rect.right + 1, virtual_screen_rect.bottom + 1, - 0, 0, SWP_NOZORDER | SWP_NOSIZE ); + 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE ); /* set XEMBED protocol data on the window */ info[0] = 0; /* protocol version */ diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 5499ef0cead..085396c8022 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -252,9 +252,7 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, root_window == DefaultRootWindow( display ) && data->whole_window != root_window) { - if (!(swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) || - is_window_managed( hwnd, rectWindow ) || - hwnd == GetActiveWindow()) + if (is_window_managed( hwnd, swp_flags, rectWindow )) { TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); make_managed = TRUE; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 8594e20696b..15834119ada 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -684,7 +684,7 @@ typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void extern void X11DRV_expect_error( Display *display, x11drv_error_callback callback, void *arg ); extern int X11DRV_check_error(void); -extern BOOL is_window_managed( HWND hwnd, const RECT *window_rect ); +extern BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect ); extern void X11DRV_set_iconic_state( HWND hwnd ); extern void X11DRV_window_to_X_rect( struct x11drv_win_data *data, RECT *rect ); extern void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect ); diff --git a/dlls/winhttp/main.c b/dlls/winhttp/main.c index e90352d7843..33864630ee3 100644 --- a/dlls/winhttp/main.c +++ b/dlls/winhttp/main.c @@ -82,3 +82,10 @@ HRESULT WINAPI DllUnregisterServer(void) FIXME("()\n"); return S_OK; } + +BOOL WINAPI WinHttpCheckPlatform(void) +{ + FIXME("stub\n"); + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; +} diff --git a/dlls/winhttp/winhttp.spec b/dlls/winhttp/winhttp.spec index 73eae073d15..ac3f7dcad9a 100644 --- a/dlls/winhttp/winhttp.spec +++ b/dlls/winhttp/winhttp.spec @@ -3,7 +3,7 @@ @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() @ stub WinHttpAddRequestHeaders -@ stub WinHttpCheckPlatform +@ stdcall WinHttpCheckPlatform() @ stub WinHttpCloseHandle @ stub WinHttpConnect @ stub WinHttpCrackUrl diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index fee2210b90f..ce5323b9df8 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -4942,96 +4942,35 @@ BOOL WINAPI GetPrinterDriverDirectoryA(LPSTR pName, LPSTR pEnvironment, /***************************************************************************** * AddPrinterDriverA [WINSPOOL.@] + * + * See AddPrinterDriverW. + * */ BOOL WINAPI AddPrinterDriverA(LPSTR pName, DWORD level, LPBYTE pDriverInfo) { - DRIVER_INFO_3A di3; - HKEY hkeyDrivers, hkeyName; - static CHAR empty[] = "", - nullnull[] = "\0"; - - TRACE("(%s,%d,%p)\n",debugstr_a(pName),level,pDriverInfo); - - if(level != 2 && level != 3) { - SetLastError(ERROR_INVALID_LEVEL); - return FALSE; - } - if ((pName) && (pName[0])) { - FIXME("pName= %s - unsupported\n", debugstr_a(pName)); - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - if(!pDriverInfo) { - WARN("pDriverInfo == NULL\n"); - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - if(level == 3) - di3 = *(DRIVER_INFO_3A *)pDriverInfo; - else { - memset(&di3, 0, sizeof(di3)); - memcpy(&di3, pDriverInfo, sizeof(DRIVER_INFO_2A)); - } - - if(!di3.pName || !di3.pDriverPath || !di3.pConfigFile || - !di3.pDataFile) { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - if(!di3.pDefaultDataType) di3.pDefaultDataType = empty; - if(!di3.pDependentFiles) di3.pDependentFiles = nullnull; - if(!di3.pHelpFile) di3.pHelpFile = empty; - if(!di3.pMonitorName) di3.pMonitorName = empty; - - hkeyDrivers = WINSPOOL_OpenDriverReg(di3.pEnvironment, FALSE); - - if(!hkeyDrivers) { - ERR("Can't create Drivers key\n"); - return FALSE; - } - - if(level == 2) { /* apparently can't overwrite with level2 */ - if(RegOpenKeyA(hkeyDrivers, di3.pName, &hkeyName) == ERROR_SUCCESS) { - RegCloseKey(hkeyName); - RegCloseKey(hkeyDrivers); - WARN("Trying to create existing printer driver %s\n", debugstr_a(di3.pName)); - SetLastError(ERROR_PRINTER_DRIVER_ALREADY_INSTALLED); - return FALSE; - } - } - if(RegCreateKeyA(hkeyDrivers, di3.pName, &hkeyName) != ERROR_SUCCESS) { - RegCloseKey(hkeyDrivers); - ERR("Can't create Name key\n"); - return FALSE; - } - RegSetValueExA(hkeyName, "Configuration File", 0, REG_SZ, (LPBYTE) di3.pConfigFile, - lstrlenA(di3.pConfigFile) + 1); - RegSetValueExA(hkeyName, "Data File", 0, REG_SZ, (LPBYTE) di3.pDataFile, lstrlenA(di3.pDataFile) + 1); - RegSetValueExA(hkeyName, "Driver", 0, REG_SZ, (LPBYTE) di3.pDriverPath, lstrlenA(di3.pDriverPath) + 1); - RegSetValueExA(hkeyName, "Version", 0, REG_DWORD, (LPBYTE) &di3.cVersion, - sizeof(DWORD)); - RegSetValueExA(hkeyName, "Datatype", 0, REG_SZ, (LPBYTE) di3.pDefaultDataType, lstrlenA(di3.pDefaultDataType)); - RegSetValueExA(hkeyName, "Dependent Files", 0, REG_MULTI_SZ, - (LPBYTE) di3.pDependentFiles, multi_sz_lenA(di3.pDependentFiles)); - RegSetValueExA(hkeyName, "Help File", 0, REG_SZ, (LPBYTE) di3.pHelpFile, lstrlenA(di3.pHelpFile) + 1); - RegSetValueExA(hkeyName, "Monitor", 0, REG_SZ, (LPBYTE) di3.pMonitorName, lstrlenA(di3.pMonitorName) + 1); - RegCloseKey(hkeyName); - RegCloseKey(hkeyDrivers); - - return TRUE; + TRACE("(%s, %d, %p)\n", debugstr_a(pName), level, pDriverInfo); + return AddPrinterDriverExA(pName, level, pDriverInfo, APD_COPY_NEW_FILES); } -/***************************************************************************** - * AddPrinterDriverW [WINSPOOL.@] +/****************************************************************************** + * AddPrinterDriverW (WINSPOOL.@) + * + * Install a Printer Driver + * + * PARAMS + * pName [I] Servername or NULL (local Computer) + * level [I] Level for the supplied DRIVER_INFO_*W struct + * pDriverInfo [I] PTR to DRIVER_INFO_*W struct with the Driver Parameter + * + * RESULTS + * Success: TRUE + * Failure: FALSE + * */ -BOOL WINAPI AddPrinterDriverW(LPWSTR printerName,DWORD level, - LPBYTE pDriverInfo) +BOOL WINAPI AddPrinterDriverW(LPWSTR pName, DWORD level, LPBYTE pDriverInfo) { - FIXME("(%s,%d,%p): stub\n",debugstr_w(printerName), - level,pDriverInfo); - return FALSE; + TRACE("(%s, %d, %p)\n", debugstr_w(pName), level, pDriverInfo); + return AddPrinterDriverExW(pName, level, pDriverInfo, APD_COPY_NEW_FILES); } /***************************************************************************** diff --git a/dlls/wintrust/Makefile.in b/dlls/wintrust/Makefile.in index 4e84922500e..85bbd77b4bb 100644 --- a/dlls/wintrust/Makefile.in +++ b/dlls/wintrust/Makefile.in @@ -11,6 +11,7 @@ C_SRCS = \ asn.c \ crypt.c \ register.c \ + softpub.c \ wintrust_main.c RC_SRCS = \ diff --git a/dlls/wintrust/register.c b/dlls/wintrust/register.c index d16b1862fa7..517359f8c78 100644 --- a/dlls/wintrust/register.c +++ b/dlls/wintrust/register.c @@ -812,6 +812,16 @@ error_close_key: return Func; } +static void * WINAPI WINTRUST_Alloc(DWORD cb) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cb); +} + +static void WINAPI WINTRUST_Free(void *p) +{ + HeapFree(GetProcessHeap(), 0, p); +} + /*********************************************************************** * WintrustLoadFunctionPointers (WINTRUST.@) */ @@ -834,8 +844,8 @@ BOOL WINAPI WintrustLoadFunctionPointers( GUID* pgActionID, WINTRUST_Guid2Wstr( pgActionID, GuidString); /* Get the function pointers from the registry, where applicable */ - pPfns->pfnAlloc = NULL; - pPfns->pfnFree = NULL; + pPfns->pfnAlloc = WINTRUST_Alloc; + pPfns->pfnFree = WINTRUST_Free; pPfns->pfnAddStore2Chain = NULL; pPfns->pfnAddSgnr2Chain = NULL; pPfns->pfnAddCert2Chain = NULL; diff --git a/dlls/wintrust/softpub.c b/dlls/wintrust/softpub.c new file mode 100644 index 00000000000..c5eb503a9d9 --- /dev/null +++ b/dlls/wintrust/softpub.c @@ -0,0 +1,37 @@ +/* + * Copyright 2007 Juan Lang + * + * 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 "windef.h" +#include "winbase.h" +#include "wintrust.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(wintrust); + +HRESULT WINAPI SoftpubInitialize(CRYPT_PROVIDER_DATA *data) +{ + HRESULT ret = S_FALSE; + + TRACE("(%p)\n", data); + + if (data->padwTrustStepErrors && + !data->padwTrustStepErrors[TRUSTERROR_STEP_FINAL_WVTINIT]) + ret = S_OK; + TRACE("returning %08x\n", ret); + return ret; +} diff --git a/dlls/wintrust/tests/Makefile.in b/dlls/wintrust/tests/Makefile.in index 59a7716dcfc..45b15a0781f 100644 --- a/dlls/wintrust/tests/Makefile.in +++ b/dlls/wintrust/tests/Makefile.in @@ -3,12 +3,13 @@ TOPOBJDIR = ../../.. SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = wintrust.dll -IMPORTS = crypt32 user32 advapi32 kernel32 +IMPORTS = wintrust crypt32 user32 advapi32 kernel32 CTESTS = \ asn.c \ crypt.c \ - register.c + register.c \ + softpub.c @MAKE_TEST_RULES@ diff --git a/dlls/wintrust/tests/register.c b/dlls/wintrust/tests/register.c index 6e6ed2044fc..f4aef92478e 100644 --- a/dlls/wintrust/tests/register.c +++ b/dlls/wintrust/tests/register.c @@ -284,6 +284,8 @@ static void test_LoadFunctionPointers(void) funcs.cbStruct = sizeof(funcs); ret = pWintrustLoadFunctionPointers(&action, &funcs); ok(ret, "WintrustLoadFunctionPointers failed: %d\n", GetLastError()); + ok(funcs.pfnAlloc != NULL, "Expected a pointer\n"); + ok(funcs.pfnFree != NULL, "Expected a pointer\n"); } static void test_RegPolicyFlags(void) diff --git a/dlls/wintrust/tests/softpub.c b/dlls/wintrust/tests/softpub.c new file mode 100644 index 00000000000..3186379f6e8 --- /dev/null +++ b/dlls/wintrust/tests/softpub.c @@ -0,0 +1,132 @@ +/* + * wintrust softpub functions tests + * + * Copyright 2007 Juan Lang + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +#include "wine/test.h" + +/* Just in case we're being built with borked headers, redefine function + * pointers to have the correct calling convention. + */ +typedef void *(WINAPI *SAFE_MEM_ALLOC)(DWORD); +typedef void (WINAPI *SAFE_MEM_FREE)(void *); +typedef BOOL (WINAPI *SAFE_ADD_STORE)(CRYPT_PROVIDER_DATA *, + HCERTSTORE); +typedef BOOL (WINAPI *SAFE_ADD_SGNR)(CRYPT_PROVIDER_DATA *, + BOOL, DWORD, struct _CRYPT_PROVIDER_SGNR *); +typedef BOOL (WINAPI *SAFE_ADD_CERT)(CRYPT_PROVIDER_DATA *, + DWORD, BOOL, DWORD, PCCERT_CONTEXT); +typedef BOOL (WINAPI *SAFE_ADD_PRIVDATA)(CRYPT_PROVIDER_DATA *, + CRYPT_PROVIDER_PRIVDATA *); +typedef HRESULT (WINAPI *SAFE_PROVIDER_INIT_CALL)(CRYPT_PROVIDER_DATA *); +typedef HRESULT (WINAPI *SAFE_PROVIDER_OBJTRUST_CALL)(CRYPT_PROVIDER_DATA *); +typedef HRESULT (WINAPI *SAFE_PROVIDER_SIGTRUST_CALL)(CRYPT_PROVIDER_DATA *); +typedef HRESULT (WINAPI *SAFE_PROVIDER_CERTTRUST_CALL)(CRYPT_PROVIDER_DATA *); +typedef HRESULT (WINAPI *SAFE_PROVIDER_FINALPOLICY_CALL)(CRYPT_PROVIDER_DATA *); +typedef HRESULT (WINAPI *SAFE_PROVIDER_TESTFINALPOLICY_CALL)( + CRYPT_PROVIDER_DATA *); +typedef HRESULT (WINAPI *SAFE_PROVIDER_CLEANUP_CALL)(CRYPT_PROVIDER_DATA *); +typedef BOOL (WINAPI *SAFE_PROVIDER_CERTCHKPOLICY_CALL)( + CRYPT_PROVIDER_DATA *, DWORD, BOOL, DWORD); + +typedef struct _SAFE_PROVIDER_FUNCTIONS +{ + DWORD cbStruct; + SAFE_MEM_ALLOC pfnAlloc; + SAFE_MEM_FREE pfnFree; + SAFE_ADD_STORE pfnAddStore2Chain; + SAFE_ADD_SGNR pfnAddSgnr2Chain; + SAFE_ADD_CERT pfnAddCert2Chain; + SAFE_ADD_PRIVDATA pfnAddPrivData2Chain; + SAFE_PROVIDER_INIT_CALL pfnInitialize; + SAFE_PROVIDER_OBJTRUST_CALL pfnObjectTrust; + SAFE_PROVIDER_SIGTRUST_CALL pfnSignatureTrust; + SAFE_PROVIDER_CERTTRUST_CALL pfnCertificateTrust; + SAFE_PROVIDER_FINALPOLICY_CALL pfnFinalPolicy; + SAFE_PROVIDER_CERTCHKPOLICY_CALL pfnCertCheckPolicy; + SAFE_PROVIDER_TESTFINALPOLICY_CALL pfnTestFinalPolicy; + struct _CRYPT_PROVUI_FUNCS *psUIpfns; + SAFE_PROVIDER_CLEANUP_CALL pfnCleanupPolicy; +} SAFE_PROVIDER_FUNCTIONS; + +static void testInitialize(SAFE_PROVIDER_FUNCTIONS *funcs, GUID *actionID) +{ + HRESULT ret; + CRYPT_PROVIDER_DATA data = { 0 }; + WINTRUST_DATA wintrust_data = { 0 }; + + if (!funcs->pfnInitialize) + { + skip("missing pfnInitialize\n"); + return; + } + + /* Crashes + ret = funcs->pfnInitialize(NULL); + */ + memset(&data, 0, sizeof(data)); + ret = funcs->pfnInitialize(&data); + ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret); + data.padwTrustStepErrors = + funcs->pfnAlloc(TRUSTERROR_MAX_STEPS * sizeof(DWORD)); + /* Without wintrust data set, crashes when padwTrustStepErrors is set */ + data.pWintrustData = &wintrust_data; + if (data.padwTrustStepErrors) + { + /* Apparently, cdwTrustStepErrors does not need to be set. */ + ret = funcs->pfnInitialize(&data); + ok(ret == S_OK, "Expected S_OK, got %08x\n", ret); + data.cdwTrustStepErrors = 1; + ret = funcs->pfnInitialize(&data); + ok(ret == S_OK, "Expected S_OK, got %08x\n", ret); + memset(data.padwTrustStepErrors, 0xba, + TRUSTERROR_MAX_STEPS * sizeof(DWORD)); + ret = funcs->pfnInitialize(&data); + ok(ret == S_FALSE, "Expected S_FALSE, got %08x\n", ret); + data.padwTrustStepErrors[TRUSTERROR_STEP_FINAL_WVTINIT] = 0; + ret = funcs->pfnInitialize(&data); + ok(ret == S_OK, "Expected S_OK, got %08x\n", ret); + funcs->pfnFree(data.padwTrustStepErrors); + } +} + +START_TEST(softpub) +{ + static GUID generic_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2; + SAFE_PROVIDER_FUNCTIONS funcs = { sizeof(SAFE_PROVIDER_FUNCTIONS), 0 }; + BOOL ret; + + ret = WintrustLoadFunctionPointers(&generic_verify_v2, + (CRYPT_PROVIDER_FUNCTIONS *)&funcs); + if (!ret) + skip("WintrustLoadFunctionPointers failed\n"); + else + { + testInitialize(&funcs, &generic_verify_v2); + } +} diff --git a/dlls/wintrust/wintrust.spec b/dlls/wintrust/wintrust.spec index b822cbe363f..71f104cca1f 100644 --- a/dlls/wintrust/wintrust.spec +++ b/dlls/wintrust/wintrust.spec @@ -64,7 +64,7 @@ @ stdcall SoftpubDllUnregisterServer() @ stub SoftpubDumpStructure @ stub SoftpubFreeDefUsageCallData -@ stub SoftpubInitialize +@ stdcall SoftpubInitialize(ptr) @ stub SoftpubLoadDefUsageCallData @ stub SoftpubLoadMessage @ stub SoftpubLoadSignature diff --git a/include/config.h.in b/include/config.h.in index 0c4935c64af..df65adb55c3 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -849,6 +849,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H +/* Define to 1 if you have the `thr_kill2' function. */ +#undef HAVE_THR_KILL2 + /* Define to 1 if you have the `timegm' function. */ #undef HAVE_TIMEGM diff --git a/include/hlink.idl b/include/hlink.idl index 96429568368..3e3389175ea 100644 --- a/include/hlink.idl +++ b/include/hlink.idl @@ -36,6 +36,8 @@ cpp_quote("HRESULT WINAPI HlinkOnNavigate(IHlinkFrame*, IHlinkBrowseContext*, DW cpp_quote("HRESULT WINAPI HlinkIsShortcut(LPCWSTR);") cpp_quote("HRESULT WINAPI HlinkTranslateURL(LPCWSTR,DWORD,LPWSTR*);") +cpp_quote("#define SID_SHlinkFrame IID_IHlinkFrame") + /***************************************************************************** * IHlink interface */ diff --git a/include/mshtml.idl b/include/mshtml.idl index 18b92bc1952..c6420d67e96 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -25,6 +25,12 @@ import "ocidl.idl"; cpp_quote("#include ") +cpp_quote("DEFINE_GUID(SID_SEditCommandTarget, 0x3050f4b5,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);") +cpp_quote("DEFINE_GUID(SID_SHTMLEditHost, 0x3050f6a0,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);") +cpp_quote("DEFINE_GUID(SID_SHTMLEditServices, 0x3050f7f9,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);") +cpp_quote("#define SID_SHTMLWindow IID_IHTMLWindow2") +cpp_quote("#define SID_SElementBehaviorFactory IID_IElementBehaviorFactory") + interface IHTMLDocument2; interface IHTMLStyleSheetsCollection; diff --git a/include/ocidl.idl b/include/ocidl.idl index 6c332409cff..c40d155828f 100644 --- a/include/ocidl.idl +++ b/include/ocidl.idl @@ -1244,6 +1244,7 @@ interface IEnumOleUndoUnits : IUnknown ] interface IOleUndoManager : IUnknown { +cpp_quote("#define SID_SOleUndoManager IID_IOleUndoManager") typedef IOleUndoManager *LPOLEUNDOMANAGER; HRESULT Open( [in] IOleParentUndoUnit *pPUU ); diff --git a/include/shlguid.h b/include/shlguid.h index ed677c083b1..be80199e466 100644 --- a/include/shlguid.h +++ b/include/shlguid.h @@ -79,9 +79,16 @@ DEFINE_GUID(CLSID_CUrlHistory, 0x3c374a40, 0xbae4, 0x11cf, 0xbf, 0x7d, 0x00, 0xa DEFINE_GUID(CLSID_CURLSearchHook, 0xcfbfae00, 0x17a6, 0x11d0, 0x99, 0xcb, 0x00, 0xc0, 0x4f, 0xd6, 0x44, 0x97); -DEFINE_GUID(SID_STopLevelBrowser, 0x4C96BE40L, 0x915C, 0x11CF, 0x99, 0xD3, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37); +DEFINE_GUID(SID_STopLevelBrowser, 0x4C96BE40, 0x915C, 0x11CF, 0x99, 0xD3, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37); +DEFINE_GUID(SID_STopWindow, 0x49e1b500, 0x4636, 0x11d3, 0x97, 0xf7, 0x00, 0xc0, 0x4f, 0x45, 0xd0, 0xb3); +DEFINE_GUID(SID_SCommDlgBrowser, 0x80f30233, 0xb7df, 0x11d2, 0xa3, 0x3b, 0x00, 0x60, 0x97, 0xdf, 0x5b, 0xd4); +#define SID_LinkSite IID_IShellLinkW #define SID_SShellBrowser IID_IShellBrowser +#define SID_SShellDesktop CLSID_ShellDesktop +#define SID_SInternetExplorer IID_IWebBrowserApp +#define SID_SWebBrowserApp IID_IWebBrowserApp +#define SID_SWebBrowserEventsService IID_IWebBrowserEventsService #define IID_IFileViewer WINELIB_NAME_AW(IID_IFileViewer) #define IID_IShellLink WINELIB_NAME_AW(IID_IShellLink) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 0fab1e36d84..52035716735 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -1359,14 +1359,15 @@ struct set_console_mode_reply struct set_console_input_info_request { struct request_header __header; - obj_handle_t handle; - int mask; - obj_handle_t active_sb; - int history_mode; - int history_size; - int edition_mode; - int input_cp; - int output_cp; + obj_handle_t handle; + int mask; + obj_handle_t active_sb; + int history_mode; + int history_size; + int edition_mode; + int input_cp; + int output_cp; + user_handle_t win; /* VARARG(title,unicode_str); */ }; struct set_console_input_info_reply @@ -1380,23 +1381,25 @@ struct set_console_input_info_reply #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40 +#define SET_CONSOLE_INPUT_INFO_WIN 0x80 struct get_console_input_info_request { struct request_header __header; - obj_handle_t handle; + obj_handle_t handle; }; struct get_console_input_info_reply { struct reply_header __header; - int history_mode; - int history_size; - int history_index; - int edition_mode; - int input_cp; - int output_cp; + int history_mode; + int history_size; + int history_index; + int edition_mode; + int input_cp; + int output_cp; + user_handle_t win; /* VARARG(title,unicode_str); */ }; @@ -3154,6 +3157,7 @@ struct get_update_region_reply #define UPDATE_ALLCHILDREN 0x10 #define UPDATE_NOCHILDREN 0x20 #define UPDATE_NOREGION 0x40 +#define UPDATE_DELAYED_ERASE 0x80 @@ -4826,6 +4830,6 @@ union generic_reply struct make_process_system_reply make_process_system_reply; }; -#define SERVER_PROTOCOL_VERSION 307 +#define SERVER_PROTOCOL_VERSION 310 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h index 7348b835ba1..e98049cba5f 100644 --- a/include/wine/wined3d_gl.h +++ b/include/wine/wined3d_gl.h @@ -3067,6 +3067,9 @@ typedef enum _GL_Cards { CARD_NVIDIA_GEFORCE_6600GT = 0x0140, CARD_NVIDIA_GEFORCE_6800 = 0x0041, CARD_NVIDIA_GEFORCE_7800GT = 0x0092, + CARD_NVIDIA_GEFORCE_8300GS = 0x0423, + CARD_NVIDIA_GEFORCE_8600GT = 0x0402, + CARD_NVIDIA_GEFORCE_8800GTS = 0x0193, CARD_INTEL_845G = 0x2562, CARD_INTEL_I830G = 0x3577, diff --git a/include/wine/wined3d_interface.h b/include/wine/wined3d_interface.h index 35430b97ef6..603eeb5f3d5 100644 --- a/include/wine/wined3d_interface.h +++ b/include/wine/wined3d_interface.h @@ -405,8 +405,8 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase) STDMETHOD_(void, GetGammaRamp)(THIS_ UINT iSwapChain, WINED3DGAMMARAMP* pRamp) PURE; STDMETHOD(SetIndices)(THIS_ struct IWineD3DIndexBuffer * pIndexData) PURE; STDMETHOD(GetIndices)(THIS_ struct IWineD3DIndexBuffer ** ppIndexData) PURE; - STDMETHOD(SetBaseVertexIndex)(THIS_ UINT baseIndex); - STDMETHOD(GetBaseVertexIndex)(THIS_ UINT *baseIndex); + STDMETHOD(SetBaseVertexIndex)(THIS_ INT baseIndex); + STDMETHOD(GetBaseVertexIndex)(THIS_ INT *baseIndex); STDMETHOD(SetLight)(THIS_ DWORD Index,CONST WINED3DLIGHT * pLight) PURE; STDMETHOD(GetLight)(THIS_ DWORD Index,WINED3DLIGHT * pLight) PURE; STDMETHOD(SetLightEnable)(THIS_ DWORD Index,BOOL Enable) PURE; diff --git a/include/wintrust.h b/include/wintrust.h index 7b0f3885cba..0fb9838d054 100644 --- a/include/wintrust.h +++ b/include/wintrust.h @@ -221,32 +221,61 @@ typedef struct _CRYPT_PROVIDER_PRIVDATA { struct _CRYPT_PROVIDER_DATA; -typedef void * (*PFN_CPD_MEM_ALLOC)(DWORD cbSize); -typedef void (*PFN_CPD_MEM_FREE)(void *pvMem2Free); -typedef BOOL (*PFN_CPD_ADD_STORE)(struct _CRYPT_PROVIDER_DATA *pProvData, +#define TRUSTERROR_STEP_WVTPARAMS 0 +#define TRUSTERROR_STEP_FILEIO 2 +#define TRUSTERROR_STEP_SIP 3 +#define TRUSTERROR_STEP_SIPSUBJINFO 5 +#define TRUSTERROR_STEP_CATALOGFILE 6 +#define TRUSTERROR_STEP_CERTSTORE 7 +#define TRUSTERROR_STEP_MESSAGE 8 +#define TRUSTERROR_STEP_MSG_SIGNERCOUNT 9 +#define TRUSTERROR_STEP_MSG_INNERCNTTYPE 10 +#define TRUSTERROR_STEP_MSG_INNERCNT 11 +#define TRUSTERROR_STEP_MSG_STORE 12 +#define TRUSTERROR_STEP_MSG_SIGNERINFO 13 +#define TRUSTERROR_STEP_MSG_SIGNERCERT 14 +#define TRUSTERROR_STEP_MSG_CERTCHAIN 15 +#define TRUSTERROR_STEP_MSG_COUNTERSIGINFO 16 +#define TRUSTERROR_STEP_MSG_COUNTERSIGCERT 17 +#define TRUSTERROR_STEP_VERIFY_MSGHASH 18 +#define TRUSTERROR_STEP_VERIFY_MSGINDIRECTDATA 19 +#define TRUSTERROR_STEP_FINAL_WVTINIT 30 +#define TRUSTERROR_STEP_FINAL_INITPROV 31 +#define TRUSTERROR_STEP_FINAL_OBJPROV 32 +#define TRUSTERROR_STEP_FINAL_SIGPROV 33 +#define TRUSTERROR_STEP_FINAL_CERTPROV 34 +#define TRUSTERROR_STEP_FINAL_CERTCHKPROV 35 +#define TRUSTERROR_STEP_FINAL_POLICYPROV 36 +#define TRUSTERROR_STEP_FINAL_UIPROV 37 + +#define TRUSTERROR_MAX_STEPS 38 + +typedef void * (WINAPI *PFN_CPD_MEM_ALLOC)(DWORD cbSize); +typedef void (WINAPI *PFN_CPD_MEM_FREE)(void *pvMem2Free); +typedef BOOL (WINAPI *PFN_CPD_ADD_STORE)(struct _CRYPT_PROVIDER_DATA *pProvData, HCERTSTORE hStore2Add); -typedef BOOL (*PFN_CPD_ADD_SGNR)(struct _CRYPT_PROVIDER_DATA *pProvData, +typedef BOOL (WINAPI *PFN_CPD_ADD_SGNR)(struct _CRYPT_PROVIDER_DATA *pProvData, BOOL fCounterSigner, DWORD idxSigner, struct _CRYPT_PROVIDER_SGNR *pSgnr2Add); -typedef BOOL (*PFN_CPD_ADD_CERT)(struct _CRYPT_PROVIDER_DATA *pProvData, +typedef BOOL (WINAPI *PFN_CPD_ADD_CERT)(struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSigner, DWORD idxCounterSigner, PCCERT_CONTEXT pCert2Add); -typedef BOOL (*PFN_CPD_ADD_PRIVDATA)(struct _CRYPT_PROVIDER_DATA *pProvData, +typedef BOOL (WINAPI *PFN_CPD_ADD_PRIVDATA)(struct _CRYPT_PROVIDER_DATA *pProvData, struct _CRYPT_PROVIDER_PRIVDATA *pPrivData2Add); -typedef HRESULT (*PFN_PROVIDER_INIT_CALL)( +typedef HRESULT (WINAPI *PFN_PROVIDER_INIT_CALL)( struct _CRYPT_PROVIDER_DATA *pProvData); -typedef HRESULT (*PFN_PROVIDER_OBJTRUST_CALL)( +typedef HRESULT (WINAPI *PFN_PROVIDER_OBJTRUST_CALL)( struct _CRYPT_PROVIDER_DATA *pProvData); -typedef HRESULT (*PFN_PROVIDER_SIGTRUST_CALL)( +typedef HRESULT (WINAPI *PFN_PROVIDER_SIGTRUST_CALL)( struct _CRYPT_PROVIDER_DATA *pProvData); -typedef HRESULT (*PFN_PROVIDER_CERTTRUST_CALL)( +typedef HRESULT (WINAPI *PFN_PROVIDER_CERTTRUST_CALL)( struct _CRYPT_PROVIDER_DATA *pProvData); -typedef HRESULT (*PFN_PROVIDER_FINALPOLICY_CALL)( +typedef HRESULT (WINAPI *PFN_PROVIDER_FINALPOLICY_CALL)( struct _CRYPT_PROVIDER_DATA *pProvData); -typedef HRESULT (*PFN_PROVIDER_TESTFINALPOLICY_CALL)( +typedef HRESULT (WINAPI *PFN_PROVIDER_TESTFINALPOLICY_CALL)( struct _CRYPT_PROVIDER_DATA *pProvData); -typedef HRESULT (*PFN_PROVIDER_CLEANUP_CALL)( +typedef HRESULT (WINAPI *PFN_PROVIDER_CLEANUP_CALL)( struct _CRYPT_PROVIDER_DATA *pProvData); -typedef BOOL (*PFN_PROVIDER_CERTCHKPOLICY_CALL)( +typedef BOOL (WINAPI *PFN_PROVIDER_CERTCHKPOLICY_CALL)( struct _CRYPT_PROVIDER_DATA *pProvData, DWORD idxSigner, BOOL fCounterSignerChain, DWORD idxCounterSigner); diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c index ceb8db423f8..e05a962b5e6 100644 --- a/libs/wine/ldt.c +++ b/libs/wine/ldt.c @@ -112,9 +112,7 @@ static inline int set_thread_area( struct modify_ldt_s *ptr ) #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) #include - -extern int i386_get_ldt(int, union descriptor *, int); -extern int i386_set_ldt(int, union descriptor *, int); +#include #endif /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */ #ifdef __APPLE__ @@ -417,6 +415,8 @@ unsigned short wine_ldt_alloc_fs(void) if (errno != ENOSYS) perror( "set_thread_area" ); } else global_fs_sel = (ldt_info.entry_number << 3) | 3; +#elif defined(__FreeBSD__) + global_fs_sel = GSEL( GUFS_SEL, SEL_UPL ); #endif } if (global_fs_sel > 0) return global_fs_sel; @@ -443,6 +443,8 @@ void wine_ldt_init_fs( unsigned short sel, const LDT_ENTRY *entry ) ldt_info.entry_number = sel >> 3; fill_modify_ldt_struct( &ldt_info, entry ); if ((ret = set_thread_area( &ldt_info ) < 0)) perror( "set_thread_area" ); +#elif defined(__FreeBSD__) + i386_set_fsbase( wine_ldt_get_base( entry )); #endif } else /* LDT selector */ diff --git a/loader/Makefile.in b/loader/Makefile.in index f94e08f9c92..ef60a56e10f 100644 --- a/loader/Makefile.in +++ b/loader/Makefile.in @@ -5,6 +5,7 @@ VPATH = @srcdir@ MODULE = wine C_SRCS = \ + freebsd.c \ glibc.c \ kthread.c \ main.c \ @@ -20,6 +21,8 @@ WINE_BINARIES = $(MAIN_BINARY) $(EXTRA_BINARIES) PROGRAMS = \ wine \ + wine-freebsd \ + wine-freebsd-installed \ wine-glibc \ wine-glibc-installed \ wine-kthread \ @@ -40,6 +43,12 @@ all: $(WINE_BINARIES) $(WINE_BINARIES:%=%-installed) $(MODULE) $(MANPAGES) LIBPTHREAD = @LIBPTHREAD@ LDEXECFLAGS = @LDEXECFLAGS@ +wine-freebsd: freebsd.o Makefile.in + $(CC) -o $@ freebsd.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL) + +wine-freebsd-installed: freebsd.o Makefile.in + $(CC) -o $@ freebsd.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_INSTALL) + wine-glibc: glibc.o Makefile.in $(CC) -o $@ glibc.o $(LIBWINE) $(LIBPORT) $(LIBPTHREAD) $(EXTRALIBS) $(LDFLAGS) $(LDRPATH_LOCAL) diff --git a/loader/freebsd.c b/loader/freebsd.c new file mode 100644 index 00000000000..0d0eb5767cb --- /dev/null +++ b/loader/freebsd.c @@ -0,0 +1,61 @@ +/* + * FreeBSD loader + * + * Copyright 2007 Alexandre Julliard + * + * 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 "config.h" +#include "wine/port.h" + +#include +#include +#include +#ifdef HAVE_SYS_RESOURCE_H +# include +#endif + +#include "wine/library.h" + +/* build a new full path from the specified path and name */ +static const char *build_new_path( const char *path, const char *name ) +{ + const char *p; + char *ret; + + if (!(p = strrchr( path, '/' ))) return name; + p++; + ret = malloc( (p - path) + strlen(name) + 1 ); + memcpy( ret, path, p - path ); + strcpy( ret + (p - path), name ); + return ret; +} + +/********************************************************************** + * main + */ +int main( int argc, char *argv[] ) +{ + const char *new_argv0 = build_new_path( argv[0], "wine-pthread" ); + struct rlimit rl; + rl.rlim_cur = 0x02000000; + rl.rlim_max = 0x02000000; + setrlimit( RLIMIT_DATA, &rl ); + wine_init_argv0_path( new_argv0 ); + wine_exec_wine_binary( NULL, argv, NULL ); + fprintf( stderr, "wine: could not exec %s\n", new_argv0 ); + exit(1); +} diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c index 119bd4a02d8..971c22d58d2 100644 --- a/programs/wineconsole/curses.c +++ b/programs/wineconsole/curses.c @@ -953,6 +953,7 @@ enum init_return WCCURSES_InitBackend(struct inner_data* data) data->fnScroll = WCCURSES_Scroll; data->fnSetFont = WCCURSES_SetFont; data->fnDeleteBackend = WCCURSES_DeleteBackend; + data->hWnd = NULL; if (wine_server_fd_to_handle(0, GENERIC_READ|SYNCHRONIZE, 0, (obj_handle_t*)&PRIVATE(data)->hInput)) diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c index 2f2c3141fea..36805e17a62 100644 --- a/programs/wineconsole/dialog.c +++ b/programs/wineconsole/dialog.c @@ -434,7 +434,7 @@ static BOOL select_font(struct dialog_info* di) WCUSER_FillLogFont(&lf, di->font[size_idx].faceName, di->font[size_idx].height, di->font[size_idx].weight); - hFont = WCUSER_CopyFont(&config, PRIVATE(di->data)->hWnd, &lf, NULL); + hFont = WCUSER_CopyFont(&config, di->data->hWnd, &lf, NULL); if (!hFont) return FALSE; if (config.cell_height != di->font[size_idx].height) @@ -573,7 +573,7 @@ static INT_PTR WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPA WCUSER_FillLogFont(&lf, di->font[val].faceName, di->font[val].height, di->font[val].weight); DeleteObject(WCUSER_CopyFont(&di->config, - PRIVATE(di->data)->hWnd, &lf, NULL)); + di->data->hWnd, &lf, NULL)); } val = (GetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_BK), 0) << 4) | @@ -831,7 +831,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) psHead.pszCaption = buff; psHead.nPages = 3; - psHead.hwndParent = PRIVATE(data)->hWnd; + psHead.hwndParent = data->hWnd; psHead.u3.phpage = psPage; WINECON_DumpConfig("init", refcfg); @@ -846,7 +846,7 @@ BOOL WCUSER_GetProperties(struct inner_data* data, BOOL current) if (refcfg == &data->curcfg) { switch (DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_SAVE_SETTINGS), - PRIVATE(data)->hWnd, WCUSER_SaveDlgProc)) + data->hWnd, WCUSER_SaveDlgProc)) { case IDC_SAV_SAVE: save = TRUE; modify_session = TRUE; break; case IDC_SAV_SESSION: modify_session = TRUE; break; diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c index 689d1286d36..fdb0e16b35b 100644 --- a/programs/wineconsole/user.c +++ b/programs/wineconsole/user.c @@ -111,12 +111,12 @@ static void WCUSER_NewBitmap(struct inner_data* data) HBITMAP hnew, hold; if (!data->curcfg.sb_width || !data->curcfg.sb_height || - !PRIVATE(data)->hFont || !(hDC = GetDC(PRIVATE(data)->hWnd))) + !PRIVATE(data)->hFont || !(hDC = GetDC(data->hWnd))) return; hnew = CreateCompatibleBitmap(hDC, data->curcfg.sb_width * data->curcfg.cell_width, data->curcfg.sb_height * data->curcfg.cell_height); - ReleaseDC(PRIVATE(data)->hWnd, hDC); + ReleaseDC(data->hWnd, hDC); hold = SelectObject(PRIVATE(data)->hMemDC, hnew); if (PRIVATE(data)->hBitmap) @@ -147,11 +147,11 @@ static void WCUSER_ResizeScreenBuffer(struct inner_data* data) */ static void WCUSER_PosCursor(const struct inner_data* data) { - if (PRIVATE(data)->hWnd != GetFocus() || !data->curcfg.cursor_visible) return; + if (data->hWnd != GetFocus() || !data->curcfg.cursor_visible) return; SetCaretPos((data->cursor.X - data->curcfg.win_pos.X) * data->curcfg.cell_width, (data->cursor.Y - data->curcfg.win_pos.Y) * data->curcfg.cell_height); - ShowCaret(PRIVATE(data)->hWnd); + ShowCaret(data->hWnd); } /****************************************************************** @@ -163,7 +163,7 @@ static void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL { if (force || size != data->curcfg.cursor_size) { - if (data->curcfg.cursor_visible && PRIVATE(data)->hWnd == GetFocus()) DestroyCaret(); + if (data->curcfg.cursor_visible && data->hWnd == GetFocus()) DestroyCaret(); if (PRIVATE(data)->cursor_bitmap) DeleteObject(PRIVATE(data)->cursor_bitmap); PRIVATE(data)->cursor_bitmap = NULL; if (size != 100) @@ -195,11 +195,11 @@ static void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL if (force || vis != data->curcfg.cursor_visible) { data->curcfg.cursor_visible = vis; - if (PRIVATE(data)->hWnd == GetFocus()) + if (data->hWnd == GetFocus()) { if (vis) { - CreateCaret(PRIVATE(data)->hWnd, PRIVATE(data)->cursor_bitmap, + CreateCaret(data->hWnd, PRIVATE(data)->cursor_bitmap, data->curcfg.cell_width, data->curcfg.cell_height); WCUSER_PosCursor(data); } @@ -229,36 +229,36 @@ static void WCUSER_ComputePositions(struct inner_data* data) if (IsRectEmpty(&r)) return; - AdjustWindowRect(&r, GetWindowLong(PRIVATE(data)->hWnd, GWL_STYLE), FALSE); + AdjustWindowRect(&r, GetWindowLong(data->hWnd, GWL_STYLE), FALSE); dx = dy = 0; if (data->curcfg.sb_width > data->curcfg.win_width) { dy = GetSystemMetrics(SM_CYHSCROLL); - SetScrollRange(PRIVATE(data)->hWnd, SB_HORZ, 0, + SetScrollRange(data->hWnd, SB_HORZ, 0, data->curcfg.sb_width - data->curcfg.win_width, FALSE); - SetScrollPos(PRIVATE(data)->hWnd, SB_HORZ, 0, FALSE); /* FIXME */ - ShowScrollBar(PRIVATE(data)->hWnd, SB_HORZ, TRUE); + SetScrollPos(data->hWnd, SB_HORZ, 0, FALSE); /* FIXME */ + ShowScrollBar(data->hWnd, SB_HORZ, TRUE); } else { - ShowScrollBar(PRIVATE(data)->hWnd, SB_HORZ, FALSE); + ShowScrollBar(data->hWnd, SB_HORZ, FALSE); } if (data->curcfg.sb_height > data->curcfg.win_height) { dx = GetSystemMetrics(SM_CXVSCROLL); - SetScrollRange(PRIVATE(data)->hWnd, SB_VERT, 0, + SetScrollRange(data->hWnd, SB_VERT, 0, data->curcfg.sb_height - data->curcfg.win_height, FALSE); - SetScrollPos(PRIVATE(data)->hWnd, SB_VERT, 0, FALSE); /* FIXME */ - ShowScrollBar(PRIVATE(data)->hWnd, SB_VERT, TRUE); + SetScrollPos(data->hWnd, SB_VERT, 0, FALSE); /* FIXME */ + ShowScrollBar(data->hWnd, SB_VERT, TRUE); } else { - ShowScrollBar(PRIVATE(data)->hWnd, SB_VERT, FALSE); + ShowScrollBar(data->hWnd, SB_VERT, FALSE); } - SetWindowPos(PRIVATE(data)->hWnd, 0, 0, 0, r.right - r.left + dx, r.bottom - r.top + dy, + SetWindowPos(data->hWnd, 0, 0, 0, r.right - r.left + dx, r.bottom - r.top + dy, SWP_NOMOVE|SWP_NOZORDER); WCUSER_ShapeCursor(data, data->curcfg.cursor_size, data->curcfg.cursor_visible, TRUE); WCUSER_PosCursor(data); @@ -274,7 +274,7 @@ static void WCUSER_SetTitle(const struct inner_data* data) WCHAR buffer[256]; if (WINECON_GetConsoleTitle(data->hConIn, buffer, sizeof(buffer))) - SetWindowText(PRIVATE(data)->hWnd, buffer); + SetWindowText(data->hWnd, buffer); } void WCUSER_DumpLogFont(const char* pfx, const LOGFONT* lf, DWORD ft) @@ -524,7 +524,7 @@ BOOL WCUSER_SetFont(struct inner_data* data, const LOGFONT* logfont) if (PRIVATE(data)->hFont != 0 && WCUSER_AreFontsEqual(&data->curcfg, logfont)) return TRUE; - hFont = WCUSER_CopyFont(&data->curcfg, PRIVATE(data)->hWnd, logfont, &el); + hFont = WCUSER_CopyFont(&data->curcfg, data->hWnd, logfont, &el); if (!hFont) {WINE_ERR("wrong font\n"); return FALSE;} if (PRIVATE(data)->hFont) DeleteObject(PRIVATE(data)->hFont); @@ -533,8 +533,8 @@ BOOL WCUSER_SetFont(struct inner_data* data, const LOGFONT* logfont) WCUSER_ComputePositions(data); WCUSER_NewBitmap(data); - InvalidateRect(PRIVATE(data)->hWnd, NULL, FALSE); - UpdateWindow(PRIVATE(data)->hWnd); + InvalidateRect(data->hWnd, NULL, FALSE); + UpdateWindow(data->hWnd); return TRUE; } @@ -612,16 +612,16 @@ static void WCUSER_SetSelection(const struct inner_data* data, HDC hRefDC) RECT r; WCUSER_GetSelectionRect(data, &r); - hDC = hRefDC ? hRefDC : GetDC(PRIVATE(data)->hWnd); + hDC = hRefDC ? hRefDC : GetDC(data->hWnd); if (hDC) { - if (PRIVATE(data)->hWnd == GetFocus() && data->curcfg.cursor_visible) - HideCaret(PRIVATE(data)->hWnd); + if (data->hWnd == GetFocus() && data->curcfg.cursor_visible) + HideCaret(data->hWnd); InvertRect(hDC, &r); if (hDC != hRefDC) - ReleaseDC(PRIVATE(data)->hWnd, hDC); - if (PRIVATE(data)->hWnd == GetFocus() && data->curcfg.cursor_visible) - ShowCaret(PRIVATE(data)->hWnd); + ReleaseDC(data->hWnd, hDC); + if (data->hWnd == GetFocus() && data->curcfg.cursor_visible) + ShowCaret(data->hWnd); } } @@ -642,11 +642,11 @@ static void WCUSER_MoveSelection(struct inner_data* data, COORD c1, COORD c2) return; WCUSER_GetSelectionRect(data, &r); - hDC = GetDC(PRIVATE(data)->hWnd); + hDC = GetDC(data->hWnd); if (hDC) { - if (PRIVATE(data)->hWnd == GetFocus() && data->curcfg.cursor_visible) - HideCaret(PRIVATE(data)->hWnd); + if (data->hWnd == GetFocus() && data->curcfg.cursor_visible) + HideCaret(data->hWnd); InvertRect(hDC, &r); } PRIVATE(data)->selectPt1 = c1; @@ -655,9 +655,9 @@ static void WCUSER_MoveSelection(struct inner_data* data, COORD c1, COORD c2) { WCUSER_GetSelectionRect(data, &r); InvertRect(hDC, &r); - ReleaseDC(PRIVATE(data)->hWnd, hDC); - if (PRIVATE(data)->hWnd == GetFocus() && data->curcfg.cursor_visible) - ShowCaret(PRIVATE(data)->hWnd); + ReleaseDC(data->hWnd, hDC); + if (data->hWnd == GetFocus() && data->curcfg.cursor_visible) + ShowCaret(data->hWnd); } } @@ -675,7 +675,7 @@ static void WCUSER_CopySelectionToClipboard(const struct inner_data* data) w = abs(PRIVATE(data)->selectPt1.X - PRIVATE(data)->selectPt2.X) + 2; h = abs(PRIVATE(data)->selectPt1.Y - PRIVATE(data)->selectPt2.Y) + 1; - if (!OpenClipboard(PRIVATE(data)->hWnd)) return; + if (!OpenClipboard(data->hWnd)) return; EmptyClipboard(); hMem = GlobalAlloc(GMEM_MOVEABLE, (w * h) * sizeof(WCHAR)); @@ -715,7 +715,7 @@ static void WCUSER_PasteFromClipboard(struct inner_data* data) HANDLE h; WCHAR* ptr; - if (!OpenClipboard(PRIVATE(data)->hWnd)) return; + if (!OpenClipboard(data->hWnd)) return; h = GetClipboardData(CF_UNICODETEXT); if (h && (ptr = GlobalLock(h))) { @@ -764,8 +764,8 @@ static void WCUSER_Refresh(const struct inner_data* data, int tp, int bm) r.right = data->curcfg.win_width * data->curcfg.cell_width; r.top = (tp - data->curcfg.win_pos.Y) * data->curcfg.cell_height; r.bottom = (bm - data->curcfg.win_pos.Y + 1) * data->curcfg.cell_height; - InvalidateRect(PRIVATE(data)->hWnd, &r, FALSE); - UpdateWindow(PRIVATE(data)->hWnd); + InvalidateRect(data->hWnd, &r, FALSE); + UpdateWindow(data->hWnd); } } @@ -778,7 +778,7 @@ static void WCUSER_Paint(const struct inner_data* data) { PAINTSTRUCT ps; - BeginPaint(PRIVATE(data)->hWnd, &ps); + BeginPaint(data->hWnd, &ps); BitBlt(ps.hdc, 0, 0, data->curcfg.win_width * data->curcfg.cell_width, data->curcfg.win_height * data->curcfg.cell_height, @@ -788,7 +788,7 @@ static void WCUSER_Paint(const struct inner_data* data) SRCCOPY); if (PRIVATE(data)->has_selection) WCUSER_SetSelection(data, ps.hdc); - EndPaint(PRIVATE(data)->hWnd, &ps); + EndPaint(data->hWnd, &ps); } /****************************************************************** @@ -800,15 +800,15 @@ static void WCUSER_Scroll(struct inner_data* data, int pos, BOOL horz) { if (horz) { - SetScrollPos(PRIVATE(data)->hWnd, SB_HORZ, pos, TRUE); + SetScrollPos(data->hWnd, SB_HORZ, pos, TRUE); data->curcfg.win_pos.X = pos; } else { - SetScrollPos(PRIVATE(data)->hWnd, SB_VERT, pos, TRUE); + SetScrollPos(data->hWnd, SB_VERT, pos, TRUE); data->curcfg.win_pos.Y = pos; } - InvalidateRect(PRIVATE(data)->hWnd, NULL, FALSE); + InvalidateRect(data->hWnd, NULL, FALSE); } /****************************************************************** @@ -882,7 +882,7 @@ static LRESULT WCUSER_Create(HWND hWnd, LPCREATESTRUCT lpcs) data = lpcs->lpCreateParams; SetWindowLongPtr(hWnd, 0L, (DWORD_PTR)data); - PRIVATE(data)->hWnd = hWnd; + data->hWnd = hWnd; hSysMenu = GetSystemMenu(hWnd, FALSE); if (!hSysMenu) return 0; @@ -1104,7 +1104,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM case WM_CREATE: return WCUSER_Create(hWnd, (LPCREATESTRUCT)lParam); case WM_DESTROY: - PRIVATE(data)->hWnd = 0; + data->hWnd = 0; PostQuitMessage(0); break; case WM_PAINT: @@ -1134,7 +1134,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM else { PRIVATE(data)->selectPt1 = PRIVATE(data)->selectPt2 = WCUSER_GetCell(data, lParam); - SetCapture(PRIVATE(data)->hWnd); + SetCapture(data->hWnd); WCUSER_SetSelection(data, 0); PRIVATE(data)->has_selection = TRUE; } @@ -1147,7 +1147,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM case WM_MOUSEMOVE: if (data->curcfg.quick_edit || PRIVATE(data)->has_selection) { - if (GetCapture() == PRIVATE(data)->hWnd && PRIVATE(data)->has_selection && + if (GetCapture() == data->hWnd && PRIVATE(data)->has_selection && (wParam & MK_LBUTTON)) { WCUSER_MoveSelection(data, PRIVATE(data)->selectPt1, WCUSER_GetCell(data, lParam)); @@ -1161,7 +1161,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM case WM_LBUTTONUP: if (data->curcfg.quick_edit || PRIVATE(data)->has_selection) { - if (GetCapture() == PRIVATE(data)->hWnd && PRIVATE(data)->has_selection) + if (GetCapture() == data->hWnd && PRIVATE(data)->has_selection) { WCUSER_MoveSelection(data, PRIVATE(data)->selectPt1, WCUSER_GetCell(data, lParam)); ReleaseCapture(); @@ -1207,7 +1207,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM case WM_SETFOCUS: if (data->curcfg.cursor_visible) { - CreateCaret(PRIVATE(data)->hWnd, PRIVATE(data)->cursor_bitmap, + CreateCaret(data->hWnd, PRIVATE(data)->cursor_bitmap, data->curcfg.cell_width, data->curcfg.cell_height); WCUSER_PosCursor(data); } @@ -1328,7 +1328,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM break; case WM_INITMENUPOPUP: if (!HIWORD(lParam)) return DefWindowProc(hWnd, uMsg, wParam, lParam); - WCUSER_SetMenuDetails(data, GetSystemMenu(PRIVATE(data)->hWnd, FALSE)); + WCUSER_SetMenuDetails(data, GetSystemMenu(data->hWnd, FALSE)); break; default: return DefWindowProc(hWnd, uMsg, wParam, lParam); @@ -1345,7 +1345,7 @@ static void WCUSER_DeleteBackend(struct inner_data* data) { if (!PRIVATE(data)) return; if (PRIVATE(data)->hMemDC) DeleteDC(PRIVATE(data)->hMemDC); - if (PRIVATE(data)->hWnd) DestroyWindow(PRIVATE(data)->hWnd); + if (data->hWnd) DestroyWindow(data->hWnd); if (PRIVATE(data)->hFont) DeleteObject(PRIVATE(data)->hFont); if (PRIVATE(data)->cursor_bitmap) DeleteObject(PRIVATE(data)->cursor_bitmap); if (PRIVATE(data)->hBitmap) DeleteObject(PRIVATE(data)->hBitmap); @@ -1361,7 +1361,7 @@ static int WCUSER_MainLoop(struct inner_data* data) { MSG msg; - ShowWindow(PRIVATE(data)->hWnd, data->nCmdShow); + ShowWindow(data->hWnd, data->nCmdShow); for (;;) { switch (MsgWaitForMultipleObjects(1, &data->hSynchro, FALSE, INFINITE, QS_ALLINPUT)) @@ -1437,7 +1437,7 @@ enum init_return WCUSER_InitBackend(struct inner_data* data) CreateWindow(wndclass.lpszClassName, NULL, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_HSCROLL|WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, 0, 0, wndclass.hInstance, data); - if (!PRIVATE(data)->hWnd) return init_failed; + if (!data->hWnd) return init_failed; return init_success; } diff --git a/programs/wineconsole/winecon_private.h b/programs/wineconsole/winecon_private.h index baa9e2d9cd9..7ea5dc096ed 100644 --- a/programs/wineconsole/winecon_private.h +++ b/programs/wineconsole/winecon_private.h @@ -58,6 +58,7 @@ struct inner_data { HANDLE hConIn; /* console input handle */ HANDLE hConOut; /* screen buffer handle: has to be changed when active sb changes */ HANDLE hSynchro; /* waitable handle signalled by server when something in server has been modified */ + HWND hWnd; /* handle of 'user' window or NULL for 'curses' */ INT nCmdShow; /* argument of WinMain */ int (*fnMainLoop)(struct inner_data* data); diff --git a/programs/wineconsole/winecon_user.h b/programs/wineconsole/winecon_user.h index e6e2507ebe1..b630499f01d 100644 --- a/programs/wineconsole/winecon_user.h +++ b/programs/wineconsole/winecon_user.h @@ -28,7 +28,6 @@ struct inner_data_user { /* the following fields are only user by the USER backend (should be hidden in user) */ - HWND hWnd; /* handle to windows for rendering */ HFONT hFont; /* font used for rendering, usually fixed */ LONG ext_leading; /* external leading for hFont */ HDC hMemDC; /* memory DC holding the bitmap below */ diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index b9654654c7b..449cb646275 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -642,16 +642,6 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna if (!ret) goto error; WINE_TRACE("using hConIn %p, hSynchro event %p\n", data->hConIn, data->hSynchro); - SERVER_START_REQ( set_console_input_info ) - { - req->handle = data->hConIn; - req->mask = SET_CONSOLE_INPUT_INFO_TITLE; - wine_server_add_data( req, appname, lstrlenW(appname) * sizeof(WCHAR) ); - ret = !wine_server_call_err( req ); - } - SERVER_END_REQ; - if (!ret) goto error; - SERVER_START_REQ(create_console_output) { req->handle_in = data->hConIn; @@ -679,6 +669,18 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna WINECON_SetConfig(data, &cfg); data->curcfg.registry = cfg.registry; WINECON_DumpConfig("fint", &data->curcfg); + SERVER_START_REQ( set_console_input_info ) + { + req->handle = data->hConIn; + req->win = data->hWnd; + req->mask = SET_CONSOLE_INPUT_INFO_TITLE | + SET_CONSOLE_INPUT_INFO_WIN; + wine_server_add_data( req, appname, lstrlenW(appname) * sizeof(WCHAR) ); + ret = !wine_server_call_err( req ); + } + SERVER_END_REQ; + if (!ret) goto error; + return data; case init_failed: break; diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 01111f4444b..30d29ff178d 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = winetest.exe APPMODE = -mconsole -IMPORTS = comctl32 user32 gdi32 wsock32 kernel32 +IMPORTS = comctl32 version user32 gdi32 wsock32 kernel32 C_SRCS = \ gui.c \ diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 5d5462ba4ce..54574b16750 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -62,6 +62,39 @@ static struct rev_info *rev_infos = NULL; static const char whitespace[] = " \t\r\n"; static const char testexe[] = "_test.exe"; +static char * get_file_version(char * file_name) +{ + static char version[32]; + DWORD size; + DWORD handle; + + size = GetFileVersionInfoSizeA(file_name, &handle); + if (size) { + char * data = xmalloc(size); + if (data) { + if (GetFileVersionInfoA(file_name, handle, size, data)) { + static char backslash[] = "\\"; + VS_FIXEDFILEINFO *pFixedVersionInfo; + UINT len; + if (VerQueryValueA(data, backslash, (LPVOID *)&pFixedVersionInfo, &len)) { + sprintf(version, "%d.%d.%d.%d", + pFixedVersionInfo->dwFileVersionMS >> 16, + pFixedVersionInfo->dwFileVersionMS & 0xffff, + pFixedVersionInfo->dwFileVersionLS >> 16, + pFixedVersionInfo->dwFileVersionLS & 0xffff); + } else + sprintf(version, "version not available"); + } else + sprintf(version, "unknown"); + free(data); + } else + sprintf(version, "failed"); + } else + sprintf(version, "version not available"); + + return version; +} + static int running_under_wine (void) { HMODULE module = GetModuleHandleA("ntdll.dll"); @@ -448,6 +481,8 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType, } FreeLibrary(dll); + xprintf (" %s=%s\n", dllname, get_file_version(dllname)); + get_subtests( tempdir, &wine_tests[nr_of_files], lpszName ); nr_of_tests += wine_tests[nr_of_files].subtest_count; nr_of_files++; diff --git a/programs/wordpad/Ko.rc b/programs/wordpad/Ko.rc index 18688000201..5f82c82ee6c 100644 --- a/programs/wordpad/Ko.rc +++ b/programs/wordpad/Ko.rc @@ -41,8 +41,8 @@ BEGIN MENUITEM "Áö¿ì±â(&C)\tDEL", ID_EDIT_CLEAR MENUITEM "¸ðµÎ ¼±ÅÃ(&S)\tCtrl+A", ID_EDIT_SELECTALL MENUITEM SEPARATOR - MENUITEM "&Find . . .\tCrtl+F", ID_FIND - MENUITEM "Find &next\tF3", ID_FIND_NEXT + MENUITEM "ã±â(&F). . .\tCrtl+F", ID_FIND + MENUITEM "´ÙÀ½ ã±â(&N)\tF3", ID_FIND_NEXT MENUITEM SEPARATOR MENUITEM "Àбâ Àü¿ë(&O)", ID_EDIT_READONLY MENUITEM "¼öÁ¤ °¡´É(&M)", ID_EDIT_MODIFIED @@ -68,7 +68,7 @@ BEGIN END POPUP "Çü½Ä(&O)" BEGIN - MENUITEM "B&ullet points" ID_BULLET + MENUITEM " °­Á¶ Á¡(&U)" ID_BULLET POPUP "¹è°æ(&B)" BEGIN MENUITEM "½Ã½ºÅÛ(&S)\tCtrl+1", ID_BACK_1 @@ -96,20 +96,20 @@ END IDD_NEWFILE DIALOG DISCARDABLE 30, 20, 140, 80 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "New" +CAPTION "»õ ¹®¼­" FONT 10, "MS Sans Serif" BEGIN - LTEXT "New document type",0,3,2,100,15 + LTEXT "»õ ¹®¼­ Çü½Ä",0,3,2,100,15 LISTBOX IDC_NEWFILE,3,12,90,65,LBS_NOINTEGRALHEIGHT - PUSHBUTTON "&OK",IDOK,97,12,40,12 - PUSHBUTTON "&Cancel",IDCANCEL,97,26,40,12 + PUSHBUTTON "È®ÀÎ(&O)",IDOK,97,12,40,12 + PUSHBUTTON "Ãë¼Ò(&C)",IDCANCEL,97,26,40,12 END STRINGTABLE DISCARDABLE BEGIN STRING_RICHTEXT_FILES_RTF, "¸®Ä¡ ÅؽºÆ® ÆÄÀÏÇü½Ä (*.rtf)" STRING_TEXT_FILES_TXT, "ÅؽºÆ® ÆÄÀÏ (*.txt)" - STRING_TEXT_FILES_UNICODE_TXT, "Unicode text document (*.txt)" + STRING_TEXT_FILES_UNICODE_TXT, "À¯´ÏÄÚµå ÅؽºÆ® ¹®¼­(*.txt)" STRING_ALL_FILES, "¸ðµç ¹®¼­ (*.*)" END @@ -117,9 +117,9 @@ STRINGTABLE DISCARDABLE BEGIN STRING_DEFAULT_FILENAME, "¹®¼­" STRING_PROMPT_SAVE_CHANGES, "'%s'ÀÇ ¹Ù²ï °ÍÀ» ÀúÀåÇÏ°Ú½À´Ï±î?" - STRING_SEARCH_FINISHED, "Finished searching the document." - STRING_LOAD_RICHED_FAILED, "Failed to load the RichEdit library." - STRING_SAVE_LOSEFORMATTING, "You have chosen to save in plain text format, " \ - "which will cause all formatting to be lost. " \ - "Are you sure that you wish to do this?" + STRING_SEARCH_FINISHED, "¹®¼­¿¡¼­ ã±â ³¡." + STRING_LOAD_RICHED_FAILED, "¸®Ä¡ÅؽºÆ® ¶óÀ̺귯¸® ºÒ·¯¿À±â ½ÇÆÐ." + STRING_SAVE_LOSEFORMATTING, "´ç½ÅÀº º¸Åë ÅؽºÆ® Çü½ÄÀ¸·Î ÀúÀåÇϱ⸦ ¼±ÅÃÇß½À´Ï´Ù, " \ + "ÀÌ°ÍÀº Ư¼öÇÑ ²Ù¹ÒÀ» ¾ø¿¤ °ÍÀÔ´Ï´Ù. " \ + "´ç½ÅÀº Á¤¸»·Î ÀúÀåÇϱ⸦ ¿øÇմϱî?" END diff --git a/server/console.c b/server/console.c index 88a24e83d9e..b0a342483ea 100644 --- a/server/console.c +++ b/server/console.c @@ -63,6 +63,7 @@ struct console_input int edition_mode; /* index to edition mode flavors */ int input_cp; /* console input codepage */ int output_cp; /* console output codepage */ + user_handle_t win; /* window handle if backend supports it */ struct event *event; /* event to wait on for input queue */ }; @@ -281,6 +282,7 @@ static struct object *create_console_input( struct thread* renderer ) console_input->edition_mode = 0; console_input->input_cp = 0; console_input->output_cp = 0; + console_input->win = 0; console_input->event = create_event( NULL, NULL, 0, 1, 0 ); if (!console_input->history || !console_input->evt) @@ -719,6 +721,10 @@ static int set_console_input_info( const struct set_console_input_info_request * { console->output_cp = req->output_cp; } + if (req->mask & SET_CONSOLE_INPUT_INFO_WIN) + { + console->win = req->win; + } release_object( console ); return 1; error: @@ -1413,6 +1419,7 @@ DECL_HANDLER(get_console_input_info) reply->edition_mode = console->edition_mode; reply->input_cp = console->input_cp; reply->output_cp = console->output_cp; + reply->win = console->win; release_object( console ); } diff --git a/server/protocol.def b/server/protocol.def index 7c1b0780c44..f50987a8ed6 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1090,15 +1090,16 @@ struct console_renderer_event /* Set info about a console (input only) */ @REQ(set_console_input_info) - obj_handle_t handle; /* handle to console input, or 0 for process' console */ - int mask; /* setting mask (see below) */ - obj_handle_t active_sb; /* active screen buffer */ - int history_mode; /* whether we duplicate lines in history */ - int history_size; /* number of lines in history */ - int edition_mode; /* index to the edition mode flavors */ - int input_cp; /* console input codepage */ - int output_cp; /* console output codepage */ - VARARG(title,unicode_str); /* console title */ + obj_handle_t handle; /* handle to console input, or 0 for process' console */ + int mask; /* setting mask (see below) */ + obj_handle_t active_sb; /* active screen buffer */ + int history_mode; /* whether we duplicate lines in history */ + int history_size; /* number of lines in history */ + int edition_mode; /* index to the edition mode flavors */ + int input_cp; /* console input codepage */ + int output_cp; /* console output codepage */ + user_handle_t win; /* console window if backend supports it */ + VARARG(title,unicode_str); /* console title */ @END #define SET_CONSOLE_INPUT_INFO_ACTIVE_SB 0x01 #define SET_CONSOLE_INPUT_INFO_TITLE 0x02 @@ -1107,19 +1108,21 @@ struct console_renderer_event #define SET_CONSOLE_INPUT_INFO_EDITION_MODE 0x10 #define SET_CONSOLE_INPUT_INFO_INPUT_CODEPAGE 0x20 #define SET_CONSOLE_INPUT_INFO_OUTPUT_CODEPAGE 0x40 +#define SET_CONSOLE_INPUT_INFO_WIN 0x80 /* Get info about a console (input only) */ @REQ(get_console_input_info) - obj_handle_t handle; /* handle to console input, or 0 for process' console */ + obj_handle_t handle; /* handle to console input, or 0 for process' console */ @REPLY - int history_mode; /* whether we duplicate lines in history */ - int history_size; /* number of lines in history */ - int history_index; /* number of used lines in history */ - int edition_mode; /* index to the edition mode flavors */ - int input_cp; /* console input codepage */ - int output_cp; /* console output codepage */ - VARARG(title,unicode_str); /* console title */ + int history_mode; /* whether we duplicate lines in history */ + int history_size; /* number of lines in history */ + int history_index; /* number of used lines in history */ + int edition_mode; /* index to the edition mode flavors */ + int input_cp; /* console input codepage */ + int output_cp; /* console output codepage */ + user_handle_t win; /* console window if backend supports it */ + VARARG(title,unicode_str); /* console title */ @END @@ -2310,6 +2313,7 @@ enum message_type #define UPDATE_ALLCHILDREN 0x10 /* force repaint of all children */ #define UPDATE_NOCHILDREN 0x20 /* don't try to repaint any children */ #define UPDATE_NOREGION 0x40 /* don't return a region, only the flags */ +#define UPDATE_DELAYED_ERASE 0x80 /* still needs erase after BeginPaint */ /* Update the z order of a window so that a given rectangle is fully visible */ diff --git a/server/ptrace.c b/server/ptrace.c index f1a9afb7c3d..343e38e54d7 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -35,6 +35,10 @@ #ifdef HAVE_SYS_WAIT_H # include #endif +#ifdef HAVE_SYS_THR_H +# include +# include +#endif #include #include "ntstatus.h" @@ -206,9 +210,8 @@ static int wait4_thread( struct thread *thread, int signal ) /* send a signal to a specific thread */ static inline int tkill( int tgid, int pid, int sig ) { - int ret = -ENOSYS; - #ifdef __linux__ + int ret = -ENOSYS; # ifdef __i386__ __asm__( "pushl %%ebx\n\t" "movl %2,%%ebx\n\t" @@ -227,11 +230,15 @@ static inline int tkill( int tgid, int pid, int sig ) __asm__( "syscall" : "=a" (ret) : "0" (200) /*SYS_tkill*/, "D" (pid), "S" (sig) ); # endif -#endif /* __linux__ */ - if (ret >= 0) return ret; errno = -ret; return -1; +#elif defined(__FreeBSD__) && defined(HAVE_THR_KILL2) + return thr_kill2( tgid, pid, sig ); +#else + errno = ENOSYS; + return -1; +#endif } /* initialize the process tracing mechanism */ diff --git a/server/trace.c b/server/trace.c index b4c0325cf45..befdd595c91 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1473,6 +1473,7 @@ static void dump_set_console_input_info_request( const struct set_console_input_ fprintf( stderr, " edition_mode=%d,", req->edition_mode ); fprintf( stderr, " input_cp=%d,", req->input_cp ); fprintf( stderr, " output_cp=%d,", req->output_cp ); + fprintf( stderr, " win=%p,", req->win ); fprintf( stderr, " title=" ); dump_varargs_unicode_str( cur_size ); } @@ -1490,6 +1491,7 @@ static void dump_get_console_input_info_reply( const struct get_console_input_in fprintf( stderr, " edition_mode=%d,", req->edition_mode ); fprintf( stderr, " input_cp=%d,", req->input_cp ); fprintf( stderr, " output_cp=%d,", req->output_cp ); + fprintf( stderr, " win=%p,", req->win ); fprintf( stderr, " title=" ); dump_varargs_unicode_str( cur_size ); } diff --git a/server/window.c b/server/window.c index 182213ee2e6..14d646852e9 100644 --- a/server/window.c +++ b/server/window.c @@ -88,9 +88,10 @@ struct window char extra_bytes[1]; /* extra bytes storage */ }; -#define PAINT_INTERNAL 0x01 /* internal WM_PAINT pending */ -#define PAINT_ERASE 0x02 /* needs WM_ERASEBKGND */ -#define PAINT_NONCLIENT 0x04 /* needs WM_NCPAINT */ +#define PAINT_INTERNAL 0x01 /* internal WM_PAINT pending */ +#define PAINT_ERASE 0x02 /* needs WM_ERASEBKGND */ +#define PAINT_NONCLIENT 0x04 /* needs WM_NCPAINT */ +#define PAINT_DELAYED_ERASE 0x08 /* still needs erase after WM_ERASEBKGND */ /* growable array of user handles */ struct user_handle_array @@ -978,7 +979,7 @@ static void set_update_region( struct window *win, struct region *region ) inc_window_paint_count( win, -1 ); free_region( win->update_region ); } - win->paint_flags &= ~(PAINT_ERASE | PAINT_NONCLIENT); + win->paint_flags &= ~(PAINT_ERASE | PAINT_DELAYED_ERASE | PAINT_NONCLIENT); win->update_region = NULL; if (region) free_region( region ); } @@ -1051,7 +1052,7 @@ static void validate_children( struct window *win ) } -/* validate the update region of a window on all parents; helper for redraw_window */ +/* validate the update region of a window on all parents; helper for get_update_region */ static void validate_parents( struct window *child ) { int offset_x = 0, offset_y = 0; @@ -1122,7 +1123,7 @@ static void redraw_window( struct window *win, struct region *region, int frame, set_update_region( win, tmp ); } if (flags & RDW_NOFRAME) validate_non_client( win ); - if (flags & RDW_NOERASE) win->paint_flags &= ~PAINT_ERASE; + if (flags & RDW_NOERASE) win->paint_flags &= ~(PAINT_ERASE | PAINT_DELAYED_ERASE); } } @@ -1137,12 +1138,6 @@ static void redraw_window( struct window *win, struct region *region, int frame, inc_window_paint_count( win, -1 ); } - if (flags & RDW_UPDATENOW) - { - validate_parents( win ); - flags &= ~RDW_UPDATENOW; - } - /* now process children recursively */ if (flags & RDW_NOCHILDREN) return; @@ -1184,11 +1179,19 @@ static unsigned int get_update_flags( struct window *win, unsigned int flags ) } if (flags & UPDATE_PAINT) { - if (win->update_region) ret |= UPDATE_PAINT; + if (win->update_region) + { + if (win->paint_flags & PAINT_DELAYED_ERASE) ret |= UPDATE_DELAYED_ERASE; + ret |= UPDATE_PAINT; + } } if (flags & UPDATE_INTERNALPAINT) { - if (win->paint_flags & PAINT_INTERNAL) ret |= UPDATE_INTERNALPAINT; + if (win->paint_flags & PAINT_INTERNAL) + { + ret |= UPDATE_INTERNALPAINT; + if (win->paint_flags & PAINT_DELAYED_ERASE) ret |= UPDATE_DELAYED_ERASE; + } } return ret; } @@ -1299,28 +1302,19 @@ static unsigned int get_window_update_flags( struct window *win, struct window * } -/* expose a region of a window, looking for the top most parent that needs to be exposed */ +/* expose a region of a window on its parent */ /* the region is in window coordinates */ -static void expose_window( struct window *win, struct window *top, struct region *region ) +static void expose_window( struct window *win, struct region *region ) { - struct window *parent, *ptr; - int offset_x, offset_y; - - /* find the top most parent that doesn't clip either siblings or children */ - for (parent = ptr = win; ptr != top; ptr = ptr->parent) - { - if (!(ptr->style & WS_CLIPCHILDREN)) parent = ptr; - if (!(ptr->style & WS_CLIPSIBLINGS)) parent = ptr->parent; - } - if (parent == win && parent != top && win->parent) - parent = win->parent; /* always go up at least one level if possible */ + struct window *parent = win; + int offset_x = win->window_rect.left - win->client_rect.left; + int offset_y = win->window_rect.top - win->client_rect.top; - offset_x = win->window_rect.left - win->client_rect.left; - offset_y = win->window_rect.top - win->client_rect.top; - for (ptr = win; ptr != parent && !is_desktop_window(ptr); ptr = ptr->parent) + if (win->parent && !is_desktop_window(win->parent)) { - offset_x += ptr->client_rect.left; - offset_y += ptr->client_rect.top; + offset_x += win->client_rect.left; + offset_y += win->client_rect.top; + parent = win->parent; } offset_region( region, offset_x, offset_y ); redraw_window( parent, region, 0, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN ); @@ -1376,7 +1370,7 @@ static void set_window_pos( struct window *win, struct window *previous, offset_region( old_vis_rgn, old_window_rect.left - window_rect->left, old_window_rect.top - window_rect->top ); if (xor_region( new_vis_rgn, old_vis_rgn, new_vis_rgn )) - expose_window( win, top, new_vis_rgn ); + expose_window( win, new_vis_rgn ); } free_region( old_vis_rgn ); @@ -1461,7 +1455,7 @@ static void set_window_region( struct window *win, struct region *region, int re { /* expose anything revealed by the change */ if (xor_region( new_vis_rgn, old_vis_rgn, new_vis_rgn )) - expose_window( win, top, new_vis_rgn ); + expose_window( win, new_vis_rgn ); free_region( new_vis_rgn ); } @@ -1958,6 +1952,12 @@ DECL_HANDLER(get_update_region) } } + if (flags & UPDATE_DELAYED_ERASE) /* this means that the previous call didn't erase */ + { + if (from_child) from_child->paint_flags |= PAINT_DELAYED_ERASE; + else win->paint_flags |= PAINT_DELAYED_ERASE; + } + reply->flags = get_window_update_flags( win, from_child, flags, &win ); reply->child = win->handle; @@ -1982,6 +1982,7 @@ DECL_HANDLER(get_update_region) if (reply->flags & (UPDATE_PAINT|UPDATE_INTERNALPAINT)) /* validate everything */ { + validate_parents( win ); validate_whole_window( win ); } else @@ -1989,7 +1990,7 @@ DECL_HANDLER(get_update_region) if (reply->flags & UPDATE_NONCLIENT) validate_non_client( win ); if (reply->flags & UPDATE_ERASE) { - win->paint_flags &= ~PAINT_ERASE; + win->paint_flags &= ~(PAINT_ERASE | PAINT_DELAYED_ERASE); /* desktop window only gets erased, not repainted */ if (is_desktop_window(win)) validate_whole_window( win ); } -- 2.11.4.GIT