From 79056c5168e3d67e836fceef4e1f694f772eca01 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Sat, 19 Apr 2008 23:49:43 +0200 Subject: [PATCH] push 6fe5edf8439c19d3885814583531c2f2b1495177 --- .gitignore | 1 + ANNOUNCE | 1609 ++++++------- ChangeLog | 2361 ++++++++++++++++++++ VERSION | 2 +- configure | 238 +- configure.ac | 25 +- dlls/advapi32/service.c | 2 +- dlls/browseui/progressdlg.c | 1 + dlls/comctl32/comboex.c | 4 +- dlls/comctl32/listview.c | 3 +- dlls/comctl32/monthcal.c | 4 +- dlls/comctl32/propsheet.c | 2 - dlls/comctl32/rebar.c | 5 +- dlls/comctl32/syslink.c | 8 +- dlls/comctl32/toolbar.c | 6 +- dlls/comctl32/trackbar.c | 3 +- dlls/comctl32/treeview.c | 3 +- dlls/comdlg32/cdlg_Fr.rc | 145 +- dlls/comdlg32/cdlg_Ko.rc | 10 + dlls/comdlg32/cdlg_Si.rc | 6 +- dlls/comdlg32/filedlg.c | 108 +- dlls/comdlg32/filedlg31.c | 10 +- dlls/comdlg32/printdlg.c | 8 +- dlls/crypt32/encode.c | 1 - dlls/crypt32/oid.c | 3 +- dlls/crypt32/store.c | 2 - dlls/d3d9/tests/visual.c | 4 +- dlls/dbghelp/pe_module.c | 2 +- dlls/ddraw/executebuffer.c | 11 +- dlls/ddraw/tests/visual.c | 20 +- dlls/dinput/joystick_linux.c | 3 + dlls/dinput/joystick_linuxinput.c | 13 +- dlls/dinput/tests/keyboard.c | 29 + dlls/dmime/graph.c | 7 +- dlls/dmime/performance.c | 3 +- dlls/dmime/segment.c | 16 +- dlls/dnsapi/record.c | 10 +- dlls/dplayx/dplay.c | 9 +- dlls/dpnhpast/dpnhpast.spec | 2 +- dlls/dpnhpast/main.c | 7 +- dlls/dsound/mixer.c | 3 +- dlls/fusion/Makefile.in | 3 +- dlls/fusion/asmcache.c | 134 +- dlls/fusion/assembly.c | 585 +++++ dlls/fusion/fusionpriv.h | 212 ++ dlls/fusion/tests/asmcache.c | 61 +- dlls/gdi32/dc.c | 1 + dlls/gdi32/dib.c | 147 +- dlls/gdi32/freetype.c | 2 +- dlls/gdi32/painting.c | 4 +- dlls/gdi32/path.c | 3 +- dlls/gdi32/tests/bitmap.c | 78 +- dlls/gdi32/tests/dc.c | 20 + dlls/gdi32/tests/font.c | 2 +- dlls/gdi32/tests/path.c | 82 + dlls/gdiplus/customlinecap.c | 10 + dlls/gdiplus/gdiplus.spec | 14 +- dlls/gdiplus/graphicspath.c | 51 + dlls/gdiplus/matrix.c | 37 + dlls/gdiplus/stringformat.c | 15 + dlls/gphoto2.ds/gphoto2_Ru.rc | 52 + dlls/gphoto2.ds/rsrc.rc | 1 + dlls/gphoto2.ds/ui.c | 5 +- dlls/hhctrl.ocx/chm.c | 7 +- dlls/hhctrl.ocx/help.c | 12 +- dlls/hhctrl.ocx/hhctrl.c | 6 +- dlls/imm32/imm.c | 153 +- dlls/imm32/imm32.spec | 4 +- dlls/jscript/tests/jscript.c | 2 +- dlls/kernel32/dosmem.c | 72 +- dlls/kernel32/process.c | 12 +- dlls/kernel32/tests/environ.c | 81 +- dlls/kernel32/tests/locale.c | 4 +- dlls/kernel32/tests/volume.c | 4 +- dlls/mshtml/Makefile.in | 1 + dlls/mshtml/dispex.c | 231 ++ dlls/mshtml/htmldoc.c | 4 +- dlls/mshtml/htmldoc3.c | 2 +- dlls/mshtml/htmlelem.c | 4 +- dlls/mshtml/htmlnode.c | 4 +- dlls/mshtml/htmloption.c | 2 +- dlls/mshtml/htmlwindow.c | 181 ++ dlls/mshtml/main.c | 52 +- dlls/mshtml/mshtml_private.h | 32 +- dlls/mshtml/navigate.c | 3 +- dlls/mshtml/nsembed.c | 2 +- dlls/mshtml/omnavigator.c | 6 + dlls/mshtml/script.c | 92 +- dlls/mshtml/tests/dom.c | 8 + dlls/mshtml/tests/htmldoc.c | 2 +- dlls/mshtml/txtrange.c | 2 +- dlls/msi/format.c | 17 +- dlls/msi/msiserver.idl | 2 +- dlls/msi/package.c | 13 +- dlls/msxml3/main.c | 10 + dlls/msxml3/node.c | 66 +- dlls/msxml3/tests/domdoc.c | 75 + dlls/ntdll/server.c | 89 +- dlls/ole32/antimoniker.c | 2 +- dlls/ole32/classmoniker.c | 6 +- dlls/ole32/clipboard.c | 33 +- dlls/ole32/filemoniker.c | 2 +- dlls/ole32/itemmoniker.c | 2 +- dlls/ole32/tests/clipboard.c | 101 + dlls/ole32/tests/marshal.c | 8 +- dlls/oleaut32/dispatch.c | 2 +- dlls/oleaut32/olepicture.c | 2 +- dlls/oleaut32/recinfo.c | 2 +- dlls/oleaut32/safearray.c | 2 +- dlls/oleaut32/tests/vartest.c | 44 +- dlls/oleaut32/tests/vartype.c | 4 +- dlls/oleaut32/typelib.c | 6 +- dlls/oleaut32/ungif.c | 4 +- dlls/oleaut32/ungif.h | 2 +- dlls/oleaut32/varformat.c | 2 +- dlls/oleaut32/variant.c | 12 +- dlls/oleaut32/vartype.c | 4 +- dlls/opengl32/tests/opengl.c | 4 +- dlls/powrprof/powrprof.c | 12 +- dlls/pstorec/pstorec.c | 6 +- dlls/qmgr/Makefile.in | 2 +- dlls/qmgr/qmgr_main.c | 8 +- dlls/qmgr/tests/enum_jobs.c | 3 + dlls/qmgr/tests/job.c | 6 + dlls/quartz/avidec.c | 5 +- dlls/quartz/avisplit.c | 482 +++- dlls/quartz/control.c | 2 +- dlls/quartz/dsoundrender.c | 39 +- dlls/quartz/filesource.c | 4 +- dlls/quartz/filtergraph.c | 8 + dlls/quartz/fourcc.h | 61 - dlls/quartz/memallocator.c | 10 +- dlls/quartz/mpegsplit.c | 10 +- dlls/quartz/nullrenderer.c | 2 +- dlls/quartz/parser.c | 12 +- dlls/quartz/parser.h | 5 +- dlls/quartz/pin.c | 11 +- dlls/quartz/transform.c | 17 +- dlls/quartz/videorenderer.c | 85 +- dlls/quartz/waveparser.c | 165 +- dlls/riched20/editor.c | 7 +- dlls/riched20/paint.c | 4 +- dlls/riched20/style.c | 2 +- dlls/riched20/tests/editor.c | 4 +- dlls/riched20/undo.c | 4 +- dlls/rpcrt4/ndr_marshall.c | 67 +- dlls/rpcrt4/ndr_stubless.c | 4 +- dlls/rpcrt4/ndr_stubless.h | 2 +- dlls/rpcrt4/rpc_binding.c | 8 +- dlls/rpcrt4/rpcrt4_main.c | 12 +- dlls/rpcrt4/rpcss_np_client.h | 2 +- dlls/rpcrt4/tests/ndr_marshall.c | 2 +- dlls/rpcrt4/tests/rpc.c | 41 + dlls/rsaenh/mpi.c | 8 +- dlls/rsaenh/rc2.c | 2 +- dlls/sane.ds/capability.c | 4 +- dlls/sane.ds/sane_i.h | 2 +- dlls/setupapi/devinst.c | 26 +- dlls/setupapi/fakedll.c | 50 +- dlls/setupapi/install.c | 244 +- dlls/setupapi/queue.c | 23 - dlls/setupapi/setupapi_private.h | 23 + dlls/setupapi/tests/devinst.c | 200 ++ dlls/setupapi/tests/install.c | 14 - dlls/shdocvw/shdocvw.inf | 2 +- dlls/shdocvw/tests/webbrowser.c | 2 +- dlls/shell32/shell32_De.rc | 2 +- dlls/shell32/shell32_Ko.rc | 17 +- dlls/shell32/shell32_Si.rc | 30 +- dlls/shlwapi/istream.c | 37 +- dlls/shlwapi/tests/istream.c | 101 +- dlls/urlmon/internet.c | 9 + dlls/urlmon/urlmon.spec | 1 + dlls/user32/button.c | 8 +- dlls/user32/combo.c | 2 +- dlls/user32/cursoricon.c | 11 + dlls/user32/edit.c | 101 +- dlls/user32/message.c | 6 +- dlls/user32/resources/user32_Ko.rc | 7 +- dlls/user32/static.c | 3 + dlls/user32/tests/cursoricon.c | 111 + dlls/user32/tests/msg.c | 199 +- dlls/user32/tests/sysparams.c | 12 +- dlls/wined3d/basetexture.c | 21 +- dlls/winedos/dosmem.c | 5 +- dlls/winex11.drv/dib.c | 2 +- dlls/winex11.drv/event.c | 104 +- dlls/winex11.drv/ime.c | 26 + dlls/winex11.drv/keyboard.c | 45 +- dlls/winex11.drv/window.c | 165 +- dlls/winex11.drv/winpos.c | 205 +- dlls/winex11.drv/x11drv.h | 3 +- dlls/winex11.drv/xim.c | 27 +- dlls/wininet/http.c | 11 + dlls/wininet/urlcache.c | 1 + dlls/winmm/winmm_Si.rc | 1 + dlls/wintab32/context.c | 32 +- dlls/wintrust/wintrust_main.c | 4 +- dlls/wldap32/wldap32_Fr.rc | 2 +- fonts/tahoma.sfd | 134 +- fonts/tahoma.ttf | Bin 84400 -> 85116 bytes include/Makefile.in | 2 + include/amvideo.idl | 12 +- include/aviriff.h | 161 +- include/axextend.idl | 3 +- include/config.h.in | 6 + include/d3dx9.h | 1 + include/d3dx9tex.h | 697 ++++++ include/ddk/imm.h | 18 + include/dimm.idl | 6 +- include/dpnathlp.h | 2 +- .../rpcrt4/rpcss_np_client.h => include/dvdmedia.h | 32 +- include/gdiplusflat.h | 8 + include/imm.h | 1 + include/indexsrv.idl | 3 - include/mshtmdid.h | 4 +- include/mshtml.idl | 68 + include/pstore.idl | 23 +- include/setupapi.h | 13 + include/shobjidl.idl | 13 +- include/tom.idl | 2 +- include/urlmon.idl | 38 + libs/wine/ldt.c | 4 +- loader/preloader.c | 31 +- programs/notepad/Ru.rc | 2 +- programs/oleview/typelib.c | 38 +- programs/regedit/No.rc | 2 +- programs/start/En.rc | 5 +- programs/start/resources.h | 1 + programs/start/start.c | 97 +- programs/winecfg/Fr.rc | 21 +- programs/winecfg/Ko.rc | 4 +- programs/winecfg/No.rc | 6 +- programs/winecfg/Si.rc | 4 +- programs/wineconsole/wineconsole_Ru.rc | 1 + programs/winefile/Fr.rc | 14 +- programs/winefile/Ko.rc | 9 +- programs/winemine/Ko.rc | 3 - programs/winevdm/winevdm.c | 8 +- programs/winhelp/Fr.rc | 17 +- programs/winhelp/No.rc | 14 +- programs/winhelp/hlpfile.c | 8 +- programs/wordpad/print.c | 2 +- server/registry.c | 57 +- server/request.c | 11 +- server/request.h | 1 + server/winstation.c | 43 +- tools/Makefile.in | 8 +- tools/widl/client.c | 10 + tools/widl/parser.y | 346 ++- tools/widl/typelib.c | 2 +- tools/widl/typelib.h | 2 +- tools/widl/utils.c | 36 +- tools/widl/utils.h | 2 + tools/widl/widltypes.h | 13 +- tools/widl/write_msft.c | 69 +- tools/wine.desktop | 2 +- tools/{wine.inf => wine.inf.in} | 48 +- tools/winedump/emf.c | 158 +- tools/wineprefixcreate.in | 26 +- 260 files changed, 10489 insertions(+), 2637 deletions(-) rewrite ANNOUNCE (95%) create mode 100644 dlls/fusion/assembly.c create mode 100644 dlls/fusion/fusionpriv.h create mode 100644 dlls/gphoto2.ds/gphoto2_Ru.rc create mode 100644 dlls/mshtml/dispex.c delete mode 100644 dlls/quartz/fourcc.h create mode 100644 include/d3dx9tex.h copy dlls/rpcrt4/rpcss_np_client.h => include/dvdmedia.h (52%) rename tools/{wine.inf => wine.inf.in} (99%) diff --git a/.gitignore b/.gitignore index e3feaa1f339..7aeef028d01 100644 --- a/.gitignore +++ b/.gitignore @@ -712,6 +712,7 @@ tools/widl/parser.tab.h tools/widl/parser.yy.c tools/widl/widl tools/widl/widl.man +tools/wine.inf tools/winebuild/winebuild tools/winebuild/winebuild.man tools/winedump/winedump diff --git a/ANNOUNCE b/ANNOUNCE dissimilarity index 95% index 612bbedd187..ef27b50aedc 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,770 +1,839 @@ -This is release 0.9.59 of Wine, a free implementation of Windows on Unix. - -What's new in this release (see below for details): - - Improved support for the .NET framework. - - Better services handling through a separate services.exe process. - - Support for ATI fragment shader. - - Better support for http proxies. - - Window management fixes. - - Pre-compiled fonts are now available in the source tree. - - 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.59.tar.bz2 - http://prdownloads.sourceforge.net/wine/wine-0.9.59.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. - ----------------------------------------------------------------- - -Bugs fixed since 0.9.58: - - 2866 Support for X11 multi head configurations (Xinerama) - 3711 Musicmatch fails to install (missing registry key, HTTP_HttpOpenRequest() problem) - 3936 Dashofer Verlag (@Borland DB) newer versions don't run - 4332 Wine User's Guide -incomplete information about compilation - 4525 OpenOffice 2.0.1 locks up after using File Open dialog for a while - 4528 Firefox vertical size wrong, doesn't take gnome system menu or task bars into account - 4572 user: Tooltips have wrong Z-Position and deactivate the Main-Window - 4733 Get optimized/compressed/packed executables (non-upx) working - 4803 Steam: not all lnk files are processed into linux shortcuts - 5077 Intro films crash Heroes V - 5767 Unable to change default web browser - 5955 DirectDrawCreate crash on non-OpenGL desktop - 6048 wine crashes while starting Strokes russian language course - 6526 Typing Instructor for Kids 2 fails to install - 6570 Supreme Commander beta wants vertex shader 2.0 - 6888 Theme Park World does not start - 7223 Wine Internet Explorer can't handle URLs that don't start with a protocol - 7653 GDI deadlock on startup of any program - 8246 invoking htmlhelp:HtmlHelpW crashes wine - 8568 Thief : the dark project crashes during startup in fullscreen mode - 8644 Unimplemented KERNEL32.dll.SetConsoleDisplayMode - 8660 Anarchy Online screenmode and card selection box not drawn properly - 9104 Pdf-xchange viewer crashes - 9166 Wine Crashes on iRO exit - 9246 Richard Scarry's Busytown 2000 locks up on click - 9459 FIFA 2007 crashes with the recent versions - 9703 3DMark2000 Setup fails - 9772 Wine apps stop after program error exit - 10021 Unreal Tournament 3 Beta Demo doesn't get past splash screen - 10022 WinUAE crashes - 10032 Wine must not use unix select() for networking where there might be high fd's - 10040 Steam crashes during the startup - 10111 WINEDEBUG=warn+heap "make test" has heap error in comdlg32/tests/printdlg.c - 10273 satisfy SafeDisc 2.x heuristic API analyzer by "adjusting" API exports/entry statistics of wine builtins (affects e.g. adobe photoshop) - 10339 Sonic & Knuckles Collection games display wrong in windowed mode - 10742 Add AMD Phenom detection to winecfg - 10760 Sim Town demo crashes - 10823 Green water in HL2 episode 2 during bug sequence - 10843 Tray icon popup menu does not go away until clicked - 10883 C&C 3 extremely slow in current GIT - 10968 tdx_level2:crash due to Unhandled page fault when login - 10992 Sacred: Crashes on enter in wine 0.9.52 - 11082 unimplemented function ntoskrnl.exe.MmIsAddressValid (SafeDisc) - 11211 winedbg crashes? - 11260 civilization 4 land surfaces turn black between turns - 11416 Left or upwards scrolling in Traffic Giant corrupts Display - 11431 Adobe Photoshop CS2: z-overlay of image containers - 11574 Picasa cannot upload to web albums - 11624 Commandos 3 - rendering problems (P8 textures) - 11662 Commandos 3: Black rectangle covers most of the backround - 11841 Pressing escape does not exit dialog in Picasa - 11884 Copy and paste garbage on end - 11890 emule 0.48a mephisto mods crash on wine 0.9.56 - 11894 3d versions of virtual moon 3.5 can't find pixel format - 11897 Wine dosen't remember d3d screen settings in various games - 11927 Crimsonland: Mouse moves to the upperleft corner and freezes - 11996 proper mshtml:HTMLDocument2_get_location() needed for NET's System.WIndows.Forms - 12070 Changing some tool properties with arrow keys in Photoshop CS2 doesnt work - 12079 VS.NET 7.x/.NET SDK installers fail if re-executed due to ACTION_StopServices being a stub - 12086 wine needs to update its timezone info? - 12098 Text positioning regression in Dragon Naturally Speaking 9 - 12134 The Settlers Heritage of Kings: Occlusion setting regression - 12160 Adobe Photoshop CS2: opening new window for each opened image - 12162 Heroes of Might & Magic IV awful frame rate - 12193 Some Lithuanian glyphs are missing in Tahoma and other fonts - 12196 Application window fails to be rendered after resize/minimize/restore cycle in managed mode - 12204 Performance Regression in CS: Source - 12229 mshtml: script.c test crashes in kubuntu hardy - 12235 crash in msxml3 test case - 12236 Irfanview: distorted image display - 12289 strange menu tracking confusion between keyboard and mouse - 12319 Can't connect to Battle.net in Starcraft anymore - 12328 Palringo: Pressing enter in a chat window closes it - 12330 Wrong width in some fonts - 12352 application windows shrink to a small square on desktop switch - ----------------------------------------------------------------- - -Changes since 0.9.58: - -Alasdair Sinclair (1): - fonts: Fix uninstall of TrueType fonts. - -Alexander Dorofeyev (25): - ddraw: Make SetPalette fail for non-palettized surfaces. - ddraw/tests: Test SetPalette on non-palettized surfaces. - wined3d: Handle zero primitive count. - ddraw/tests: Test executebuffer triangle instruction with zero count. - d3d8/tests: Test DrawIndexedPrimitiveUP with primitive count zero. - ddraw: Fix vertex processing. - wined3d: Fix comment. - ddraw/tests: Add test for ddraw 8-bit mode. - wined3d: Don't use device palettes in read_from_framebuffer. - wined3d: Don't use device palettes in GetDC. - wined3d: Don't use device palettes in RealizePalette. - wined3d: Don't store primary surface palette in device palettes. - wined3d: Make device palettes dynamically allocated. - d3d9/tests: Test that GOURAUD and PHONG modes are equal. - ddraw: Set surface to NULL on failure in GetAttachedSurface. - wined3d: Add ENTER_GL/LEAVE_GL in surface_bind_and_dirtify. - wined3d: Add ENTER_GL/LEAVE_GL in surface_allocate_surface. - wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DSurfaceImpl_Release. - wined3d: Avoid calling LoadTexture with gl lock held in IWineD3DSurfaceImpl_PreLoad. - wined3d: Remove ENTER_GL/LEAVE_GL in IWineD3DTextureImpl_PreLoad. - wined3d: Remove ENTER_GL/LEAVE_GL in IWineD3DCubeTextureImpl_PreLoad. - ddraw/tests: Additional colorfill test in p8_primary_test. - wined3d: Support index in alpha in BltOverride colorfill codepath. - wined3d: Improve detection of device palette change. - ddraw/tests: Extend p8_primary_test. - -Alexander Morozov (6): - setupapi: Add a check of "#" for interface subkey names. - setupapi: Added a test for registering device interface and getting device path. - setupapi: Creating SymbolicLink value in registry as in Windows XP. - setupapi: Create device interface keys in registry as in Windows XP. - setupapi: Create DeviceInstance value in registry, delete todo_wine from test. - setupapi: Prevent of reallocating memory for _SP_DEVINFO_DATA structures. - -Alexander Nicolaysen Sørnes (5): - wordpad: Add support for previewing two pages side-by-side. - kernel32: Set processorLevel to cpu family. - reg: Add Norwegian Bokmål resource. - net: Add Norwegian Bokmål resource. - winecfg: Update Norwegian Bokmål resource. - -Alexandre Julliard (63): - shell32: Make the icon space a bit larger in the About dialog. - shell32: Use the larger Wine logo icon in the About dialog. - notepad: Use the larger icon in the About dialog. - wrc: parser_error must append a newline. - kernel32/tests: Added some tests for FindResource. - kernel32/tests: Fix the FindFirstVolume test on Vista. - tools/sfnt2fnt: Separate the building of the font data and the actual file creation. - tools/sfnt2fnt: Merge the fnt2fon code into sfnt2fnt to allow generating fonts in a single step. - tools/sfnt2fnt: Add getopt option parsing. - fonts: Store the generated TrueType fonts in the repository, and rebuild them only in maintainer mode. - winex11: Setting window z-order using a sibling doesn't work with some window managers. - winex11: Grab the pointer in menu tracking mode too. - user32: Make sure we set menu capture to a window that is visible. - user32: Clamp the mouse position to the window rectangle when starting a window resize. - setupapi/tests: Use FIELD_OFFSET instead of offsetof. - winex11: Don't attempt to dock into the system tray in desktop mode. - mscoree: Implement a number of interop helpers. - regedit: Display a larger icon in the About box. - comdlg32: Fixed a number of buffer overflows in the file dialog. - winex11: Fix X11DRV_CLIPBOARD_ReadProperty to read data in larger chunks and to properly null-terminate the buffer. - server: impersonation_level should be an int since we store -1 in it. - libwine: Added a wine_call_on_stack function. - kernel32: Moved the allocation of the process stack to ntdll. - ntdll: Clear the process stack again after dll init and before calling the main entry point. - qmgr: Avoid %ll printf formats. - quartz: Avoid %ll printf formats. - libwine: Export functions that return the Wine version number and build id. - ntdll: Export the libwine version functions from ntdll too. - user32: Allow arbitrary text size for loaded strings in message boxes. - shell32: Add a license message box and a build id to the About dialog. Clean things up a little. - gdi32: Store the return value separately in StretchDIBits instead of overwriting heightSrc. - winefile: Remove redundant About Wine menu option. - winefile: Use the larger icon in the About box. - winefile: Remove some unused resources. - user32: Cosmetic fixes to the About dialog. - winetest: Add the Wine build id to the version information. - winetest: Use the HEAD commit sha1 as default build id. - include: Fix access permissions in some ioctl codes, and add a few more. - wine.inf: Create a fake module for mountmgr.sys. - winex11: Ignore EnterNotify resulting from a pointer grab. - advapi32: Silence the pipe read error in the normal case. - wineboot: No longer needs to keep running now that we have services.exe. - user32: Don't start explorer.exe on non-visible window stations. - winemine: Use a standard About box with the larger icon. - ntdll: Moved stack allocation for thread and process to a common routine in virtual.c. - ntdll: Add support for handling page faults caused by guard pages on the thread stack. - ntdll: Add a guard page at the bottom of the stack and raise a stack overflow exception when hit. - imm32: Remove stray semicolon. Don't try to load an invalid file. - wineboot: Make services.exe inherit the wineboot event to keep it alive. - winex11: Move handling of WM_STATE changes to a separate function, and call it directly from wait_from_withdrawn_state. - winex11: Rely on PropertyNotify events instead of Map/UnmapNotify to detect iconification. - winex11: Replace the lock_changes flag by a check on the event currently being processed. - winex11: Allow mapping/unmapping a window even while processing another event. - wordpad: Display the larger icon in the about box. - ntdll: Implemented LdrProcessRelocationBlock. - ntdll: Use LdrProcessRelocationBlock to apply relocations. - winedevice: Apply relocations to the driver in cases where the loader doesn't do it. - winex11: Always update the window position without relying on the cached values. - winex11: Ignore ConfigureNotify events on unmapped windows. - winex11: Use the same test for resizable windows when setting size and mwm hints. - winex11: Don't update the normal size hints when a window is minimized or maximized. - wininet: Avoid size_t type in trace. - winex11: Avoid updating the wm states inside a ConfigureNotify event. - -Alistair Leslie-Hughes (10): - msxml3: Add support for SAX Documents. - msxml3: Add SAX interfaces. - msxml3: Added typelib ids for SAX interfaces. - msxml3: Added support for SAXXMLReader. - msxml3: Correct SAXXMLReader_create. - msxml3: Correct IXMLDOMText appendData. - msxml3: Correct IXMLDOMComment appendData. - msxml3: Correct IXMLDOMCDATASection appendData. - mscoree: Add missing interfaces. - mscoree: Added ICorRuntimeHost support. - -Allan Tong (1): - wined3d: Call ActivateContext before any gl call in IWineD3DSurfaceImpl_Release. - -Anatoly Lyutin (2): - kernel32: Implement IsWow64Process. - comctl32: Add HotTrackingColor into COMCTL32_SysColor structure. - -Andrew Talbot (36): - winedos: Assign to struct instead of using memcpy. - winex11.drv: Indirection level fix. - wineps.drv: Assign to structs instead of using memcpy. - wnaspi32: Assign to struct instead of using memcpy. - wintrust: Assign to structs instead of using memcpy. - wintab32: Assign to structs instead of using memcpy. - winmm: Assign to struct instead of using memcpy. - wininet: Assign to structs instead of using memcpy. - winex11.drv: Assign to structs instead of using memcpy. - ws2_32: Assign to structs instead of using memcpy. - wsock32: Assign to struct instead of using memcpy. - inetcomm: Assign to structs instead of using memcpy. - winealsa.drv: Assign to structs instead of using memcpy. - wineaudioio.drv: Assign to structs instead of using memcpy. - winecoreaudio.drv: Assign to structs instead of using memcpy. - wineesd.drv: Assign to structs instead of using memcpy. - winenas.drv: Assign to struct instead of using memcpy. - winejack.drv: Assign to structs instead of using memcpy. - wineoss.drv: Assign to structs instead of using memcpy. - dinput: Assign to struct instead of using CopyMemory. - dplayx: Assign to structs instead of using CopyMemory. - rpcrt4: Void functions should not return a value. - inetcomm: Void functions should not return a value. - user32: Void functions should not return a value. - dsound: Assign to structs instead of using CopyMemory. - uxtheme: Assign to struct instead of using CopyMemory. - quartz: Assign to structs instead of using CopyMemory. - ole32: Assign to structs instead of using CopyMemory. - qcap: Assign to struct instead of using CopyMemory. - dbghelp: Fix type mismatch in comparison. - ws2_32: Make function declarations match definitions. - mshtml: Remove superfluous semicolon. - msxml3: Remove superfluous semicolon. - ntdll: Remove superfluous semicolon. - msi: Remove tentative declaration of static array with no size specifier. - rsaenh: Remove tentative declaration of static array with no size specifier. - -Apostolos Alexiadis (3): - comctl32: Greek translation update. - comdlg32: Added Greek translation. - hhctrl: Added Greek translation. - -Aric Stewart (6): - imm: Implement ImmGetIMEFileNameW and ImmGetIMEFileNameA. - imm32: Have both ImmInternalPostIMEMessage and ImmInternalSendIMENotify receive an InputContextData parameter instead of relaying on root_context. - imm32: Correct a typo accidently using data instead of root_context. - imm32: Begin to add basic framework for loading IMEs as dlls. - imm: Implement GetCompositionFont. - imm32: Keep track of context associations between HWND and HIMC. - -Aurimas Fischer (3): - fonts: Added/updated all (9x2) Lithuanian glyphs. - fonts: Where possible use references to Latin glyphs in Latin-Extended glyphs. - fonts: Where possible use references to Latin glyphs in Latin-Extended glyphs. - -Austin English (6): - gdi32: Spelling fixes. - Spelling fixes. - Spelling fixes. - Spelling fixes. - ddraw: Spelling fixes. - Spelling fixes. - -Chris Robinson (1): - quartz: Break processing loop when shutting down. - -Christian Costa (1): - ddraw: DDRAW_dump_flags_nolf must not add LF. - -Christopher Berner (1): - setupapi: Fix buffer size in SetupDiGetDeviceInterfaceDetailW. - -Dan Hipschman (5): - advapi32: Add a stub for CreateRestrictedToken. - wininet: HttpSendRequestExA is not a stub. - wininet: InternetReadFileExA should check INTERNET_FLAG_ASYNC. - widl: Fix a mistake in an ordered list (keywords). - qedit: Indicate the methods of IMediaDet are not implemented in the FIXMEs. - -Dan Kegel (2): - kernel32: Test negative dest len in WideCharToMultiByte. - gdi32: Test retrieving BI_BITFIELDS info for 16bpp modes. - -Detlef Riekenberg (2): - ntoskrnl.exe: Implement MmIsAddressValid. - winspool: Forward EnumPrintersA to EnumPrintersW. - -Dmitry Timoshkov (8): - winex11.drv: Don't add owned windows to the taskbar. - kernel32: Make the test compatible with win9x. - d3d9: Make the visual test pass on GeForce Go 7600. - user32: Add a test for combobox navigation with arrow keys, make it pass under Wine. - user32: Add a defwinproc flag when appropriate. - winecfg: Update the DPI trackbar according to the edit box changes. - wine.inf: Update timezone information. - gdi32: Add a font scaling test when lfHeight == 0 and lfWidth != 0, make it pass under Wine. - -EA Durbin (1): - include: Define some console display modes. - -Eric Pouech (5): - richedit: Added missing fields to be reinitialized for the RTF \pard token. - richedit: Fixed the initialization of the word wrap mode. - richedit: Fixed a bogus computation of paragraph indentation. - richedit: For setting word wrapping, native only uses a null vs non null value. - wordpad: Don't try to use information that hasn't been initialized yet. - -Francois Gouget (1): - ddraw: Remove trailing spaces in ok() calls. - -Frans Kool (2): - winecfg: Added missing Dutch translations. - shell32: Corrected/added Dutch translations. - -Ge van Geldorp (1): - shell32: Support getting the shell folder path for users other than the current user and the default user. - -Hans Leidekker (15): - wininet: Don't strip Accept-Encoding headers from version 1.1 requests. - wininet: Correct spec file entry for InternetCanonicalizeUrl{A, W}. - wininet: Avoid a crash with traces on. - mscms: Rewrite handle management to be thread-safe. Allocate handles dynamically. - wininet: Implement chunked reads. - wininet: Support chunked reads in InternetReadFileEx too. - wininet: Support http_proxy environment variable. - wininet: Don't close proxy connections when keep-alive is specified. - wininet: Fix redirects through a proxy. - wininet: Don't set the host port from the server port. - wininet: Set ProxyEnable registry value if it isn't already set. - wininet: Use a direct connection for tests that connect to localhost. - wininet: Remove dead code from HTTP_DealWithProxy and improve its debug trace. - wininet: Parse the redirect URL in HTTP_HandleRedirect in case of a proxy connection. - wininet: Use INTERNET_MAX_URL_LENGTH to size buffers we intend to store a URL in. - -Herve Chanal (6): - user32: A nicer icon for oic_winlogo. - regedit: A nicer icon. - winefile: A nicer icon. - winetest: A nicer icon. - winemine: A nicer icon. - wordpad: A nicer icon. - -Hin-Tak Leung (1): - hhctrl.ocx: Implement more navigation of chm to TOC, default topic and specific title. - -Huw Davies (1): - mscms: Fix compilation without lcms. - -Hwang YunSong(황윤성) (7): - avifil32: Updated Korean resource. - clock: Updated Korean resource. - credui: Updated Korean resource. - devenum: New Korean resource. - msi: Updated Korean resource. - msrle32: Updated Korean resource. - crypt32: Updated Korean resource. - -Jacek Caban (32): - mshtml: Don't access BSCallback directly in nsio.c. - mshtml: Don't access BSCallback directly in nsembed.c. - mshtml: Added new nsChannelBSC type. - mshtml: Move BSCallback declaration to navigate.c. - mshtml: Move hlink_frame_navigate function. - mshtml: Abstract BSCallback implementation. - jscript: Added DllCanUnloadNow implementation. - jscript: Added tests. - mshtml: Added script engine loading implementation. - mshtml: Added script engine loading test. - mshtml: Added IHTMLDocument2::get_location implementation. - mshtml: Rename nsChannel::content to content_type and clean up its handling. - mshtml: Pass buffer length to MultiByteToWideChar instead of -1. - mshtml: Added nsIChannel::SetContentType implementation. - mshtml: Fixed crash in tests if Gecko is not available. - mshtml: Fixed invalid use of -1 length in WideCharToMultiByte calls. - urlmon: Don't use -1 length in WideCharToMultiByte call. - mshtml: Don't access released object in release_script_hosts. - uuid: Include objsafe.h. - mshtml: Added IActiveScriptSite::OnStateChange implementation. - mshtml: Added script engine initialization implementation. - mshtml: Set script engine state to SCRIPTSTATE_CONNECTED when page is loaded. - mshtml: Added IActiveScriptSiteInterruptPoll stub implementation. - winex11: Add owned windows to the taskbar if it has WS_EX_APPWINDOW style. - mshtml: Added IActiveScriptSiteWindow stub implementation. - mshtml: Added IActiveScriptSite::GetLCID implementation. - mshtml: Added IActiveScriptSite::GetItemInfo implementation. - mshtml: Return S_OK in OnEnterScript and OnLeaveScript. - mshtml: Added parsing inline script support. - mshtml: Added parsing external scripts support. - include: Added activedbg.idl. - mshtml: Fixed copy&paste mistake. - -James Hawkins (19): - msi: Initialize the size parameter. - msi: INSTALLPROPERTY_AUTHORIZED_LUA_APP is only available with msi >= 3.0. - msi: Don't hardcode the root drive. - msi: Implement the StopServices action. - fusion: Add initial fusion.idl. - fusion: Add a few fusion stubs. - fusion: Add a stub implementation of IAssemblyName. - msi: Fix a typo. - fusion: Add a stub implementation of IAssemblyCache. - fusion: Add a stub implementation of IAssemblyEnum. - fusion: Implement CreateAssemblyCache. - include: Add corerror.h. - fusion: Add initial tests for IAssemblyCache. - msi: Handle sorting an empty table. - shell32: Handle a few cases in FO_COPY that arise from not double-NULL terminating the input. - shell32: Fix and simplify the FO_COPY operation, with tests. - msi: Handle the case where no files match the wildcard in MoveFiles. - msi: Downgrade a few messages to WARN. - msi: Fix joining a nonexistent table with another table. - -Jason Edmeades (1): - comctl32: Add basic custom draw support for tooltips. - -Jason Green (4): - d3d9: Add visual test for D3DRS_SHADEMODE states. - d3d9: Allow for driver precision differences in some visual tests. - d3d9: Add a visual test for the DP2ADD shader instruction. - d3d9: Add some visual tests for Direct3DDevice9_StretchRect(). - -Juan Lang (5): - advapi32: Test the MachineGuid value. - advapi32: Create MachineGuid value if it doesn't exist. - crypt32: Test updates after the final update to a detached message. - crypt32: Keep track of state in each message type's update function rather than in CryptMsgUpdate. - crypt32: Allow one update to a decode message after the final update if it's a detached message. - -Justin Chevrier (1): - wine.inf: Create fake dll entry for dosx.exe. - -Kai Blin (2): - janitorial: Use poll() instead of select(). - netapi32: Revert "janitorial: Use poll() instead of select()." - -Ken Thomases (1): - libwine: Cope with Leopard brokenness w.r.t. setrlimit(RLIMIT_NOFILE). - -Kolbjørn Fredheim (1): - ddraw: Don't clear the return value anymore, we fill the fields anyway, also a test for the behaviour. - -Kusanagi Kouichi (1): - regedit: Fix Japanese resource. - -Lei Zhang (11): - comdlg32: Avoid double free in PRINTDLG_PaperSizeA/W. - msxml3: Fix compiles for systems without libxml2. - user32: Tweak how the edit control handles WM_GETDLGCODE. - user32: Make an edit test more readable. - user32: Add more dialog with edit control tests. - user32: Handle WM_CHAR messages better in edit controls. - user32: Add more DrawText tests. - user32: Add more edit dialog tests. - user32: Dialog should ignore WM_KEYDOWN messages if it gets DLGC_WANTCHARS. - user32: Correctly handle VK_RETURN for edit controls with ES_WANTRETURN style. - user32: Use a bogus wildcard in listbox test, change wildcard string to a const. - -Maarten Lankhorst (27): - quartz: Parse audio packets in mpeg splitter to obtain the duration. - quartz: Add sanity check to mediaseeking setrate. - quartz: Make acmwrapper code aware of time, and get rid of its internal buffer. - quartz: Play silence in directsound renderer on end of stream notification. - quartz: Forward requests for MediaSeeking from all pins properly. - quartz: Silence requests for ipin on filters. - quartz: Change name from Start position to Current position in MediaSeeking. - quartz: Add GetCurrentPosition using the reference clock. - quartz: Check against a null dereference and don't read beyond the end of file. - winemp3: Replace fprintf with wine debugging facilities. - quartz: Small mpeg splitter fixes. - quartz: Allow parser filters to implement their own seeking methods. - quartz: Implement graph MediaSeeking GetPositions. - quartz: Implement seeking stubs for transform filters. - quartz: Fix locking in MediaSeeking and forward SetPosition. - quartz: Don't hold lock when changing state in filtergraph. - quartz: Implement filtergraph mediaseeking setposition. - quartz: Fix parser and pins logic to no longer deadlock. - quartz: Prepare mpeg splitter code for seeking by making most splitter parsing locked. - quartz: Add seeking to mpeg splitter. - quartz: Make acmwrapper respond to a sample discontinuity by dropping the frame after parsing it. - include: Add BroadcastSystemMessageEx. - quartz: Fix stop_playback used in pullpin. - quartz: Implement seeking on the null renderer. - winemp3: Change a few more fprintf's to wine logs. - quartz: Fix memory leak found by valgrind. - user32: Implement BroadcastSystemMessage. - -Marcus Meissner (7): - user32/tests: Skip checks if pre-condition does not match. - version: LZCopy return value is LONG. - user32/tests: Fix uninitialized struct component. - msxml3: Fixed include of SAX.h. - user32/tests: Mark unsigned entitities as unsigned. - ddraw/tests: Initialize ddprimpal. - shell32: Adjusted German about dialog for changes in English one. - -Markus Amsler (1): - opengl: Allocate DisabledExtensions buffer. - -Michael Stefaniuc (21): - credui: Update the German translation. - browseui: Add the Romanian translation. - shlwapi: Add the Romanian translation. - browseui: Add the German translation. - comctl32: Add the Romanian translation. - gdiplus: Remove break after return (Smatch). - mshtml: Update the German translation. - shell32: Update the German Translation. - comdlg32: Add the Romanian translation. - comdlg32: Small typo fix in the German translation. - winhelp: Update the German translation. - user32: Add the Romanian translation. - wordpad: Remove bogus ';' after the if statement. - user32: About dialog cosmetic fixes for the Romanian translation too. - wrc: Add the code page mapping for LANG_ROMANSH. - kernel32: Add the NLS file for Romansh (Switzerland). - winhelp: Fix and activate the Romansh translation. - notepad: Update the German translation. - wordpad: Update the German translation. - wrc: Sync the codepage mapping to the LANG_* identifiers from include/winnt.h. - progman: Delete bitrotted translations. - -Mikołaj Zalewski (19): - services.exe: Add a new program. - services.exe: Load list of services from registry at startup. - services: Start a local RPC server. - services: Move CreateService, OpenService and DeleteService implementations from advapi32.dll to services.exe. - services: Move QueryServiceConfigW from advapi32.dll to services.exe. - services: Move ChangeServiceConfigW implementation from advapi32.dll to services.exe. - services: Move GetServiceDisplayName to services.exe and implement GetServiceKeyName. - wrc: verify-translation: Compare all the controls of dialogs, not only the first one. - wrc: verify-translation: Remove dumping of stringtables. - wrc: verify-translation: Allow the translators to set BS_MULTILINE on buttons without an error. - wldap32: Add Polish translation. - comdlg32: Add some ES_NUMBER to pagesetup dialog templates in languages that don't have them. - winecfg: Update Polish translation. - regedit: Add some ES_AUTOHSCROLL to dialog templates in languages that didn't have them. - shell32: Update Polish translation. - reg: Add Polish translation. - credui: Update Polish translation. - gdi32: Fix GetGlyphIndices to select properly the invalid char glyph for TrueType fonts. - winecfg: Update Polish translation. - -Nikolay Sivov (1): - gdi32: PlgBlt implementation. - -Paul Vriens (15): - setupapi: Forward SetupInstallServicesFromInfSectionA to W-function. - setupapi/tests: Add some tests for the last error returned. - setupapi/tests: Run tests on win9x again. - setupapi/tests: Add a few tests for SetupInstallServicesFromInfSectionA. - setupapi/tests: Remove check as we don't care how 'field' is allocated. - setupapi: Fix some last errors for SetupFindFirstLine. - setupapi: Fix some last errors for SetupGetLineByIndex. - winecfg: Update the Dutch resources. - setupapi: Fix for SetupGetIntField, with tests. - setupapi/tests: No need to use GetProcAddress as all functions exist on all platforms. - shlwapi/tests: Turn printf into trace or skip. - rsaenh/tests: Fix a typo. - rsaenh: Add some new flags to wincrypt.h and use one of them. - rsaenh/tests: Add a few skips for non implemented parameters. - rsabase: Remove rsabase tests as they are covered in rsaenh. - -Philip Nilsson (1): - wined3d: Initialize maxAttribs in case it isn't changed by glGetIntegerv. - -Piotr Caban (2): - msxml3: Added SAXXMLReader registration. - msxml3: Added fixmes to stubs. - -Reece Dunn (14): - user32: Fixed the HiliteMenuItem tests to pass on Windows 9x. - comdlg32: Fix building the tests with MSVC headers. - tools: Target the version defines to Vista in msvcmaker. - quartz: Fixed building with MSVC headers. - ole32: Added a missing include needed for CLSID_ShellDesktop using MSVC headers. - ntdsapi: Fix building the tests with MSVC headers. - shlwapi: Added SHCreateStreamOnFileA tests. - shlwapi: Added SHCreateStreamOnFileW tests. - shlwapi: Added SHCreateStreamOnFileEx tests. - shlwapi: Added STGM_TRANSACTED tests for SHCreateStreamOnFileA/W/Ex. - shlwapi: Added basic tests for the SHCreateStreamOnFile IStream implementation. - winecfg: Add support for updating all system colours. - shlwapi/tests: Loop over the STGM access modes when testing the SHCreateStreamOnFile methods. - shlwapi/tests: Fixed the wide-character strings. - -Rob Shearman (30): - widl: Support using context handles as the binding handle in client functions. - widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - widl: Add support for generic binding handles. - widl: Fix detection of non-pointer context handles. - widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - winedevice: Handle failure of RegisterServiceCtrlHandlerExW. - rpcrt4: Print an error if an invalid client context handle is used. - notepad: Remove the License and NO WARRANTY options from the Help->Information popup menu as the same information can now be viewed from the About dialog. - services: Move SetServiceStatus and QueryServiceStatusEx to services.exe. - services: Move LockServiceDatabase and UnlockServiceDatabase from advapi32.dll to services.exe. - services: Move ControlService and StartServiceW from advapi32.dll to services.exe. - services: Remove dependency on service name being determined correctly in order for the two ends on the control pipe to meet up. - services: Introduce an scmdatabase object to store the root key of the services database. - services: Fill in the functions between implemented functions in svcctl.idl so that it our remoting code is wire-compatible with NT. - widl: Parse typedefs of function pointers. - Remove superfluous semicolons from IDL files. - widl: Be more strict about where semicolons can appear in IDL files. - rpcrt4: Improve trace in RPCRT4_find_interface to print the interface identifier data as well as the object guid. - rpcrt4: Add a reference to the binding object in I_RpcNegotiateTransferSyntax and release the reference in I_RpcFreeBuffer. - services: Fix memory leak of some data in the service record. - advapi32: Remove some unused services functions. - net: Display a more specific error message when a service command fails. - wineboot: Start services.exe on startup instead of on demand in the advapi32 services code. - widl: Add a function to get the return type of a parsed function. - widl: Store function and function pointer types completely within type_t type. - widl: Support parsing calling conventions for function identifiers. - widl: Support __fastcall and __pascal calling conventions. - widl: Add a newline between function prototypes for non-object interfaces. - widl: Fix the writing out of function pointers with more than one level of indirection. - widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - -Roderick Colenbrander (25): - wined3d: We don't offer index/vertex buffer caps. Neither do Windows drivers (at least Nvidia, Ati and Intel). - wined3d: When volume textures aren't around (GL_EXT_texture3D not supported) return WINED3DERR_NOTAVAILABLE. - wined3d: Add reporting of D3DRTYPE_VOLUME capabilties. - wined3d: Return WINED3DERR_NOTAVAILABLE when cubemapping isn't supported. - wined3d: Don't continue with CheckDeviceFormat when the texture format isn't around. - wined3d: Remove unneeded code in CheckDeviceFormat. - wined3d: Add srgb write support to CheckDeviceFormat. - wined3d: Add a missing break to blt_to_drawable. - wgl: Return TRUE on wglReleasePbufferDCARB success. - wined3d: CheckTextureCapability returns TRUE for V8U8. - wined3d: We want to compare the old and the new format and not the old with the old. - wined3d: Add more debug code to CheckDeviceFormat. - wined3d: Fix a typo in CheckSrgbWriteCapability. We support both X8R8G8B8 and A8R8G8B8. - wined3d: Always report D16 as Windows drivers report it on all cards (likely using emulation). - d3d9: Test post pixelshader blending. - wined3d: Initial post pixelshader blending support. [attempt 2]. - wined3d: Add D3DUSAGE_QUERY_PIXELSHADER_BLENDING to CheckDeviceFormat. - wined3d: Make the filtering capability of a format a flag in the formats table. - wined3d: Add a depthstencil flag to the formats table and make use of it in CheckDepthStencilCapability. - wined3d: Also move the rendertarget capability to the formats table. - wined3d: Fix a postpixelshader_blending bug. - wined3d: Request a pixel format with alpha support in case of P8 render targets. - wgl: Move all winex11.drv opengl traces to wgl. - wgl: Fix ChoosePixelFormat behavior. - wgl: Add missing WGL_STEREO_ARB to ConvertAttribWGLtoGLX. - -Sean Huckins (1): - gdiplus: Implementation of GdipCreateBitmapFromHBITMAP. - -Stefan Dösinger (41): - wined3d: Make the state table a property of the shader backend. - wined3d: Move shader generation into the shader backend. - wined3d: Move the shader backend selection into a separate function. - d3d: De-pointerize the WINED3DCAPS structure. - wined3d: Set shader specific caps in the shader backend. - wined3d: Move shader caps setting into the arb and glsl shader backends. - d3d9: Add a projected texture test. - wined3d: Free shader private data on reset. - wined3d: Alloc / free shader private data and blt stuff in Init3D/Uninit3D. - wined3d: Add GL_ATI_fragment_shader. - wined3d: Add a shader DLL init callback. - wined3d: Fragment processing using GL_ATI_fragment_shader. - wined3d: Implement env bump mapping in the atifs ffp replacement. - wined3d: Enable D3DFMT_V8U8 with GL_ATI_fragment_shader. - ddraw: Fix some Z buffer formats. - ddraw: Some EnumZBufferFormat fixes. - d3d9: Add a basic test for multiple rendertargets. - wined3d: Free heapMemory, not allocatedMemory when adjusting the surface. - d3d8: Reject broken normal declaration types with fixed function. - wined3d: Inherit from the proper state table in atifs. - wined3d: Remove some debug TRACE stuff. - wined3d: Create a fake non-gl adapter. - wined3d: Return a fake pixel format if gl is not loaded. - wined3d: Refuse 3D initialization without opengl. - ddraw: Do not fail if D3D is not available. - wined3d: Catch D3DUSAGE_AUTOGENMIPMAP and D3DUSAGE_RENDERTARGET combos. - d3d9: Add a test for temporary results. - wined3d: Prepare the atifs shader generator for temp register support. - wined3d: Implement D3DTA_TEMP in the GL_ATI_fragment_shader codepath. - wined3d: Do not report pixel shaders if not supported. - wined3d: Implement TSSARGTEMP with register combiners. - wined3d: Update copyright lines. - d3d9: Make the shading test even more precision tolerant. - ddraw: Add a D3D7 cube map test. - ddraw: Remove some leftover test debug output. - ddraw: Pass the NULL rectangle to IDirectDrawSurface::Unlock. - wined3d: Initialize some ARB shader output parameters. - d3d9: Improve an ok line. - wined3d: Deactivate GL_FRAGMENT_SHADER_ATI before deactivating a context. - wined3d: Advertize postpixelshader blending for surfaces. - wined3d: Advertise shader emulation of bumpmap formats. - -Stefan Leichter (1): - advapi32: Partly implemented QueryServiceConfig2A/W. - -Tony Wasserka (1): - d3dx9: Start implementation of d3dx9_37. - -Vitaliy Margolen (16): - user32: Fix F1 message sequence. - wineshelllink: Don't hard-code icon extension to xpm. - winemenubuilder: Add support for 24 and 32 bit icons using png format. - regedit: Fix typo. - shlwapi: Add Russian translation. - Update Russian translations. - hhctrl: Add Russian translation. - devenum: Add Russian translation. - net: Update help. - mshtml: Add Russian translation. - Update Russian translations. - user32: Properly translate keyboard left/right-shift, alt, ctrl keys hardware messages. - localspl: Add Russian translation. - winecfg: Update Russian translation. - winex11drv: Distinguish left and right keys for shift, ctrl and alt. - reg: Add Russian translation. - -Vitaly Perov (1): - comdlg32: When PD_USEDEVMODECOPIESANDCOLLATE flag is not set dmCopies must be 1. - --- -Alexandre Julliard -julliard@winehq.org +This is release 0.9.60 of Wine, a free implementation of Windows on Unix. + +What's new in this release (see below for details): + - Better support for Windows IMEs. + - Option for Windows-style window decorations. + - Improved system tray behavior. + - Window management fixes. + - Improved quartz audio support. + - Better support for launching apps from Unix file managers. + - 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.60.tar.bz2 + http://prdownloads.sourceforge.net/wine/wine-0.9.60.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. + +---------------------------------------------------------------- + +Bugs fixed since 0.9.59: + + 2989 Wine supports only one DISPLAY per session + 3185 Invalid working directory results in crashes file open/close dialog + 3534 Systray icons are not transparent... + 4056 winecfg is unusable with the default virtual desktop size + 5034 Wrong size of commdlg OpenFile dialog in radvideo.exe + 5346 Library initialisation crash with USER and X11DRV + 5396 Tabbed Text + 5804 iTunes detects incorrect version of QuickTime + 5887 Wine does not load dynamically generated fonts + 6257 Ankh Demo crashes in OpenGL mode + 6450 Deus Ex user input stops working intermittently + 6573 Errors while trying to run Ragnarok Online causing game to crash at startup + 6785 Continuum doesn't run in non-virtual desktop when windowed + 6786 Continuum windowed mode under virtual desktop puts pixels ~15 too low + 6871 Textures in GTAIII are rendered as grey and silver weirdness + 6907 Delphi applications printing bug + 6999 Prince of Persia Warrior Within plays videos with blank screen then closes + 7137 game Secret Files Tunguska dies randomly with "unknown error" poping up + 7140 segfault running rc.exe via make + 7174 Master of Orion 2 does not switch screen resolution correctly + 7193 Deus Ex fullscreen > 1024x768 cut off + 7231 TextPad4: Can't print + 7477 Uplink demo crashes + 7596 HomeSeer 2.2 will not install + 7622 Sony Vegas 7.0 + 7631 Titan Quest hangs after 5 seconds in menu + 7647 The updater for Gekkeiju Online crashes with an error message. + 7679 IMVU 3D Avatar Chat client crashes + 7786 Grand Prix 3 dplay error + 7836 Prism fails to start + 7879 Mono (D3D Game) dies with an error about sound + 7945 3dmark 2000 demo immediately exits + 8049 Edit control text length is off by one + 8086 gdi32 font test fails in fonts with charset 130 + 8116 MyScribe doesn't start (Suse 10.0) + 8143 Project IGI 2 : Covert Strike crashes at the end of intro movie + 8319 Autocad 2008 trial install fails very early + 8540 C&C3: Malfunctioning shaders (ATI) + 8547 Intel Image processing Library - ipla6 error preventing operation. + 8551 MoveFileWithProgressW unconditional fails for directories with flag MOVEFILE_REPLACE_EXISTING + 8641 Supreme Commander Patch crashes + 8809 When in "Wine desktop" mode, systray crashes + 9010 HebRech takes forever to load + 9011 incorrect dup() behavior + 9047 Civilization IV Expansion pack "Beyond the Sword" Install Crash + 9286 nice icon and menu + 9315 Running Corel Draw 7 causes crash + 9631 Window with specific classes/styles/ex_styles should bypass WM taskbar + 9647 iTunes 7 sound loopy, unstable + 9671 Derive 5 no longer draws graphs in color + 9731 GdiConvertToDevmodeW trying to copy -32 bytes on memcpy + 9740 Unimplemented function causes Phantasmagoria 2 to crash + 9765 iTunes 7.4.3 can't connect to the iTunes music store + 9793 Circuitmaker 2000 trouble with wire manual routing + 9809 Autodesk Revit Architecture 2008 install fails + 9969 OPAS shows error boxes when hovering over calendar item + 10446 Capslock key press not detected + 10750 shdocvw carshes after showing webpage + 10867 Trying to run Ztree under wine : "Could not get hWnd" + 10917 Checkpoint Smart Dashboard crashes + 11026 newly created tool window does not have keyboard focus + 11111 Picasa slideshow does not have focus on Gnome + 11252 Adobe Photoshop CS2 window motion cosmetic problem + 11347 Microsoft Word 2000 - some fonts are always bold + 11371 Not possible to open documents with Teach2000 + 11463 conflicting types between Wine list.h and Solaris list.h in server/fd.c + 11474 winelauncher mixes up stdout & stderr + 11547 corrupted double-linked list - glasgow haskell compiler + 11593 winecfg does not correctly import colour theme profiles + 11679 BW Styler Plugin for Adobe Photoshop CS/CS2 ugly cosmetic problem + 11731 iTunes doesn't register mouse clicks properly + 11775 Oleview does not correctly generate idl files + 11784 3dsmax2008 installer crashes:err:cursor:DIB_GetBitmapInfo (1633746944): unknown/wrong size for header + 11870 Steam Crashes when trying to install any game with GLX Error + 11973 Chatstat crashes into wintrust + 12050 No mouse cursor after minimize-restore in Uru + 12073 Cyberboard: selection windows don't change selection + 12108 Regression in mshtml results in page causes page fault when visiting a web page + 12110 Regression in Starfleet Command game since 0.9.57 + 12150 Photoshop7 -> open file -> select more than 36 files, Wine dies + 12156 closing multiple help windows crashes wine + 12162 Heroes of Might & Magic IV awful frame rate + 12203 Windows Live Messenger 8.1.0178 fails to install + 12249 Ultraedit v14.00a builtin MSI doesn't work. + 12250 Call of Cthulhu: Slow and jerky mouse movement + 12264 IDA disassembler (and other apps developed in Delphi) window isn't added to taskbar + 12266 EVE Online interface got several glitches between 0.9.58 and 0.9.59 + 12296 Some games are crashing when they switch the resolution + 12325 winebrowser / mapi32.dll does not support accented characters in mailto: + 12331 windows driver doc kit won't install. + 12343 Anarchy Online: Shift Clicking anything with left shift does not work as intended + 12362 Systray support for all applications is broken + 12365 ntoskrnl: crash on unimplemented API: KeQueryActiveProcessors / KeQueryInterruptTime (starforce) + 12397 Can't accept licence of Swat 4 demo + 12399 Oregon Trail 5th Edition: will not start + 12408 Swat 4 Demo Installer license text displayed incorrectly + 12409 EVE Premium Client Login Screen Black + 12410 f761b908013698ee4e015ea03f48ce5d170fb666 breaks ghostrecon + 12413 Pokerstars windows not refreshed + 12424 QIP: message window hangs often if minimized + 12439 Regression: Age of Mythology: Installer page faults + 12445 Arcgisexplorer crashes in dbghelp + 12461 SmartFTP Client requires an implementation of cryptui.dll + 12465 winetest compilation regression with 0.9.59 (Bourne shell problem) + 12469 Keyboard navigation regression in some controls + 12482 Wine 0.9.59 don't do linefeed when ENTER is pressed in any "MEMO" in applications compiled by DELPHI7. + 12493 CreateCompatibleDC creates a compatible DC from everything + 12496 SSF: SendMessage Error MessageBox ends program + 12498 fixme:htmlhelp:HtmlHelpW Not all HH cases handled correctly + 12499 RnQ: chat input textbox became non-multiline in 0.9.59 + 12512 Ctrl+Home and Ctrl+End don't match Windows behaviour for the edit control + 12543 Shift-click not working in World of Warcraft after upgrade to latest wine (0.9.59) (affects Photoshop, too) + 12579 regression : cohabitation between windows in "mdi" application + +---------------------------------------------------------------- + +Changes since 0.9.59: + +Alex Villacís Lasso (1): + user32: LoadImage(IMAGE_BITMAP) should reject invalid BMP files (with tests). + +Alexander Dorofeyev (21): + wined3d: Don't copy the extra line. + wined3d: Implement CONVERT_RGB32_888 conversion. + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_Uninit3D. + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_ColorFill. + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_ResourceReleased. + wined3d: LEAVE_GL when exiting with error in tesselate_rectpatch. + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DQueryImpl_Release. + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DOcclusionQueryImpl_GetData. + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DEventQueryImpl_GetData. + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DEventQueryImpl_Issue. + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DOcclusionQueryImpl_Issue. + wined3d: move ENTER_GL in IWineD3DDeviceImpl_Init3D. + wined3d: Add device->isInDraw checks in LoadLocation. + wined3d: Move PreLoad to avoid calling it with gl lock held. + wined3d: Set isInDraw later in drawPrimitive. + include/d3d.h: Fix method calling macros. + ddraw: Add possibility to ignore lights in viewport_activate. + ddraw: Set active_device in AddViewport. + ddraw: Temporarily activate viewport when clearing. + ddraw/tests: Add viewport clearing tests. + ddraw/tests: Add colorkeyed blit to p8_primary_test. + +Alexander Morozov (3): + setupapi: Add a test for SetupDiGetDeviceRegistryProperty and SetupDiSetDeviceRegistryProperty. + setupapi: SetupDiGetDeviceRegistryProperty should return ERROR_INSUFFICIENT_BUFFER when buffer size is insufficient. + setupapi: SetupDiGetDeviceRegistryProperty should return ERROR_INVALID_DATA when buffer size is not 0 but buffer is NULL. + +Alexander Nicolaysen Sørnes (6): + comdlg32: Update Norwegian Bokmål resource. + oledlg: Fix control class in Norwegian Bokmål resource. + shell32: Update Norwegian Bokmål resource. + winecfg: Update Norwegian Bokmål resource. + regedit: Update Norwegian Bokmål resource. + winhelp: Update Norwegian Bokmål resource. + +Alexandre Julliard (63): + winex11: Ignore ConfigureNotify events when a window is iconified. + user32: Fix a few ShowWindow todo tests. + winex11: Fix handling of property sizes for 64-bit platforms. + winex11: Get rid of the SetWindowPos hack to unmap systray windows. + winex11: Set the _NET_WM_STATE atom directly for unmapped windows. + winex11: Don't set NET_WM_STATE on the desktop window. + libwine: Only use the last line of the git version description. + user32: Fix list_window_parents when run in the desktop process. + wrc: Add support for Unicode accelerator strings. + libwine: Added mappings for codepage 1361 (Korean Johab). + user32: Get rid of the debug mark option in the system menu. + winex11: Improved handling of broken 8-bit TARGETS selection. + winex11: Move all the embedded systray window support to winex11.drv. + winex11: Make the system tray window transparent. + winex11: Add a timer to detect when a systray owner has been destroyed. + explorer: Implement a global system tray window. + programs: Remove obsolete winelauncher script. + tools: Remove the obsolete bug_report.pl and genpatch scripts. + winex11: Abstract window map/unmap to separate functions. + winex11: Add some generic support for XEMBED client windows. + winex11: Get rid of the useless systray hidden flag. + winex11: Fix KeymapNotify handler to take left/right modifiers into account. + winex11: Added an error handler to catch bad atoms in clipboard selections. + winex11: Flush the display after creating X windows. + user32/tests: Avoid testing uninitialized data. + programs: Remove winelauncher from install rules. + winex11: Separate the XIM process-wide setup from the IME creation. + winex11: Make sure to flush painting operations before moving a window. + comctl32: Get rid of the hack to remove size grips on managed windows. + user32: Forward all WM_SYSCOMMAND messages to the driver, not only moves and resizes. + user32: Moved the menu activation hack on managed windows to the X11 driver. + winex11: Replace the keyboard flags bitfield by the official flag definitions. + user32/tests: Replace the keyboard flags bitfield by the official flag definitions. + wine.inf: Add a version number to make sure the file changes between versions. + wordpad: Don't pass an invalid DC to CreateCompatibleDC. + gdi32: Fix CreateCompatibleDC to reject invalid DCs. + winex11: Don't set full screen style on minimized windows. + winex11: Make WS_EX_APPWINDOW windows have normal type. + winex11: Fix the type hint for the desktop window. + shdocvw: Fixed typo in CLSID_InternetShortcut. + preloader: Reserve low memory areas in separate chunks. + kernel32: Reserve the low 64Kb area separately from the rest of the DOS memory. + winedos: Handle memory reservation errors more gracefully. + include: Add the SPSVCINST_* setupapi flags. + setupapi: Move strdupW and strdupWtoA to the setupapi_private.h header. + setupapi: Implemented SetupInstallServicesFromInfSectionW. + setupapi: Install services in InstallHinfSection. + wine.inf: Use a proper services section to install services. + fusion: Fix a number of leaks in assembly_create. + comdlg32: CDM_GETSPEC and CDM_GETFILEPATH should preserve double quotes in file lists. + server: Keep a file descriptor open to the config directory to make sure we don't write the registry in the wrong place. + winex11: Moved the ExposeEvent handler to event.c. + winex11: Moved the MapNotify handler to event.c. + winex11: Moved the WM_SYSCOMMAND handling to window.c. + user32: Added support for WS_EX_RIGHT in the button control. + user32: Added support for WS_EX_RIGHT in the edit control. + user32: Added support for WS_EX_RIGHT in the static control. + quartz: Avoid sizeof in traces. + kernel32: Create the windows and system directories if necessary. + setupapi: Add support for creating directories from the FakeDlls section. + wineprefixcreate: Moved creation of directories to wine.inf. + ntdll: Don't create a temporary dir, run wineprefixcreate directly in the final dir. + gdi32: Fixed initialization of bit masks in GetDIBits for 16-bit bitmaps. + +Alistair Leslie-Hughes (1): + msxml3: Implement transformNode. + +Anatoly Lyutin (2): + user32/tests: Get rid of magic number. + user32/tests: Add test for switching not maximized mdi children. + +Andrew Talbot (23): + port: Remove superfluous semicolon. + wintrust: Avoid assigning to struct members from other structs. + advapi32: Do not call MIDL_user_free() with pointer to stack memory. + msdmo: Array parameter is passed to function as pointer so loses size information. + advapi32: Array parameters are passed to function as pointers so lose size information. + msdmo: Fix calculation of array size in bytes. + dnsapi: Remove unused variables. + comctl32: Remove unused variables. + comctl32: Remove unused variables. + crypt32: Remove unwanted shadow variable. + comdlg32: Remove unused variables. + crypt32: Remove unused variables. + browseui: Fix handle leak. + dinput: Fix handle leak. + comctl32: Remove unused variables. + dmime: Remove unused variables. + comdlg32: Remove unused variable. + dsound: Remove unused variable. + dplayx: Remove unused variables. + gdi32: Remove unused variable. + gphoto2.ds: Remove unused variable. + hhctrl.ocx: Remove unused variable. + ddraw: Remove unused variables. + +Apostolos Alexiadis (3): + oleaut32: Added Greek translation. + comctl32: Greek resources update. + comdlg32: Greek resources update. + +Aric Stewart (22): + winex11: Add IME functionality to winex11drv. + imm32: Implement ImmConfigureIME using the loaded IME. + imm32: Load a default IME if a specific one is not specified. This defaults to x11. + imm32: Implement ImmGetImeMenuItems using loaded IME. + winex11: Have all xim interaction pass through the new x11drv IME interface. + imm32: Make use of of the loaded IME for all processing. + imm: Default context and hwnd are per thread so store that data in a thread local storage. + imm32: Properly handle unicode and non unicode IMEs with SetCompositionString. + imm32: ImmDestroyContext cannot destroy the default context. + imm32: Semi-stub implement ImmEnumRegisterWord using loaded IME. + imm32: Semi-stub implement ImmEscape using loaded IME. + imm32: Semi-stub implement ImmGetConversionList using loaded IME. + imm32: Implement ImmGetRegisterWordStyle using loaded IME. + imm32: Implement ImmRegisterWord using loaded IME. + imm32: Implement ImmUnregisterWord using loaded IME. + imm32: Remember to unset the hwnd for a context when that hwnd is associated with a different context. + user32: Make sure there is space for at least 6 items in a combo dropdown without forcing it to be at most 6 items as well. + imm32: All HIMCC in the InputContext should be initialized at creation. + imm32: Implement ImmProcessKey and ImmTranslateMessage. + user32: Call ImmProcessKey in TranslateMessage to allow IMEs to handle key processing if they choose to. + imm32: Create the IME UI window with the IME instance so the registered class can be found. + wininet: Correct the case where Content-Length is set as well as Transfer-Encoding == chunked. + +Austin English (6): + Spelling fixes. + msi: Spelling fixes. + Spelling fixes. + ole32: Spelling fixes. + oleaut32: Spelling fixes. + Spelling fixes. + +ByeongSik Jeon (2): + winex11: Add VK_HANGUL, VK_HANJA for Korean Native IME. + imm32: Implement ImmSetConversionStatus. + +Chris Robinson (1): + wined3d: Check for NULL vertex declarations. + +Colin Finck (1): + gdi32: Add a test to demonstrate a CreateCompatibleDC problem. + +Dan Hipschman (15): + qedit/tests: Don't forget CoUninitialize. + qedit/tests: Add test framework and test for IMediaDet_put_Filename. + qedit/tests: Add a test for IMediaDet_get_OutputStreams. + qedit/tests: Add a test for IMediaDet_get_Filename. + qedit/tests: Add a test for IMediaDet_(put|get)_CurrentStream. + qedit/tests: Add a partial test for IMediaDet_get_StreamMediaType. + qedit/tests: Fix an incorrect count given to GetTempPathW. + qedit: Implement IMediaDet_put_Filename. + qedit: Implement IMediaDet_get_Filename. + qedit: Implement IMediaDet_get_OutputStreams. + qedit: Implement IMediaDet_(put|get)_CurrentStream. + qedit: Implement IMediaDet_get_StreamMediaType. + qedit: Implement IMediaDet_get_FrameRate. + qedit: Add a stub for IMediaDet_get_StreamLength. + qmgr/tests: Fix minor potential memory leaks. + +Detlef Riekenberg (2): + ntoskrnl.exe: Implement KeQueryActiveProcessors. + ntoskrnl.exe: Implement KeQueryInterruptTime. + +Dmitry Timoshkov (19): + gdi32: Fully initialize face->ntmFlags on font load. + winex11: Change the priority of evaluated window styles to workaround a Metacity bug with handling of utility windows. + gdi32: Fix lfWidth before caching the font to avoid duplicate entries in the cache. + gdi32: Move negative lfWidth test into a separate body, skip the test if there is no 'x' in the font. + winex11.drv: Do not set window type to utility to avoid a Metacity bug. + regedit: Fix Win64 warnings. + wineboot: Fix Win64 warnings. + wineconsole: Fix Win64 warning. + winefile: Fix Win64 warnings. + wordpad: Fix Win64 warnings. + winhelp: Fix Win64 warnings. + tools: Fix font structure layout for 64-bit mode. + user32: Fix Win64 warnings. + user32: Use appropriate type for lresult. + gdi32: Clarify which font doesn't contain 'x'. + gdi32: Map glyph to Symbol range only if the font supports symbol encoding. + winex11.drv: Map zero-sized windows but don't add WM decoration to them. + winedump: Print names for all known EMF records. + winedump: Decipher contents of a couple EMF records. + +Eric Pouech (5): + dbghelp: Be stricter when looping in symbol tables. + dbghelp: Prevent debug overflow of internal buffer while tracing. + dbghelp: Fix invalid pointer dereference. + richedit: Force window update when the word wrap option has changed. + winhelp: Fix regression introduced by Win64 warning fixes. + +Erik de Castro Lopo (1): + msvcrt: Clear end-of-file flag on fseek. + +Francois Gouget (11): + services: Add a trailing '\n' to a couple of Wine traces. + wineboot: Make sure COBJMACROS is defined before objidl.h is included. + ddraw/tests: Fix compilation on systems that don't support nameless unions. + fusion/tests: Fix compilation on systems that don't support nameless unions. + Assorted spelling fixes. + ole32: Fix spelling of GetComparisonData(). + Fix spelling of dwAssign. + wldap32: Fix typo in the French resources. + jscript/tests: Fix the '\n's in an ok() call. + ddraw/tests: Fix compilation on systems that don't support nameless unions. + Spelling fix in the ldt bitfields. + +Hans Leidekker (1): + winebrowser: Convert to Unicode. + +Hin-Tak Leung (2): + hhctrl.ocx: Return help window handle to caller. + hhctrl.ocx: Look up in chm if url doesn't contain "://". + +Huw Davies (2): + gdi32: Don't overrun the current scanline while copying a glyph's bitmap. + gdi32: LineDDA shouldn't include the end point. Add some tests. + +Hwang YunSong(황윤성 (8): + winemine: Updated Korean resource. + winecfg: Updated Korean resource. + user32: Updated Korean resource. + comdlg32: Updated Korean resource. + shell32: Updated Korean resource. + user32: Updated Korean resource. + winecfg: Updated Korean resource. + winefile: Updated Korean resource. + +Hwang YunSong(황윤성) (10): + progman: Updated Korean resource. + notepad: Updated Korean resource. + shell32: Updated Korean resource. + uninstaller: Updated Korean resource. + winecfg: Updated Korean resource. + winemine: Update Korean resource. + winhelp: Updated Korean resource. + wordpad: Updated Korean resource. + xcopy: Updated Korean resource. + wineps.drv: Updated Korean resource. + +Jacek Caban (17): + mshtml: Added IHTMLWindow2::get_navigator implementation. + mshtml: Don't crash if nsWebBrowser could not be created. + mshtml: Remove unneeded includes. + jscript: Added IObjectSafety implementation. + jscript: Added IObjectSafety tests. + include: Added ICanHandleException interface. + mshtml.idl: Added DispHTMLWindow2 dispinterface. + mshtml: Correctly handle NULL req in get_nscontainer_from_load_group. + mshtmdid.h: Fixed IHTMLWindow2 dispids. + mshtml.idl: Added IHTMLWindow3 declaration. + mshtml: Make sure to null terminate buffer in parse_extern_script. + mshtml: Added IActiveScriptDebug32 stub implementation. + mshtml: Added generic IDispatchEx implementation and use it in OnNavigator. + mshtml: Move get_typeinfo to dispex.c. + mshtml: Added possibility to get node object from nsIDOMNode only if available. + mshtml: Added IHTMLWindow3 stub implementation. + mshtml: Store IActiveScriptParseProcedure in ScriptHost. + +James Hawkins (21): + msi: Reset the feature states if iInstallLevel is 0 or below. + msi: Set the install context based on the ALLUSERS property. + msi: Don't reorder the table when matching rows as the results are already ordered. + msi: Test and reimplement MsiQueryProductState. + msi: Open the install properties key based on the install context. + msi: Don't execute the view again when modifying a WHERE query. + advapi32: Fix a few tests that fail in win2k. + crypt32: Fix a few tests that fail in win2k. + ntdll: Fix a few tests that fail in win2k. + kernel32: Add traces to see why the tests fail in win2k. + shell32: Fix a few tests that fail in win2k. + fusion: Implement IAssemblyCache::InstallAssembly. + user32: Fix a test that fails in XP and win2k3. + kernel32: Split the GetComputerName/Ex tests into their own test functions. + kernel32: Fix a few failing tests in win2k. + kernel32: Remove an invalid trace and comment. + fusion: Explicitly check for -1 for a missing table. + kernel32: Fix a test that fails in win2k. + kernel32: Fix a test that fails in win2k and up. + ole32: Fix a few tests that fail in win2k. + oleaut32: Fix a few tests that fail in win2k. + +Jeremy White (1): + include: Add a resource type for scalable font resource (.fot) files. + +John Klehm (1): + wintab32: Implement WTSetA/W. + +Jonathan Ernst (4): + comdlg32: Updated French translation. + winecfg: Updated French translation. + winefile: Updated French translation. + winhelp: Updated French translation. + +Juan Lang (2): + softpub: Forward softpub functions to wintrust. + cryptui: Add stub DLL. + +Jörg Höhle (1): + wined3d: Fix missing break inside switch in SetAutoGenFilterType. + +Kai Blin (1): + dpnhpast: Implement a stub for DirectPlayNATHelpCreate. + +Kusanagi Kouichi (4): + winex11: Connect to XIM server dynamically. + winex11.drv: Fix Solaris build error. + user32: Handle IME messages more gracefully. + winex11: Update caret position. + +Lei Zhang (38): + user32: Add more tests for ES_WANTRETURN. + user32: Add more tests for single line edit control inside a dialog. + user32: Add tests for edit controls and VK_RETURN. + user32: Add tests for edit controls and VK_TAB. + user32: Fix WM_CHAR return value for edit controls. + user32: Handle ES_MULTILINE correctly for WM_KEYDOWN/VK_RETURN. + user32: Handle VK_ESCAPE correctly in EDIT_WM_KeyDown. + gdiplus: Add a stub for GdipSetClipRectI. + user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_RETURN. + user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_TAB. + user32: Fix a typo. + user32: Handle VK_TAB in EDIT_WM_KeyDown. + gdiplus: Add a stub for GdipSetClipRegion. + gdiplus: Add a stub for GdipSetCustomLineCapBaseCap. + gdiplus: Add a stub for GdipGetCustomLineCapBaseInset. + gdiplus: Add a stub for GdipSetCustomLineCapBaseInset. + gdiplus: Add a stub for GdipSetCustomLineCapStrokeJoin. + gdiplus: Add a stub for GdipSetCustomLineCapWidthScale. + gdiplus: Add a stub for GdipSetEffectParameters. + gdiplus: Add a stub for GdipSetEmpty. + gdiplus: Add a stub for GdipSetImageAttributesCachedBackground. + gdiplus: Add a stub for GdipSetImageAttributesGamma. + gdiplus: Add a stub for GdipSetImageAttributesNoOp. + gdiplus: Add a stub for GdipSetImageAttributesOutputChannel. + gdiplus: Add a stub for GdipSetImageAttributesOutputChannelColorProfile. + gdiplus: Add a stub for GdipSetImageAttributesRemapTable. + gdiplus: Add a stub for GdipSetImageAttributesThreshold. + gdiplus: Add a stub for GdipSetImageAttributesToIdentity. + gdiplus: Add a stub for GdipSetInfinite. + gdiplus: Add a stub for GdipSetLineColors. + gdiplus: Add a stub for GdipSetLineLinearBlend. + gdiplus: Add a stub for GdipSetLinePresetBlend. + gdiplus: Add a stub for GdipSetLineTransform. + gdiplus: Add a stub for GdipSetMetafileDownLevelRasterizationLimit. + user32: Do checks in the right order in EDIT_BuildLineDefs_ML. + user32: Handle ctrl + home in edit control. + user32: Handle ctrl + end in edit control. + msxml3: Check for xsltInit before calling it. + +Louis Lenders (2): + urlmon: Add stub for CoInternetSetFeatureEnabled. + wininet: Improve stub for FindNextUrlCacheEntryW a tiny bit. + +Luis C. Busquets Pérez (1): + tools: Add Spanish translation to wine.desktop. + +Maarten Lankhorst (47): + dsound: Hold lock in GetStatus. + quartz: Add more state transitions to the filtergraph. + quartz: Get rid of code duplication and add a flush method. + quartz: Make FileAsyncReader_WaitForNext return an empty sample in flushing state. + quartz: Fix some memory leaks in the file source. + quartz: Fix past mistake to release lock during seeking and changing state. + quartz: Reset EcCompleteCount before starting filters. + quartz: Handle flushing and end of stream notifications for input pins. + quartz: Make wait timeout in directsound slightly larger. + quartz: Fix deadlocks in pullpin. + quartz: Make mpeg splitter keep track of play position and keep last sample if sending was not successful. + quartz: Try creating the file reader from the filter source first before falling back to the generic async file reader. + quartz: Drop packets in the transform filter if in the wrong state. + quartz: Make the DirectSound renderer return S_FALSE packet if in the paused state. + quartz: Don't free a null media type in the file source. + quartz: Make the pullpin forward the BeginFlush before doing its own flushing. + quartz: Remove while { } while construct. + quartz: Generate a seek table for the mpeg splitter. + quartz: Make the directsound renderer handle the Play->Pause->Play position without dropping data. + quartz: Implement stop position in the filtergraph. + quartz: Implement stop position in the mpeg splitter. + include: Add ISeekingPassThru interface. + quartz: Add a stub for SeekingPassThru. + quartz: Add stubs for the IMediaSeeking interface in SeekingPassThru. + quartz: Don't clean up in avi decoder if driver isn't opened. + quartz: Set sane defaults for pin stream rate. + quartz: Silence requests for IVideoWindow. + quartz: Silence seeking fixmes on transform filter. + quartz: Bring waveparser to the same level as the mpeg splitter. + include: Add dvdmedia stub header. + quartz: Add VIDEOINFOHEADER2 support to VideoRenderer. + quartz: Update start_time if the current position is changed. + include: Update aviriff header. + quartz: Dump opendml indexes and header. + quartz: Make the avi splitter skip index headers. + quartz: Parse old style avi index. + quartz: Add a Disconnect function to the parser and use it to clean up allocated memory in avisplitter. + quartz: Fix discontinuities in wave parser. + quartz: Fix IMediaSample2 SetPreroll and SetSyncPoint. + quartz: Reject samples in video renderer when stopped. + quartz: Reject samples in transform filter only when stopped. + quartz: Make sure at least 1 sample is processed before returning. + quartz: Check for discontinuities in the directsound renderer. + quartz: Store the stream index in the avi stream for files that have them. + quartz: Obtain the duration using the index in avisplitter. + server: Make enum_winstations enumerate all the window stations with WINSTA_ENUMERATE right. + server: Make enum_desktop enumerate all the desktops on the window station with the DESKTOP_ENUMERATE right. + +Marcus Meissner (6): + shell32: Correct casing for "Wine". + d3d9: Initialized 2 variables with NULL. + rpcrt4: Handle exit path where bind not allocated yet. + wined3d: Handle out of array bounds state. + winex11: Move code behind error return. + advapi32: Initialize hLock. + +Matthew D'Asaro (2): + winex11: Add registry option to let wine decorate windows. + winecfg: Add option to let wine decorate windows. + +Michael Hoffman (3): + powrprof: Implement IsPwrSuspendAllowed. + powrprof: Implement IsPwrShutdownAllowed. + powrprof: Implement IsPwrHibernateAllowed. + +Michael Moss (1): + wine.inf: Move winebrowser.exe to the system directory. + +Michael Stefaniuc (8): + localui: Add the Romanian translation. + sane.ds: Add the Romanian translation. + mpr: Add the Romanian translation. + view: Add the Romanian translation. + notepad: Add the Romanian translation. + msacm32: Add the Romanian translation. + quartz: Add missing lock releases on some code paths (Smatch). + fonts: Add the Romanian glyphs SsTt with "comma below" to the tahoma font. + +Mikołaj Zalewski (1): + qedit/tests: Fix dependency. + +Nikolay Sivov (7): + gdiplus: Implement GdipCloneStringFormat. + gdiplus: Implement GdipAddPathLine2I. + gdiplus: Implement GdipAddPathArcI. + gdiplus: Implement GdipCreateMatrix3I. + gdiplus: Implement GdipCreatePath2I. + gdiplus: Implemented GdipGetCustomLineCapBaseCap. + gdiplus: Implemented GdipVectorTransformMatrixPoints. + +Paul Vriens (1): + rsaenh/tests: Fix a test on W2K and above. + +Peter Urbanec (1): + comctl32: Mousewheel support for updown control. + +Petr Sumbera (2): + winetest: Fix shell substitution syntax for Solaris. + server: Workaround for conflict between Wine and Solaris list.h. + +Piotr Caban (11): + oleview: Added helpstring to functions. + oleview: Fixed idl files generation with dual interfaces. + oleview: Fixed idl files generation with oleautomation flag. + oleview: Hide functions without id property in dual interfaces. + oleview: Added returns as arguments in interfaces with oleautomation flag. + oleview: Skip IDispatch functions in dual interfaces properly. + oleview: Added coclass handling base. + oleview: Removed memory leak in EnumImplTypes. + oleview: CreateCoclassHeader partially implemented. + oleview: Add dual interfaces support to coclasses. + oleview: Fixed incorrect brackets bug. + +Reece Dunn (3): + tools/msvcmaker: Suppress deprecation warnings on VC8 and above. + shlwapi: Fixed the todo blocks in the SHCreateStreamOnFile tests. + shlwapi/tests: Enumerate the STGM sharing modes in the SHCreateStreamOnFile tests. + +Rhys McGuckin (1): + wintrust: Check for null CleanupPolicy function pointer. + +Rico Schüller (5): + d3d9: Make the shader test more precision tolerant. + d3d9: fix two copy and paste mistakes. + wined3d: Filter out invalid stuff in SetStreamSourceFreq(). + wined3d: Improve drawStridedInstanced(). + d3d9: Add stream_test with instancing. + +Rob Shearman (34): + shell32: Implement ParseDisplayName for EntireNetwork in the Network Places shell folder. + mshtml: Support parsing the resource type in the res:// protocol. + mshtml: Fix the buffer length being passed into MultiByteToWideChar in set_registry. + winedos: The calling convention should come after the return type in the declaration of VGA_DoShowMouse for portability. + rpcrt4: Implement I_RpcExceptionFilter. + services: Split RPC_MainLoop into initialisation and the actual loop. + services: Automatically start boot-start, system-start and auto-start services when services.exe is started, instead of in wineboot.exe. + ole32: Use I_RpcExceptionFilter instead of custom exception filter for RPC calls. + advapi32: Add exception handling around all service RPC calls. + widl: Support non-default calling conventions for object methods. + widl: Support non-default calling conventions for non-object functions. + qmgr: Dynamically link to advpack.dll. + rpcrt4: Add buffer size checks to base type unmarshalling. + include: The unique attribute doesn't make any sense in the interface header, so remove it. + include: Fix a typo in a level of indirection in tom.idl. + include: Add local to interfaces or functions that take a void * parameter and so aren't designed to work remotely. + pstorec: Fix incorrectly spelt PPST_PROMPTIFO type in pstorec.c and pstore.idl. + widl: Check that attributes applied to interfaces, functions and arguments are applicable and issue an error if not. + widl: Check that attributes applied to typedefs and fields are applicable and issue an error otherwise. + widl: Make the attrs parameter passed to start_typelib const. + widl: The odl attribute is valid for dispinterfaces. + widl: Check that attributes are applicable for libraries, modules, dispinterfaces and coclasses and otherwise issue an error. + widl: Output a warning if duplicate attributes are specified. + widl: Add support for the broadcast and idempotent operation attributes. + widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse. + widl: Add functions to print an error or warning message using location information to enable these to be printed accurately when a check is done after an element is parsed. + widl: Add checking to arguments of non-local functions. + include: Make IContextMenu interface in shobjidl.idl local since some parameters are pointers to structures with fields that can't be marshalled. + ole32: Add some tests for OleGetClipboard. + ole32: Fix OLEClipbrd_IDataObject_QueryGetData to conform to the tests. + ole32: Add tests for clipboard's implementation of IDataObject_GetData. + rpcrt4: Test and fix I_RpcExceptionFilter. + widl: Change alls calls to error in the parser to error_loc so that line number information is printed. + msi: Fix the value parameter of IWineMsiRemotePackage::FormatRecord to have the right level of indirection for an [out] parameter. + +Roderick Colenbrander (2): + wined3d: Use the render target its palette when performing a texture copy as the texture doesn't hold one. + wined3d: Remove a PBO when a converted surface is detected. + +Rok Mandeljc (53): + avifil32: Updated Slovenian translation. + gphoto2.ds: Added Slovenian translation. + iccvid: Added Slovenian translation. + mscacm32: Added Slovenian translation. + mshtml: Added Slovenian translation. + sane.ds: Added Slovenian translation. + winspool.drv: Added Slovenian translation. + msi: Added Slovenian translation. + comctl32: Updated Slovenian translation. + msrle32: Updated Slovenian translation. + user32: Updated Slovenian translation. + winmm: Updated Slovenian translation. + comdlg32: Updated Slovenian translation. + localspl: Added Slovenian translation. + wininet: Updated Slovenian translation. + wineboot: Added Slovenian translation. + winemine: Updated Slovenian translation. + notepad: Updated Slovenian translation. + clock: Updated Slovenian translation. + winhelp: Updated Slovenian translation. + winefile: Updated Slovenian translation. + view: Updated Slovenian translation. + progman: Updated Slovenian translation. + browseui: Added Slovenian translation. + oledlg: Added Slovenian translation. + credui: Added Slovenian translation. + wordpad: Added Slovenian translation. + net: Added Slovenian Translation. + mpr: Added Slovenian translation. + hhctrl.ocx: Added Slovenian translation. + uninstaller: Added Slovenian translation. + winecfg: Added Slovenian translation. + shdoclc: Added Slovenian translation. + shlwapi: Added Slovenian translation. + write: Added Slovenian translation. + devenum: Added Slovenian translation. + cmdlgtest: Updated Slovenian translation. + wineconsole: Added Slovenian translation. + shell32: Updated Slovenian translation. + start: Updated Slovenian translation. + reg: Added Slovenian translation. + xcopy: Added Slovenian translation. + taskmgr: Added Slovenian translation. + localui: Added Slovenian translation. + cmd: Updated Slovenian translation. + msvidc32: Added Slovenian translation. + msvfw32: Added Slovenian translation. + regedit: Updated Slovenian translation. + oleaut32: Added Slovenian translation. + winmm: Slovenian translation: Add a string that got lost during last update. + comdlg32: Fix a mistake in Slovenian translation. + winecfg: Update Slovenian translation to reflect recently introduced changes. + shell32: Updated Slovenian translation to reflect changes in About dialog. + +Sergey Khodych (1): + dinput/tests: Add test to show dinput does not use user defined data format for keyboard. + +Stefan Dösinger (18): + d3d9: Enforce ColorFill restrictions. + d3d9: Remove some test trace lines. + d3d9: Read from a slightly different spot in a test. + d3d9: Accept nvidia hardware vp garbage. + d3d9: Fix a few ok conditions in the visual tests. + d3d9: Run the visual test with hardware vertex processing. + wined3d: Put implicit surfaces into drawable on unload. + wined3d: Mark the SYSMEM copy outdated after releasing memory. + wined3d: Store the number of aux buffers in the context. + wined3d: Report D3DUSAGE_QUERY_WRAPANDMIP support. + wined3d: Make the min mip lookup type a texture property. + wined3d: Disable texture filtering on textures that do not support it. + wined3d: Make the mag filter lookup a separate array. + wined3d: Disable MAG filters on formats that do not support them. + wined3d: Disable blending when clearing. + d3d9: Make the srgb reading test less strict. + d3d9: Accept erros in the fvp->3.0 pixel shader varying test. + d3d9: Some Windows drivers set undefined attributes to 0.0. + +Steven Edwards (2): + server: Remove unneeded semicolon. + include/setupapi: Remove extra semicolons. + +Tomasz Jezierski (2): + hhctrl.ocx: Fix for writing outside allocated memory in HH_AddToolbar. + hhctrl.ocx: Apparently it is possible to have chm file without #STRINGS in it, so we should not stop processing file at it. + +Tony Wasserka (1): + d3dx9: Add d3dx9tex.h. + +Vincent Povirk (2): + start.exe: Add /Unix switch for native file managers. + tools: Modify wine.desktop to use start.exe /unix. + +Vitaliy Margolen (16): + iccvid: Add Russian translation. + localui: Add Russian translation. + mpr: Add Russian translation. + msvfw32: Add Russian translation. + msvidc32: Add Russian translation. + sane.ds: Add Russian translation. + msacm32: Add Russian translation. + winex11: Get the ScrollLock mask. + winex11: Properly report state of the caps-lock and num-lock and scroll-lock keys. + wininet: Properly initialize struct. + dinput: Assign button GUID to joystick buttons. + dinput: Joysticks are not supported for DX v3. + dinput: Don't use dead-zone from the device. + winex11.drv: Send scan code when adjusting modifier key states. + Update Russian translation. + gphoto2.ds: Add Russian translation. + +-- +Alexandre Julliard +julliard@winehq.org diff --git a/ChangeLog b/ChangeLog index 3bb9de58b6d..9b9c22be6b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,2364 @@ +2008-04-18 Louis Lenders + + * dlls/wininet/urlcache.c: + wininet: Improve stub for FindNextUrlCacheEntryW a tiny bit. + +2008-04-16 Marcus Meissner + + * dlls/advapi32/service.c: + advapi32: Initialize hLock. + +2008-04-18 Nikolay Sivov + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/matrix.c, include/gdiplusflat.h: + gdiplus: Implemented GdipVectorTransformMatrixPoints. + +2008-04-17 Nikolay Sivov + + * dlls/gdiplus/customlinecap.c, dlls/gdiplus/gdiplus.spec, + include/gdiplusflat.h: + gdiplus: Implemented GdipGetCustomLineCapBaseCap. + +2008-04-17 Anatoly Lyutin + + * dlls/user32/tests/msg.c: + user32/tests: Add test for switching not maximized mdi children. + + * dlls/user32/tests/msg.c: + user32/tests: Get rid of magic number. + +2008-04-17 Lei Zhang + + * configure, configure.ac, dlls/msxml3/main.c, include/config.h.in: + msxml3: Check for xsltInit before calling it. + +2008-04-18 Kusanagi Kouichi + + * dlls/winex11.drv/ime.c, dlls/winex11.drv/x11drv.h, + dlls/winex11.drv/xim.c: + winex11: Update caret position. + + * dlls/user32/edit.c: + user32: Handle IME messages more gracefully. + +2008-04-18 Alexandre Julliard + + * dlls/gdi32/dib.c, dlls/gdi32/tests/bitmap.c: + gdi32: Fixed initialization of bit masks in GetDIBits for 16-bit bitmaps. + Fix and improve the test cases. + +2008-04-17 Andrew Talbot + + * dlls/ddraw/executebuffer.c: + ddraw: Remove unused variables. + +2008-04-18 Sergey Khodych + + * dlls/dinput/tests/keyboard.c: + dinput/tests: Add test to show dinput does not use user defined data format + for keyboard. + +2008-04-18 Hwang YunSong(황윤성 + + * programs/winefile/Ko.rc: + winefile: Updated Korean resource. + + * programs/winecfg/Ko.rc: + winecfg: Updated Korean resource. + + * dlls/user32/resources/user32_Ko.rc: + user32: Updated Korean resource. + + * dlls/shell32/shell32_Ko.rc: + shell32: Updated Korean resource. + + * dlls/comdlg32/cdlg_Ko.rc: + comdlg32: Updated Korean resource. + +2008-04-17 Jacek Caban + + * dlls/mshtml/script.c: + mshtml: Store IActiveScriptParseProcedure in ScriptHost. + + * dlls/mshtml/htmlwindow.c, dlls/mshtml/mshtml_private.h, + dlls/mshtml/tests/dom.c: + mshtml: Added IHTMLWindow3 stub implementation. + + * dlls/mshtml/htmldoc.c, dlls/mshtml/htmldoc3.c, dlls/mshtml/htmlelem.c, + dlls/mshtml/htmlnode.c, dlls/mshtml/htmloption.c, + dlls/mshtml/mshtml_private.h, dlls/mshtml/nsembed.c, + dlls/mshtml/txtrange.c: + mshtml: Added possibility to get node object from nsIDOMNode only if available. + +2008-04-17 Eric Pouech + + * programs/winhelp/hlpfile.c: + winhelp: Fix regression introduced by Win64 warning fixes. + +2008-04-17 Aric Stewart + + * dlls/wininet/http.c: + wininet: Correct the case where Content-Length is set as well as + Transfer-Encoding == chunked. + +2008-04-18 Rhys McGuckin + + * dlls/wintrust/wintrust_main.c: + wintrust: Check for null CleanupPolicy function pointer. + +2008-04-17 Alexandre Julliard + + * dlls/ntdll/server.c: + ntdll: Don't create a temporary dir, run wineprefixcreate directly in the + final dir. + + * tools/wine.inf.in, tools/wineprefixcreate.in: + wineprefixcreate: Moved creation of directories to wine.inf. + + * dlls/setupapi/fakedll.c: + setupapi: Add support for creating directories from the FakeDlls section. + + * dlls/kernel32/process.c: + kernel32: Create the windows and system directories if necessary. + +2008-04-17 Alexander Morozov + + * dlls/setupapi/devinst.c, dlls/setupapi/tests/devinst.c: + setupapi: SetupDiGetDeviceRegistryProperty should return ERROR_INVALID_DATA + when buffer size is not 0 but buffer is NULL. + + * dlls/setupapi/devinst.c, dlls/setupapi/tests/devinst.c: + setupapi: SetupDiGetDeviceRegistryProperty should return + ERROR_INSUFFICIENT_BUFFER when buffer size is insufficient. + + * dlls/setupapi/tests/devinst.c: + setupapi: Add a test for SetupDiGetDeviceRegistryProperty and + SetupDiSetDeviceRegistryProperty. + +2008-04-17 Andrew Talbot + + * dlls/hhctrl.ocx/chm.c: + hhctrl.ocx: Remove unused variable. + + * dlls/gphoto2.ds/ui.c: + gphoto2.ds: Remove unused variable. + + * dlls/gdi32/path.c: + gdi32: Remove unused variable. + +2008-04-17 Dmitry Timoshkov + + * tools/winedump/emf.c: + winedump: Decipher contents of a couple EMF records. + +2008-04-17 Alexandre Julliard + + * dlls/quartz/avisplit.c: + quartz: Avoid sizeof in traces. + + * dlls/user32/static.c: + user32: Added support for WS_EX_RIGHT in the static control. + + * dlls/user32/edit.c: + user32: Added support for WS_EX_RIGHT in the edit control. + + * dlls/user32/button.c: + user32: Added support for WS_EX_RIGHT in the button control. + + * dlls/winex11.drv/window.c, dlls/winex11.drv/winpos.c: + winex11: Moved the WM_SYSCOMMAND handling to window.c. + + * dlls/winex11.drv/event.c, dlls/winex11.drv/winpos.c, + dlls/winex11.drv/x11drv.h: + winex11: Moved the MapNotify handler to event.c. + + * dlls/winex11.drv/event.c, dlls/winex11.drv/winpos.c, + dlls/winex11.drv/x11drv.h: + winex11: Moved the ExposeEvent handler to event.c. + Use consistent naming for all event handlers. + +2008-04-15 Maarten Lankhorst + + * server/winstation.c: + server: Make enum_desktop enumerate all the desktops on the window station + with the DESKTOP_ENUMERATE right. + + * server/winstation.c: + server: Make enum_winstations enumerate all the window stations with + WINSTA_ENUMERATE right. + +2008-04-13 Reece Dunn + + * dlls/shlwapi/tests/istream.c: + shlwapi/tests: Enumerate the STGM sharing modes in the SHCreateStreamOnFile + tests. + +2008-04-15 Reece Dunn + + * dlls/shlwapi/istream.c, dlls/shlwapi/tests/istream.c: + shlwapi: Fixed the todo blocks in the SHCreateStreamOnFile tests. + +2008-04-17 Nikolay Sivov + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphicspath.c, + include/gdiplusflat.h: + gdiplus: Implement GdipCreatePath2I. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/matrix.c, include/gdiplusflat.h: + gdiplus: Implement GdipCreateMatrix3I. + +2008-04-16 Nikolay Sivov + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphicspath.c, + include/gdiplusflat.h: + gdiplus: Implement GdipAddPathArcI. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphicspath.c, + include/gdiplusflat.h: + gdiplus: Implement GdipAddPathLine2I. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/stringformat.c, + include/gdiplusflat.h: + gdiplus: Implement GdipCloneStringFormat. + +2008-04-16 James Hawkins + + * dlls/oleaut32/tests/vartest.c: + oleaut32: Fix a few tests that fail in win2k. + + * dlls/ole32/tests/marshal.c: + ole32: Fix a few tests that fail in win2k. + + * dlls/kernel32/tests/volume.c: + kernel32: Fix a test that fails in win2k and up. + + * dlls/kernel32/tests/locale.c: + kernel32: Fix a test that fails in win2k. + +2008-04-17 Alexandre Julliard + + * server/registry.c, server/request.c, server/request.h: + server: Keep a file descriptor open to the config directory to make sure we + don't write the registry in the wrong place. + +2008-04-16 James Hawkins + + * dlls/fusion/assembly.c: + fusion: Explicitly check for -1 for a missing table. + +2008-04-17 Dmitry Timoshkov + + * tools/winedump/emf.c: + winedump: Print names for all known EMF records. + +2008-04-16 Dmitry Timoshkov + + * dlls/winex11.drv/window.c: + winex11.drv: Map zero-sized windows but don't add WM decoration to them. + +2008-04-14 Hin-Tak Leung + + * dlls/hhctrl.ocx/help.c: + hhctrl.ocx: Look up in chm if url doesn't contain "://". + +2008-04-16 Hin-Tak Leung + + * dlls/hhctrl.ocx/hhctrl.c: + hhctrl.ocx: Return help window handle to caller. + +2008-04-12 Vincent Povirk + + * tools/wine.desktop: + tools: Modify wine.desktop to use start.exe /unix. + + * programs/start/En.rc, programs/start/resources.h, + programs/start/start.c: + start.exe: Add /Unix switch for native file managers. + +2008-04-10 Austin English + + * dlls/opengl32/tests/opengl.c, dlls/quartz/control.c, + dlls/quartz/filesource.c, dlls/quartz/mpegsplit.c, + dlls/quartz/videorenderer.c, dlls/riched20/paint.c, + dlls/riched20/style.c, dlls/riched20/tests/editor.c, + dlls/riched20/undo.c, dlls/rpcrt4/ndr_marshall.c, + dlls/rpcrt4/ndr_stubless.c, dlls/rpcrt4/ndr_stubless.h, + dlls/rpcrt4/rpcrt4_main.c, dlls/rpcrt4/rpcss_np_client.h, + dlls/rpcrt4/tests/ndr_marshall.c, dlls/rsaenh/mpi.c, + dlls/rsaenh/rc2.c, dlls/sane.ds/capability.c, dlls/sane.ds/sane_i.h: + Spelling fixes. + +2008-04-15 Tony Wasserka + + * include/Makefile.in, include/d3dx9.h, include/d3dx9tex.h: + d3dx9: Add d3dx9tex.h. + +2008-03-26 Alistair Leslie-Hughes + + * dlls/msxml3/main.c, dlls/msxml3/node.c, dlls/msxml3/tests/domdoc.c: + msxml3: Implement transformNode. + +2008-04-13 Louis Lenders + + * dlls/urlmon/internet.c, dlls/urlmon/urlmon.spec, include/urlmon.idl: + urlmon: Add stub for CoInternetSetFeatureEnabled. + +2008-04-16 Michael Hoffman + + * dlls/powrprof/powrprof.c: + powrprof: Implement IsPwrHibernateAllowed. + + * dlls/powrprof/powrprof.c: + powrprof: Implement IsPwrShutdownAllowed. + + * dlls/powrprof/powrprof.c: + powrprof: Implement IsPwrSuspendAllowed. + +2008-04-17 Jacek Caban + + * dlls/mshtml/dispex.c, dlls/mshtml/main.c, dlls/mshtml/mshtml_private.h: + mshtml: Move get_typeinfo to dispex.c. + + * dlls/mshtml/Makefile.in, dlls/mshtml/dispex.c, + dlls/mshtml/mshtml_private.h, dlls/mshtml/omnavigator.c: + mshtml: Added generic IDispatchEx implementation and use it in OnNavigator. + + * dlls/mshtml/script.c: + mshtml: Added IActiveScriptDebug32 stub implementation. + + * dlls/mshtml/mshtml_private.h, dlls/mshtml/navigate.c, + dlls/mshtml/script.c: + mshtml: Make sure to null terminate buffer in parse_extern_script. + +2008-04-16 Maarten Lankhorst + + * dlls/quartz/avisplit.c: + quartz: Obtain the duration using the index in avisplitter. + + * dlls/quartz/avisplit.c: + quartz: Store the stream index in the avi stream for files that have them. + + * dlls/quartz/dsoundrender.c: + quartz: Check for discontinuities in the directsound renderer. + + * dlls/quartz/pin.c: + quartz: Make sure at least 1 sample is processed before returning. + + * dlls/quartz/transform.c: + quartz: Reject samples in transform filter only when stopped. + Use S_FALSE for saying sample is rejected. + + * dlls/quartz/videorenderer.c: + quartz: Reject samples in video renderer when stopped. + When stopped video renderer no longer updates, so don't even try. + + * dlls/quartz/memallocator.c: + quartz: Fix IMediaSample2 SetPreroll and SetSyncPoint. + + * dlls/quartz/waveparser.c: + quartz: Fix discontinuities in wave parser. + +2008-04-16 Andrew Talbot + + * dlls/dplayx/dplay.c: + dplayx: Remove unused variables. + + * dlls/dsound/mixer.c: + dsound: Remove unused variable. + + * dlls/comdlg32/filedlg31.c: + comdlg32: Remove unused variable. + +2008-04-16 Marcus Meissner + + * dlls/winex11.drv/dib.c: + winex11: Move code behind error return. + + * dlls/wined3d/basetexture.c: + wined3d: Handle out of array bounds state. + +2008-04-16 James Hawkins + + * dlls/kernel32/tests/environ.c: + kernel32: Remove an invalid trace and comment. + + * dlls/kernel32/tests/environ.c: + kernel32: Fix a few failing tests in win2k. + + * dlls/kernel32/tests/environ.c: + kernel32: Split the GetComputerName/Ex tests into their own test functions. + + * dlls/user32/tests/sysparams.c: + user32: Fix a test that fails in XP and win2k3. + +2008-04-16 Rob Shearman + + * dlls/msi/format.c, dlls/msi/msiserver.idl, dlls/msi/package.c: + msi: Fix the value parameter of IWineMsiRemotePackage::FormatRecord to have + the right level of indirection for an [out] parameter. + Remove the redundant size parameter and simplify the client code such + that the remote function is only called once, with the value being + automatically allocated. Add corresponding code on the server side to + automatically allocate said value. + +2008-04-16 Aric Stewart + + * dlls/imm32/imm.c: + imm32: Create the IME UI window with the IME instance so the registered class + can be found. + +2008-04-16 ByeongSik Jeon + + * dlls/imm32/imm.c: + imm32: Implement ImmSetConversionStatus. + + * dlls/winex11.drv/keyboard.c: + winex11: Add VK_HANGUL, VK_HANJA for Korean Native IME. + +2008-04-16 Alexandre Julliard + + * dlls/comdlg32/filedlg.c: + comdlg32: CDM_GETSPEC and CDM_GETFILEPATH should preserve double quotes in + file lists. + +2008-04-16 Kusanagi Kouichi + + * configure, configure.ac, dlls/winex11.drv/xim.c, include/config.h.in: + winex11.drv: Fix Solaris build error. + Solaris doesn't define XICCallback. + +2008-04-15 Maarten Lankhorst + + * dlls/quartz/avisplit.c, dlls/quartz/mpegsplit.c, dlls/quartz/parser.c, + dlls/quartz/parser.h, dlls/quartz/waveparser.c: + quartz: Add a Disconnect function to the parser and use it to clean up allocated + memory in avisplitter. + +2008-04-11 Maarten Lankhorst + + * dlls/quartz/avisplit.c: + quartz: Parse old style avi index. + + * dlls/quartz/avisplit.c: + quartz: Make the avi splitter skip index headers. + + * dlls/quartz/avisplit.c: + quartz: Dump opendml indexes and header. + +2008-04-16 Marcus Meissner + + * dlls/rpcrt4/rpc_binding.c: + rpcrt4: Handle exit path where bind not allocated yet. + +2008-04-14 Tomasz Jezierski + + * dlls/hhctrl.ocx/chm.c: + hhctrl.ocx: Apparently it is possible to have chm file without #STRINGS in it, + so we should not stop processing file at it. + +2008-04-16 Michael Stefaniuc + + * fonts/tahoma.sfd, fonts/tahoma.ttf: + fonts: Add the Romanian glyphs SsTt with "comma below" to the tahoma font. + +2008-04-15 Dan Hipschman + + * dlls/qmgr/tests/enum_jobs.c, dlls/qmgr/tests/job.c: + qmgr/tests: Fix minor potential memory leaks. + +2008-04-15 Andrew Talbot + + * dlls/dmime/graph.c, dlls/dmime/performance.c, dlls/dmime/segment.c: + dmime: Remove unused variables. + + * dlls/comctl32/syslink.c, dlls/comctl32/toolbar.c: + comctl32: Remove unused variables. + + * dlls/dinput/joystick_linux.c: + dinput: Fix handle leak. + + * dlls/browseui/progressdlg.c: + browseui: Fix handle leak. + +2008-04-15 Rob Shearman + + * tools/widl/parser.y: + widl: Change alls calls to error in the parser to error_loc so that line number + information is printed. + + * dlls/rpcrt4/rpcrt4_main.c, dlls/rpcrt4/tests/rpc.c: + rpcrt4: Test and fix I_RpcExceptionFilter. + + * dlls/ole32/tests/clipboard.c: + ole32: Add tests for clipboard's implementation of IDataObject_GetData. + + * dlls/ole32/clipboard.c, dlls/ole32/tests/clipboard.c: + ole32: Fix OLEClipbrd_IDataObject_QueryGetData to conform to the tests. + + * dlls/ole32/tests/clipboard.c: + ole32: Add some tests for OleGetClipboard. + Test the IDataObject_QueryGetData function of the returned object. + + * include/shobjidl.idl: + include: Make IContextMenu interface in shobjidl.idl local since some parameters + are pointers to structures with fields that can't be marshalled. + +2008-04-15 Huw Davies + + * dlls/gdi32/painting.c, dlls/gdi32/tests/path.c: + gdi32: LineDDA shouldn't include the end point. Add some tests. + +2008-04-16 Alexandre Julliard + + * dlls/fusion/assembly.c: + fusion: Fix a number of leaks in assembly_create. + + * tools/wine.inf.in: + wine.inf: Use a proper services section to install services. + + * dlls/setupapi/install.c, dlls/setupapi/tests/install.c: + setupapi: Install services in InstallHinfSection. + + * dlls/setupapi/install.c, dlls/setupapi/tests/install.c: + setupapi: Implemented SetupInstallServicesFromInfSectionW. + + * dlls/setupapi/queue.c, dlls/setupapi/setupapi_private.h: + setupapi: Move strdupW and strdupWtoA to the setupapi_private.h header. + + * include/setupapi.h: + include: Add the SPSVCINST_* setupapi flags. + +2008-04-13 James Hawkins + + * dlls/fusion/Makefile.in, dlls/fusion/asmcache.c, dlls/fusion/assembly.c, + dlls/fusion/fusionpriv.h, dlls/fusion/tests/asmcache.c: + fusion: Implement IAssemblyCache::InstallAssembly. + +2008-04-14 Andrew Talbot + + * dlls/crypt32/oid.c, dlls/crypt32/store.c: + crypt32: Remove unused variables. + + * dlls/comdlg32/printdlg.c: + comdlg32: Remove unused variables. + + * dlls/crypt32/encode.c: + crypt32: Remove unwanted shadow variable. + +2008-04-15 Marcus Meissner + + * dlls/d3d9/tests/visual.c: + d3d9: Initialized 2 variables with NULL. + +2008-04-02 Marcus Meissner + + * dlls/shell32/shell32_De.rc: + shell32: Correct casing for "Wine". + +2008-04-14 Lei Zhang + + * dlls/user32/edit.c: + user32: Handle ctrl + end in edit control. + + * dlls/user32/edit.c: + user32: Handle ctrl + home in edit control. + + * dlls/user32/edit.c: + user32: Do checks in the right order in EDIT_BuildLineDefs_ML. + +2008-04-15 Jacek Caban + + * include/mshtml.idl: + mshtml.idl: Added IHTMLWindow3 declaration. + + * include/mshtmdid.h: + mshtmdid.h: Fixed IHTMLWindow2 dispids. + +2008-04-10 Maarten Lankhorst + + * dlls/quartz/avisplit.c, dlls/quartz/fourcc.h, dlls/quartz/waveparser.c, + include/aviriff.h: + include: Update aviriff header. + +2008-04-14 Maarten Lankhorst + + * dlls/quartz/filtergraph.c: + quartz: Update start_time if the current position is changed. + +2008-04-11 Maarten Lankhorst + + * dlls/quartz/videorenderer.c: + quartz: Add VIDEOINFOHEADER2 support to VideoRenderer. + +2008-04-14 Jonathan Ernst + + * programs/winhelp/Fr.rc: + winhelp: Updated French translation. + + * programs/winefile/Fr.rc: + winefile: Updated French translation. + + * programs/winecfg/Fr.rc: + winecfg: Updated French translation. + + * dlls/comdlg32/cdlg_Fr.rc: + comdlg32: Updated French translation. + +2008-04-14 Jörg Höhle + + * dlls/wined3d/basetexture.c: + wined3d: Fix missing break inside switch in SetAutoGenFilterType. + +2008-04-14 Aric Stewart + + * dlls/user32/message.c, include/imm.h: + user32: Call ImmProcessKey in TranslateMessage to allow IMEs to handle key + processing if they choose to. + +2008-04-14 Hwang YunSong(황윤성 + + * dlls/user32/resources/user32_Ko.rc: + user32: Updated Korean resource. + + * programs/winecfg/Ko.rc: + winecfg: Updated Korean resource. + + * programs/winemine/Ko.rc: + winemine: Updated Korean resource. + +2008-04-14 Alexander Nicolaysen Sørnes + + * programs/winhelp/No.rc: + winhelp: Update Norwegian Bokmål resource. + + * programs/regedit/No.rc: + regedit: Update Norwegian Bokmål resource. + +2008-04-11 Maarten Lankhorst + + * include/Makefile.in, include/dvdmedia.h: + include: Add dvdmedia stub header. + +2008-04-12 Maarten Lankhorst + + * dlls/quartz/waveparser.c: + quartz: Bring waveparser to the same level as the mpeg splitter. + + * dlls/quartz/transform.c: + quartz: Silence seeking fixmes on transform filter. + +2008-04-10 Maarten Lankhorst + + * dlls/quartz/dsoundrender.c, dlls/quartz/filesource.c, + dlls/quartz/nullrenderer.c, dlls/quartz/parser.c, + dlls/quartz/transform.c: + quartz: Silence requests for IVideoWindow. + +2008-04-12 Maarten Lankhorst + + * dlls/quartz/pin.c: + quartz: Set sane defaults for pin stream rate. + + * dlls/quartz/avidec.c: + quartz: Don't clean up in avi decoder if driver isn't opened. + +2008-04-14 Eric Pouech + + * dlls/riched20/editor.c: + richedit: Force window update when the word wrap option has changed. + +2008-04-14 Dmitry Timoshkov + + * dlls/gdi32/freetype.c: + gdi32: Map glyph to Symbol range only if the font supports symbol encoding. + +2008-04-10 Austin English + + * dlls/oleaut32/dispatch.c, dlls/oleaut32/olepicture.c, + dlls/oleaut32/recinfo.c, dlls/oleaut32/safearray.c, + dlls/oleaut32/tests/vartest.c, dlls/oleaut32/tests/vartype.c, + dlls/oleaut32/typelib.c, dlls/oleaut32/ungif.c, + dlls/oleaut32/ungif.h, dlls/oleaut32/varformat.c, + dlls/oleaut32/variant.c, dlls/oleaut32/vartype.c: + oleaut32: Spelling fixes. + +2008-04-14 Alexandre Julliard + + * dlls/winedos/dosmem.c, programs/winevdm/winevdm.c: + winedos: Handle memory reservation errors more gracefully. + + * dlls/kernel32/dosmem.c: + kernel32: Reserve the low 64Kb area separately from the rest of the DOS memory. + + * loader/preloader.c: + preloader: Reserve low memory areas in separate chunks. + + * dlls/shdocvw/shdocvw.inf: + shdocvw: Fixed typo in CLSID_InternetShortcut. + +2008-04-14 Rob Shearman + + * tools/widl/parser.y: + widl: Add checking to arguments of non-local functions. + Check that out arguments have enough levels of indirection and that they + don't derive from void * or a function pointer. + + * tools/widl/parser.y, tools/widl/utils.c, tools/widl/utils.h, + tools/widl/widltypes.h: + widl: Add functions to print an error or warning message using location + information to enable these to be printed accurately when a check is done + after an element is parsed. + Add location information to variable automatically, since this is will + be useful for type checking of arguments. + + * tools/widl/write_msft.c: + widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we + currently parse. + Add FIXMEs for the remaining ones and remove the warning for + unimplemented attribute types since we now support all the attributes + that we parse. + + * tools/widl/client.c, tools/widl/parser.y, tools/widl/widltypes.h: + widl: Add support for the broadcast and idempotent operation attributes. + + * tools/widl/parser.y: + widl: Output a warning if duplicate attributes are specified. + + * tools/widl/parser.y: + widl: Check that attributes are applicable for libraries, modules, + dispinterfaces and coclasses and otherwise issue an error. + + * tools/widl/parser.y: + widl: The odl attribute is valid for dispinterfaces. + + * tools/widl/typelib.c, tools/widl/typelib.h, tools/widl/widltypes.h: + widl: Make the attrs parameter passed to start_typelib const. + + * tools/widl/parser.y: + widl: Check that attributes applied to typedefs and fields are applicable and + issue an error otherwise. + + * tools/widl/parser.y: + widl: Check that attributes applied to interfaces, functions and arguments + are applicable and issue an error if not. + + * dlls/pstorec/pstorec.c, include/pstore.idl: + pstorec: Fix incorrectly spelt PPST_PROMPTIFO type in pstorec.c and pstore.idl. + + * include/amvideo.idl, include/axextend.idl, include/dimm.idl, + include/shobjidl.idl: + include: Add local to interfaces or functions that take a void * parameter + and so aren't designed to work remotely. + + * include/tom.idl: + include: Fix a typo in a level of indirection in tom.idl. + The parameter for ITextPara::GetDuplicate should have two levels of + indirection. + + * include/indexsrv.idl: + include: The unique attribute doesn't make any sense in the interface header, + so remove it. + It is only accepted by MIDL as a synonym for pointer_default(unique), + but it isn't a synonym in widl so remove it. + +2008-04-14 Alexandre Julliard + + * dlls/winex11.drv/window.c: + winex11: Fix the type hint for the desktop window. + + * dlls/winex11.drv/window.c: + winex11: Make WS_EX_APPWINDOW windows have normal type. + + * dlls/winex11.drv/winpos.c: + winex11: Don't set full screen style on minimized windows. + +2008-04-12 Kai Blin + + * dlls/dpnhpast/dpnhpast.spec, dlls/dpnhpast/main.c, include/dpnathlp.h: + dpnhpast: Implement a stub for DirectPlayNATHelpCreate. + +2008-04-12 Rok Mandeljc + + * dlls/shell32/shell32_Si.rc: + shell32: Updated Slovenian translation to reflect changes in About dialog. + + * programs/winecfg/Si.rc: + winecfg: Update Slovenian translation to reflect recently introduced changes. + + * dlls/comdlg32/cdlg_Si.rc: + comdlg32: Fix a mistake in Slovenian translation. + + * dlls/winmm/winmm_Si.rc: + winmm: Slovenian translation: Add a string that got lost during last update. + +2008-04-12 Andrew Talbot + + * dlls/comctl32/propsheet.c, dlls/comctl32/toolbar.c, + dlls/comctl32/trackbar.c, dlls/comctl32/treeview.c: + comctl32: Remove unused variables. + +2008-04-11 Aric Stewart + + * dlls/imm32/imm.c, dlls/imm32/imm32.spec: + imm32: Implement ImmProcessKey and ImmTranslateMessage. + + * dlls/imm32/imm.c, include/ddk/imm.h: + imm32: All HIMCC in the InputContext should be initialized at creation. + +2008-04-09 John Klehm + + * dlls/wintab32/context.c: + wintab32: Implement WTSetA/W. + +2008-04-13 Vitaliy Margolen + + * dlls/gphoto2.ds/gphoto2_Ru.rc, dlls/gphoto2.ds/rsrc.rc: + gphoto2.ds: Add Russian translation. + + * programs/notepad/Ru.rc, programs/wineconsole/wineconsole_Ru.rc: + Update Russian translation. + + * dlls/winex11.drv/keyboard.c: + winex11.drv: Send scan code when adjusting modifier key states. + +2008-04-13 Alexander Nicolaysen Sørnes + + * programs/winecfg/No.rc: + winecfg: Update Norwegian Bokmål resource. + +2008-04-13 Dmitry Timoshkov + + * dlls/gdi32/tests/font.c: + gdi32: Clarify which font doesn't contain 'x'. + +2008-04-14 Francois Gouget + + * libs/wine/ldt.c, loader/preloader.c: + Spelling fix in the ldt bitfields. + + * dlls/ddraw/tests/visual.c: + ddraw/tests: Fix compilation on systems that don't support nameless unions. + + * dlls/jscript/tests/jscript.c: + jscript/tests: Fix the '\n's in an ok() call. + + * dlls/wldap32/wldap32_Fr.rc: + wldap32: Fix typo in the French resources. + + * dlls/mshtml/tests/htmldoc.c, dlls/shdocvw/tests/webbrowser.c: + Fix spelling of dwAssign. + + * dlls/ole32/antimoniker.c, dlls/ole32/classmoniker.c, + dlls/ole32/filemoniker.c, dlls/ole32/itemmoniker.c: + ole32: Fix spelling of GetComparisonData(). + +2008-04-12 Vitaliy Margolen + + * dlls/dinput/joystick_linuxinput.c: + dinput: Don't use dead-zone from the device. + + * dlls/dinput/joystick_linuxinput.c: + dinput: Joysticks are not supported for DX v3. + + * dlls/dinput/joystick_linux.c, dlls/dinput/joystick_linuxinput.c: + dinput: Assign button GUID to joystick buttons. + +2008-04-11 Piotr Caban + + * programs/oleview/typelib.c: + oleview: Fixed incorrect brackets bug. + + * programs/oleview/typelib.c: + oleview: Add dual interfaces support to coclasses. + +2008-04-12 Eric Pouech + + * dlls/dbghelp/pe_module.c: + dbghelp: Fix invalid pointer dereference. + +2008-04-12 Rob Shearman + + * dlls/rpcrt4/ndr_marshall.c: + rpcrt4: Add buffer size checks to base type unmarshalling. + Reimplement NdrSimpleTypeUnmarshall using similar macros to + NdrBaseTypeUnmarshalling without buffer checks, due to + NdrSimpleTypeUnmarshall not doing any safety checks. + + * dlls/qmgr/Makefile.in, dlls/qmgr/qmgr_main.c: + qmgr: Dynamically link to advpack.dll. + Use RegInstall instead of RegInstallA as RegInstallA isn't available in + some native versions of advpack commonly installed by programs. + +2008-04-12 Andrew Talbot + + * dlls/comctl32/comboex.c, dlls/comctl32/listview.c, + dlls/comctl32/monthcal.c, dlls/comctl32/rebar.c: + comctl32: Remove unused variables. + +2008-04-11 Andrew Talbot + + * dlls/dnsapi/record.c: + dnsapi: Remove unused variables. + +2008-04-11 Alex Villacís Lasso + + * dlls/user32/cursoricon.c, dlls/user32/tests/cursoricon.c: + user32: LoadImage(IMAGE_BITMAP) should reject invalid BMP files (with tests). + +2008-04-14 Alexandre Julliard + + * dlls/gdi32/dc.c, dlls/gdi32/tests/dc.c: + gdi32: Fix CreateCompatibleDC to reject invalid DCs. + + * programs/wordpad/print.c: + wordpad: Don't pass an invalid DC to CreateCompatibleDC. + +2008-04-11 Colin Finck + + * dlls/gdi32/tests/dc.c: + gdi32: Add a test to demonstrate a CreateCompatibleDC problem. + +2008-04-11 Aric Stewart + + * dlls/user32/combo.c: + user32: Make sure there is space for at least 6 items in a combo dropdown + without forcing it to be at most 6 items as well. + + * dlls/imm32/imm.c: + imm32: Remember to unset the hwnd for a context when that hwnd is associated + with a different context. + +2008-04-11 Dmitry Timoshkov + + * dlls/user32/message.c: + user32: Use appropriate type for lresult. + +2008-04-11 Alexandre Julliard + + * .gitignore, tools/Makefile.in, tools/wine.inf, tools/wine.inf.in, + tools/wineprefixcreate.in: + wine.inf: Add a version number to make sure the file changes between versions. + +2008-04-10 Matthew D'Asaro + + * programs/winecfg/En.rc, programs/winecfg/resource.h, + programs/winecfg/x11drvdlg.c: + winecfg: Add option to let wine decorate windows. + + * dlls/winex11.drv/window.c, dlls/winex11.drv/x11drv.h, + dlls/winex11.drv/x11drv_main.c: + winex11: Add registry option to let wine decorate windows. + +2008-04-10 James Hawkins + + * dlls/shell32/tests/shlfileop.c: + shell32: Fix a few tests that fail in win2k. + +2008-04-10 Alexander Dorofeyev + + * dlls/ddraw/tests/visual.c: + ddraw/tests: Add colorkeyed blit to p8_primary_test. + + * dlls/ddraw/tests/visual.c: + ddraw/tests: Add viewport clearing tests. + + * dlls/ddraw/viewport.c: + ddraw: Temporarily activate viewport when clearing. + + * dlls/ddraw/device.c, dlls/ddraw/viewport.c: + ddraw: Set active_device in AddViewport. + + * dlls/ddraw/ddraw_private.h, dlls/ddraw/device.c, + dlls/ddraw/executebuffer.c, dlls/ddraw/viewport.c: + ddraw: Add possibility to ignore lights in viewport_activate. + Mostly NOP regarding existing functionality, but makes it possible to skip light + activation when it's not needed (like when clearing). + + * include/d3d.h: + include/d3d.h: Fix method calling macros. + +2008-04-11 Rob Shearman + + * tools/widl/client.c, tools/widl/header.c: + widl: Support non-default calling conventions for non-object functions. + + * tools/widl/header.c, tools/widl/proxy.c: + widl: Support non-default calling conventions for object methods. + + * dlls/advapi32/service.c: + advapi32: Add exception handling around all service RPC calls. + + * dlls/ole32/moniker.c: + ole32: Use I_RpcExceptionFilter instead of custom exception filter for RPC calls. + + * programs/services/rpc.c, programs/services/services.c, + programs/services/services.h, programs/wineboot/wineboot.c: + services: Automatically start boot-start, system-start and auto-start services + when services.exe is started, instead of in wineboot.exe. + + * programs/services/rpc.c, programs/services/services.c, + programs/services/services.h: + services: Split RPC_MainLoop into initialisation and the actual loop. + + * dlls/rpcrt4/rpcrt4.spec, dlls/rpcrt4/rpcrt4_main.c: + rpcrt4: Implement I_RpcExceptionFilter. + +2008-04-11 Dmitry Timoshkov + + * dlls/user32/exticon.c, dlls/user32/listbox.c, dlls/user32/sysparams.c: + user32: Fix Win64 warnings. + +2008-04-11 Peter Urbanec + + * dlls/comctl32/updown.c: + comctl32: Mousewheel support for updown control. + +2008-04-10 Vitaliy Margolen + + * dlls/wininet/utility.c: + wininet: Properly initialize struct. + +2008-04-09 Jeremy White + + * include/wine/winbase16.h: + include: Add a resource type for scalable font resource (.fot) files. + +2008-04-11 Dmitry Timoshkov + + * tools/fnt2bdf.h, tools/fnt2fon.c: + tools: Fix font structure layout for 64-bit mode. + +2008-04-11 Piotr Caban + + * programs/oleview/main.h, programs/oleview/typelib.c: + oleview: CreateCoclassHeader partially implemented. + + * programs/oleview/typelib.c: + oleview: Removed memory leak in EnumImplTypes. + + * programs/oleview/typelib.c: + oleview: Added coclass handling base. + + * programs/oleview/typelib.c: + oleview: Skip IDispatch functions in dual interfaces properly. + +2008-04-10 James Hawkins + + * dlls/kernel32/tests/environ.c: + kernel32: Add traces to see why the tests fail in win2k. + + * dlls/ntdll/tests/error.c: + ntdll: Fix a few tests that fail in win2k. + + * dlls/crypt32/tests/oid.c, dlls/crypt32/tests/protectdata.c: + crypt32: Fix a few tests that fail in win2k. + + * dlls/advapi32/tests/security.c: + advapi32: Fix a few tests that fail in win2k. + +2008-04-10 Lei Zhang + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c: + gdiplus: Add a stub for GdipSetMetafileDownLevelRasterizationLimit. + + * dlls/gdiplus/brush.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipSetLineTransform. + + * dlls/gdiplus/brush.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipSetLinePresetBlend. + + * dlls/gdiplus/brush.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipSetLineLinearBlend. + + * dlls/gdiplus/brush.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipSetLineColors. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/region.c: + gdiplus: Add a stub for GdipSetInfinite. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/imageattributes.c: + gdiplus: Add a stub for GdipSetImageAttributesToIdentity. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/imageattributes.c: + gdiplus: Add a stub for GdipSetImageAttributesThreshold. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/imageattributes.c, + include/gdipluscolor.h, include/gdipluscolormatrix.h, + include/gdiplusgpstubs.h: + gdiplus: Add a stub for GdipSetImageAttributesRemapTable. + +2008-04-10 Petr Sumbera + + * server/fd.c: + server: Workaround for conflict between Wine and Solaris list.h. + + * programs/winetest/Makefile.in: + winetest: Fix shell substitution syntax for Solaris. + +2008-04-10 Luis C. Busquets Pérez + + * tools/wine.desktop: + tools: Add Spanish translation to wine.desktop. + +2008-04-10 Juan Lang + + * Makefile.in, configure, configure.ac, dlls/Makefile.in, + dlls/cryptui/Makefile.in, dlls/cryptui/cryptui.spec, + dlls/cryptui/main.c: + cryptui: Add stub DLL. + + * dlls/softpub/Makefile.in, dlls/softpub/main.c, + dlls/softpub/softpub.spec: + softpub: Forward softpub functions to wintrust. + +2008-04-10 Rob Shearman + + * dlls/winedos/vga.c: + winedos: The calling convention should come after the return type in the + declaration of VGA_DoShowMouse for portability. + + * dlls/mshtml/install.c: + mshtml: Fix the buffer length being passed into MultiByteToWideChar in + set_registry. + + * dlls/mshtml/protocol.c: + mshtml: Support parsing the resource type in the res:// protocol. + + * dlls/shell32/pidl.c, dlls/shell32/pidl.h, + dlls/shell32/shfldr_netplaces.c, dlls/shell32/tests/Makefile.in, + dlls/shell32/tests/shfldr_netplaces.c: + shell32: Implement ParseDisplayName for EntireNetwork in the Network Places + shell folder. + Add a test for this behaviour. + +2008-04-10 Alexandre Julliard + + * dlls/user32/tests/input.c: + user32/tests: Replace the keyboard flags bitfield by the official flag + definitions. + + * dlls/winex11.drv/keyboard.c: + winex11: Replace the keyboard flags bitfield by the official flag definitions. + + * dlls/user32/menu.c, dlls/winex11.drv/winpos.c: + user32: Moved the menu activation hack on managed windows to the X11 driver. + + * dlls/user32/driver.c, dlls/user32/nonclient.c, + dlls/user32/user_private.h, dlls/user32/winpos.c, + dlls/winex11.drv/winex11.drv.spec, dlls/winex11.drv/winpos.c: + user32: Forward all WM_SYSCOMMAND messages to the driver, not only moves + and resizes. + + * dlls/comctl32/status.c: + comctl32: Get rid of the hack to remove size grips on managed windows. + + * dlls/winex11.drv/window.c, dlls/winex11.drv/winpos.c: + winex11: Make sure to flush painting operations before moving a window. + +2008-04-04 Kusanagi Kouichi + + * dlls/winex11.drv/window.c, dlls/winex11.drv/x11drv.h, + dlls/winex11.drv/x11drv_main.c, dlls/winex11.drv/xim.c: + winex11: Connect to XIM server dynamically. + +2008-04-10 Alexandre Julliard + + * dlls/winex11.drv/x11drv.h, dlls/winex11.drv/x11drv_main.c, + dlls/winex11.drv/xim.c: + winex11: Separate the XIM process-wide setup from the IME creation. + +2008-04-09 Maarten Lankhorst + + * dlls/quartz/control.c: + quartz: Add stubs for the IMediaSeeking interface in SeekingPassThru. + + * dlls/quartz/control.c, dlls/quartz/main.c, dlls/quartz/quartz_private.h: + quartz: Add a stub for SeekingPassThru. + +2008-04-10 Jacek Caban + + * dlls/mshtml/nsio.c: + mshtml: Correctly handle NULL req in get_nscontainer_from_load_group. + + * include/mshtmdid.h, include/mshtml.idl: + mshtml.idl: Added DispHTMLWindow2 dispinterface. + + * include/dispex.idl: + include: Added ICanHandleException interface. + + * dlls/jscript/tests/Makefile.in, dlls/jscript/tests/jscript.c: + jscript: Added IObjectSafety tests. + +2008-04-09 Lei Zhang + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/imageattributes.c: + gdiplus: Add a stub for GdipSetImageAttributesOutputChannelColorProfile. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/imageattributes.c, + include/Makefile.in, include/gdiplus.h, include/gdipluscolor.h: + gdiplus: Add a stub for GdipSetImageAttributesOutputChannel. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/imageattributes.c: + gdiplus: Add a stub for GdipSetImageAttributesNoOp. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/imageattributes.c: + gdiplus: Add a stub for GdipSetImageAttributesGamma. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/imageattributes.c: + gdiplus: Add a stub for GdipSetImageAttributesCachedBackground. + + * dlls/gdiplus/Makefile.in, dlls/gdiplus/gdiplus.spec, + dlls/gdiplus/region.c: + gdiplus: Add a stub for GdipSetEmpty. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/image.c, + include/gdiplusgpstubs.h: + gdiplus: Add a stub for GdipSetEffectParameters. + + * dlls/gdiplus/customlinecap.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipSetCustomLineCapWidthScale. + + * dlls/gdiplus/customlinecap.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipSetCustomLineCapStrokeJoin. + + * dlls/gdiplus/customlinecap.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipSetCustomLineCapBaseInset. + + * dlls/gdiplus/customlinecap.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipGetCustomLineCapBaseInset. + + * dlls/gdiplus/customlinecap.c, dlls/gdiplus/gdiplus.spec: + gdiplus: Add a stub for GdipSetCustomLineCapBaseCap. + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c, + include/gdiplusgpstubs.h: + gdiplus: Add a stub for GdipSetClipRegion. + + * dlls/user32/dialog.c, dlls/user32/edit.c: + user32: Handle VK_TAB in EDIT_WM_KeyDown. + +2008-04-09 Dan Hipschman + + * dlls/qedit/mediadet.c: + qedit: Add a stub for IMediaDet_get_StreamLength. + To get this working by querying the filters for IMediaSeeking and calling + GetDuration, we need a little better support from quartz. For now a stub + is better than nothing. + + * dlls/qedit/mediadet.c, dlls/qedit/tests/mediadet.c: + qedit: Implement IMediaDet_get_FrameRate. + + * dlls/qedit/mediadet.c, dlls/qedit/tests/mediadet.c: + qedit: Implement IMediaDet_get_StreamMediaType. + +2008-04-09 Piotr Caban + + * programs/oleview/typelib.c: + oleview: Added returns as arguments in interfaces with oleautomation flag. + + * programs/oleview/typelib.c: + oleview: Hide functions without id property in dual interfaces. + + * programs/oleview/typelib.c: + oleview: Fixed idl files generation with oleautomation flag. + + * programs/oleview/main.h, programs/oleview/typelib.c: + oleview: Fixed idl files generation with dual interfaces. + + * programs/oleview/typelib.c: + oleview: Added helpstring to functions. + +2008-04-09 Andrew Talbot + + * dlls/msdmo/dmoreg.c: + msdmo: Fix calculation of array size in bytes. + +2008-04-09 Austin English + + * dlls/ole32/antimoniker.c, dlls/ole32/bindctx.c, dlls/ole32/compobj.c, + dlls/ole32/compositemoniker.c, dlls/ole32/datacache.c, + dlls/ole32/defaulthandler.c, dlls/ole32/filemoniker.c, + dlls/ole32/ifs.c, dlls/ole32/itemmoniker.c, dlls/ole32/moniker.c, + dlls/ole32/ole16.c, dlls/ole32/pointermoniker.c, dlls/ole32/rpc.c, + dlls/ole32/stg_prop.c, dlls/ole32/storage.c, dlls/ole32/storage32.c, + dlls/ole32/storage32.h: + ole32: Spelling fixes. + +2008-04-09 Maarten Lankhorst + + * include/axextend.idl: + include: Add ISeekingPassThru interface. + + * dlls/quartz/mpegsplit.c: + quartz: Implement stop position in the mpeg splitter. + + * dlls/quartz/filtergraph.c: + quartz: Implement stop position in the filtergraph. + +2008-04-10 Alexandre Julliard + + * programs/Makefile.in: + programs: Remove winelauncher from install rules. + + * dlls/user32/tests/cursoricon.c: + user32/tests: Avoid testing uninitialized data. + +2008-04-09 Tomasz Jezierski + + * dlls/hhctrl.ocx/help.c: + hhctrl.ocx: Fix for writing outside allocated memory in HH_AddToolbar. + +2008-04-08 Lei Zhang + + * dlls/user32/edit.c: + user32: Fix a typo. + +2008-04-09 Lei Zhang + + * dlls/user32/edit.c, dlls/user32/tests/edit.c: + user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_TAB. + + * dlls/user32/edit.c, dlls/user32/tests/edit.c: + user32: Add edit control check to see if its in a dialog on WM_CHAR/VK_RETURN. + +2008-04-09 Alexandre Julliard + + * dlls/winex11.drv/window.c: + winex11: Flush the display after creating X windows. + + * dlls/winex11.drv/clipboard.c: + winex11: Added an error handler to catch bad atoms in clipboard selections. + +2008-04-09 Steven Edwards + + * include/setupapi.h: + include/setupapi: Remove extra semicolons. + + * server/mach.c: + server: Remove unneeded semicolon. + +2008-04-09 Aric Stewart + + * dlls/imm32/imm.c: + imm32: Implement ImmUnregisterWord using loaded IME. + + * dlls/imm32/imm.c: + imm32: Implement ImmRegisterWord using loaded IME. + + * dlls/imm32/imm.c: + imm32: Implement ImmGetRegisterWordStyle using loaded IME. + + * dlls/imm32/imm.c: + imm32: Semi-stub implement ImmGetConversionList using loaded IME. + + * dlls/imm32/imm.c: + imm32: Semi-stub implement ImmEscape using loaded IME. + + * dlls/imm32/imm.c: + imm32: Semi-stub implement ImmEnumRegisterWord using loaded IME. + +2008-04-09 Dmitry Timoshkov + + * programs/winhelp/callback.c, programs/winhelp/hlpfile.c, + programs/winhelp/macro.lex.l, programs/winhelp/winhelp.c: + winhelp: Fix Win64 warnings. + + * programs/wordpad/print.c, programs/wordpad/registry.c: + wordpad: Fix Win64 warnings. + + * programs/winefile/winefile.c: + winefile: Fix Win64 warnings. + + * programs/wineconsole/wineconsole.c: + wineconsole: Fix Win64 warning. + + * programs/wineboot/wineboot.c: + wineboot: Fix Win64 warnings. + + * programs/regedit/listview.c, programs/regedit/main.c, + programs/regedit/main.h, programs/regedit/treeview.c: + regedit: Fix Win64 warnings. + +2008-04-09 Mikołaj Zalewski + + * dlls/qedit/tests/qedit.rc: + qedit/tests: Fix dependency. + +2008-04-09 Alexandre Julliard + + * dlls/winex11.drv/keyboard.c: + winex11: Fix KeymapNotify handler to take left/right modifiers into account. + + * dlls/winex11.drv/systray.c: + winex11: Get rid of the useless systray hidden flag. + + * dlls/winex11.drv/systray.c, dlls/winex11.drv/winpos.c, + dlls/winex11.drv/x11drv.h: + winex11: Add some generic support for XEMBED client windows. + + * dlls/winex11.drv/winpos.c: + winex11: Abstract window map/unmap to separate functions. + +2008-04-04 Hwang YunSong(황윤성) + + * dlls/wineps.drv/wps_Ko.rc: + wineps.drv: Updated Korean resource. + + * programs/xcopy/Ko.rc: + xcopy: Updated Korean resource. + + * programs/wordpad/Ko.rc: + wordpad: Updated Korean resource. + + * programs/winhelp/Ko.rc: + winhelp: Updated Korean resource. + + * programs/winemine/Ko.rc: + winemine: Update Korean resource. + + * programs/winecfg/Ko.rc: + winecfg: Updated Korean resource. + + * programs/uninstaller/Ko.rc: + uninstaller: Updated Korean resource. + + * dlls/shell32/shell32_Ko.rc: + shell32: Updated Korean resource. + + * programs/notepad/Ko.rc: + notepad: Updated Korean resource. + +2008-04-07 Chris Robinson + + * dlls/d3d9/tests/device.c, dlls/wined3d/device.c: + wined3d: Check for NULL vertex declarations. + +2008-04-08 Lei Zhang + + * dlls/gdiplus/gdiplus.spec, dlls/gdiplus/graphics.c, + include/gdiplusenums.h: + gdiplus: Add a stub for GdipSetClipRectI. + +2008-04-08 Austin English + + * dlls/msvcrt/cppexcept.h, dlls/msvcrt/main.c, dlls/msvcrt/tests/string.c, + dlls/msvcrt/undname.c, dlls/mswsock/mswsock.c, dlls/msxml3/node.c, + dlls/msxml3/pi.c, dlls/msxml3/tests/domdoc.c, dlls/netapi32/ds.c, + dlls/netapi32/nbnamecache.h, dlls/netapi32/nbt.c, + dlls/netapi32/wksta.c, dlls/ntdll/directory.c, dlls/ntdll/path.c, + dlls/ntdll/reg.c, dlls/ntdll/relay.c, dlls/ntdll/serial.c, + dlls/ntdll/tests/atom.c, dlls/ntdll/tests/env.c, + dlls/ntdll/tests/om.c, dlls/ntdll/tests/reg.c, + dlls/ntdll/tests/rtl.c, dlls/ntdll/tests/rtlstr.c, + dlls/ntdll/tests/string.c: + Spelling fixes. + +2008-04-08 Maarten Lankhorst + + * dlls/quartz/dsoundrender.c: + quartz: Make the directsound renderer handle the Play->Pause->Play position + without dropping data. + + * dlls/quartz/mpegsplit.c: + quartz: Generate a seek table for the mpeg splitter. + Speeds up seeking mp3's on large files. + + * dlls/quartz/control.c, dlls/quartz/pin.c: + quartz: Remove while { } while construct. + Thanks to Andrew Talbot for spotting this. + +2008-04-09 Alexandre Julliard + + * tools/bug_report.pl, tools/genpatch: + tools: Remove the obsolete bug_report.pl and genpatch scripts. + + * .gitignore, programs/Makefile.in, programs/winelauncher.in: + programs: Remove obsolete winelauncher script. + +2008-04-07 Stefan Dösinger + + * dlls/d3d9/tests/visual.c, dlls/wined3d/state.c: + d3d9: Some Windows drivers set undefined attributes to 0.0. + + * dlls/d3d9/tests/visual.c: + d3d9: Accept erros in the fvp->3.0 pixel shader varying test. + Some cards/drivers like ATI and the Geforce 8 driver return an error in + this case, make the test accept that. This lifts some constraints we + have to care for in WineD3D and removes one of the requirement for the + packing shader. We still need the packing shader for vs_1_1 -> ps_3_0 + mapping and for indirect pixel shader varying addressing though. + + * dlls/d3d9/tests/visual.c: + d3d9: Make the srgb reading test less strict. + +2008-04-06 Stefan Dösinger + + * dlls/wined3d/context.c: + wined3d: Disable blending when clearing. + + * dlls/wined3d/basetexture.c, dlls/wined3d/device.c, + dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h: + wined3d: Disable MAG filters on formats that do not support them. + + * dlls/wined3d/basetexture.c, dlls/wined3d/directx.c, + dlls/wined3d/surface.c, dlls/wined3d/wined3d_private.h: + wined3d: Make the mag filter lookup a separate array. + This makes it easier to make this a per texture / per adapter property. + Somewhen we should rename the remaining lookup type in the general + lookup table to wraplookup. + + * dlls/wined3d/device.c, dlls/wined3d/directx.c, + dlls/wined3d/wined3d_private.h: + wined3d: Disable texture filtering on textures that do not support it. + OpenGL always offers filtering on all formats, and if the hardware + doesn't support it the driver falls back to software. Direct3D on the + other hand silently disables filtering, so that's what we should do too. + + * dlls/wined3d/basetexture.c, dlls/wined3d/device.c, + dlls/wined3d/wined3d_private.h: + wined3d: Make the min mip lookup type a texture property. + +2008-04-05 Stefan Dösinger + + * dlls/wined3d/directx.c: + wined3d: Report D3DUSAGE_QUERY_WRAPANDMIP support. + +2008-04-08 Stefan Dösinger + + * dlls/wined3d/context.c, dlls/wined3d/device.c, dlls/wined3d/directx.c, + dlls/wined3d/surface.c, dlls/wined3d/wined3d_private.h, + include/wine/wined3d_gl.h: + wined3d: Store the number of aux buffers in the context. + +2008-04-08 Michael Stefaniuc + + * dlls/quartz/parser.c: + quartz: Add missing lock releases on some code paths (Smatch). + +2008-04-08 Dan Hipschman + + * dlls/qedit/mediadet.c, dlls/qedit/tests/mediadet.c: + qedit: Implement IMediaDet_(put|get)_CurrentStream. + + * dlls/qedit/mediadet.c, dlls/qedit/tests/mediadet.c, + dlls/qedit/tests/qedit.rc, dlls/qedit/tests/rc.h, + dlls/qedit/tests/test_sound.avi: + qedit: Implement IMediaDet_get_OutputStreams. + + * dlls/qedit/Makefile.in, dlls/qedit/mediadet.c, + dlls/qedit/tests/mediadet.c: + qedit: Implement IMediaDet_get_Filename. + + * dlls/qedit/mediadet.c, dlls/qedit/tests/mediadet.c: + qedit: Implement IMediaDet_put_Filename. + + * dlls/qedit/tests/mediadet.c: + qedit/tests: Fix an incorrect count given to GetTempPathW. + +2008-04-08 Aric Stewart + + * dlls/imm32/imm.c: + imm32: ImmDestroyContext cannot destroy the default context. + +2008-04-08 Andrew Talbot + + * dlls/advapi32/cred.c: + advapi32: Array parameters are passed to function as pointers so lose size + information. + +2008-04-08 Erik de Castro Lopo + + * dlls/msvcrt/file.c, dlls/msvcrt/tests/file.c: + msvcrt: Clear end-of-file flag on fseek. + +2008-04-07 Maarten Lankhorst + + * dlls/quartz/pin.c: + quartz: Make the pullpin forward the BeginFlush before doing its own flushing. + + * dlls/quartz/filesource.c: + quartz: Don't free a null media type in the file source. + + * dlls/quartz/dsoundrender.c: + quartz: Make the DirectSound renderer return S_FALSE packet if in the paused + state. + + * dlls/quartz/transform.c: + quartz: Drop packets in the transform filter if in the wrong state. + + * dlls/quartz/filtergraph.c: + quartz: Try creating the file reader from the filter source first before + falling back to the generic async file reader. + + * dlls/quartz/mpegsplit.c: + quartz: Make mpeg splitter keep track of play position and keep last sample + if sending was not successful. + This fixes data discontinuities that earlier occured after a + stop/pause command or the downright rejection of a sample (S_FALSE). + +2008-04-08 Alexandre Julliard + + * programs/explorer/systray.c: + explorer: Implement a global system tray window. + + * dlls/winex11.drv/systray.c: + winex11: Add a timer to detect when a systray owner has been destroyed. + + * dlls/winex11.drv/systray.c: + winex11: Make the system tray window transparent. + + * dlls/winex11.drv/Makefile.in, dlls/winex11.drv/systray.c, + dlls/winex11.drv/window.c, dlls/winex11.drv/winex11.drv.spec, + dlls/winex11.drv/x11drv.h, dlls/winex11.drv/x11drv_main.c, + programs/explorer/systray.c: + winex11: Move all the embedded systray window support to winex11.drv. + +2008-04-08 Huw Davies + + * dlls/gdi32/freetype.c: + gdi32: Don't overrun the current scanline while copying a glyph's bitmap. + +2008-04-08 Alexander Dorofeyev + + * dlls/wined3d/drawprim.c: + wined3d: Set isInDraw later in drawPrimitive. + This should fix the problem that in LoadLocation SFLAG_INTEXTURE path gl calls + can be made without activating context, due to isInDraw checks. + +2008-04-08 Michael Stefaniuc + + * dlls/msacm32/msacm.rc, dlls/msacm32/msacm_Ro.rc: + msacm32: Add the Romanian translation. + + * programs/notepad/Ro.rc, programs/notepad/rsrc.rc: + notepad: Add the Romanian translation. + + * programs/view/Ro.rc, programs/view/viewrc.rc: + view: Add the Romanian translation. + + * dlls/mpr/mpr.rc, dlls/mpr/mpr_Ro.rc: + mpr: Add the Romanian translation. + + * dlls/sane.ds/rsrc.rc, dlls/sane.ds/sane_Ro.rc: + sane.ds: Add the Romanian translation. + + * dlls/localui/localui.rc, dlls/localui/ui_Ro.rc: + localui: Add the Romanian translation. + +2008-04-07 Austin English + + * dlls/msi/action.c, dlls/msi/helpers.c, dlls/msi/msi.c, + dlls/msi/tests/db.c, dlls/msi/tests/format.c, + dlls/msi/tests/install.c, dlls/msi/tests/package.c, + dlls/msi/tests/source.c: + msi: Spelling fixes. + +2008-04-08 Alexandre Julliard + + * dlls/winex11.drv/clipboard.c: + winex11: Improved handling of broken 8-bit TARGETS selection. + +2008-04-07 Detlef Riekenberg + + * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec: + ntoskrnl.exe: Implement KeQueryInterruptTime. + + * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec: + ntoskrnl.exe: Implement KeQueryActiveProcessors. + +2008-04-07 Maarten Lankhorst + + * dlls/quartz/parser.c, dlls/quartz/pin.c, dlls/quartz/pin.h: + quartz: Fix deadlocks in pullpin. + + * dlls/quartz/dsoundrender.c: + quartz: Make wait timeout in directsound slightly larger. + +2008-04-08 Alexandre Julliard + + * dlls/user32/nonclient.c, dlls/user32/resources/user32_Bg.rc, + dlls/user32/resources/user32_Ca.rc, + dlls/user32/resources/user32_Da.rc, + dlls/user32/resources/user32_De.rc, + dlls/user32/resources/user32_En.rc, + dlls/user32/resources/user32_Eo.rc, + dlls/user32/resources/user32_Es.rc, + dlls/user32/resources/user32_Fi.rc, + dlls/user32/resources/user32_Fr.rc, + dlls/user32/resources/user32_Hu.rc, + dlls/user32/resources/user32_It.rc, + dlls/user32/resources/user32_Ja.rc, + dlls/user32/resources/user32_Ko.rc, + dlls/user32/resources/user32_Nl.rc, + dlls/user32/resources/user32_No.rc, + dlls/user32/resources/user32_Pl.rc, + dlls/user32/resources/user32_Pt.rc, + dlls/user32/resources/user32_Ro.rc, + dlls/user32/resources/user32_Ru.rc, + dlls/user32/resources/user32_Si.rc, + dlls/user32/resources/user32_Sk.rc, + dlls/user32/resources/user32_Tr.rc, + dlls/user32/resources/user32_Uk.rc, + dlls/user32/resources/user32_Wa.rc: + user32: Get rid of the debug mark option in the system menu. + + * libs/wine/Makefile.in, libs/wine/c_1361.c, libs/wine/cpmap.pl, + libs/wine/cptable.c: + libwine: Added mappings for codepage 1361 (Korean Johab). + +2008-04-07 Lei Zhang + + * dlls/user32/edit.c, dlls/user32/tests/edit.c: + user32: Handle VK_ESCAPE correctly in EDIT_WM_KeyDown. + + * dlls/user32/edit.c, dlls/user32/tests/edit.c: + user32: Handle ES_MULTILINE correctly for WM_KEYDOWN/VK_RETURN. + + * dlls/user32/edit.c, dlls/user32/tests/edit.c: + user32: Fix WM_CHAR return value for edit controls. + + * dlls/user32/tests/edit.c: + user32: Add tests for edit controls and VK_TAB. + + * dlls/user32/tests/edit.c: + user32: Add tests for edit controls and VK_RETURN. + + * dlls/user32/tests/edit.c, dlls/user32/tests/resource.rc: + user32: Add more tests for single line edit control inside a dialog. + + * dlls/user32/tests/edit.c, dlls/user32/tests/resource.rc: + user32: Add more tests for ES_WANTRETURN. + +2008-04-07 Stefan Dösinger + + * dlls/wined3d/device.c: + wined3d: Mark the SYSMEM copy outdated after releasing memory. + Strictly speaking this is redundant because the UnLoad before did the + job, but if we mess with the allocated memory we have to tell the + surface about that. Updating INDRAWABLE will automatically mark SYSMEM + outdated. + + * dlls/wined3d/surface.c: + wined3d: Put implicit surfaces into drawable on unload. + If we mark the sysmem copy up to date we would have to take care about + allocating it. As explained in the comment, INDRAWABLE is a saner + choice + +2008-04-07 Andrew Talbot + + * dlls/msdmo/dmoreg.c: + msdmo: Array parameter is passed to function as pointer so loses size + information. + +2008-04-07 Rok Mandeljc + + * dlls/oleaut32/oleaut32.rc, dlls/oleaut32/oleaut32_Si.rc: + oleaut32: Added Slovenian translation. + + * programs/regedit/Si.rc: + regedit: Updated Slovenian translation. + + * dlls/msvfw32/msvfw32_Si.rc, dlls/msvfw32/rsrc.rc: + msvfw32: Added Slovenian translation. + + * dlls/msvidc32/msvidc32_Si.rc, dlls/msvidc32/rsrc.rc: + msvidc32: Added Slovenian translation. + + * programs/cmd/Si.rc: + cmd: Updated Slovenian translation. + + * dlls/localui/localui.rc, dlls/localui/ui_Si.rc: + localui: Added Slovenian translation. + + * programs/taskmgr/Si.rc, programs/taskmgr/taskmgr.rc: + taskmgr: Added Slovenian translation. + + * programs/xcopy/Si.rc, programs/xcopy/rsrc.rc: + xcopy: Added Slovenian translation. + + * programs/reg/Si.rc, programs/reg/rsrc.rc: + reg: Added Slovenian translation. + + * programs/start/Si.rc, programs/start/rsrc.rc: + start: Updated Slovenian translation. + + * dlls/shell32/shell32_Si.rc: + shell32: Updated Slovenian translation. + + * programs/wineconsole/wineconsole_Si.rc, + programs/wineconsole/wineconsole_res.rc: + wineconsole: Added Slovenian translation. + + * programs/cmdlgtst/Si.rc: + cmdlgtest: Updated Slovenian translation. + + * dlls/devenum/devenum.rc: + devenum: Added Slovenian translation. + + * programs/write/Si.rc, programs/write/rsrc.rc: + write: Added Slovenian translation. + + * dlls/shlwapi/shlwapi.rc, dlls/shlwapi/shlwapi_Si.rc: + shlwapi: Added Slovenian translation. + + * dlls/shdoclc/Si.rc, dlls/shdoclc/rsrc.rc: + shdoclc: Added Slovenian translation. + + * programs/winecfg/Si.rc, programs/winecfg/winecfg.rc: + winecfg: Added Slovenian translation. + + * programs/uninstaller/Si.rc, programs/uninstaller/rsrc.rc: + uninstaller: Added Slovenian translation. + + * dlls/hhctrl.ocx/Si.rc, dlls/hhctrl.ocx/hhctrl.rc: + hhctrl.ocx: Added Slovenian translation. + + * dlls/mpr/mpr.rc, dlls/mpr/mpr_Si.rc: + mpr: Added Slovenian translation. + + * programs/net/Si.rc, programs/net/rsrc.rc: + net: Added Slovenian Translation. + + * programs/wordpad/Si.rc, programs/wordpad/rsrc.rc: + wordpad: Added Slovenian translation. + + * dlls/credui/credui.rc, dlls/credui/credui_Si.rc: + credui: Added Slovenian translation. + + * dlls/oledlg/oledlg_Si.rc, dlls/oledlg/rsrc.rc: + oledlg: Added Slovenian translation. + + * dlls/browseui/rsrc.rc, dlls/browseui/rsrc_Si.rc: + browseui: Added Slovenian translation. + + * programs/progman/Si.rc: + progman: Updated Slovenian translation. + + * programs/view/Si.rc: + view: Updated Slovenian translation. + +2008-04-08 Alexandre Julliard + + * tools/wrc/parser.y: + wrc: Add support for Unicode accelerator strings. + +2008-04-07 Rok Mandeljc + + * programs/winefile/Si.rc: + winefile: Updated Slovenian translation. + + * programs/winhelp/Si.rc: + winhelp: Updated Slovenian translation. + + * programs/clock/Si.rc: + clock: Updated Slovenian translation. + + * programs/notepad/Si.rc: + notepad: Updated Slovenian translation. + + * programs/winemine/Si.rc: + winemine: Updated Slovenian translation. + + * programs/wineboot/wineboot.rc, programs/wineboot/wineboot_Si.rc: + wineboot: Added Slovenian translation. + + * dlls/wininet/wininet_Si.rc: + wininet: Updated Slovenian translation. + + * dlls/localspl/localspl.rc, dlls/localspl/spl_Si.rc: + localspl: Added Slovenian translation. + + * dlls/comdlg32/cdlg_Si.rc: + comdlg32: Updated Slovenian translation. + + * dlls/winmm/winmm_Si.rc: + winmm: Updated Slovenian translation. + + * dlls/user32/resources/user32_Si.rc: + user32: Updated Slovenian translation. + + * dlls/msrle32/msrle_Si.rc: + msrle32: Updated Slovenian translation. + + * dlls/comctl32/comctl_Si.rc: + comctl32: Updated Slovenian translation. + + * dlls/msi/msi.rc, dlls/msi/msi_Si.rc: + msi: Added Slovenian translation. + + * dlls/winspool.drv/Si.rc, dlls/winspool.drv/winspool.rc: + winspool.drv: Added Slovenian translation. + + * dlls/sane.ds/rsrc.rc, dlls/sane.ds/sane_Si.rc: + sane.ds: Added Slovenian translation. + + * dlls/mshtml/Si.rc, dlls/mshtml/rsrc.rc: + mshtml: Added Slovenian translation. + + * dlls/msacm32/msacm.rc, dlls/msacm32/msacm_Si.rc: + mscacm32: Added Slovenian translation. + + * dlls/iccvid/iccvid_Si.rc, dlls/iccvid/rsrc.rc: + iccvid: Added Slovenian translation. + + * dlls/gphoto2.ds/gphoto2_Si.rc, dlls/gphoto2.ds/rsrc.rc: + gphoto2.ds: Added Slovenian translation. + + * dlls/avifil32/avifile_Si.rc: + avifil32: Updated Slovenian translation. + +2008-04-06 Rico Schüller + + * dlls/d3d9/tests/visual.c: + d3d9: Add stream_test with instancing. + + * dlls/wined3d/drawprim.c: + wined3d: Improve drawStridedInstanced(). + + * dlls/wined3d/device.c: + wined3d: Filter out invalid stuff in SetStreamSourceFreq(). + +2008-04-07 Alexander Dorofeyev + + * dlls/wined3d/surface.c: + wined3d: Move PreLoad to avoid calling it with gl lock held. + + * dlls/wined3d/surface.c: + wined3d: Add device->isInDraw checks in LoadLocation. + Prevents calling ActivateContext while holding gl lock, e.g. when preloading + texture in sampler(). + + * dlls/wined3d/device.c: + wined3d: move ENTER_GL in IWineD3DDeviceImpl_Init3D. + + * dlls/wined3d/query.c: + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DOcclusionQueryImpl_Issue. + + * dlls/wined3d/query.c: + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DEventQueryImpl_Issue. + + * dlls/wined3d/query.c: + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DEventQueryImpl_GetData. + + * dlls/wined3d/query.c: + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DOcclusionQueryImpl_GetData. + + * dlls/wined3d/query.c: + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DQueryImpl_Release. + + * dlls/wined3d/drawprim.c: + wined3d: LEAVE_GL when exiting with error in tesselate_rectpatch. + + * dlls/wined3d/device.c: + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_ResourceReleased. + + * dlls/wined3d/device.c: + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_ColorFill. + + * dlls/wined3d/device.c: + wined3d: Add ENTER_GL/LEAVE_GL in IWineD3DDeviceImpl_Uninit3D. + + * dlls/wined3d/surface.c: + wined3d: Implement CONVERT_RGB32_888 conversion. + + * dlls/wined3d/surface_base.c: + wined3d: Don't copy the extra line. + biSizeImage has an extra line added to it, and passing it to memcpy can cause a + crash. + +2008-04-07 Aric Stewart + + * dlls/imm32/imm.c: + imm32: Properly handle unicode and non unicode IMEs with SetCompositionString. + + * dlls/imm32/imm.c: + imm: Default context and hwnd are per thread so store that data in a thread + local storage. + + * dlls/imm32/imm.c: + imm32: Make use of of the loaded IME for all processing. + + * dlls/winex11.drv/xim.c: + winex11: Have all xim interaction pass through the new x11drv IME interface. + +2008-04-03 Aric Stewart + + * dlls/imm32/imm.c: + imm32: Implement ImmGetImeMenuItems using loaded IME. + + * dlls/imm32/imm.c: + imm32: Load a default IME if a specific one is not specified. This defaults + to x11. + +2008-04-02 Aric Stewart + + * dlls/imm32/imm.c: + imm32: Implement ImmConfigureIME using the loaded IME. + + * dlls/winex11.drv/Makefile.in, dlls/winex11.drv/ime.c, + dlls/winex11.drv/winex11.drv.spec, dlls/winex11.drv/x11drv.h, + dlls/winex11.drv/x11drv_main.c, dlls/winex11.drv/xim.c: + winex11: Add IME functionality to winex11drv. + All XIM interaction will soon pass through this functionality instead + of directly to imm32. + +2008-04-06 Reece Dunn + + * tools/winapi/msvcmaker: + tools/msvcmaker: Suppress deprecation warnings on VC8 and above. + +2008-04-07 Dmitry Timoshkov + + * dlls/winex11.drv/window.c: + winex11.drv: Do not set window type to utility to avoid a Metacity bug. + + * dlls/gdi32/tests/font.c: + gdi32: Move negative lfWidth test into a separate body, skip the test if there + is no 'x' in the font. + + * dlls/gdi32/freetype.c: + gdi32: Fix lfWidth before caching the font to avoid duplicate entries in + the cache. + +2008-04-07 Alexandre Julliard + + * dlls/user32/win.c: + user32: Fix list_window_parents when run in the desktop process. + + * libs/wine/Makefile.in: + libwine: Only use the last line of the git version description. + + * dlls/winex11.drv/winpos.c: + winex11: Don't set NET_WM_STATE on the desktop window. + +2008-04-05 Andrew Talbot + + * dlls/advapi32/service.c, dlls/advapi32/tests/service.c: + advapi32: Do not call MIDL_user_free() with pointer to stack memory. + +2008-04-07 Francois Gouget + + * dlls/kernel32/nls/rmc.nls, dlls/oleaut32/tests/olefont.c, + dlls/oleaut32/tests/vartest.c, dlls/oleaut32/typelib.c, + dlls/user32/tests/winstation.c, dlls/wined3d/arb_program_shader.c, + dlls/wined3d/ati_fragment_shader.c, dlls/wined3d/device.c, + dlls/wined3d/directx.c, dlls/winedos/int31.c, + dlls/wineoss.drv/midi.c, programs/cmd/batch.c, + programs/cmd/builtins.c, programs/cmd/directory.c, + programs/notepad/dialog.c, programs/notepad/main.c, + programs/services/services.c, programs/taskmgr/taskmgr.h, + programs/winecfg/libraries.c, programs/winedbg/be_cpu.h, + programs/winedbg/be_i386.c, programs/winedbg/winedbg.c, + programs/xcopy/xcopy.c, server/atom.c, server/change.c, + tools/wrc/genres.c: + Assorted spelling fixes. + + * dlls/fusion/tests/asmcache.c: + fusion/tests: Fix compilation on systems that don't support nameless unions. + + * dlls/ddraw/tests/visual.c: + ddraw/tests: Fix compilation on systems that don't support nameless unions. + + * programs/wineboot/wineboot.c: + wineboot: Make sure COBJMACROS is defined before objidl.h is included. + + * programs/services/rpc.c: + services: Add a trailing '\n' to a couple of Wine traces. + +2008-04-07 Jacek Caban + + * dlls/jscript/jscript.c: + jscript: Added IObjectSafety implementation. + + * dlls/mshtml/conpoint.c, dlls/mshtml/editor.c, dlls/mshtml/hlink.c, + dlls/mshtml/htmlanchor.c, dlls/mshtml/htmlbody.c, + dlls/mshtml/htmlelem.c, dlls/mshtml/htmlelem2.c, + dlls/mshtml/htmlinput.c, dlls/mshtml/htmlnode.c, + dlls/mshtml/htmloption.c, dlls/mshtml/htmlscript.c, + dlls/mshtml/htmlselect.c, dlls/mshtml/htmlstyle.c, + dlls/mshtml/htmlstylesheet.c, dlls/mshtml/htmltable.c, + dlls/mshtml/htmltextarea.c, dlls/mshtml/htmlwindow.c, + dlls/mshtml/main.c, dlls/mshtml/olecmd.c, dlls/mshtml/selection.c, + dlls/mshtml/txtrange.c: + mshtml: Remove unneeded includes. + + * dlls/mshtml/nsembed.c: + mshtml: Don't crash if nsWebBrowser could not be created. + + * dlls/mshtml/Makefile.in, dlls/mshtml/htmlwindow.c, + dlls/mshtml/mshtml_private.h, dlls/mshtml/omnavigator.c, + dlls/mshtml/tests/dom.c: + mshtml: Added IHTMLWindow2::get_navigator implementation. + +2008-04-04 Austin English + + * dlls/ddraw/main.c, dlls/ddraw/tests/visual.c, + dlls/dplayx/dplayx_global.c, dlls/iphlpapi/iphlpapi_main.c, + dlls/mapi32/prop.c, dlls/mciseq/mcimidi.c, dlls/mciwave/mciwave.c, + dlls/mpr/pwcache.c, dlls/msadp32.acm/msadp32.c, dlls/mshtml/editor.c, + dlls/mshtml/htmlnode.c, dlls/mshtml/service.c, + dlls/mshtml/tests/htmldoc.c: + Spelling fixes. + +2008-04-05 Vitaliy Margolen + + * dlls/winex11.drv/keyboard.c: + winex11: Properly report state of the caps-lock and num-lock and scroll-lock + keys. + +2008-04-06 Vitaliy Margolen + + * dlls/winex11.drv/keyboard.c: + winex11: Get the ScrollLock mask. + +2008-04-07 Dmitry Timoshkov + + * dlls/winex11.drv/window.c: + winex11: Change the priority of evaluated window styles to workaround a Metacity + bug with handling of utility windows. + + * dlls/gdi32/freetype.c: + gdi32: Fully initialize face->ntmFlags on font load. + +2008-04-07 Hwang YunSong(황윤성) + + * programs/progman/Ko.rc: + progman: Updated Korean resource. + +2008-04-06 Alexander Nicolaysen Sørnes + + * dlls/shell32/shell32_No.rc: + shell32: Update Norwegian Bokmål resource. + + * dlls/oledlg/oledlg_No.rc: + oledlg: Fix control class in Norwegian Bokmål resource. + + * dlls/comdlg32/cdlg_No.rc: + comdlg32: Update Norwegian Bokmål resource. + +2008-04-05 Roderick Colenbrander + + * dlls/wined3d/surface.c: + wined3d: Remove a PBO when a converted surface is detected. + This can happen e.g. when suddenly color keying is activated and at + some stages we don't know if we will need conversion at PBO creation + time. + +2008-04-03 Roderick Colenbrander + + * dlls/wined3d/surface.c: + wined3d: Use the render target its palette when performing a texture copy as + the texture doesn't hold one. + +2008-04-06 Hans Leidekker + + * programs/winebrowser/Makefile.in, programs/winebrowser/main.c: + winebrowser: Convert to Unicode. + +2008-04-06 Rico Schüller + + * dlls/d3d9/tests/visual.c: + d3d9: fix two copy and paste mistakes. + + * dlls/d3d9/tests/visual.c: + d3d9: Make the shader test more precision tolerant. + +2008-04-05 Stefan Dösinger + + * dlls/d3d9/tests/visual.c: + d3d9: Run the visual test with hardware vertex processing. + + * dlls/d3d9/tests/visual.c: + d3d9: Fix a few ok conditions in the visual tests. + + * dlls/d3d9/tests/visual.c: + d3d9: Accept nvidia hardware vp garbage. + Apparently nvidia cards do not like 3.0 vshader + fixed function fragment + processing, so accept their result. This has no implementation implications + for Wine because we need the code to support the 3.0+ffp combination to + handle 3.0+1.x and 3.0+2.0 shader combinations too + + * dlls/d3d9/tests/visual.c: + d3d9: Read from a slightly different spot in a test. + + * dlls/d3d9/tests/visual.c: + d3d9: Remove some test trace lines. + +2008-04-04 Stefan Dösinger + + * dlls/d3d9/device.c: + d3d9: Enforce ColorFill restrictions. + +2008-04-07 Alexandre Julliard + + * dlls/winex11.drv/winpos.c: + winex11: Set the _NET_WM_STATE atom directly for unmapped windows. + + * dlls/winex11.drv/window.c: + winex11: Get rid of the SetWindowPos hack to unmap systray windows. + + * dlls/winex11.drv/clipboard.c, dlls/winex11.drv/event.c, + dlls/winex11.drv/graphics.c, dlls/winex11.drv/window.c, + dlls/winex11.drv/winpos.c, dlls/winex11.drv/x11drv.h, + dlls/winex11.drv/xdnd.c: + winex11: Fix handling of property sizes for 64-bit platforms. + +2008-04-05 Apostolos Alexiadis + + * dlls/comdlg32/cdlg_El.rc: + comdlg32: Greek resources update. + + * dlls/comctl32/comctl_El.rc: + comctl32: Greek resources update. + + * dlls/oleaut32/oleaut32.rc, dlls/oleaut32/oleaut32_El.rc: + oleaut32: Added Greek translation. + +2008-04-04 Maarten Lankhorst + + * dlls/quartz/dsoundrender.c, dlls/quartz/nullrenderer.c, + dlls/quartz/pin.c, dlls/quartz/pin.h, dlls/quartz/transform.c, + dlls/quartz/videorenderer.c: + quartz: Handle flushing and end of stream notifications for input pins. + + * dlls/quartz/filtergraph.c: + quartz: Reset EcCompleteCount before starting filters. + This sends EC_COMPLETE notifications to the application after a graph has + finished running for the second time. + + * dlls/quartz/filtergraph.c: + quartz: Fix past mistake to release lock during seeking and changing state. + + * dlls/quartz/filesource.c: + quartz: Fix some memory leaks in the file source. + + * dlls/quartz/filesource.c: + quartz: Make FileAsyncReader_WaitForNext return an empty sample in flushing + state. + + * dlls/quartz/dsoundrender.c, dlls/quartz/filesource.c, + dlls/quartz/nullrenderer.c, dlls/quartz/parser.c, dlls/quartz/pin.c, + dlls/quartz/pin.h, dlls/quartz/transform.c, + dlls/quartz/videorenderer.c: + quartz: Get rid of code duplication and add a flush method. + + * dlls/quartz/tests/filtergraph.c: + quartz: Add more state transitions to the filtergraph. + +2008-04-02 Maarten Lankhorst + + * dlls/dsound/buffer.c: + dsound: Hold lock in GetStatus. + +2008-04-05 Vitaliy Margolen + + * dlls/msacm32/msacm.rc, dlls/msacm32/msacm_Ru.rc: + msacm32: Add Russian translation. + + * dlls/sane.ds/rsrc.rc, dlls/sane.ds/sane_Ru.rc: + sane.ds: Add Russian translation. + + * dlls/msvidc32/msvidc32_Ru.rc, dlls/msvidc32/rsrc.rc: + msvidc32: Add Russian translation. + + * dlls/msvfw32/msvfw32_Ru.rc, dlls/msvfw32/rsrc.rc: + msvfw32: Add Russian translation. + + * dlls/mpr/mpr.rc, dlls/mpr/mpr_Ru.rc: + mpr: Add Russian translation. + + * dlls/localui/localui.rc, dlls/localui/ui_Ru.rc: + localui: Add Russian translation. + + * dlls/iccvid/iccvid_Ru.rc, dlls/iccvid/rsrc.rc: + iccvid: Add Russian translation. + +2008-04-05 Eric Pouech + + * dlls/dbghelp/msc.c: + dbghelp: Prevent debug overflow of internal buffer while tracing. + + * dlls/dbghelp/msc.c: + dbghelp: Be stricter when looping in symbol tables. + +2008-04-06 James Hawkins + + * dlls/msi/tests/db.c, dlls/msi/where.c: + msi: Don't execute the view again when modifying a WHERE query. + +2008-04-05 James Hawkins + + * dlls/msi/action.c: + msi: Open the install properties key based on the install context. + + * dlls/msi/action.c, dlls/msi/msi.c, dlls/msi/msipriv.h, + dlls/msi/registry.c, dlls/msi/tests/install.c, dlls/msi/tests/msi.c: + msi: Test and reimplement MsiQueryProductState. + + * dlls/msi/table.c, dlls/msi/tests/db.c: + msi: Don't reorder the table when matching rows as the results are already + ordered. + + * dlls/msi/action.c, dlls/msi/files.c, dlls/msi/msipriv.h, + dlls/msi/package.c: + msi: Set the install context based on the ALLUSERS property. + +2008-04-04 James Hawkins + + * dlls/msi/install.c: + msi: Reset the feature states if iInstallLevel is 0 or below. + +2008-04-04 Dan Hipschman + + * dlls/qedit/tests/mediadet.c: + qedit/tests: Add a partial test for IMediaDet_get_StreamMediaType. + + * dlls/qedit/tests/mediadet.c: + qedit/tests: Add a test for IMediaDet_(put|get)_CurrentStream. + + * dlls/qedit/tests/mediadet.c: + qedit/tests: Add a test for IMediaDet_get_Filename. + + * dlls/qedit/tests/mediadet.c: + qedit/tests: Add a test for IMediaDet_get_OutputStreams. + + * dlls/qedit/tests/Makefile.in, dlls/qedit/tests/mediadet.c, + dlls/qedit/tests/qedit.rc, dlls/qedit/tests/test.avi: + qedit/tests: Add test framework and test for IMediaDet_put_Filename. + + * dlls/qedit/tests/mediadet.c: + qedit/tests: Don't forget CoUninitialize. + +2008-04-04 Michael Moss + + * tools/wine.inf: + wine.inf: Move winebrowser.exe to the system directory. + +2008-04-04 Andrew Talbot + + * dlls/wintrust/register.c: + wintrust: Avoid assigning to struct members from other structs. + + * libs/port/interlocked.c: + port: Remove superfluous semicolon. + +2008-04-04 Paul Vriens + + * dlls/rsaenh/tests/rsaenh.c: + rsaenh/tests: Fix a test on W2K and above. + +2008-04-04 Alexandre Julliard + + * dlls/user32/tests/msg.c, dlls/user32/winpos.c: + user32: Fix a few ShowWindow todo tests. + + * dlls/winex11.drv/winpos.c: + winex11: Ignore ConfigureNotify events when a window is iconified. + + * ANNOUNCE, ChangeLog, VERSION, configure: + Release 0.9.59. + +---------------------------------------------------------------- 2008-04-04 Alexandre Julliard * dlls/winex11.drv/winpos.c: diff --git a/VERSION b/VERSION index ded25e1e433..4f96b961bf3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Wine version 0.9.59 +Wine version 0.9.60 diff --git a/configure b/configure index a36297e3027..f994101df15 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.59. +# Generated by GNU Autoconf 2.61 for Wine 0.9.60. # # 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.59' -PACKAGE_STRING='Wine 0.9.59' +PACKAGE_VERSION='0.9.60' +PACKAGE_STRING='Wine 0.9.60' PACKAGE_BUGREPORT='wine-devel@winehq.org' ac_unique_file="server/atom.c" @@ -1295,7 +1295,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.59 to adapt to many kinds of systems. +\`configure' configures Wine 0.9.60 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1364,7 +1364,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Wine 0.9.59:";; + short | recursive ) echo "Configuration of Wine 0.9.60:";; esac cat <<\_ACEOF @@ -1492,7 +1492,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Wine configure 0.9.59 +Wine configure 0.9.60 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1506,7 +1506,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.59, which was +It was created by Wine $as_me 0.9.60, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -10707,6 +10707,115 @@ esac fi + { echo "$as_me:$LINENO: checking for XICCallback.callback" >&5 +echo $ECHO_N "checking for XICCallback.callback... $ECHO_C" >&6; } +if test "${ac_cv_member_XICCallback_callback+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_X11_XLIB_H +#include +#endif + +int +main () +{ +static XICCallback ac_aggr; +if (ac_aggr.callback) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_XICCallback_callback=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef HAVE_X11_XLIB_H +#include +#endif + +int +main () +{ +static XICCallback ac_aggr; +if (sizeof ac_aggr.callback) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_XICCallback_callback=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_XICCallback_callback=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_member_XICCallback_callback" >&5 +echo "${ECHO_T}$ac_cv_member_XICCallback_callback" >&6; } +if test $ac_cv_member_XICCallback_callback = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_XICCALLBACK_CALLBACK 1 +_ACEOF + + +fi + + opengl_msg="" if test "x$with_opengl" != "xno" @@ -11860,6 +11969,7 @@ then ac_xslt_libs="`xslt-config --libs 2>/dev/null`" ac_xslt_cflags="`xslt-config --cflags 2>/dev/null`" fi + ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ac_xslt_cflags" @@ -11917,7 +12027,15 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - { echo "$as_me:$LINENO: checking for xsltCompilePattern in -lxslt" >&5 + +fi + +done + + CPPFLAGS="$ac_save_CPPFLAGS" + if test "$ac_cv_header_libxslt_transform_h" = "yes" + then + { echo "$as_me:$LINENO: checking for xsltCompilePattern in -lxslt" >&5 echo $ECHO_N "checking for xsltCompilePattern in -lxslt... $ECHO_C" >&6; } if test "${ac_cv_lib_xslt_xsltCompilePattern+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11984,16 +12102,108 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_LIBXSLT 1 _ACEOF - XSLTLIBS="$ac_xslt_libs" - XSLTINCL="$ac_xslt_cflags" -fi + XSLTLIBS="$ac_xslt_libs" + XSLTINCL="$ac_xslt_cflags" + ac_save_LIBS="$LIBS" + LIBS="$LIBS $ac_xslt_libs" +for ac_func in xsltInit +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi done - CPPFLAGS="$ac_save_CPPFLAGS" + LIBS="$ac_save_LIBS" +fi + + fi fi if test "$ac_cv_lib_xslt_xsltCompilePattern" != "yes"; then case "x$with_xslt" in @@ -22510,7 +22720,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.59, which was +This file was extended by Wine $as_me 0.9.60, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -22563,7 +22773,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Wine config.status 0.9.59 +Wine config.status 0.9.60 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 4969403b819..759e334bdc4 100644 --- a/configure.ac +++ b/configure.ac @@ -709,6 +709,12 @@ then WINE_NOTICE_WITH(xcomposite,[test "x$ac_cv_lib_soname_Xcomposite" = "x"], [libxcomposite development files not found, Xcomposite won't be supported.]) + dnl *** Check for XICCallback struct + AC_CHECK_MEMBERS([XICCallback.callback],,, +[#ifdef HAVE_X11_XLIB_H +#include +#endif]) + dnl *** End of X11/Xlib.h check dnl Check for the presence of OpenGL @@ -831,17 +837,24 @@ then ac_xslt_libs="`xslt-config --libs 2>/dev/null`" ac_xslt_cflags="`xslt-config --cflags 2>/dev/null`" fi + ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ac_xslt_cflags" - AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h], - [AC_CHECK_LIB(xslt, xsltCompilePattern, - [AC_DEFINE(HAVE_LIBXSLT, 1, [Define if you have the libxslt library]) - XSLTLIBS="$ac_xslt_libs" - XSLTINCL="$ac_xslt_cflags"],,$ac_xslt_libs) - ],, + AC_CHECK_HEADERS([libxslt/pattern.h libxslt/transform.h],,, [#ifdef HAVE_LIBXSLT_PATTERN_H # include #endif]) CPPFLAGS="$ac_save_CPPFLAGS" + if test "$ac_cv_header_libxslt_transform_h" = "yes" + then + AC_CHECK_LIB(xslt, xsltCompilePattern, + [AC_DEFINE(HAVE_LIBXSLT, 1, [Define if you have the libxslt library]) + XSLTLIBS="$ac_xslt_libs" + XSLTINCL="$ac_xslt_cflags" + ac_save_LIBS="$LIBS" + LIBS="$LIBS $ac_xslt_libs" + AC_CHECK_FUNCS(xsltInit) + LIBS="$ac_save_LIBS"],,$ac_xslt_libs) + fi fi WINE_NOTICE_WITH(xslt,[test "$ac_cv_lib_xslt_xsltCompilePattern" != "yes"], [libxslt development files not found, xslt won't be supported.]) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index dc44e6f6adf..f9115c23ac6 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -669,7 +669,7 @@ BOOL WINAPI StartServiceCtrlDispatcherW( const SERVICE_TABLE_ENTRYW *servent ) SC_LOCK WINAPI LockServiceDatabase (SC_HANDLE hSCManager) { struct sc_manager *hscm; - SC_RPC_LOCK hLock; + SC_RPC_LOCK hLock = NULL; DWORD err; TRACE("%p\n",hSCManager); diff --git a/dlls/browseui/progressdlg.c b/dlls/browseui/progressdlg.c index c5465a35190..c65a097d769 100644 --- a/dlls/browseui/progressdlg.c +++ b/dlls/browseui/progressdlg.c @@ -324,6 +324,7 @@ static HRESULT WINAPI ProgressDialog_StartProgressDialog(IProgressDialog *iface, hThread = CreateThread(NULL, 0, dialog_thread, ¶ms, 0, NULL); WaitForSingleObject(params.hEvent, INFINITE); + CloseHandle(hThread); This->hwndDisabledParent = NULL; if (hwndParent && (dwFlags & PROGDLG_MODAL)) { diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index a98243d1472..e79831d2b05 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -530,13 +530,11 @@ static UINT COMBOEX_GetListboxText(COMBOEX_INFO *infoPtr, int n, LPWSTR buf) static INT COMBOEX_DeleteItem (COMBOEX_INFO *infoPtr, INT index) { - CBE_ITEMDATA const *item; - TRACE("(index=%d)\n", index); /* if item number requested does not exist then return failure */ if ((index >= infoPtr->nb_items) || (index < 0)) return CB_ERR; - if (!(item = COMBOEX_FindItem(infoPtr, index))) return CB_ERR; + if (!COMBOEX_FindItem(infoPtr, index)) return CB_ERR; /* doing this will result in WM_DELETEITEM being issued */ SendMessageW (infoPtr->hwndCombo, CB_DELETESTRING, (WPARAM)index, 0); diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index abe1470e9b5..ab819e6b0a1 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -9968,10 +9968,9 @@ static LRESULT LISTVIEW_Command(const LISTVIEW_INFO *infoPtr, WPARAM wParam, LPA HFONT hFont, hOldFont = 0; RECT rect; SIZE sz; - int len; if (!infoPtr->hwndEdit || !hdc) return 0; - len = GetWindowTextW(infoPtr->hwndEdit, buffer, sizeof(buffer)/sizeof(buffer[0])); + GetWindowTextW(infoPtr->hwndEdit, buffer, sizeof(buffer)/sizeof(buffer[0])); GetWindowRect(infoPtr->hwndEdit, &rect); /* Select font to get the right dimension of the string */ diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 1c325de4508..a9647cd74a6 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -442,7 +442,7 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT RECT *days=&dayrect; RECT rtoday; int i, j, m, mask, day, firstDay, weeknum, weeknum1,prevMonth; - int textHeight = infoPtr->textHeight, textWidth = infoPtr->textWidth; + int textHeight = infoPtr->textHeight; SIZE size; HBRUSH hbr; HFONT currentFont; @@ -659,13 +659,11 @@ static void MONTHCAL_Refresh(MONTHCAL_INFO *infoPtr, HDC hdc, const PAINTSTRUCT * date if necessary */ if(!(dwStyle & MCS_NOTODAY)) { - int offset = 0; if(!(dwStyle & MCS_NOTODAYCIRCLE)) { /*day is the number of days from nextmonth we put on the calendar */ MONTHCAL_CircleDay(infoPtr, hdc, day+MONTHCAL_MonthLength(infoPtr->currentMonth,infoPtr->currentYear), infoPtr->currentMonth); - offset+=textWidth; } if (!LoadStringW(COMCTL32_hModule,IDM_TODAY,buf1,countof(buf1))) { diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index a1930821056..84b1b7f448c 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -3412,7 +3412,6 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) PropSheetInfo* psInfo = (PropSheetInfo*) lParam; WCHAR* strCaption = (WCHAR*)Alloc(MAX_CAPTION_LENGTH*sizeof(WCHAR)); HWND hwndTabCtrl = GetDlgItem(hwnd, IDC_TABCONTROL); - LPCPROPSHEETPAGEW ppshpage; int idx; LOGFONTW logFont; @@ -3508,7 +3507,6 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) PSCB_INITIALIZED, (LPARAM)0); idx = psInfo->active_page; - ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[idx].hpage; psInfo->active_page = -1; PROPSHEET_SetCurSel(hwnd, idx, 1, psInfo->proppage[idx].hpage); diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 033b47489bb..638acea20f1 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -2848,7 +2848,6 @@ REBAR_Create (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { LPCREATESTRUCTW cs = (LPCREATESTRUCTW) lParam; RECT wnrc1, clrc1; - HTHEME theme; if (TRACE_ON(rebar)) { GetWindowRect(infoPtr->hwndSelf, &wnrc1); @@ -2859,8 +2858,8 @@ REBAR_Create (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam) } TRACE("created!\n"); - - if ((theme = OpenThemeData (infoPtr->hwndSelf, themeClass))) + + if (OpenThemeData (infoPtr->hwndSelf, themeClass)) { /* native seems to clear WS_BORDER when themed */ infoPtr->dwStyle &= ~WS_BORDER; diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 02a0385b2ec..a1b8aff1e3f 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -967,16 +967,14 @@ static HFONT SYSLINK_SetFont (SYSLINK_INFO *infoPtr, HFONT hFont, BOOL bRedraw) */ static LRESULT SYSLINK_SetText (SYSLINK_INFO *infoPtr, LPCWSTR Text) { - int textlen; - /* clear the document */ SYSLINK_ClearDoc(infoPtr); - - if(Text == NULL || (textlen = lstrlenW(Text)) == 0) + + if(Text == NULL || *Text == 0) { return TRUE; } - + /* let's parse the string and create a document */ if(SYSLINK_ParseText(infoPtr, Text) > 0) { diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 1bda0ccca63..574692887a8 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -1280,7 +1280,7 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle ) TBUTTON_INFO *btnPtr; INT x, cx, i, j; RECT rc; - BOOL bWrap, bButtonWrap; + BOOL bButtonWrap; /* When the toolbar window style is not TBSTYLE_WRAPABLE, */ /* no layout is necessary. Applications may use this style */ @@ -1314,7 +1314,6 @@ TOOLBAR_WrapToolbar( HWND hwnd, DWORD dwStyle ) for (i = 0; i < infoPtr->nNumButtons; i++ ) { - bWrap = FALSE; btnPtr[i].fsState &= ~TBSTATE_WRAP; if (btnPtr[i].fsState & TBSTATE_HIDDEN) @@ -5779,7 +5778,6 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) POINT pt; INT nHit; INT nOldIndex = -1; - BOOL bSendMessage = TRUE; NMHDR hdr; NMMOUSE nmmouse; NMTOOLBARA nmtb; @@ -5866,8 +5864,6 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) if (btnPtr->fsStyle & BTNS_GROUP) { nOldIndex = TOOLBAR_GetCheckedGroupButtonIndex (infoPtr, nHit); - if (nOldIndex == nHit) - bSendMessage = FALSE; if ((nOldIndex != nHit) && (nOldIndex != -1)) infoPtr->buttons[nOldIndex].fsState &= ~TBSTATE_CHECKED; diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index 7cdfe71c606..e81d55f2ec7 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -822,7 +822,6 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) HBITMAP hOldBmp = 0, hOffScreenBmp = 0; NMCUSTOMDRAW nmcd; int gcdrf, icdrf; - HTHEME theme; if (infoPtr->flags & TB_THUMBCHANGED) { TRACKBAR_UpdateThumb (infoPtr); @@ -867,7 +866,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst) /* Erase background */ if (gcdrf == CDRF_DODEFAULT || notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) { - if ((theme = GetWindowTheme (infoPtr->hwndSelf))) { + if (GetWindowTheme (infoPtr->hwndSelf)) { DrawThemeParentBackground (infoPtr->hwndSelf, hdc, 0); } else diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 5650c4673b6..2b71a3b25d3 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3575,12 +3575,11 @@ TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam) TREEVIEW_ITEM *editItem = infoPtr->selectedItem; HDC hdc = GetDC(infoPtr->hwndEdit); SIZE sz; - int len; HFONT hFont, hOldFont = 0; infoPtr->bLabelChanged = TRUE; - len = GetWindowTextW(infoPtr->hwndEdit, buffer, sizeof(buffer)/sizeof(buffer[0])); + GetWindowTextW(infoPtr->hwndEdit, buffer, sizeof(buffer)/sizeof(buffer[0])); /* Select font to get the right dimension of the string */ hFont = (HFONT)SendMessageW(infoPtr->hwndEdit, WM_GETFONT, 0, 0); diff --git a/dlls/comdlg32/cdlg_Fr.rc b/dlls/comdlg32/cdlg_Fr.rc index b38faaa4fa2..33c78651fb6 100644 --- a/dlls/comdlg32/cdlg_Fr.rc +++ b/dlls/comdlg32/cdlg_Fr.rc @@ -3,7 +3,7 @@ * French language support * * Copyright 1995 Alexandre Julliard - * Copyright 2005 Jonathan Ernst + * Copyright 2005-2008 Jonathan Ernst * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -31,15 +31,15 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ouvrir" FONT 8, "MS Shell Dlg" { - LTEXT "&Nom de fichier:", 1090, 6, 6, 76, 9 + LTEXT "&Nom de fichier :", 1090, 6, 6, 76, 9 EDITTEXT edt1, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP LTEXT "&Répertoires", -1, 110, 6, 92, 9 LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP - LTEXT "Liste des fichiers de &type:", 1089, 6, 104, 90, 9 + LTEXT "Liste des fichiers de &type :", 1089, 6, 104, 90, 9 COMBOBOX cmb1, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP - LTEXT "&Lecteurs:", 1091, 110, 104, 92, 9 + LTEXT "&Lecteurs :", 1091, 110, 104, 92, 9 COMBOBOX cmb2, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP DEFPUSHBUTTON "OK", 1, 208, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP PUSHBUTTON "Annuler", 2, 208, 24, 56, 14, WS_GROUP | WS_TABSTOP @@ -53,13 +53,13 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Enregistrer sous ..." FONT 8, "MS Shell Dlg" { - LTEXT "&Nom de fichier:", 1090, 6, 6, 76, 9 + LTEXT "&Nom de fichier :", 1090, 6, 6, 76, 9 EDITTEXT edt1, 6, 16, 90, 12, ES_AUTOHSCROLL | ES_OEMCONVERT | WS_BORDER | WS_TABSTOP LISTBOX 1120, 6, 32, 90, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP - LTEXT "&Répertoires:", -1, 110, 6, 92, 9 + LTEXT "&Répertoires :", -1, 110, 6, 92, 9 LTEXT "", 1088, 110, 18, 92, 9, SS_NOPREFIX | WS_GROUP LISTBOX 1121, 110, 32, 92, 68, LBS_STANDARD | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_TABSTOP - LTEXT "Liste des fichiers de &type:", 1089, 6, 104, 90, 9 + LTEXT "Liste des fichiers de &type :", 1089, 6, 104, 90, 9 COMBOBOX cmb1, 6, 114, 90, 36, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP LTEXT "&Lecteurs:", 1091, 110, 104, 92, 9 COMBOBOX cmb2, 110, 114, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP @@ -75,7 +75,7 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Imprimer" FONT 8, "MS Shell Dlg" { - LTEXT "Imprimante:", 1088, 6, 6, 40, 9 + LTEXT "Imprimante :", 1088, 6, 6, 40, 9 LTEXT "", 1089, 60, 6, 150, 9 GROUPBOX "Étendue", grp1, 6, 30, 160, 65, BS_GROUPBOX RADIOBUTTON "&Tout", rad1, 16, 45, 60, 12 @@ -112,8 +112,8 @@ FONT 8, "MS Shell Dlg" ICON "LANDSCAP", stc10, 10, 95, 32, 32 ICON "PORTRAIT", stc11, 10, 95, 32, 32 GROUPBOX "Papier", grp3, 120, 85, 180, 50, BS_GROUPBOX - LTEXT "&Taille :", 1089, 130, 95, 30, 9 - LTEXT "&Ali&mentation :", 1090, 130, 110, 30, 9 + LTEXT "&Taille :", 1089, 130, 95, 30, 9 + LTEXT "&Source :", 1090, 130, 110, 30, 9 COMBOBOX cmb2, 155, 95, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP COMBOBOX cmb3, 155, 110, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP } @@ -156,20 +156,20 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Couleurs" FONT 8, "MS Shell Dlg" { - LTEXT "Couleurs de &base:", 1088, 4, 4, 140, 10 - LTEXT "&Couleurs personnalisées:", 1089, 4, 106, 140, 10 + LTEXT "Couleurs de &base :", 1088, 4, 4, 140, 10 + LTEXT "&Couleurs personnalisées :", 1089, 4, 106, 140, 10 LTEXT "Couleur | &Uni", 1090, 150, 151, 48, 10 - LTEXT "&Rouge:", 726 /*1094*/,249,126,24,10 + LTEXT "&Rouge :", 726 /*1094*/,249,126,24,10 EDITTEXT 706, 275,124,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&Vert:",727/*1095*/,249,140,24,10 + LTEXT "&Vert :",727/*1095*/,249,140,24,10 EDITTEXT 707, 275,138,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "Bl&eu:",728 /*1096*/,249,154,24,10 + LTEXT "Bl&eu :",728 /*1096*/,249,154,24,10 EDITTEXT 708, 275,152,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&Teinte:" ,723 /*1091*/,202,126,22,10 + LTEXT "&Teinte :" ,723 /*1091*/,202,126,22,10 EDITTEXT 703, 226,124,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&Sat.:" ,724 /*1092*/,202,140,22,10 + LTEXT "&Sat. :" ,724 /*1092*/,202,140,22,10 EDITTEXT 704, 226,138,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "&Lum.:" ,725 /*1093*/,202,154,22,10 + LTEXT "&Lum. :" ,725 /*1093*/,202,154,22,10 EDITTEXT 705, 226,152,21,12, WS_BORDER | WS_GROUP | WS_TABSTOP CONTROL "" ,720,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,14,140,86 CONTROL "" ,721,"STATIC",SS_SIMPLE|WS_TABSTOP|WS_GROUP,4,116,140,28 @@ -190,7 +190,7 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Rechercher" FONT 8, "MS Shell Dlg" { - LTEXT "&Rechercher:", -1, 4, 8, 42, 8 + LTEXT "&Rechercher :", -1, 4, 8, 42, 8 EDITTEXT edt1, 47, 7, 128, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP CHECKBOX "M&ot seulement", chx1, 4, 26, 100, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP CHECKBOX "Respect des &majuscules/minuscules", chx2, 4, 42, 64, 12, BS_AUTOCHECKBOX | WS_TABSTOP @@ -209,9 +209,9 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remplacer" FONT 8, "MS Shell Dlg" { - LTEXT "&Rechercher:", -1, 4, 9, 48, 8 + LTEXT "&Rechercher :", -1, 4, 9, 48, 8 EDITTEXT edt1, 54, 7, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP - LTEXT "R&emplacer par:", -1, 4, 26, 48, 8 + LTEXT "R&emplacer par :", -1, 4, 26, 48, 8 EDITTEXT edt2, 54, 24, 114, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP CHECKBOX "M&ot seulement", chx1, 5, 46, 104, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP CHECKBOX "Respect des &majuscules/minuscules", chx2, 5, 62, 59, 12, BS_AUTOCHECKBOX | WS_TABSTOP @@ -237,13 +237,13 @@ FONT 8, "MS Shell Dlg" GROUPBOX "Imprimante", grp4, 8, 4, 272,84, WS_GROUP CONTROL "Imprimer dans un fichier", chx1, "Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,212,70,64,12 PUSHBUTTON "Propriétés", psh2, 212, 17, 60,14, WS_GROUP - LTEXT "&Nom:", stc6, 16, 20, 36,8 + LTEXT "&Nom :", stc6, 16, 20, 36,8 COMBOBOX cmb4, 52, 18, 152,152,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP - LTEXT "Etat:", stc8, 16, 36, 36,10, SS_NOPREFIX + LTEXT "État :", stc8, 16, 36, 36,10, SS_NOPREFIX LTEXT "Dummy State", stc12, 52, 36, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT "Type:", stc7, 16, 48, 36,10, SS_NOPREFIX + LTEXT "Type :", stc7, 16, 48, 36,10, SS_NOPREFIX LTEXT "Dummy Type", stc11, 52, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT "Emplacement:", stc10, 16, 60, 36,10, SS_NOPREFIX + LTEXT "Emplacement :", stc10, 16, 60, 36,10, SS_NOPREFIX LTEXT "Dummy Location", stc14, 52, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP LTEXT "Commentaire:", stc9, 16, 72, 36,10, SS_NOPREFIX LTEXT "Dummy Remark", stc13, 52, 72, 152,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP @@ -260,8 +260,8 @@ FONT 8, "MS Shell Dlg" CONTROL "Selection", rad2,"Button",BS_AUTORADIOBUTTON,16,138,64,12 EDITTEXT edt1, 74,122, 26,12, WS_GROUP | ES_NUMBER EDITTEXT edt2, 118,122, 26,12, WS_GROUP | ES_NUMBER - RTEXT "&de:", stc2, 52,124, 20,8 - RTEXT "&à:", stc3, 100,124, 16,8 + RTEXT "&de :", stc2, 52,124, 20,8 + RTEXT "&à :", stc3, 100,124, 16,8 } PRINT32_SETUP DIALOG LOADONCALL MOVEABLE DISCARDABLE 32, 32, 288, 178 @@ -276,15 +276,15 @@ BEGIN GROUPBOX "Imprimante", grp4, 8, 4, 272,84, WS_GROUP PUSHBUTTON "&Propriétés", psh2, 212, 17, 60,14, WS_GROUP - LTEXT "&Nom:", stc6, 16, 20, 36,8 + LTEXT "&Nom :", stc6, 16, 20, 36,8 COMBOBOX cmb1, 52, 18, 152,152,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP - LTEXT "Etat:", stc8, 16, 36, 36,10, SS_NOPREFIX + LTEXT "État:", stc8, 16, 36, 36,10, SS_NOPREFIX LTEXT "[aucun]", stc12, 60, 36, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP LTEXT "Type:", stc7, 16, 48, 36,10, SS_NOPREFIX LTEXT "[aucun]", stc11, 60, 48, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT "Emplacement:", stc10, 16, 60, 36,10, SS_NOPREFIX + LTEXT "Emplacement :", stc10, 16, 60, 36,10, SS_NOPREFIX LTEXT "[aucun]", stc14, 60, 60, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP - LTEXT "Commentaire:", stc9, 16, 72, 36,10, SS_NOPREFIX + LTEXT "Commentaire :", stc9, 16, 72, 36,10, SS_NOPREFIX LTEXT "[aucun]", stc13, 60, 72, 224,10, SS_NOPREFIX | SS_LEFTNOWORDWRAP GROUPBOX "Papier", grp2, 8, 92, 164,56, WS_GROUP @@ -308,21 +308,21 @@ BEGIN CONTROL "", rct2, "Static", SS_GRAYRECT, 160, 12, 4, 80 CONTROL "", rct3, "Static", SS_GRAYRECT, 84, 88, 80, 4 GROUPBOX "Papier", grp2, 8, 96, 224, 56, BS_GROUPBOX - LTEXT "&Taille:", stc2, 16, 112, 36, 8 + LTEXT "&Taille :", stc2, 16, 112, 36, 8 COMBOBOX cmb2, 64, 110, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL - LTEXT "&Source:", stc3, 16, 132, 36, 8 + LTEXT "&Source :", stc3, 16, 132, 36, 8 COMBOBOX cmb3, 64, 130, 160, 160, CBS_SIMPLE|CBS_DROPDOWN|CBS_SORT|WS_GROUP|WS_TABSTOP|WS_VSCROLL GROUPBOX "Orientation", grp1, 8, 156, 64, 56, BS_GROUPBOX AUTORADIOBUTTON "&Portrait", rad1, 16, 170, 52, 12, BS_AUTORADIOBUTTON AUTORADIOBUTTON "P&aysage", rad2, 16, 190, 52, 12, BS_AUTORADIOBUTTON GROUPBOX "Marges", grp4, 80, 156, 152, 56, BS_GROUPBOX - LTEXT "&Droite:", stc15, 88, 172, 21, 8 + LTEXT "&Droite :", stc15, 88, 172, 21, 8 EDITTEXT edt4, 111, 170, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER|ES_NUMBER - LTEXT "&Gauche:", stc16, 159, 172, 27, 8 + LTEXT "&Gauche :", stc16, 159, 172, 27, 8 EDITTEXT edt6, 187, 170, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER|ES_NUMBER - LTEXT "&Haut:", stc17, 88, 192, 21, 8 + LTEXT "&Haut :", stc17, 88, 192, 21, 8 EDITTEXT edt5, 111, 190, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER|ES_NUMBER - LTEXT "&Bas:", stc18, 159, 192, 23, 8 + LTEXT "&Bas :", stc18, 159, 192, 23, 8 EDITTEXT edt7, 187, 190, 39, 12, WS_TABSTOP|WS_GROUP|WS_BORDER|ES_NUMBER DEFPUSHBUTTON "OK", IDOK, 71, 220, 50, 14, BS_PUSHBUTTON PUSHBUTTON "Annuler", IDCANCEL, 126, 220, 50, 14 @@ -340,7 +340,7 @@ FONT 8, "MS Shell Dlg" LTEXT "" , IDC_TOOLBARSTATIC, 181, 2, 102, 17, NOT WS_GROUP | NOT WS_VISIBLE LISTBOX IDC_SHELLSTATIC,4,20,272,85, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE - LTEXT "&Nom du fichier:",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY + LTEXT "&Nom du fichier :",IDC_FILENAMESTATIC,5,112,46,8, SS_NOTIFY EDITTEXT IDC_FILENAME,54,110,155,12,ES_AUTOHSCROLL LTEXT "&Type du fichier",IDC_FILETYPESTATIC,5,128,42,8, SS_NOTIFY @@ -356,9 +356,9 @@ FONT 8, "MS Shell Dlg" STRINGTABLE DISCARDABLE { IDS_ABOUTBOX "À propos du choix de répertoires" - IDS_DOCUMENTFOLDERS "Répertoire Documents" - IDS_PERSONAL "Mes Documents" - IDS_FAVORITES "Mes Favoris" + IDS_DOCUMENTFOLDERS "Répertoire documents" + IDS_PERSONAL "Mes documents" + IDS_FAVORITES "Mes favoris" IDS_PATH "Répertoire système" IDS_DESKTOP "Bureau" IDS_FONTS "Polices" @@ -371,8 +371,8 @@ STRINGTABLE DISCARDABLE IDS_LOCALHARDRIVES "Disques locaux" IDS_FILENOTFOUND "Fichier non trouvé" IDS_VERIFYFILE "Prière de vérifier que le nom de fichier indiqué est correct" - IDS_CREATEFILE "Ce fichier n'existe pas.\nSouhaitez-vous le créer ?" - IDS_OVERWRITEFILE "Ce fichier existe déjà.\nVoulez-vous le remplacer ?" + IDS_CREATEFILE "Ce fichier n'existe pas.\nSouhaitez-vous le créer ?" + IDS_OVERWRITEFILE "Ce fichier existe déjà.\nVoulez-vous le remplacer ?" IDS_INVALID_FILENAME_TITLE "Le chemin d'accès contient des caractères invalides" IDS_INVALID_FILENAME "Un nom de fichier ne peut contenir un des caractères suivants : \n / : < > |" IDS_PATHNOTEXISTING "Le chemin d'accès n'existe pas" @@ -395,11 +395,11 @@ STRINGTABLE DISCARDABLE PD32_VALUE_UREADABLE "Entrée illisible" PD32_INVALID_PAGE_RANGE "Cette valeur n'est pas dans l'intervalle de pages\n\ Veuillez indiquer une valeur entre %d et %d." - PD32_FROM_NOT_ABOVE_TO "Le champ 'de' ne peut être plus grand \ -que le champ 'à'." + PD32_FROM_NOT_ABOVE_TO "Le champ « de » ne peut être plus grand \ +que le champ « à »." PD32_MARGINS_OVERLAP "Les marges se recouvrent ou dépassent du papier\n\ Veuillez indiquer de nouvelles valeurs." - PD32_NR_OF_COPIES_EMPTY "Le champ 'Copies' est vide.\n\ + PD32_NR_OF_COPIES_EMPTY "Le champ « Copies » est vide.\n\ Veuillez entrer un nombre et r&essayer." PD32_TOO_LARGE_COPIES "Votre imprimante ne peut gérer autant de copies.\n\ Veuillez indiquer un nombre de copies entre 1 et %d." @@ -413,40 +413,49 @@ Veuillez indiquer un nombre de copies entre 1 et %d." comme la configuration de l'imprimante ou l'impression d'un document, vous devez installer une imprimante. \ Veuillez en installer une et réessayez." - PD32_DEFAULT_PRINTER "Imprimante par défaut; " + PD32_DEFAULT_PRINTER "Imprimante par défaut ; " PD32_NR_OF_DOCUMENTS_IN_QUEUE "Il y a %d documents dans la file d'attente" PD32_MARGINS_IN_INCHES "Marges [pouces]" PD32_MARGINS_IN_MILIMETERS "Marges [mm]" PD32_MILIMETERS "mm" - PD32_PRINTER_STATUS_READY "Prêt; " - PD32_PRINTER_STATUS_PAUSED "Suspendu; " - PD32_PRINTER_STATUS_ERROR "Erreur; " - PD32_PRINTER_STATUS_PENDING_DELETION "En attente de suppression; " - PD32_PRINTER_STATUS_PAPER_JAM "Bourrage papier; " - PD32_PRINTER_STATUS_PAPER_OUT "Plus de papier; " - PD32_PRINTER_STATUS_MANUAL_FEED "Insertion manuelle du papier; " + PD32_PRINTER_STATUS_READY "Prêt ; " + PD32_PRINTER_STATUS_PAUSED "Suspendu ; " + PD32_PRINTER_STATUS_ERROR "Erreur ; " + PD32_PRINTER_STATUS_PENDING_DELETION "En attente de suppression ; " + PD32_PRINTER_STATUS_PAPER_JAM "Bourrage papier ; " + PD32_PRINTER_STATUS_PAPER_OUT "Plus de papier ; " + PD32_PRINTER_STATUS_MANUAL_FEED "Insertion manuelle du papier ; " PD32_PRINTER_STATUS_PAPER_PROBLEM "Problème de papier; " PD32_PRINTER_STATUS_OFFLINE "L'imprimante n'est pas en ligne; " PD32_PRINTER_STATUS_IO_ACTIVE "IO Active; " PD32_PRINTER_STATUS_BUSY "Occupée; " PD32_PRINTER_STATUS_PRINTING "En cours d'impression; " PD32_PRINTER_STATUS_OUTPUT_BIN_FULL "Le bac de sortie est plein; " - PD32_PRINTER_STATUS_NOT_AVAILABLE "Non disponible; " - PD32_PRINTER_STATUS_WAITING "En attente; " - PD32_PRINTER_STATUS_PROCESSING "Traitement en cours; " - PD32_PRINTER_STATUS_INITIALIZING "Démarrage en cours; " - PD32_PRINTER_STATUS_WARMING_UP "Préchauffage; " - PD32_PRINTER_STATUS_TONER_LOW "Toner presque vide; " - PD32_PRINTER_STATUS_NO_TONER "Pas de toner; " - PD32_PRINTER_STATUS_PAGE_PUNT "Page punt; " - PD32_PRINTER_STATUS_USER_INTERVENTION "Annulé par utilisateur; " - PD32_PRINTER_STATUS_OUT_OF_MEMORY "Plus assez de mémoire; " - PD32_PRINTER_STATUS_DOOR_OPEN "La porte de l'imprimante est ouverte; " - PD32_PRINTER_STATUS_SERVER_UNKNOWN "Serveur d'impression inconnu; " - PD32_PRINTER_STATUS_POWER_SAVE "Mode économie d'énergie; " + PD32_PRINTER_STATUS_NOT_AVAILABLE "Non disponible ; " + PD32_PRINTER_STATUS_WAITING "En attente ; " + PD32_PRINTER_STATUS_PROCESSING "Traitement en cours ; " + PD32_PRINTER_STATUS_INITIALIZING "Démarrage en cours ; " + PD32_PRINTER_STATUS_WARMING_UP "Préchauffage ; " + PD32_PRINTER_STATUS_TONER_LOW "Toner presque vide ; " + PD32_PRINTER_STATUS_NO_TONER "Pas de toner ; " + PD32_PRINTER_STATUS_PAGE_PUNT "Abandon de page ; " + PD32_PRINTER_STATUS_USER_INTERVENTION "Annulé par utilisateur ; " + PD32_PRINTER_STATUS_OUT_OF_MEMORY "Plus assez de mémoire ; " + PD32_PRINTER_STATUS_DOOR_OPEN "La porte de l'imprimante est ouverte ; " + PD32_PRINTER_STATUS_SERVER_UNKNOWN "Serveur d'impression inconnu ; " + PD32_PRINTER_STATUS_POWER_SAVE "Mode économie d'énergie ; " } +STRINGTABLE DISCARDABLE /* Font styles */ +{ + IDS_FONT_REGULAR "Normal" + IDS_FONT_BOLD "Gras" + IDS_FONT_ITALIC "Italique" + IDS_FONT_BOLD_ITALIC "Gras italique" +} + + STRINGTABLE DISCARDABLE /* Color names */ { IDS_COLOR_BLACK "Noir" @@ -471,7 +480,7 @@ STRINGTABLE DISCARDABLE { IDS_FONT_SIZE "Sélectionnez une taille de police entre %d et %d points." IDS_SAVE_BUTTON "&Sauver" - IDS_SAVE_IN "Sauver &dans:" + IDS_SAVE_IN "Sauver &dans :" IDS_SAVE "Enregistrer" IDS_SAVE_AS "Enregistrer sous" IDS_OPEN_FILE "Ouvrir Fichier" diff --git a/dlls/comdlg32/cdlg_Ko.rc b/dlls/comdlg32/cdlg_Ko.rc index a855fb1dedb..705e21c117b 100644 --- a/dlls/comdlg32/cdlg_Ko.rc +++ b/dlls/comdlg32/cdlg_Ko.rc @@ -445,6 +445,16 @@ STRINGTABLE DISCARDABLE PD32_PRINTER_STATUS_POWER_SAVE "Àü¿ø Àý¾à ¸ðµå; " } + +STRINGTABLE DISCARDABLE /* Font styles */ +{ + IDS_FONT_REGULAR "·¹±Ö·¯" + IDS_FONT_BOLD "º¼µå" + IDS_FONT_ITALIC "ÀÌÅÚ¸¯" + IDS_FONT_BOLD_ITALIC "º¼µå ÀÌÅÚ¸¯" +} + + STRINGTABLE DISCARDABLE /* Color names */ { IDS_COLOR_BLACK "°ËÁ¤" diff --git a/dlls/comdlg32/cdlg_Si.rc b/dlls/comdlg32/cdlg_Si.rc index dfd7e0acbea..66dc0d76302 100644 --- a/dlls/comdlg32/cdlg_Si.rc +++ b/dlls/comdlg32/cdlg_Si.rc @@ -256,10 +256,10 @@ FONT 8, "MS Shell Dlg" CONTROL "&Vse", rad1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,106,30,12 CONTROL "St&rani", rad3,"Button",BS_AUTORADIOBUTTON,16,122,30,12 CONTROL "I&zbor", rad2,"Button",BS_AUTORADIOBUTTON,16,138,30,12 - EDITTEXT edt1, 64,122, 26,12, WS_GROUP | ES_NUMBER + EDITTEXT edt1, 66,122, 26,12, WS_GROUP | ES_NUMBER EDITTEXT edt2, 108,122, 26,12, WS_GROUP | ES_NUMBER - LTEXT "&od:", stc2, 52,124, 10,8 - LTEXT "&do:", stc3, 94,124, 10,8 + RTEXT "&od:", stc2, 52,124, 12,8 + RTEXT "&do:", stc3, 94,124, 12,8 } PRINT32_SETUP DIALOG LOADONCALL MOVEABLE DISCARDABLE 32, 32, 288, 178 diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 3e662ec4619..f64fca71c07 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -196,7 +196,7 @@ static void FILEDLG95_SHELL_Clean(HWND hwnd); static BOOL FILEDLG95_SHELL_BrowseToDesktop(HWND hwnd); /* Functions used by the EDIT box */ -static int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed, char separator); +static int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed); /* Functions used by the filetype combo box */ static HRESULT FILEDLG95_FILETYPE_Init(HWND hwnd); @@ -858,11 +858,10 @@ LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode) return hook_result; } -static INT_PTR FILEDLG95_Handle_GetFilePath(HWND hwnd, DWORD size, LPVOID buffer) +static INT_PTR FILEDLG95_Handle_GetFilePath(HWND hwnd, DWORD size, LPVOID result) { - UINT sizeUsed = 0, n, total; - LPWSTR lpstrFileList = NULL; - WCHAR lpstrCurrentDir[MAX_PATH]; + UINT len, total; + WCHAR *p, *buffer; FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); TRACE("CDM_GETFILEPATH:\n"); @@ -871,79 +870,29 @@ static INT_PTR FILEDLG95_Handle_GetFilePath(HWND hwnd, DWORD size, LPVOID buffer return -1; /* get path and filenames */ - COMDLG32_GetDisplayNameOf(fodInfos->ShellInfos.pidlAbsCurrent, lpstrCurrentDir); - n = FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed, ' '); - - TRACE("path >%s< filespec >%s< %d files\n", - debugstr_w(lpstrCurrentDir),debugstr_w(lpstrFileList),n); - - if( fodInfos->unicode ) - { - LPWSTR bufW = buffer; - total = lstrlenW(lpstrCurrentDir) + 1 + sizeUsed; - - /* Prepend the current path */ - n = lstrlenW(lpstrCurrentDir) + 1; - memcpy( bufW, lpstrCurrentDir, min(n,size) * sizeof(WCHAR)); - if(n %s\n",debugstr_wn(bufW, total)); - } - else + len = SendMessageW( fodInfos->DlgInfos.hwndFileName, WM_GETTEXTLENGTH, 0, 0 ); + buffer = HeapAlloc( GetProcessHeap(), 0, (len + 2 + MAX_PATH) * sizeof(WCHAR) ); + COMDLG32_GetDisplayNameOf( fodInfos->ShellInfos.pidlAbsCurrent, buffer ); + if (len) { - LPSTR bufA = buffer; - total = WideCharToMultiByte(CP_ACP, 0, lpstrCurrentDir, -1, - NULL, 0, NULL, NULL); - total += WideCharToMultiByte(CP_ACP, 0, lpstrFileList, sizeUsed, - NULL, 0, NULL, NULL); - - /* Prepend the current path */ - n = WideCharToMultiByte(CP_ACP, 0, lpstrCurrentDir, -1, - bufA, size, NULL, NULL); - - if(n %s\n",debugstr_an(bufA, total)); + p = buffer + strlenW(buffer); + *p++ = '\\'; + SendMessageW( fodInfos->DlgInfos.hwndFileName, WM_GETTEXT, len + 1, (LPARAM)p ); } - MemFree(lpstrFileList); - - return total; -} - -static INT_PTR FILEDLG95_Handle_GetFileSpec(HWND hwnd, DWORD size, LPVOID buffer) -{ - UINT sizeUsed = 0; - LPWSTR lpstrFileList = NULL; - FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); - - TRACE("CDM_GETSPEC:\n"); - - FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed, ' '); - if( fodInfos->unicode ) + if (fodInfos->unicode) { - lstrcpynW( buffer, lpstrFileList, size ); + total = strlenW( buffer) + 1; + if (result) lstrcpynW( result, buffer, size ); + TRACE( "CDM_GETFILEPATH: returning %u %s\n", total, debugstr_w(result)); } else { - LPSTR bufA = buffer; - DWORD sizeA = WideCharToMultiByte( CP_ACP, 0, lpstrFileList, sizeUsed, NULL, 0, NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, lpstrFileList, sizeUsed, bufA, size, NULL, NULL); - if (size && size < sizeA) bufA[size - 1] = 0; - sizeUsed = sizeA; + total = WideCharToMultiByte( CP_ACP, 0, buffer, -1, NULL, 0, NULL, NULL ); + if (total <= size) WideCharToMultiByte( CP_ACP, 0, buffer, -1, result, size, NULL, NULL ); + TRACE( "CDM_GETFILEPATH: returning %u %s\n", total, debugstr_a(result)); } - MemFree(lpstrFileList); - - return sizeUsed; + HeapFree( GetProcessHeap(), 0, buffer ); + return total; } /*********************************************************************** @@ -980,7 +929,15 @@ static INT_PTR FILEDLG95_HandleCustomDialogMessages(HWND hwnd, UINT uMsg, WPARAM break; case CDM_GETSPEC: - retval = FILEDLG95_Handle_GetFileSpec(hwnd, (UINT)wParam, (LPSTR)lParam); + TRACE("CDM_GETSPEC:\n"); + retval = SendMessageW(fodInfos->DlgInfos.hwndFileName, WM_GETTEXTLENGTH, 0, 0) + 1; + if (lParam) + { + if (fodInfos->unicode) + SendMessageW(fodInfos->DlgInfos.hwndFileName, WM_GETTEXT, wParam, lParam); + else + SendMessageA(fodInfos->DlgInfos.hwndFileName, WM_GETTEXT, wParam, lParam); + } break; case CDM_SETCONTROLTEXT: @@ -1797,7 +1754,7 @@ BOOL FILEDLG95_OnOpen(HWND hwnd) TRACE("hwnd=%p\n", hwnd); /* get the files from the edit control */ - nFileCount = FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed, '\0'); + nFileCount = FILEDLG95_FILENAME_GetFileNames(hwnd, &lpstrFileList, &sizeUsed); /* try if the user selected a folder in the shellview */ if(nFileCount == 0) @@ -3204,7 +3161,7 @@ static HRESULT COMDLG32_StrRetToStrNW (LPWSTR dest, DWORD len, LPSTRRET src, LPI * The delimiter is specified by the parameter 'separator', * usually either a space or a nul */ -static int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed, char separator) +static int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, UINT * sizeUsed) { FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwnd,FileOpenDlgInfosStr); UINT nStrCharCount = 0; /* index in src buffer */ @@ -3238,7 +3195,7 @@ static int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, U (*lpstrFileList)[nFileIndex++] = lpstrEdit[nStrCharCount]; nStrCharCount++; } - (*lpstrFileList)[nFileIndex++] = separator; + (*lpstrFileList)[nFileIndex++] = 0; nFileCount++; } nStrCharCount++; @@ -3253,7 +3210,6 @@ static int FILEDLG95_FILENAME_GetFileNames (HWND hwnd, LPWSTR * lpstrFileList, U } /* trailing \0 */ - if (nFileIndex && separator) nFileIndex--; /* remove trailing separator */ (*lpstrFileList)[nFileIndex++] = '\0'; *sizeUsed = nFileIndex; diff --git a/dlls/comdlg32/filedlg31.c b/dlls/comdlg32/filedlg31.c index 10238def2b5..c8fcf7e220b 100644 --- a/dlls/comdlg32/filedlg31.c +++ b/dlls/comdlg32/filedlg31.c @@ -143,10 +143,10 @@ static LPCWSTR FD31_GetFileType(LPCWSTR cfptr, LPCWSTR fptr, const WORD index) */ static BOOL FD31_ScanDir(const OPENFILENAMEW *ofn, HWND hWnd, LPCWSTR newPath) { - WCHAR buffer[BUFFILE]; - HWND hdlg, hdlgDir; - LRESULT lRet = TRUE; - HCURSOR hCursorWait, oldCursor; + WCHAR buffer[BUFFILE]; + HWND hdlg; + LRESULT lRet = TRUE; + HCURSOR hCursorWait, oldCursor; TRACE("Trying to change to %s\n", debugstr_w(newPath)); if ( newPath[0] && !SetCurrentDirectoryW( newPath )) @@ -180,7 +180,7 @@ static BOOL FD31_ScanDir(const OPENFILENAMEW *ofn, HWND hWnd, LPCWSTR newPath) /* list of directories */ strcpyW(buffer, FILE_star); - if ((hdlgDir = GetDlgItem(hWnd, lst2)) != 0) { + if (GetDlgItem(hWnd, lst2) != 0) { lRet = DlgDirListW(hWnd, buffer, lst2, stc1, DDL_EXCLUSIVE | DDL_DIRECTORY); } SetCursor(oldCursor); diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c index ea5d34e5624..808a33c7417 100644 --- a/dlls/comdlg32/printdlg.c +++ b/dlls/comdlg32/printdlg.c @@ -1247,7 +1247,6 @@ static LRESULT check_printer_setup(HWND hDlg) { DWORD needed,num; WCHAR resourcestr[256],resultstr[256]; - int res; EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &needed, &num); if(needed == 0) @@ -1260,7 +1259,7 @@ static LRESULT check_printer_setup(HWND hDlg) { LoadStringW(COMDLG32_hInstance, PD32_NO_DEVICES,resultstr, 255); LoadStringW(COMDLG32_hInstance, PD32_PRINT_TITLE,resourcestr, 255); - res = MessageBoxW(hDlg, resultstr, resourcestr,MB_OK | MB_ICONWARNING); + MessageBoxW(hDlg, resultstr, resourcestr,MB_OK | MB_ICONWARNING); return FALSE; } } @@ -2566,15 +2565,13 @@ _c_str2sizeW(const PAGESETUPDLGW *dlga, LPCWSTR strin) { */ static BOOL PRINTDLG_PS_UpdateDlgStructA(HWND hDlg, PageSetupDataA *pda) { - DEVNAMES *dn; DEVMODEA *dm; DWORD paperword; memcpy(pda->dlga, &pda->curdlg, sizeof(pda->curdlg)); pda->dlga->hDevMode = pda->pdlg.hDevMode; pda->dlga->hDevNames = pda->pdlg.hDevNames; - - dn = GlobalLock(pda->pdlg.hDevNames); + dm = GlobalLock(pda->pdlg.hDevMode); /* Save paper orientation into device context */ @@ -2599,7 +2596,6 @@ PRINTDLG_PS_UpdateDlgStructA(HWND hDlg, PageSetupDataA *pda) { else FIXME("could not get dialog text for papersize cmbbox?\n"); - GlobalUnlock(pda->pdlg.hDevNames); GlobalUnlock(pda->pdlg.hDevMode); return TRUE; diff --git a/dlls/crypt32/encode.c b/dlls/crypt32/encode.c index f769afcd76a..9071e5c4918 100644 --- a/dlls/crypt32/encode.c +++ b/dlls/crypt32/encode.c @@ -1227,7 +1227,6 @@ static BOOL WINAPI CRYPT_DEREncodeItemsAsSet(DWORD dwCertEncodingType, if (ret) { DWORD bytesNeeded = 0, lenBytes; - BOOL ret; for (i = 0; i < setOf.cBlob; i++) bytesNeeded += setOf.rgBlob[i].cbData; diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index 980c75040df..5a71c74b0bd 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -938,7 +938,6 @@ BOOL WINAPI CryptRegisterDefaultOIDFunction(DWORD dwEncodingType, { HKEY key; LPWSTR dlls; - LPCWSTR existing; BOOL ret = FALSE; TRACE("(%x, %s, %d, %s)\n", dwEncodingType, debugstr_a(pszFuncName), @@ -954,7 +953,7 @@ BOOL WINAPI CryptRegisterDefaultOIDFunction(DWORD dwEncodingType, return FALSE; dlls = CRYPT_GetDefaultOIDDlls(key); - if ((existing = CRYPT_FindStringInMultiString(dlls, pwszDll))) + if (CRYPT_FindStringInMultiString(dlls, pwszDll)) SetLastError(ERROR_FILE_EXISTS); else { diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 20d71b76e13..84d326c62f9 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -291,7 +291,6 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv, PWINECRYPT_CERTSTORE store = NULL; HKEY root; LPCWSTR base; - BOOL ret; TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags, debugstr_w((LPCWSTR)pvPara)); @@ -304,7 +303,6 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv, if (!lstrcmpiW(storeName, rootW)) return CRYPT_RootOpenStore(hCryptProv, dwFlags); - ret = TRUE; switch (dwFlags & CERT_SYSTEM_STORE_LOCATION_MASK) { case CERT_SYSTEM_STORE_LOCAL_MACHINE: diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index e8866c0cc8a..e977930e1cd 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -2043,8 +2043,8 @@ static void fill_surface(IDirect3DSurface9 *surface, DWORD color) static void stretchrect_test(IDirect3DDevice9 *device) { HRESULT hr; - IDirect3DTexture9 *tex_rt32 = NULL, *tex_rt64 = NULL, *tex_rt_dest64; - IDirect3DSurface9 *surf_tex_rt32 = NULL, *surf_tex_rt64 = NULL, *surf_tex_rt_dest64; + IDirect3DTexture9 *tex_rt32 = NULL, *tex_rt64 = NULL, *tex_rt_dest64 = NULL; + IDirect3DSurface9 *surf_tex_rt32 = NULL, *surf_tex_rt64 = NULL, *surf_tex_rt_dest64 = NULL; IDirect3DTexture9 *tex32 = NULL, *tex64 = NULL, *tex_dest64 = NULL; IDirect3DSurface9 *surf_tex32 = NULL, *surf_tex64 = NULL, *surf_tex_dest64 = NULL; IDirect3DSurface9 *surf_rt32 = NULL, *surf_rt64 = NULL, *surf_rt_dest64 = NULL; diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index ca40417cedc..533cfeb6037 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -456,7 +456,7 @@ PVOID WINAPI ImageDirectoryEntryToDataEx( PVOID base, BOOLEAN image, USHORT dir, *size = nt->OptionalHeader.DataDirectory[dir].Size; if (image || addr < nt->OptionalHeader.SizeOfHeaders) { - if (*section) *section = NULL; + if (section) *section = NULL; return (char *)base + addr; } diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c index 09125e2657e..76f0e369f04 100644 --- a/dlls/ddraw/executebuffer.c +++ b/dlls/ddraw/executebuffer.c @@ -401,9 +401,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, unsigned int nb; D3DVERTEX *src = ((LPD3DVERTEX) ((char *)This->desc.lpData + vs)) + ci->wStart; D3DTLVERTEX *dst = ((LPD3DTLVERTEX) (This->vertex_data)) + ci->wDest; - D3DMATRIX *mat2 = &world_mat; D3DMATRIX mat; - D3DVALUE nx,ny,nz; D3DVIEWPORT* Viewport = &lpViewport->viewports.vp1; if (TRACE_ON(d3d7)) { @@ -419,18 +417,13 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This, multiply_matrix(&mat,&proj_mat,&mat); for (nb = 0; nb < ci->dwCount; nb++) { - /* Normals transformation */ - nx = (src->u4.nx * mat2->_11) + (src->u5.ny * mat2->_21) + (src->u6.nz * mat2->_31); - ny = (src->u4.nx * mat2->_12) + (src->u5.ny * mat2->_22) + (src->u6.nz * mat2->_32); - nz = (src->u4.nx * mat2->_13) + (src->u5.ny * mat2->_23) + (src->u6.nz * mat2->_33); - /* No lighting yet */ dst->u5.color = 0xFFFFFFFF; /* Opaque white */ dst->u6.specular = 0xFF000000; /* No specular and no fog factor */ - + dst->u7.tu = src->u7.tu; dst->u8.tv = src->u8.tv; - + /* Now, the matrix multiplication */ dst->u1.sx = (src->u1.x * mat._11) + (src->u2.y * mat._21) + (src->u3.z * mat._31) + (1.0 * mat._41); dst->u2.sy = (src->u1.x * mat._12) + (src->u2.y * mat._22) + (src->u3.z * mat._32) + (1.0 * mat._42); diff --git a/dlls/ddraw/tests/visual.c b/dlls/ddraw/tests/visual.c index 02d9c590dcd..4353f51771d 100644 --- a/dlls/ddraw/tests/visual.c +++ b/dlls/ddraw/tests/visual.c @@ -1763,7 +1763,7 @@ static void D3D1_ViewportClearTest(void) memset(&mat, 0, sizeof(mat)); mat.dwSize = sizeof(mat); - U1(U1(mat).diffuse).r = 1.0f; + U1(U(mat).diffuse).r = 1.0f; hr = IDirect3DMaterial_SetMaterial(bgMaterial, &mat); ok(hr == D3D_OK, "IDirect3DMaterial_SetMaterial failed: %08x\n", hr); @@ -1781,16 +1781,16 @@ static void D3D1_ViewportClearTest(void) if (SUCCEEDED(hr)) { D3DRECT rect; - rect.x1 = rect.y1 = 0; - rect.x2 = 640; - rect.y2 = 480; + U1(rect).x1 = U2(rect).y1 = 0; + U3(rect).x2 = 640; + U4(rect).y2 = 480; hr = IDirect3DViewport_Clear(Viewport, 1, &rect, D3DCLEAR_TARGET); ok(hr == D3D_OK, "IDirect3DViewport_Clear failed: %08x\n", hr); memset(&mat, 0, sizeof(mat)); mat.dwSize = sizeof(mat); - U1(U1(mat).diffuse).b = 1.0f; + U3(U(mat).diffuse).b = 1.0f; hr = IDirect3DMaterial_SetMaterial(bgMaterial, &mat); ok(hr == D3D_OK, "IDirect3DMaterial_SetMaterial failed: %08x\n", hr); @@ -1832,7 +1832,7 @@ static DWORD D3D3_getPixelColor(IDirectDraw4 *DirectDraw, IDirectDrawSurface4 *S */ memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); - ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); + U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat); ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; ddsd.dwWidth = 640; ddsd.dwHeight = 480; @@ -1847,7 +1847,7 @@ static DWORD D3D3_getPixelColor(IDirectDraw4 *DirectDraw, IDirectDrawSurface4 *S memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); - ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); + U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat); hr = IDirectDrawSurface4_BltFast(surf, 0, 0, Surface, NULL, 0); ok(hr == DD_OK, "IDirectDrawSurface_BltFast returned %08x\n", hr); @@ -2025,9 +2025,9 @@ static void D3D3_ViewportClearTest(void) ok(hr == D3D_OK, "IDirect3DDevice3_SetRenderState returned %08x\n", hr); if (SUCCEEDED(hr)) { - rect.x1 = rect.y1 = 0; - rect.x2 = 640; - rect.y2 = 480; + U1(rect).x1 = U2(rect).y1 = 0; + U3(rect).x2 = 640; + U4(rect).y2 = 480; hr = IDirect3DViewport3_Clear2(Viewport3, 1, &rect, D3DCLEAR_TARGET, 0x00ff00, 0.0f, 0); ok(hr == D3D_OK, "IDirect3DViewport3_Clear2 failed, hr = %08x\n", hr); diff --git a/dlls/dinput/joystick_linux.c b/dlls/dinput/joystick_linux.c index a43f842c658..5e87a0256cc 100644 --- a/dlls/dinput/joystick_linux.c +++ b/dlls/dinput/joystick_linux.c @@ -151,6 +151,8 @@ static INT find_joystick_devices(void) if ((fd = open(device_name, O_RDONLY)) < 0) continue; } + close(fd); + if (!(str = HeapAlloc(GetProcessHeap(), 0, len))) break; memcpy(str, device_name, len); @@ -471,6 +473,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di for (i = 0; i < newDevice->buttons; i++) { memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[i + 12], df->dwObjSize); + df->rgodf[idx ].pguid = &GUID_Button; df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(i) | DIDFT_PSHBUTTON; } newDevice->base.data_format.wine_df = df; diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index c31fc2898d7..50befd913db 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -373,9 +373,9 @@ static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN if (id >= have_joydevs) { return FALSE; } - + if (!((dwDevType == 0) || - ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 0x0800)) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800)))) return FALSE; @@ -400,7 +400,7 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN } if (!((dwDevType == 0) || - ((dwDevType == DIDEVTYPE_JOYSTICK) && (version < 0x0800)) || + ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800)))) return FALSE; @@ -423,7 +423,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm int i, idx = 0; char buffer[MAX_PATH+16]; HKEY hkey, appkey; - LONG def_deadzone = -1; + LONG def_deadzone = 0; newDevice = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(JoystickImpl)); if (!newDevice) return NULL; @@ -471,9 +471,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm newDevice->props[idx].lMin = 0; newDevice->props[idx].lMax = 0xffff; newDevice->props[idx].lSaturation = 0; - newDevice->props[idx].lDeadZone = def_deadzone >= 0 ? def_deadzone : - MulDiv(newDevice->joydev->axes[i].flat, 0xffff, - newDevice->props[idx].lDevMax - newDevice->props[idx].lDevMin); + newDevice->props[idx].lDeadZone = def_deadzone; df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(newDevice->numAxes++) | DIDFT_ABSAXIS; } @@ -498,6 +496,7 @@ static JoystickImpl *alloc_device(REFGUID rguid, const void *jvt, IDirectInputIm memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[newDevice->numButtons + WINE_JOYSTICK_MAX_AXES + WINE_JOYSTICK_MAX_POVS], df->dwObjSize); newDevice->buttons[i] = 0x80 | newDevice->numButtons; + df->rgodf[idx ].pguid = &GUID_Button; df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(newDevice->numButtons++) | DIDFT_PSHBUTTON; } df->dwNumObjs = idx; diff --git a/dlls/dinput/tests/keyboard.c b/dlls/dinput/tests/keyboard.c index 76ecec8c56c..440cd3c5b03 100644 --- a/dlls/dinput/tests/keyboard.c +++ b/dlls/dinput/tests/keyboard.c @@ -71,6 +71,22 @@ static void acquire_tests(LPDIRECTINPUT pDI, HWND hwnd) HRESULT hr; LPDIRECTINPUTDEVICE pKeyboard; BYTE kbd_state[256]; + BYTE custom_state[4]; + DIOBJECTDATAFORMAT dodf[] = + { + { &GUID_Key, 0, DIDFT_MAKEINSTANCE(DIK_Q)|DIDFT_BUTTON, 0 }, + { &GUID_Key, 1, DIDFT_MAKEINSTANCE(DIK_W)|DIDFT_BUTTON, 0 }, + { &GUID_Key, 2, DIDFT_MAKEINSTANCE(DIK_E)|DIDFT_BUTTON, 0 }, + { &GUID_Key, 3, DIDFT_MAKEINSTANCE(DIK_R)|DIDFT_BUTTON, 0 }, + }; + + DIDATAFORMAT df; + df.dwSize = sizeof( df ); + df.dwObjSize = sizeof( DIOBJECTDATAFORMAT ); + df.dwFlags = DIDF_RELAXIS; + df.dwDataSize = sizeof( dodf )/sizeof( dodf[0] ); + df.dwNumObjs = sizeof( dodf )/sizeof( dodf[0] ); + df.rgodf = dodf; hr = IDirectInput_CreateDevice(pDI, &GUID_SysKeyboard, &pKeyboard, NULL); ok(SUCCEEDED(hr), "IDirectInput_CreateDevice() failed: %s\n", DXGetErrorString8(hr)); @@ -94,6 +110,19 @@ static void acquire_tests(LPDIRECTINPUT pDI, HWND hwnd) ok(hr == DIERR_INVALIDPARAM, "IDirectInputDevice_GetDeviceState(10,) should have failed: %s\n", DXGetErrorString8(hr)); hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(kbd_state), kbd_state); ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState() failed: %s\n", DXGetErrorString8(hr)); + hr = IDirectInputDevice_Unacquire(pKeyboard); + ok(SUCCEEDED(hr), "IDirectInputDevice_Uncquire() failed: %s\n", DXGetErrorString8(hr)); + hr = IDirectInputDevice_SetDataFormat( pKeyboard , &df ); + ok(SUCCEEDED(hr), "IDirectInputDevice_SetDataFormat() failed: %s\n", DXGetErrorString8(hr)); + hr = IDirectInputDevice_Acquire(pKeyboard); + ok(SUCCEEDED(hr), "IDirectInputDevice_Acquire() failed: %s\n", DXGetErrorString8(hr)); + todo_wine + { + hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state), custom_state); + ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState(4,) failed: %s\n", DXGetErrorString8(hr)); + hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(kbd_state), kbd_state); + ok(hr == DIERR_INVALIDPARAM, "IDirectInputDevice_GetDeviceState(256,) should have failed: %s\n", DXGetErrorString8(hr)); + } if (pKeyboard) IUnknown_Release(pKeyboard); } diff --git a/dlls/dmime/graph.c b/dlls/dmime/graph.c index 7d0363acfdb..79ff8235cb7 100644 --- a/dlls/dmime/graph.c +++ b/dlls/dmime/graph.c @@ -108,7 +108,6 @@ static HRESULT WINAPI IDirectMusicGraphImpl_IDirectMusicGraph_StampPMsg (LPDIREC static HRESULT WINAPI IDirectMusicGraphImpl_IDirectMusicGraph_InsertTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool, DWORD* pdwPChannels, DWORD cPChannels, LONG lIndex) { ICOM_THIS_MULTI(IDirectMusicGraphImpl, GraphVtbl, iface); - HRESULT hr; struct list* pEntry = NULL; struct list* pPrevEntry = NULL; LPDMUS_PRIVATE_GRAPH_TOOL pIt = NULL; @@ -142,14 +141,14 @@ static HRESULT WINAPI IDirectMusicGraphImpl_IDirectMusicGraph_InsertTool (LPDIRE pNewTool->pTool = pTool; pNewTool->dwIndex = lIndex; IDirectMusicTool8_AddRef(pTool); - hr = IDirectMusicTool8_Init(pTool, iface); + IDirectMusicTool8_Init(pTool, iface); list_add_tail (pPrevEntry->next, &pNewTool->entry); #if 0 DWORD dwNum = 0; - hr = IDirectMusicTool8_GetMediaTypes(pTool, &dwNum); + IDirectMusicTool8_GetMediaTypes(pTool, &dwNum); #endif - + return DS_OK; } diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 973010422db..ad3d7408608 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -222,8 +222,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANC This->pDirectSound = pDirectSound; IDirectSound_AddRef(This->pDirectSound); } else { - HRESULT hr; - hr = DirectSoundCreate8(NULL, (LPDIRECTSOUND8*) &This->pDirectSound, NULL); + DirectSoundCreate8(NULL, (LPDIRECTSOUND8*) &This->pDirectSound, NULL); if (!This->pDirectSound) return DSERR_NODRIVER; if (NULL != hWnd) { diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c index a90bd4c8c5b..6b7243ae841 100644 --- a/dlls/dmime/segment.c +++ b/dlls/dmime/segment.c @@ -822,9 +822,9 @@ static HRESULT IDirectMusicSegment8Impl_IPersistStream_ParseTrackForm (LPPERSIST /*ICOM_THIS_MULTI(IDirectMusicSegment8Impl, PersistStreamVtbl, iface);*/ HRESULT hr = E_FAIL; DMUS_PRIVATE_CHUNK Chunk; - DWORD StreamSize, StreamCount, ListSize[3], ListCount[3]; + DWORD StreamSize, StreamCount, ListSize[3]; LARGE_INTEGER liMove; /* used when skipping chunks */ - + DMUS_IO_TRACK_HEADER track_hdr; DMUS_IO_TRACK_EXTRAS_HEADER track_xhdr; IDirectMusicTrack* pTrack = NULL; @@ -869,7 +869,6 @@ static HRESULT IDirectMusicSegment8Impl_IPersistStream_ParseTrackForm (LPPERSIST IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); TRACE_(dmfile)(": LIST chunk of type %s", debugstr_fourcc(Chunk.fccID)); ListSize[0] = Chunk.dwSize - sizeof(FOURCC); - ListCount[0] = 0; if (Chunk.fccID == track_hdr.fccType && 0 == track_hdr.ckid) { LPSTREAM pClonedStream = NULL; @@ -982,7 +981,7 @@ static HRESULT IDirectMusicSegment8Impl_IPersistStream_ParseTrackList (LPPERSIST HRESULT hr = E_FAIL; DMUS_PRIVATE_CHUNK Chunk; - DWORD StreamSize, StreamCount, ListSize[3], ListCount[3]; + DWORD StreamSize, ListSize[3], ListCount[3]; LARGE_INTEGER liMove; /* used when skipping chunks */ if (pChunk->fccID != DMUS_FOURCC_TRACK_LIST) { @@ -1002,7 +1001,6 @@ static HRESULT IDirectMusicSegment8Impl_IPersistStream_ParseTrackList (LPPERSIST IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); TRACE_(dmfile)(": RIFF chunk of type %s", debugstr_fourcc(Chunk.fccID)); StreamSize = Chunk.dwSize - sizeof(FOURCC); - StreamCount = 0; switch (Chunk.fccID) { case DMUS_FOURCC_TRACK_FORM: { TRACE_(dmfile)(": TRACK form\n"); @@ -1192,14 +1190,13 @@ static HRESULT IDirectMusicSegment8Impl_IPersistStream_LoadWave (LPPERSISTSTREAM static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTREAM iface, IStream* pStm) { ICOM_THIS_MULTI(IDirectMusicSegment8Impl, PersistStreamVtbl, iface); - + HRESULT hr; DMUS_PRIVATE_CHUNK Chunk; - DWORD StreamSize, StreamCount; + DWORD StreamSize; /*DWORD ListSize[3], ListCount[3];*/ LARGE_INTEGER liMove; /* used when skipping chunks */ - - + TRACE("(%p, %p): Loading\n", This, pStm); IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); @@ -1208,7 +1205,6 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IPersistStream_Load (LPPERSISTSTR IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL); TRACE_(dmfile)(": RIFF chunk of type %s", debugstr_fourcc(Chunk.fccID)); StreamSize = Chunk.dwSize - sizeof(FOURCC); - StreamCount = 0; switch (Chunk.fccID) { case DMUS_FOURCC_SEGMENT_FORM: { TRACE_(dmfile)(": segment form\n"); diff --git a/dlls/dnsapi/record.c b/dlls/dnsapi/record.c index d84275abfee..958403172d8 100644 --- a/dlls/dnsapi/record.c +++ b/dlls/dnsapi/record.c @@ -644,7 +644,7 @@ BOOL WINAPI DnsRecordSetCompare( PDNS_RECORD set1, PDNS_RECORD set2, PDNS_RECORD *diff1, PDNS_RECORD *diff2 ) { BOOL ret = TRUE; - DNS_RECORD *r, *s1, *s2, *t, *u; + DNS_RECORD *r, *t, *u; DNS_RRSET rr1, rr2; TRACE( "(%p,%p,%p,%p)\n", set1, set2, diff1, diff2 ); @@ -668,9 +668,9 @@ BOOL WINAPI DnsRecordSetCompare( PDNS_RECORD set1, PDNS_RECORD set2, DNS_RRSET_INIT( rr1 ); DNS_RRSET_INIT( rr2 ); - for (r = s1 = set1; (s1 = r); r = r->pNext) + for (r = set1; r; r = r->pNext) { - for (t = s2 = set2; (s2 = t); t = t->pNext) + for (t = set2; t; t = t->pNext) { u = DnsRecordCopyEx( r, r->Flags.S.CharSet, t->Flags.S.CharSet ); if (!u) goto error; @@ -684,9 +684,9 @@ BOOL WINAPI DnsRecordSetCompare( PDNS_RECORD set1, PDNS_RECORD set2, } } - for (t = s2 = set2; (s2 = t); t = t->pNext) + for (t = set2; t; t = t->pNext) { - for (r = s1 = set1; (s1 = r); r = r->pNext) + for (r = set1; r; r = r->pNext) { u = DnsRecordCopyEx( t, t->Flags.S.CharSet, r->Flags.S.CharSet ); if (!u) goto error; diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 5be4c5d4e73..7b18010ee25 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -3396,13 +3396,12 @@ static void DP_CopySessionDesc( LPDPSESSIONDESC2 lpSessionDest, static HRESULT WINAPI DP_IF_AddGroupToGroup ( IDirectPlay3Impl* This, DPID idParentGroup, DPID idGroup ) { - lpGroupData lpGParentData; lpGroupData lpGData; lpGroupList lpNewGList; TRACE( "(%p)->(0x%08x,0x%08x)\n", This, idParentGroup, idGroup ); - if( ( lpGParentData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idParentGroup ) ) == NULL ) + if( DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idParentGroup ) == NULL ) { return DPERR_INVALIDGROUP; } @@ -4487,8 +4486,6 @@ static HRESULT WINAPI DP_SendEx LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout, LPVOID lpContext, LPDWORD lpdwMsgID, BOOL bAnsi ) { - lpPlayerList lpPList; - lpGroupData lpGData; BOOL bValidDestination = FALSE; FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,0x%08x,0x%08x,0x%08x,%p,%p,%u)" @@ -4508,7 +4505,7 @@ static HRESULT WINAPI DP_SendEx */ if( idFrom != DPID_UNKNOWN ) { - if( ( lpPList = DP_FindPlayer( This, idFrom ) ) == NULL ) + if( DP_FindPlayer( This, idFrom ) == NULL ) { WARN( "INFO: Invalid from player 0x%08x\n", idFrom ); return DPERR_INVALIDPLAYER; @@ -4551,7 +4548,7 @@ static HRESULT WINAPI DP_SendEx } if( ( !bValidDestination ) && - ( ( lpGData = DP_FindAnyGroup( This, idTo ) ) != NULL ) + ( DP_FindAnyGroup( This, idTo ) != NULL ) ) { bValidDestination = TRUE; diff --git a/dlls/dpnhpast/dpnhpast.spec b/dlls/dpnhpast/dpnhpast.spec index 67fb171001e..ea61468ac87 100644 --- a/dlls/dpnhpast/dpnhpast.spec +++ b/dlls/dpnhpast/dpnhpast.spec @@ -1,4 +1,4 @@ -1 stub DirectPlayNATHelpCreate +1 stdcall DirectPlayNATHelpCreate(ptr ptr) @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) diff --git a/dlls/dpnhpast/main.c b/dlls/dpnhpast/main.c index 6ec2e6f621d..74427babfbb 100644 --- a/dlls/dpnhpast/main.c +++ b/dlls/dpnhpast/main.c @@ -55,12 +55,11 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) * * */ -#if 0 -HRESULT WINAPI DPNHPAST_DirectPlayNATHelpCreate(void) +HRESULT WINAPI DirectPlayNATHelpCreate(LPCGUID pIID, PVOID *ppvInterface) { - /* @stub in .spec */ + TRACE("(%p, %p) stub\n", pIID, ppvInterface); + return E_NOTIMPL; } -#endif /****************************************************************** diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c index fd2f671ac4c..3d3741b5da8 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -324,7 +324,7 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2) void DSOUND_MixToTemporary(const IDirectSoundBufferImpl *dsb, DWORD writepos, DWORD len, BOOL inmixer) { INT i, size; - BYTE *ibp, *obp, *ibp_begin, *obp_begin; + BYTE *ibp, *obp, *obp_begin; INT iAdvance = dsb->pwfx->nBlockAlign; INT oAdvance = dsb->device->pwfx->nBlockAlign; DWORD freqAcc, target_writepos = 0, overshot, maxlen; @@ -340,7 +340,6 @@ void DSOUND_MixToTemporary(const IDirectSoundBufferImpl *dsb, DWORD writepos, DW maxlen = DSOUND_secpos_to_bufpos(dsb, len, 0, NULL); ibp = dsb->buffer->memory + writepos; - ibp_begin = dsb->buffer->memory; if (!inmixer) obp_begin = dsb->tmp_buffer; else if (dsb->device->tmp_buffer_len < maxlen || !dsb->device->tmp_buffer) diff --git a/dlls/fusion/Makefile.in b/dlls/fusion/Makefile.in index 21792c8aa65..851fafcde21 100644 --- a/dlls/fusion/Makefile.in +++ b/dlls/fusion/Makefile.in @@ -3,11 +3,12 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = fusion.dll -IMPORTS = kernel32 +IMPORTS = advapi32 dbghelp kernel32 shlwapi version C_SRCS = \ asmcache.c \ asmname.c \ + assembly.c \ fusion.c \ fusion_main.c diff --git a/dlls/fusion/asmcache.c b/dlls/fusion/asmcache.c index 68a8240684b..7da79f46453 100644 --- a/dlls/fusion/asmcache.c +++ b/dlls/fusion/asmcache.c @@ -19,18 +19,78 @@ */ #include +#include #define COBJMACROS #include "windef.h" #include "winbase.h" #include "winuser.h" +#include "winver.h" +#include "wincrypt.h" +#include "winreg.h" +#include "shlwapi.h" +#include "dbghelp.h" #include "ole2.h" #include "fusion.h" +#include "corerror.h" + +#include "fusionpriv.h" #include "wine/debug.h" +#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(fusion); +static BOOL create_full_path(LPCSTR path) +{ + LPSTR new_path; + BOOL ret = TRUE; + int len; + + new_path = HeapAlloc(GetProcessHeap(), 0, lstrlenA(path) + 1); + if (!new_path) + return FALSE; + + lstrcpyA(new_path, path); + + while ((len = lstrlenA(new_path)) && new_path[len - 1] == '\\') + new_path[len - 1] = 0; + + while (!CreateDirectoryA(new_path, NULL)) + { + LPSTR slash; + DWORD last_error = GetLastError(); + + if(last_error == ERROR_ALREADY_EXISTS) + break; + + if(last_error != ERROR_PATH_NOT_FOUND) + { + ret = FALSE; + break; + } + + if(!(slash = strrchr(new_path, '\\'))) + { + ret = FALSE; + break; + } + + len = slash - new_path; + new_path[len] = 0; + if(!create_full_path(new_path)) + { + ret = FALSE; + break; + } + + new_path[len] = '\\'; + } + + HeapFree(GetProcessHeap(), 0, new_path); + return ret; +} + /* IAssemblyCache */ typedef struct { @@ -130,10 +190,80 @@ static HRESULT WINAPI IAssemblyCacheImpl_InstallAssembly(IAssemblyCache *iface, LPCWSTR pszManifestFilePath, LPCFUSION_INSTALL_REFERENCE pRefData) { - FIXME("(%p, %d, %s, %p) stub!\n", iface, dwFlags, + ASSEMBLY *assembly; + LPSTR filename; + LPSTR name = NULL; + LPSTR token = NULL; + LPSTR version = NULL; + LPSTR asmpath = NULL; + CHAR path[MAX_PATH]; + CHAR windir[MAX_PATH]; + LPWSTR ext; + HRESULT hr; + + static const WCHAR ext_exe[] = {'.','e','x','e',0}; + static const WCHAR ext_dll[] = {'.','d','l','l',0}; + + TRACE("(%p, %d, %s, %p)\n", iface, dwFlags, debugstr_w(pszManifestFilePath), pRefData); - return E_NOTIMPL; + if (!pszManifestFilePath || !*pszManifestFilePath) + return E_INVALIDARG; + + if (!(ext = strrchrW(pszManifestFilePath, '.'))) + return HRESULT_FROM_WIN32(ERROR_INVALID_NAME); + + if (lstrcmpW(ext, ext_exe) && lstrcmpW(ext, ext_dll)) + return HRESULT_FROM_WIN32(ERROR_INVALID_NAME); + + if (GetFileAttributesW(pszManifestFilePath) == INVALID_FILE_ATTRIBUTES) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + + hr = assembly_create(&assembly, pszManifestFilePath); + if (FAILED(hr)) + { + hr = COR_E_ASSEMBLYEXPECTED; + goto done; + } + + hr = assembly_get_name(assembly, &name); + if (FAILED(hr)) + goto done; + + hr = assembly_get_pubkey_token(assembly, &token); + if (FAILED(hr)) + goto done; + + hr = assembly_get_version(assembly, &version); + if (FAILED(hr)) + goto done; + + GetWindowsDirectoryA(windir, MAX_PATH); + + FIXME("Ignoring assembly architecture!\n"); + + sprintf(path, "%s\\assembly\\GAC_MSIL\\%s\\%s__%s\\", windir, name, + version, token); + + create_full_path(path); + + hr = assembly_get_path(assembly, &asmpath); + if (FAILED(hr)) + goto done; + + filename = PathFindFileNameA(asmpath); + + lstrcatA(path, filename); + if (!CopyFileA(asmpath, path, FALSE)) + hr = HRESULT_FROM_WIN32(GetLastError()); + +done: + HeapFree(GetProcessHeap(), 0, name); + HeapFree(GetProcessHeap(), 0, token); + HeapFree(GetProcessHeap(), 0, version); + HeapFree(GetProcessHeap(), 0, asmpath); + assembly_release(assembly); + return hr; } static const IAssemblyCacheVtbl AssemblyCacheVtbl = { diff --git a/dlls/fusion/assembly.c b/dlls/fusion/assembly.c new file mode 100644 index 00000000000..eee889a409e --- /dev/null +++ b/dlls/fusion/assembly.c @@ -0,0 +1,585 @@ +/* + * assembly parser + * + * Copyright 2008 James Hawkins + * + * 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 "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winver.h" +#include "wincrypt.h" +#include "dbghelp.h" +#include "ole2.h" +#include "fusion.h" + +#include "fusionpriv.h" +#include "wine/debug.h" +#include "wine/unicode.h" + +#define MAX_CLR_TABLES 64 + +typedef struct tagCLRTABLE +{ + DWORD rows; + DWORD offset; +} CLRTABLE; + +struct tagASSEMBLY +{ + LPSTR path; + + HANDLE hfile; + HANDLE hmap; + BYTE *data; + + IMAGE_NT_HEADERS32 *nthdr; + IMAGE_COR20_HEADER *corhdr; + + METADATAHDR *metadatahdr; + + METADATATABLESHDR *tableshdr; + DWORD numtables; + DWORD *numrows; + CLRTABLE tables[MAX_CLR_TABLES]; + + BYTE *strings; + BYTE *blobs; +}; + +/* FIXME: fill in */ +const DWORD COR_TABLE_SIZES[64] = +{ + sizeof(MODULETABLE), + sizeof(TYPEREFTABLE), + sizeof(TYPEDEFTABLE), + 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, + sizeof(ASSEMBLYTABLE), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + sizeof(MANIFESTRESTABLE), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; + +static LPSTR strdupWtoA(LPCWSTR str) +{ + LPSTR ret = NULL; + DWORD len; + + if (!str) + return ret; + + len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL); + ret = HeapAlloc(GetProcessHeap(), 0, len); + if (ret) + WideCharToMultiByte(CP_ACP, 0, str, -1, ret, len, NULL, NULL); + + return ret; +} + +static DWORD rva_to_offset(IMAGE_NT_HEADERS *nthdrs, DWORD rva) +{ + DWORD offset = rva, limit; + IMAGE_SECTION_HEADER *img; + WORD i; + + img = IMAGE_FIRST_SECTION(nthdrs); + + if (rva < img->PointerToRawData) + return rva; + + for (i = 0; i < nthdrs->FileHeader.NumberOfSections; i++) + { + if (img[i].SizeOfRawData) + limit = img[i].SizeOfRawData; + else + limit = img[i].Misc.VirtualSize; + + if (rva >= img[i].VirtualAddress && + rva < (img[i].VirtualAddress + limit)) + { + if (img[i].PointerToRawData != 0) + { + offset -= img[i].VirtualAddress; + offset += img[i].PointerToRawData; + } + + return offset; + } + } + + return 0; +} + +static BYTE *GetData(BYTE *pData, ULONG *pLength) +{ + if ((*pData & 0x80) == 0x00) + { + *pLength = (*pData & 0x7f); + return pData + 1; + } + + if ((*pData & 0xC0) == 0x80) + { + *pLength = ((*pData & 0x3f) << 8 | *(pData + 1)); + return pData + 2; + } + + if ((*pData & 0xE0) == 0xC0) + { + *pLength = ((*pData & 0x1f) << 24 | *(pData + 1) << 16 | + *(pData + 2) << 8 | *(pData + 3)); + return pData + 4; + } + + *pLength = (ULONG)-1; + return 0; +} + +static VOID *assembly_data_offset(ASSEMBLY *assembly, ULONG offset) +{ + return (VOID *)&assembly->data[offset]; +} + +static HRESULT parse_clr_tables(ASSEMBLY *assembly, ULONG offset) +{ + DWORD i, previ, offidx; + ULONG currofs; + + currofs = offset; + assembly->tableshdr = (METADATATABLESHDR *)assembly_data_offset(assembly, currofs); + if (!assembly->tableshdr) + return E_FAIL; + + currofs += sizeof(METADATATABLESHDR); + assembly->numrows = (DWORD *)assembly_data_offset(assembly, currofs); + if (!assembly->numrows) + return E_FAIL; + + assembly->numtables = 0; + for (i = 0; i < MAX_CLR_TABLES; i++) + { + if ((i < 32 && (assembly->tableshdr->MaskValid.LowPart >> i) & 1) || + (i >= 32 && (assembly->tableshdr->MaskValid.HighPart >> i) & 1)) + { + assembly->numtables++; + } + } + + currofs += assembly->numtables * sizeof(DWORD); + memset(assembly->tables, -1, MAX_CLR_TABLES * sizeof(CLRTABLE)); + + if (assembly->tableshdr->MaskValid.LowPart & 1) + { + assembly->tables[0].offset = currofs; + assembly->tables[0].rows = assembly->numrows[0]; + } + + previ = 0; + offidx = 1; + for (i = 1; i < MAX_CLR_TABLES; i++) + { + if ((i < 32 && (assembly->tableshdr->MaskValid.LowPart >> i) & 1) || + (i >= 32 && (assembly->tableshdr->MaskValid.HighPart >> i) & 1)) + { + currofs += COR_TABLE_SIZES[previ] * assembly->numrows[offidx - 1]; + assembly->tables[i].offset = currofs; + assembly->tables[i].rows = assembly->numrows[offidx]; + offidx++; + previ = i; + } + } + + return S_OK; +} + +static HRESULT parse_clr_metadata(ASSEMBLY *assembly) +{ + METADATASTREAMHDR *streamhdr; + ULONG rva, i, ofs; + LPSTR stream; + HRESULT hr; + BYTE *ptr; + + rva = assembly->corhdr->MetaData.VirtualAddress; + assembly->metadatahdr = ImageRvaToVa(assembly->nthdr, assembly->data, + rva, NULL); + if (!assembly->metadatahdr) + return E_FAIL; + + ptr = ImageRvaToVa(assembly->nthdr, assembly->data, + rva + sizeof(METADATAHDR), NULL); + if (!ptr) + return E_FAIL; + + for (i = 0; i < assembly->metadatahdr->Streams; i++) + { + streamhdr = (METADATASTREAMHDR *)ptr; + ofs = rva_to_offset(assembly->nthdr, rva + streamhdr->Offset); + + ptr += sizeof(METADATASTREAMHDR); + stream = (LPSTR)ptr; + + if (!lstrcmpA(stream, "#~")) + { + hr = parse_clr_tables(assembly, ofs); + if (FAILED(hr)) + return hr; + } + else if (!lstrcmpA(stream, "#Strings")) + assembly->strings = (BYTE *)assembly_data_offset(assembly, ofs); + else if (!lstrcmpA(stream, "#Blob")) + assembly->blobs = (BYTE *)assembly_data_offset(assembly, ofs); + + ptr += lstrlenA(stream); + while (!*ptr) ptr++; + } + + return S_OK; +} + +static HRESULT parse_pe_header(ASSEMBLY *assembly) +{ + IMAGE_DATA_DIRECTORY *datadirs; + + assembly->nthdr = ImageNtHeader(assembly->data); + if (!assembly->nthdr) + return E_FAIL; + + datadirs = assembly->nthdr->OptionalHeader.DataDirectory; + if (!datadirs) + return E_FAIL; + + if (!datadirs[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress || + !datadirs[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].Size) + { + return E_FAIL; + } + + assembly->corhdr = ImageRvaToVa(assembly->nthdr, assembly->data, + datadirs[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress, NULL); + if (!assembly->corhdr) + return E_FAIL; + + return S_OK; +} + +HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file) +{ + ASSEMBLY *assembly; + HRESULT hr; + + *out = NULL; + + assembly = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ASSEMBLY)); + if (!assembly) + return E_OUTOFMEMORY; + + assembly->path = strdupWtoA(file); + if (!assembly->path) + { + hr = E_OUTOFMEMORY; + goto failed; + } + + assembly->hfile = CreateFileW(file, GENERIC_READ, FILE_SHARE_READ, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (assembly->hfile == INVALID_HANDLE_VALUE) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + assembly->hmap = CreateFileMappingW(assembly->hfile, NULL, PAGE_READONLY, + 0, 0, NULL); + if (!assembly->hmap) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + assembly->data = MapViewOfFile(assembly->hmap, FILE_MAP_READ, 0, 0, 0); + if (!assembly->data) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto failed; + } + + hr = parse_pe_header(assembly); + if (FAILED(hr)) goto failed; + + hr = parse_clr_metadata(assembly); + if (FAILED(hr)) goto failed; + + *out = assembly; + return S_OK; + +failed: + assembly_release( assembly ); + return hr; +} + +HRESULT assembly_release(ASSEMBLY *assembly) +{ + if (!assembly) + return S_OK; + + HeapFree(GetProcessHeap(), 0, assembly->path); + UnmapViewOfFile(assembly->data); + CloseHandle(assembly->hmap); + CloseHandle(assembly->hfile); + HeapFree(GetProcessHeap(), 0, assembly); + + return S_OK; +} + +static LPSTR assembly_dup_str(ASSEMBLY *assembly, WORD index) +{ + return strdup((LPSTR)&assembly->strings[index]); +} + +HRESULT assembly_get_name(ASSEMBLY *assembly, LPSTR *name) +{ + ASSEMBLYTABLE *asmtbl; + ULONG offset; + + offset = assembly->tables[0x20].offset; /* FIXME: add constants */ + if (offset == -1) + return E_FAIL; + + asmtbl = (ASSEMBLYTABLE *)assembly_data_offset(assembly, offset); + if (!asmtbl) + return E_FAIL; + + *name = assembly_dup_str(assembly, asmtbl->Name); + if (!*name) + return E_OUTOFMEMORY; + + return S_OK; +} + +HRESULT assembly_get_path(ASSEMBLY *assembly, LPSTR *path) +{ + *path = strdup(assembly->path); + if (!*path) + return E_OUTOFMEMORY; + + return S_OK; +} + +HRESULT assembly_get_version(ASSEMBLY *assembly, LPSTR *version) +{ + LPSTR verdata; + VS_FIXEDFILEINFO *ffi; + HRESULT hr = S_OK; + DWORD size; + + size = GetFileVersionInfoSizeA(assembly->path, NULL); + if (!size) + return HRESULT_FROM_WIN32(GetLastError()); + + verdata = HeapAlloc(GetProcessHeap(), 0, size); + if (!verdata) + return E_OUTOFMEMORY; + + if (!GetFileVersionInfoA(assembly->path, 0, size, verdata)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto done; + } + + if (!VerQueryValueA(verdata, "\\", (LPVOID *)&ffi, &size)) + { + hr = HRESULT_FROM_WIN32(GetLastError()); + goto done; + } + + *version = HeapAlloc(GetProcessHeap(), 0, MAX_PATH); + if (!*version) + { + hr = E_OUTOFMEMORY; + goto done; + } + + sprintf(*version, "%d.%d.%d.%d", HIWORD(ffi->dwFileVersionMS), + LOWORD(ffi->dwFileVersionMS), HIWORD(ffi->dwFileVersionLS), + LOWORD(ffi->dwFileVersionLS)); + +done: + HeapFree(GetProcessHeap(), 0, verdata); + return hr; +} + +HRESULT assembly_get_architecture(ASSEMBLY *assembly, DWORD fixme) +{ + /* FIXME */ + return S_OK; +} + +static BYTE *assembly_get_blob(ASSEMBLY *assembly, WORD index, ULONG *size) +{ + return GetData(&assembly->blobs[index], size); +} + +static void bytes_to_str(BYTE *bytes, DWORD len, LPSTR str) +{ + int i; + + static const char hexval[16] = { + '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' + }; + + for(i = 0; i < len; i++) + { + str[i * 2] = hexval[((bytes[i] >> 4) & 0xF)]; + str[i * 2 + 1] = hexval[(bytes[i]) & 0x0F]; + } +} + +#define BYTES_PER_TOKEN 8 +#define CHARS_PER_BYTE 2 +#define TOKEN_LENGTH (BYTES_PER_TOKEN * CHARS_PER_BYTE + 1) + +HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPSTR *token) +{ + ASSEMBLYTABLE *asmtbl; + ULONG i, offset, size; + BYTE *hashdata; + HCRYPTPROV crypt; + HCRYPTHASH hash; + BYTE *pubkey; + BYTE tokbytes[BYTES_PER_TOKEN]; + HRESULT hr = E_FAIL; + LPSTR tok; + + *token = NULL; + + offset = assembly->tables[0x20].offset; /* FIXME: add constants */ + if (offset == -1) + return E_FAIL; + + asmtbl = (ASSEMBLYTABLE *)assembly_data_offset(assembly, offset); + if (!asmtbl) + return E_FAIL; + + pubkey = assembly_get_blob(assembly, asmtbl->PublicKey, &size); + + if (!CryptAcquireContextA(&crypt, NULL, NULL, PROV_RSA_FULL, + CRYPT_VERIFYCONTEXT)) + return E_FAIL; + + if (!CryptCreateHash(crypt, CALG_SHA1, 0, 0, &hash)) + return E_FAIL; + + if (!CryptHashData(hash, pubkey, size, 0)) + return E_FAIL; + + size = 0; + if (!CryptGetHashParam(hash, HP_HASHVAL, NULL, &size, 0)) + return E_FAIL; + + hashdata = HeapAlloc(GetProcessHeap(), 0, size); + if (!hashdata) + { + hr = E_OUTOFMEMORY; + goto done; + } + + if (!CryptGetHashParam(hash, HP_HASHVAL, hashdata, &size, 0)) + goto done; + + for (i = size - 1; i >= size - 8; i--) + tokbytes[size - i - 1] = hashdata[i]; + + tok = HeapAlloc(GetProcessHeap(), 0, TOKEN_LENGTH); + if (!tok) + { + hr = E_OUTOFMEMORY; + goto done; + } + + bytes_to_str(tokbytes, BYTES_PER_TOKEN, tok); + tok[TOKEN_LENGTH - 1] = '\0'; + + *token = tok; + hr = S_OK; + +done: + HeapFree(GetProcessHeap(), 0, hashdata); + CryptDestroyHash(hash); + CryptReleaseContext(crypt, 0); + + return hr; +} diff --git a/dlls/fusion/fusionpriv.h b/dlls/fusion/fusionpriv.h new file mode 100644 index 00000000000..ca84a29eb15 --- /dev/null +++ b/dlls/fusion/fusionpriv.h @@ -0,0 +1,212 @@ +/* + * fusion private definitions + * + * Copyright 2008 James Hawkins + * + * 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 + */ + +#ifndef __WINE_FUSION_PRIVATE__ +#define __WINE_FUSION_PRIVATE__ + +#include + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" + +typedef struct +{ + ULONG Signature; + USHORT MajorVersion; + USHORT MinorVersion; + ULONG Reserved; + ULONG VersionLength; + BYTE Version[12]; + BYTE Flags; + WORD Streams; +} METADATAHDR; + +#include + +typedef struct +{ + DWORD Offset; + DWORD Size; +} METADATASTREAMHDR; + +typedef struct +{ + DWORD Reserved1; + BYTE MajorVersion; + BYTE MinorVersion; + BYTE HeapOffsetSizes; + BYTE Reserved2; + LARGE_INTEGER MaskValid; + LARGE_INTEGER MaskSorted; +} METADATATABLESHDR; + +typedef struct +{ + WORD Generation; + WORD Name; + WORD Mvid; + WORD EncId; + WORD EncBaseId; +} MODULETABLE; + +typedef struct +{ + DWORD Flags; + WORD Name; + WORD Namespace; + WORD Extends; + WORD FieldList; + WORD MethodList; +} TYPEDEFTABLE; + +typedef struct +{ + DWORD ResolutionScope; + WORD Name; + WORD Namespace; +} TYPEREFTABLE; + +typedef struct +{ + DWORD HashAlgId; + WORD MajorVersion; + WORD MinorVersion; + WORD BuildNumber; + WORD RevisionNumber; + DWORD Flags; + WORD PublicKey; + WORD Name; + WORD Culture; +} ASSEMBLYTABLE; + +typedef struct +{ + DWORD Offset; + DWORD Flags; + WORD Name; + WORD Implementation; +} MANIFESTRESTABLE; + +typedef struct +{ + DWORD ImportLookupTable; + DWORD DateTimeStamp; + DWORD ForwarderChain; + DWORD Name; + DWORD ImportAddressTable; + BYTE pad[20]; +} IMPORTTABLE; + +typedef struct +{ + DWORD HintNameTableRVA; + BYTE pad[8]; +} IMPORTLOOKUPTABLE; + +typedef struct +{ + WORD Hint; + BYTE Name[12]; + BYTE Module[12]; + DWORD Reserved; + WORD EntryPoint; + DWORD RVA; +} HINTNAMETABLE; + +typedef struct +{ + DWORD PageRVA; + DWORD Size; + DWORD Relocation; +} RELOCATION; + +typedef struct +{ + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[17]; + VS_FIXEDFILEINFO Value; +} VS_VERSIONINFO; + +typedef struct +{ + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[13]; +} VARFILEINFO; + +typedef struct +{ + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[13]; + DWORD Value; +} VAR; + +typedef struct +{ + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[15]; +} STRINGFILEINFO; + +typedef struct +{ + WORD wLength; + WORD wValueLength; + WORD wType; + WCHAR szKey[9]; +} STRINGTABLE; + +typedef struct +{ + WORD wLength; + WORD wValueLength; + WORD wType; +} STRINGHDR; + +typedef struct +{ + DWORD Size; + DWORD Signature; + DWORD HeaderVersion; + DWORD SkipData; + BYTE Data[168]; +} RESOURCE; + +#include + +struct tagASSEMBLY; +typedef struct tagASSEMBLY ASSEMBLY; + +HRESULT assembly_create(ASSEMBLY **out, LPCWSTR file); +HRESULT assembly_release(ASSEMBLY *assembly); +HRESULT assembly_get_name(ASSEMBLY *assembly, LPSTR *name); +HRESULT assembly_get_path(ASSEMBLY *assembly, LPSTR *path); +HRESULT assembly_get_version(ASSEMBLY *assembly, LPSTR *version); +HRESULT assembly_get_architecture(ASSEMBLY *assembly, DWORD fixme); +HRESULT assembly_get_pubkey_token(ASSEMBLY *assembly, LPSTR *token); + +#endif /* __WINE_FUSION_PRIVATE__ */ diff --git a/dlls/fusion/tests/asmcache.c b/dlls/fusion/tests/asmcache.c index 75b71dceb82..a160b0a0703 100644 --- a/dlls/fusion/tests/asmcache.c +++ b/dlls/fusion/tests/asmcache.c @@ -853,6 +853,7 @@ static void test_InstallAssembly(void) IAssemblyCache *cache; HRESULT hr; ULONG disp; + DWORD attr; static const WCHAR empty[] = {0}; static const WCHAR noext[] = {'f','i','l','e',0}; @@ -877,64 +878,44 @@ static void test_InstallAssembly(void) /* NULL pszManifestFilePath */ hr = IAssemblyCache_InstallAssembly(cache, 0, NULL, NULL); - todo_wine - { - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - } + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); /* empty pszManifestFilePath */ hr = IAssemblyCache_InstallAssembly(cache, 0, empty, NULL); - todo_wine - { - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); - } + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr); /* pszManifestFilePath has no extension */ hr = IAssemblyCache_InstallAssembly(cache, 0, noext, NULL); - todo_wine - { - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x\n", hr); - } + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), + "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x\n", hr); /* pszManifestFilePath has bad extension */ hr = IAssemblyCache_InstallAssembly(cache, 0, badext, NULL); - todo_wine - { - ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), - "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x\n", hr); - } + ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_NAME), + "Expected HRESULT_FROM_WIN32(ERROR_INVALID_NAME), got %08x\n", hr); /* pszManifestFilePath has dll extension */ hr = IAssemblyCache_InstallAssembly(cache, 0, dllext, NULL); - todo_wine - { - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - } + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); /* pszManifestFilePath has exe extension */ hr = IAssemblyCache_InstallAssembly(cache, 0, exeext, NULL); - todo_wine - { - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), - "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); - } + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), + "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr); /* empty file */ hr = IAssemblyCache_InstallAssembly(cache, 0, testdll, NULL); - todo_wine - { - ok(hr == COR_E_ASSEMBLYEXPECTED, - "Expected COR_E_ASSEMBLYEXPECTED, got %08x\n", hr); - } + ok(hr == COR_E_ASSEMBLYEXPECTED, + "Expected COR_E_ASSEMBLYEXPECTED, got %08x\n", hr); /* wine assembly */ hr = IAssemblyCache_InstallAssembly(cache, 0, winedll, NULL); - todo_wine - { - ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); - } + ok(hr == S_OK, "Expected S_OK, got %08x\n", hr); + + attr = GetFileAttributes("C:\\windows\\assembly\\GAC_MSIL\\wine\\" + "1.0.0.0__2d03617b1c31e2f5/wine.dll"); + ok(attr != INVALID_FILE_ATTRIBUTES, "Expected assembly to exist\n"); /* uninstall the assembly from the GAC */ hr = IAssemblyCache_UninstallAssembly(cache, 0, wine, NULL, &disp); @@ -945,6 +926,12 @@ static void test_InstallAssembly(void) "Expected IASSEMBLYCACHE_UNINSTALL_DISPOSITION_UNINSTALLED, got %d\n", disp); } + /* FIXME: remove once UninstallAssembly is implemented */ + DeleteFileA("C:\\windows\\assembly\\GAC_MSIL\\wine\\" + "1.0.0.0__2d03617b1c31e2f5\\wine.dll"); + RemoveDirectoryA("C:\\windows\\assembly\\GAC_MSIL\\wine\\1.0.0.0__2d03617b1c31e2f5"); + RemoveDirectoryA("C:\\windows\\assembly\\GAC_MSIL\\wine"); + DeleteFileA("test.dll"); DeleteFileA("wine.dll"); IAssemblyCache_Release(cache); diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index ffd6a1b0659..debbde8e842 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -785,6 +785,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc ) release_dc_ptr( origDC ); if (funcs) funcs = DRIVER_get_driver( funcs ); } + else if (hdc) return 0; if (!funcs && !(funcs = DRIVER_load_driver( displayW ))) return 0; diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index 2b5ae374d44..caf3e6ca9ab 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -620,8 +620,55 @@ INT WINAPI GetDIBits( /* Transfer color info */ - if (bpp <= 8 && bpp > 0) + switch (bpp) { + case 0: /* query bitmap info only */ + if (core_header) + { + BITMAPCOREHEADER* coreheader = (BITMAPCOREHEADER*) info; + coreheader->bcWidth = bmp->bitmap.bmWidth; + coreheader->bcHeight = bmp->bitmap.bmHeight; + coreheader->bcPlanes = 1; + coreheader->bcBitCount = bmp->bitmap.bmBitsPixel; + } + else + { + info->bmiHeader.biWidth = bmp->bitmap.bmWidth; + info->bmiHeader.biHeight = bmp->bitmap.bmHeight; + info->bmiHeader.biPlanes = 1; + info->bmiHeader.biSizeImage = + DIB_GetDIBImageBytes( bmp->bitmap.bmWidth, + bmp->bitmap.bmHeight, + bmp->bitmap.bmBitsPixel ); + switch(bmp->bitmap.bmBitsPixel) + { + case 15: + info->bmiHeader.biBitCount = 16; + info->bmiHeader.biCompression = BI_RGB; + break; + case 16: + info->bmiHeader.biBitCount = 16; + info->bmiHeader.biCompression = BI_BITFIELDS; + break; + default: + info->bmiHeader.biBitCount = bmp->bitmap.bmBitsPixel; + info->bmiHeader.biCompression = BI_RGB; + break; + } + info->bmiHeader.biXPelsPerMeter = 0; + info->bmiHeader.biYPelsPerMeter = 0; + info->bmiHeader.biClrUsed = 0; + info->bmiHeader.biClrImportant = 0; + + /* Windows 2000 doesn't touch the additional struct members if + it's a BITMAPV4HEADER or a BITMAPV5HEADER */ + } + lines = abs(bmp->bitmap.bmHeight); + goto done; + + case 1: + case 4: + case 8: if (!core_header) info->bmiHeader.biClrUsed = 0; /* If the bitmap object already has a dib section at the @@ -758,6 +805,25 @@ INT WINAPI GetDIBits( } } } + break; + + case 15: + if (info->bmiHeader.biCompression == BI_BITFIELDS) + { + ((PDWORD)info->bmiColors)[0] = 0x7c00; + ((PDWORD)info->bmiColors)[1] = 0x03e0; + ((PDWORD)info->bmiColors)[2] = 0x001f; + } + break; + + case 16: + if (info->bmiHeader.biCompression == BI_BITFIELDS) + { + ((PDWORD)info->bmiColors)[0] = 0xf800; + ((PDWORD)info->bmiColors)[1] = 0x07e0; + ((PDWORD)info->bmiColors)[2] = 0x001f; + } + break; } if (bits && lines) @@ -981,84 +1047,21 @@ INT WINAPI GetDIBits( } } } - else - { - /* fill in struct members */ - - if (bpp == 0) - { - if (core_header) - { - BITMAPCOREHEADER* coreheader = (BITMAPCOREHEADER*) info; - coreheader->bcWidth = bmp->bitmap.bmWidth; - coreheader->bcHeight = bmp->bitmap.bmHeight; - coreheader->bcPlanes = 1; - coreheader->bcBitCount = bmp->bitmap.bmBitsPixel; - } - else - { - info->bmiHeader.biWidth = bmp->bitmap.bmWidth; - info->bmiHeader.biHeight = bmp->bitmap.bmHeight; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biSizeImage = - DIB_GetDIBImageBytes( bmp->bitmap.bmWidth, - bmp->bitmap.bmHeight, - bmp->bitmap.bmBitsPixel ); - switch(bmp->bitmap.bmBitsPixel) - { - case 15: - info->bmiHeader.biBitCount = 16; - info->bmiHeader.biCompression = BI_RGB; - break; - - case 16: - if (bits) - { - /* Add color only when bits is given, as per MSDN */ - ((PDWORD)info->bmiColors)[0] = 0xf800; - ((PDWORD)info->bmiColors)[1] = 0x07e0; - ((PDWORD)info->bmiColors)[2] = 0x001f; - } - info->bmiHeader.biBitCount = 16; - info->bmiHeader.biCompression = BI_BITFIELDS; - break; - - default: - info->bmiHeader.biBitCount = bmp->bitmap.bmBitsPixel; - info->bmiHeader.biCompression = BI_RGB; - break; - } - info->bmiHeader.biXPelsPerMeter = 0; - info->bmiHeader.biYPelsPerMeter = 0; - info->bmiHeader.biClrUsed = 0; - info->bmiHeader.biClrImportant = 0; - - /* Windows 2000 doesn't touch the additional struct members if - it's a BITMAPV4HEADER or a BITMAPV5HEADER */ - } - lines = abs(bmp->bitmap.bmHeight); - } - else - { - /* The knowledge base article Q81498 ("DIBs and Their Uses") states that - if bits == NULL and bpp != 0, only biSizeImage and the color table are - filled in. */ - if (!core_header) - { - /* FIXME: biSizeImage should be calculated according to the selected - compression algorithm if biCompression != BI_RGB */ - info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes( width, height, bpp ); - } - lines = abs(height); - } - } + else lines = abs(height); + /* The knowledge base article Q81498 ("DIBs and Their Uses") states that + if bits == NULL and bpp != 0, only biSizeImage and the color table are + filled in. */ if (!core_header) { + /* FIXME: biSizeImage should be calculated according to the selected + compression algorithm if biCompression != BI_RGB */ + info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes( width, height, bpp ); TRACE("biSizeImage = %d, ", info->bmiHeader.biSizeImage); } TRACE("biWidth = %d, biHeight = %d\n", width, height); +done: release_dc_ptr( dc ); GDI_ReleaseObj( hbitmap ); return lines; diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index aeb9c7db3ad..bfa986d0f39 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -4064,7 +4064,7 @@ static FT_UInt get_glyph_index(const GdiFont *font, UINT glyph) return get_GSUB_vert_glyph(font,ret); } - if(font->charset == SYMBOL_CHARSET && glyph < 0x100) + if(font->ft_face->charmap->encoding == FT_ENCODING_MS_SYMBOL && glyph < 0x100) glyph = glyph + 0xf000; glyphId = pFT_Get_Char_Index(font->ft_face, glyph); return get_GSUB_vert_glyph(font,glyphId); diff --git a/dlls/gdi32/painting.c b/dlls/gdi32/painting.c index 097ddcfd099..8c9aa98f121 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -1005,7 +1005,7 @@ BOOL WINAPI LineDDA(INT nXStart, INT nYStart, INT nXEnd, INT nYEnd, if (dx > dy) /* line is "more horizontal" */ { err = 2*dy - dx; erradd = 2*dy - 2*dx; - for(cnt = 0;cnt <= dx; cnt++) + for(cnt = 0;cnt < dx; cnt++) { callback(nXStart,nYStart,lParam); if (err > 0) @@ -1020,7 +1020,7 @@ BOOL WINAPI LineDDA(INT nXStart, INT nYStart, INT nXEnd, INT nYEnd, else /* line is "more vertical" */ { err = 2*dx - dy; erradd = 2*dx - 2*dy; - for(cnt = 0;cnt <= dy; cnt++) + for(cnt = 0;cnt < dy; cnt++) { callback(nXStart,nYStart,lParam); if (err > 0) diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index a8977ebc67b..56036f96008 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -1851,7 +1851,7 @@ static BOOL PATH_StrokePath(DC *dc, GdiPath *pPath) static BOOL PATH_WidenPath(DC *dc) { - INT i, j, numStrokes, nLinePts, penWidth, penWidthIn, penWidthOut, size, penStyle; + INT i, j, numStrokes, penWidth, penWidthIn, penWidthOut, size, penStyle; BOOL ret = FALSE; GdiPath *pPath, *pNewPath, **pStrokes, *pUpPath, *pDownPath; EXTLOGPEN *elp; @@ -1907,7 +1907,6 @@ static BOOL PATH_WidenPath(DC *dc) penWidthOut++; numStrokes = 0; - nLinePts = 0; pStrokes = HeapAlloc(GetProcessHeap(), 0, numStrokes * sizeof(GdiPath*)); pStrokes[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(GdiPath)); diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index 67bb27fc82e..15a463b0175 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -1606,6 +1606,7 @@ static void test_GetDIBits_BI_BITFIELDS(void) * for the three primary colors in non-paletted 16 bit mode. */ char dibinfo_buf[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)]; + DWORD bits[32]; LPBITMAPINFO dibinfo = (LPBITMAPINFO) dibinfo_buf; HDC hdc; HBITMAP hbm; @@ -1622,30 +1623,61 @@ static void test_GetDIBits_BI_BITFIELDS(void) /* Call GetDIBits to fill in bmiHeader. */ ret = GetDIBits(hdc, hbm, 0, 1, NULL, dibinfo, DIB_RGB_COLORS); ok(ret == 1, "GetDIBits failed\n"); - if (dibinfo->bmiHeader.biBitCount == 16 - && dibinfo->bmiHeader.biCompression == BI_BITFIELDS) { - /* In the BITMAPINFOHEADER doc, this little struct is implicit. - * Making explicit for clarity. - */ - struct bi_bitfields_s { - DWORD red; - DWORD blue; - DWORD green; - } *bitmasks; - - /* Retrieve the BI_BITFIELDS info (requires second call, honest). */ - ret = GetDIBits(hdc, hbm, 0, 1, NULL, dibinfo, DIB_RGB_COLORS); - ok(ret == 1, "GetDIBits failed\n"); - - bitmasks = (struct bi_bitfields_s *) dibinfo->bmiColors; - todo_wine { - ok(bitmasks->red != 0, "expected space for red pixels\n"); - ok(bitmasks->blue != 0, "expected space for blue pixels\n"); - ok(bitmasks->green != 0, "expected space for green pixels\n"); - } - } else { - skip("not in 16 bpp BI_BITFIELDS mode, skipping that test\n"); + if (dibinfo->bmiHeader.biBitCount == 16 && + dibinfo->bmiHeader.biCompression == BI_BITFIELDS) + { + DWORD *bitmasks = (DWORD *)dibinfo->bmiColors; + + ok( !bitmasks[0], "red mask is set\n" ); + ok( !bitmasks[1], "green mask is set\n" ); + ok( !bitmasks[2], "blue mask is set\n" ); + + /* test with NULL bits pointer and correct bpp */ + dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; + ret = GetDIBits(hdc, hbm, 0, 1, NULL, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed\n"); + + ok( bitmasks[0] != 0, "red mask is not set\n" ); + ok( bitmasks[1] != 0, "green mask is not set\n" ); + ok( bitmasks[2] != 0, "blue mask is not set\n" ); + ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); + + /* test with valid bits pointer */ + memset(dibinfo, 0, sizeof(dibinfo_buf)); + dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + ret = GetDIBits(hdc, hbm, 0, 1, NULL, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError()); + dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; + ret = GetDIBits(hdc, hbm, 0, 1, bits, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError()); + + ok( bitmasks[0] != 0, "red mask is not set\n" ); + ok( bitmasks[1] != 0, "green mask is not set\n" ); + ok( bitmasks[2] != 0, "blue mask is not set\n" ); + ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); + + /* now with bits and 0 lines */ + memset(dibinfo, 0, sizeof(dibinfo_buf)); + dibinfo->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; + ret = GetDIBits(hdc, hbm, 0, 0, bits, dibinfo, DIB_RGB_COLORS); + + ok( !bitmasks[0], "red mask is set\n" ); + ok( !bitmasks[1], "green mask is set\n" ); + ok( !bitmasks[2], "blue mask is set\n" ); + ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); + + memset(bitmasks, 0, 3*sizeof(DWORD)); + dibinfo->bmiHeader.biSizeImage = 0xdeadbeef; + ret = GetDIBits(hdc, hbm, 0, 0, bits, dibinfo, DIB_RGB_COLORS); + ok(ret == 1, "GetDIBits failed ret %u err %u\n",ret,GetLastError()); + + ok( bitmasks[0] != 0, "red mask is not set\n" ); + ok( bitmasks[1] != 0, "green mask is not set\n" ); + ok( bitmasks[2] != 0, "blue mask is not set\n" ); + ok( dibinfo->bmiHeader.biSizeImage != 0xdeadbeef, "size image not set\n" ); } + else skip("not in 16 bpp BI_BITFIELDS mode, skipping that test\n"); DeleteObject(hbm); ReleaseDC(NULL, hdc); diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c index 79b6ef7d8ee..9e0048e4fce 100644 --- a/dlls/gdi32/tests/dc.c +++ b/dlls/gdi32/tests/dc.c @@ -234,9 +234,29 @@ static void test_GdiConvertToDevmodeW(void) HeapFree(GetProcessHeap(), 0, dmW); } +static void test_CreateCompatibleDC(void) +{ + BOOL bRet; + HDC hDC; + HDC hNewDC; + + /* Create a DC compatible with the screen */ + hDC = CreateCompatibleDC(NULL); + ok(hDC != NULL, "CreateCompatibleDC returned %p\n", hDC); + + /* Delete this DC, this should succeed */ + bRet = DeleteDC(hDC); + ok(bRet == TRUE, "DeleteDC returned %u\n", bRet); + + /* Try to create a DC compatible to the deleted DC. This has to fail */ + hNewDC = CreateCompatibleDC(hDC); + ok(hNewDC == NULL, "CreateCompatibleDC returned %p\n", hNewDC); +} + START_TEST(dc) { test_savedc(); test_savedc_2(); test_GdiConvertToDevmodeW(); + test_CreateCompatibleDC(); } diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index ef250d9c377..803994b50cc 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1518,7 +1518,7 @@ static void test_negative_width(HDC hdc, const LOGFONTA *lf) { SelectObject(hdc, hfont_prev); DeleteObject(hfont); - skip("This font doesn't contain 'x', skipping the test\n"); + skip("Font %s doesn't contain 'x', skipping the test\n", lf->lfFaceName); return; } diff --git a/dlls/gdi32/tests/path.c b/dlls/gdi32/tests/path.c index cbbd53cdb6e..58e84677fcf 100644 --- a/dlls/gdi32/tests/path.c +++ b/dlls/gdi32/tests/path.c @@ -422,6 +422,87 @@ static void test_closefigure(void) { ReleaseDC(0, hdc); } +static void WINAPI linedda_callback(INT x, INT y, LPARAM lparam) +{ + POINT **pt = (POINT**)lparam; + ok((*pt)->x == x && (*pt)->y == y, "point mismatch expect(%d,%d) got(%d,%d)\n", + (*pt)->x, (*pt)->y, x, y); + + (*pt)++; + return; +} + +static void test_linedda(void) +{ + const POINT *pt; + static const POINT array_10_20_20_40[] = {{10,20},{10,21},{11,22},{11,23}, + {12,24},{12,25},{13,26},{13,27}, + {14,28},{14,29},{15,30},{15,31}, + {16,32},{16,33},{17,34},{17,35}, + {18,36},{18,37},{19,38},{19,39}, + {-1,-1}}; + static const POINT array_10_20_20_43[] = {{10,20},{10,21},{11,22},{11,23}, + {12,24},{12,25},{13,26},{13,27}, + {13,28},{14,29},{14,30},{15,31}, + {15,32},{16,33},{16,34},{17,35}, + {17,36},{17,37},{18,38},{18,39}, + {19,40},{19,41},{20,42},{-1,-1}}; + + static const POINT array_10_20_10_20[] = {{-1,-1}}; + static const POINT array_10_20_11_27[] = {{10,20},{10,21},{10,22},{10,23}, + {11,24},{11,25},{11,26},{-1,-1}}; + + static const POINT array_20_43_10_20[] = {{20,43},{20,42},{19,41},{19,40}, + {18,39},{18,38},{17,37},{17,36}, + {17,35},{16,34},{16,33},{15,32}, + {15,31},{14,30},{14,29},{13,28}, + {13,27},{13,26},{12,25},{12,24}, + {11,23},{11,22},{10,21},{-1,-1}}; + + static const POINT array_20_20_10_43[] = {{20,20},{20,21},{19,22},{19,23}, + {18,24},{18,25},{17,26},{17,27}, + {17,28},{16,29},{16,30},{15,31}, + {15,32},{14,33},{14,34},{13,35}, + {13,36},{13,37},{12,38},{12,39}, + {11,40},{11,41},{10,42},{-1,-1}}; + + static const POINT array_20_20_43_10[] = {{20,20},{21,20},{22,19},{23,19}, + {24,18},{25,18},{26,17},{27,17}, + {28,17},{29,16},{30,16},{31,15}, + {32,15},{33,14},{34,14},{35,13}, + {36,13},{37,13},{38,12},{39,12}, + {40,11},{41,11},{42,10},{-1,-1}}; + + + pt = array_10_20_20_40; + LineDDA(10, 20, 20, 40, linedda_callback, (LPARAM)&pt); + ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); + + pt = array_10_20_20_43; + LineDDA(10, 20, 20, 43, linedda_callback, (LPARAM)&pt); + ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); + + pt = array_10_20_10_20; + LineDDA(10, 20, 10, 20, linedda_callback, (LPARAM)&pt); + ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); + + pt = array_10_20_11_27; + LineDDA(10, 20, 11, 27, linedda_callback, (LPARAM)&pt); + ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); + + pt = array_20_43_10_20; + LineDDA(20, 43, 10, 20, linedda_callback, (LPARAM)&pt); + ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); + + pt = array_20_20_10_43; + LineDDA(20, 20, 10, 43, linedda_callback, (LPARAM)&pt); + ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); + + pt = array_20_20_43_10; + LineDDA(20, 20, 43, 10, linedda_callback, (LPARAM)&pt); + ok(pt->x == -1 && pt->y == -1, "didn't find terminator\n"); +} + START_TEST(path) { test_widenpath(); @@ -429,4 +510,5 @@ START_TEST(path) test_anglearc(); test_polydraw(); test_closefigure(); + test_linedda(); } diff --git a/dlls/gdiplus/customlinecap.c b/dlls/gdiplus/customlinecap.c index 54005a8157b..e8e18bc3806 100644 --- a/dlls/gdiplus/customlinecap.c +++ b/dlls/gdiplus/customlinecap.c @@ -184,3 +184,13 @@ GpStatus WINGDIPAPI GdipSetCustomLineCapWidthScale(GpCustomLineCap* custom, return NotImplemented; } + +GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap *customCap, GpLineCap *baseCap) +{ + if(!customCap || !baseCap) + return InvalidParameter; + + *baseCap = customCap->cap; + + return Ok; +} diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 337ffb2da9a..f2426b19121 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -1,5 +1,5 @@ @ stdcall GdipAddPathArc(ptr long long long long long long) -@ stub GdipAddPathArcI +@ stdcall GdipAddPathArcI(ptr long long long long long long) @ stub GdipAddPathBezier @ stdcall GdipAddPathBezierI(ptr long long long long long long long long) @ stdcall GdipAddPathBeziers(ptr ptr long) @@ -17,7 +17,7 @@ @ stdcall GdipAddPathEllipse(ptr long long long long) @ stub GdipAddPathEllipseI @ stdcall GdipAddPathLine2(ptr ptr long) -@ stub GdipAddPathLine2I +@ stdcall GdipAddPathLine2I(ptr ptr long) @ stub GdipAddPathLine @ stdcall GdipAddPathLineI(ptr long long long long) @ stdcall GdipAddPathPath(ptr ptr long) @@ -58,7 +58,7 @@ @ stdcall GdipClonePath(ptr ptr) @ stdcall GdipClonePen(ptr ptr) @ stub GdipCloneRegion -@ stub GdipCloneStringFormat +@ stdcall GdipCloneStringFormat(ptr ptr) @ stdcall GdipClosePathFigure(ptr) @ stdcall GdipClosePathFigures(ptr) @ stub GdipCombineRegionPath @@ -106,7 +106,7 @@ @ stub GdipCreateLineBrushI @ stdcall GdipCreateMatrix2(long long long long long long ptr) @ stdcall GdipCreateMatrix3(ptr ptr ptr) -@ stub GdipCreateMatrix3I +@ stdcall GdipCreateMatrix3I(ptr ptr ptr) @ stdcall GdipCreateMatrix(ptr) @ stdcall GdipCreateMetafileFromEmf(ptr long ptr) @ stub GdipCreateMetafileFromFile @@ -114,7 +114,7 @@ @ stdcall GdipCreateMetafileFromWmf(ptr long ptr ptr) @ stub GdipCreateMetafileFromWmfFile @ stdcall GdipCreatePath2(ptr ptr long long ptr) -@ stub GdipCreatePath2I +@ stdcall GdipCreatePath2I(ptr ptr long long ptr) @ stdcall GdipCreatePath(long ptr) @ stdcall GdipCreatePathGradient(ptr long long ptr) @ stdcall GdipCreatePathGradientFromPath(ptr ptr) @@ -249,7 +249,7 @@ @ stub GdipGetClipBoundsI @ stdcall GdipGetCompositingMode(ptr ptr) @ stdcall GdipGetCompositingQuality(ptr ptr) -@ stub GdipGetCustomLineCapBaseCap +@ stdcall GdipGetCustomLineCapBaseCap(ptr ptr) @ stdcall GdipGetCustomLineCapBaseInset(ptr ptr) @ stub GdipGetCustomLineCapStrokeCaps @ stub GdipGetCustomLineCapStrokeJoin @@ -619,7 +619,7 @@ @ stub GdipTranslateRegionI @ stub GdipTranslateTextureTransform @ stdcall GdipTranslateWorldTransform(ptr long long long) -@ stub GdipVectorTransformMatrixPoints +@ stdcall GdipVectorTransformMatrixPoints(ptr ptr long) @ stub GdipVectorTransformMatrixPointsI @ stub GdipWarpPath @ stub GdipWidenPath diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index adeaa891872..0375f8e7464 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -97,6 +97,12 @@ GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, return Ok; } +GpStatus WINGDIPAPI GdipAddPathArcI(GpPath *path, INT x1, INT y1, INT x2, + INT y2, REAL startAngle, REAL sweepAngle) +{ + return GdipAddPathArc(path,(REAL)x1,(REAL)y1,(REAL)x2,(REAL)y2,startAngle,sweepAngle); +} + GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, INT y2, INT x3, INT y3, INT x4, INT y4) { @@ -217,6 +223,30 @@ GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, return Ok; } +GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath *path, GDIPCONST GpPoint *points, INT count) +{ + GpPointF *pointsF; + INT i; + GpStatus stat; + + if(count <= 0) + return InvalidParameter; + + pointsF = GdipAlloc(sizeof(GpPointF) * count); + if(!pointsF) return OutOfMemory; + + for(i = 0;i < count; i++){ + pointsF[i].X = (REAL)points[i].X; + pointsF[i].Y = (REAL)points[i].Y; + } + + stat = GdipAddPathLine2(path, pointsF, count); + + GdipFree(pointsF); + + return stat; +} + GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2) { INT old_count; @@ -373,6 +403,27 @@ GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF* points, return Ok; } +GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint* points, + GDIPCONST BYTE* types, INT count, GpFillMode fill, GpPath **path) +{ + GpPointF *ptF; + GpStatus ret; + INT i; + + ptF = GdipAlloc(sizeof(GpPointF)*count); + + for(i = 0;i < count; i++){ + ptF[i].X = (REAL)points[i].X; + ptF[i].Y = (REAL)points[i].Y; + } + + ret = GdipCreatePath2(ptF, types, count, fill, path); + + GdipFree(ptF); + + return ret; +} + GpStatus WINGDIPAPI GdipDeletePath(GpPath *path) { if(!path) diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index 2ee445829b0..a40f690e84d 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -89,6 +89,23 @@ GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *rect, return Ok; } +GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect *rect, GDIPCONST GpPoint *pt, + GpMatrix **matrix) +{ + GpRectF rectF; + GpPointF ptF; + + rectF.X = (REAL)rect->X; + rectF.Y = (REAL)rect->Y; + rectF.Width = (REAL)rect->Width; + rectF.Height = (REAL)rect->Height; + + ptF.X = (REAL)pt->X; + ptF.Y = (REAL)pt->Y; + + return GdipCreateMatrix3(&rectF, &ptF, matrix); +} + GpStatus WINGDIPAPI GdipCloneMatrix(GpMatrix *matrix, GpMatrix **clone) { if(!matrix || !clone) @@ -264,3 +281,23 @@ GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX, return Ok; } + +GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count) +{ + REAL x, y; + INT i; + + if(!matrix || !pts) + return InvalidParameter; + + for(i = 0; i < count; i++) + { + x = pts[i].X; + y = pts[i].Y; + + pts[i].X = x * matrix->matrix[0] + y * matrix->matrix[2]; + pts[i].Y = x * matrix->matrix[1] + y * matrix->matrix[3]; + } + + return Ok; +} diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index 7de1c2cbf9e..bd5d6ad0920 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -152,3 +152,18 @@ GpStatus WINGDIPAPI GdipSetStringFormatFlags(GDIPCONST GpStringFormat *format, I return Ok; } + +GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat *format, GpStringFormat **newFormat) +{ + if(!format || !newFormat) + return InvalidParameter; + + *newFormat = GdipAlloc(sizeof(GpStringFormat)); + if(!*newFormat) return OutOfMemory; + + **newFormat = *format; + + TRACE("%p %p\n",format,newFormat); + + return Ok; +} diff --git a/dlls/gphoto2.ds/gphoto2_Ru.rc b/dlls/gphoto2.ds/gphoto2_Ru.rc new file mode 100644 index 00000000000..9ac3c119651 --- /dev/null +++ b/dlls/gphoto2.ds/gphoto2_Ru.rc @@ -0,0 +1,52 @@ +/* + * Russian resources for Twain + * + * Copyright 2008 Vitaliy Margolen + * + * 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 + */ + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +IDD_CAMERAUI DIALOG DISCARDABLE 0, 0, 372, 273 +STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Ôàéëû â êàìåðå" +MENU 20545 +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "Ñïèñîê1",IDC_LIST1,"SysListView32", LVS_ICON | WS_BORDER | WS_TABSTOP,7,7,358,229 + DEFPUSHBUTTON "Çàãðóçèòü âûáðàííûå",IDC_IMPORT,152,252,72,14 + PUSHBUTTON "Ïðîñìîòð",IDC_FETCH,7,252,64,14 + PUSHBUTTON "Çàãðóçèòü âñå",IDC_IMPORTALL,80,252,64,14 + CONTROL "Áîëüøå íå ñïðàøèâàòü",IDC_SKIP,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,230,252,76,14 + PUSHBUTTON "Âûõîä",IDC_EXIT,315,252,50,14 +END + +IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 46 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTER | DS_SETFOREGROUND +CAPTION "Çàãðóçêà" +FONT 8, "MS Sans Serif" +BEGIN + LTEXT "Çàãðóçêà.... Æäèòå",IDC_STATIC,5,19,176,8, SS_CENTER +END + +IDD_CONNECTING DIALOG DISCARDABLE 0, 0, 280, 116 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU| WS_VISIBLE | DS_CENTER +CAPTION "Ïîäêëþ÷åíèå ê êàìåðå" +FONT 8, "MS Sans Serif" +BEGIN + CONTROL "",IDC_BITMAP,"Static",SS_BITMAP|SS_CENTERIMAGE,4,4,110,110 + LTEXT "Ïîäêëþ÷åíèå ê êàìåðå... Æäèòå",IDC_STATIC,128,58,116,8 +END diff --git a/dlls/gphoto2.ds/rsrc.rc b/dlls/gphoto2.ds/rsrc.rc index 9df3c2875af..5359e66ed00 100644 --- a/dlls/gphoto2.ds/rsrc.rc +++ b/dlls/gphoto2.ds/rsrc.rc @@ -34,5 +34,6 @@ #include "gphoto2_Nl.rc" #include "gphoto2_No.rc" #include "gphoto2_Pl.rc" +#include "gphoto2_Ru.rc" #include "gphoto2_Si.rc" #include "gphoto2_Sv.rc" diff --git a/dlls/gphoto2.ds/ui.c b/dlls/gphoto2.ds/ui.c index 6e8ecc011aa..d36d7dec01b 100644 --- a/dlls/gphoto2.ds/ui.c +++ b/dlls/gphoto2.ds/ui.c @@ -114,7 +114,6 @@ static void PopulateListView(HWND List) static void PopulateImageList(HIMAGELIST *iList, HWND list) { struct gphoto2_file *file; - INT rc; HWND progress_dialog; progress_dialog = @@ -143,8 +142,8 @@ static void PopulateImageList(HIMAGELIST *iList, HWND list) SendMessageW(list, LVM_SETICONSPACING, 0, MAKELONG(bmpInfo.bmWidth+6, bmpInfo.bmHeight+15) ); } - - rc = ImageList_Add(*iList, bitmap, 0); + + ImageList_Add(*iList, bitmap, 0); DeleteObject(static_bitmap); static_bitmap = bitmap; diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index ece05f06202..699fa04727f 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -229,7 +229,7 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) info->WinType.cbStruct=sizeof(info->WinType); info->WinType.fUniCodeStrings=TRUE; info->WinType.pszType=strdupW(defaultwinW); - info->WinType.pszToc = strdupW(info->pCHMInfo->defToc); + info->WinType.pszToc = strdupW(info->pCHMInfo->defToc ? info->pCHMInfo->defToc : null); info->WinType.pszIndex = strdupW(null); info->WinType.fsValidMembers=0; info->WinType.fsWinProperties=HHWIN_PROP_TRI_PANE; @@ -363,14 +363,13 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file) CHMInfo *OpenCHM(LPCWSTR szFile) { WCHAR file[MAX_PATH] = {0}; - DWORD res; HRESULT hres; static const WCHAR wszSTRINGS[] = {'#','S','T','R','I','N','G','S',0}; CHMInfo *ret = heap_alloc_zero(sizeof(CHMInfo)); - res = GetFullPathNameW(szFile, sizeof(file)/sizeof(file[0]), file, NULL); + GetFullPathNameW(szFile, sizeof(file)/sizeof(file[0]), file, NULL); ret->szFile = strdupW(file); hres = CoCreateInstance(&CLSID_ITStorage, NULL, CLSCTX_INPROC_SERVER, @@ -391,7 +390,7 @@ CHMInfo *OpenCHM(LPCWSTR szFile) &ret->strings_stream); if(FAILED(hres)) { WARN("Could not open #STRINGS stream: %08x\n", hres); - return CloseCHM(ret); + /* It's not critical, so we pass */ } if(!ReadChmSystem(ret)) { diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index 900cfd9c197..a2081cef94f 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -89,9 +89,15 @@ BOOL NavigateToUrl(HHInfo *info, LPCWSTR surl) BOOL ret; HRESULT hres; - hres = navigate_url(info, surl); - if(SUCCEEDED(hres)) - return TRUE; + static const WCHAR url_indicator[] = {':', '/', '/'}; + + TRACE("%s\n", debugstr_w(surl)); + + if (strstrW(surl, url_indicator)) { + hres = navigate_url(info, surl); + if(SUCCEEDED(hres)) + return TRUE; + } /* look up in chm if it doesn't look like a full url */ SetChmPath(&chm_path, info->pCHMInfo->szFile, surl); ret = NavigateToChm(info, chm_path.chm_file, chm_path.chm_index); diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 472b7cfc310..c0054de0ede 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -132,8 +132,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat if(!res) ReleaseHelpViewer(info); } - - return NULL; /* FIXME */ + return info->WinType.hwndHelp; } case HH_HELP_CONTEXT: { HHInfo *info; @@ -149,8 +148,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat NavigateToUrl(info, url); heap_free(url); - - return NULL; /* FIXME */ + return info->WinType.hwndHelp; } case HH_PRETRANSLATEMESSAGE: { static BOOL warned = FALSE; diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 000052c1fdc..c267a70cf9d 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -78,6 +78,7 @@ typedef struct tagInputContextData ImmHkl *immKbd; HWND imeWnd; + UINT lastVK; } InputContextData; typedef struct _tagTRANSMSG { @@ -91,7 +92,6 @@ typedef struct _tagIMMThreadData { HWND hwndDefault; } IMMThreadData; -static HANDLE hImeInst; static DWORD tlsIndex = 0; static struct list ImmHklList = LIST_INIT(ImmHklList); @@ -293,7 +293,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved) switch (fdwReason) { case DLL_PROCESS_ATTACH: - hImeInst = hInstDLL; IMM_RegisterMessages(); tlsIndex = TlsAlloc(); IMM_InitThreadData(); @@ -383,6 +382,13 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC) else SetPropW(hWnd,szwWineIMCProperty,(HANDLE)hIMC); } + + if (old) + { + InputContextData *old_data = (InputContextData*)old; + if (old_data->IMC.hWnd == hWnd) + old_data->IMC.hWnd = NULL; + } } if (!hIMC) @@ -489,6 +495,8 @@ BOOL WINAPI ImmConfigureIMEW( HIMC WINAPI ImmCreateContext(void) { InputContextData *new_context; + LPGUIDELINE gl; + LPCANDIDATEINFO ci; new_context = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(InputContextData)); @@ -502,9 +510,19 @@ HIMC WINAPI ImmCreateContext(void) return 0; } - /* hCompStr is never NULL */ + /* the HIMCCs are never NULL */ new_context->IMC.hCompStr = ImmCreateBlankCompStr(); - new_context->IMC.hMsgBuf = ImmCreateIMCC(1); + new_context->IMC.hMsgBuf = ImmCreateIMCC(0); + new_context->IMC.hCandInfo = ImmCreateIMCC(sizeof(CANDIDATEINFO)); + ci = ImmLockIMCC(new_context->IMC.hCandInfo); + memset(ci,0,sizeof(CANDIDATEINFO)); + ci->dwSize = sizeof(CANDIDATEINFO); + ImmUnlockIMCC(new_context->IMC.hCandInfo); + new_context->IMC.hGuideLine = ImmCreateIMCC(sizeof(GUIDELINE)); + gl = ImmLockIMCC(new_context->IMC.hGuideLine); + memset(gl,0,sizeof(GUIDELINE)); + gl->dwSize = sizeof(GUIDELINE); + ImmUnlockIMCC(new_context->IMC.hGuideLine); /* Initialize the IME Private */ new_context->IMC.hPrivate = ImmCreateIMCC(new_context->immKbd->imeInfo.dwPrivateDataSize); @@ -1741,16 +1759,27 @@ BOOL WINAPI ImmSetCompositionWindow( BOOL WINAPI ImmSetConversionStatus( HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence) { - static int shown = 0; + InputContextData *data = (InputContextData*)hIMC; - if (!shown) { - FIXME("(%p, %d, %d): stub\n", - hIMC, fdwConversion, fdwSentence - ); - shown = 1; - } - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + TRACE("%p %d %d\n", hIMC, fdwConversion, fdwSentence); + + if (!data) + return FALSE; + + if ( fdwConversion != data->IMC.fdwConversion ) + { + data->IMC.fdwConversion = fdwConversion; + ImmNotifyIME(hIMC, NI_CONTEXTUPDATED, 0, IMC_SETCONVERSIONMODE); + ImmInternalSendIMENotify(data, IMN_SETCONVERSIONMODE, 0); + } + if ( fdwSentence != data->IMC.fdwSentence ) + { + data->IMC.fdwSentence = fdwSentence; + ImmNotifyIME(hIMC, NI_CONTEXTUPDATED, 0, IMC_SETSENTENCEMODE); + ImmInternalSendIMENotify(data, IMN_SETSENTENCEMODE, 0); + } + + return TRUE; } /*********************************************************************** @@ -1769,8 +1798,8 @@ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen) { /* create the ime window */ data->imeWnd = CreateWindowExW( WS_EX_TOOLWINDOW, - data->immKbd->imeClassName, - NULL, WS_POPUP, 0, 0, 1, 1, 0, 0, hImeInst, 0); + data->immKbd->imeClassName, NULL, WS_POPUP, 0, 0, 1, 1, 0, + 0, data->immKbd->hIME, 0); SetWindowLongW(data->imeWnd, IMMGWL_IMC, (LONG)data); IMM_GetThreadData()->hwndDefault = data->imeWnd; } @@ -2128,3 +2157,97 @@ BOOL WINAPI ImmGenerateMessage(HIMC hIMC) return TRUE; } + +/*********************************************************************** +* ImmTranslateMessage(IMM32.@) +* ( Undocumented, call internally and from user32.dll ) +*/ +BOOL WINAPI ImmTranslateMessage(HWND hwnd, UINT msg, WCHAR chr, LPARAM lKeyData) +{ + InputContextData *data; + HIMC imc = ImmGetContext(hwnd); + BYTE state[256]; + UINT scancode; + LPVOID list = 0; + UINT msg_count; + UINT uVirtKey; + static const int list_count = 10; + + TRACE("%p %x '%c' %x\n",hwnd, msg, chr, (UINT)lKeyData); + + if (imc) + data = (InputContextData*)imc; + else + return FALSE; + + if (!data->immKbd->hIME || !data->immKbd->pImeToAsciiEx) + return FALSE; + + GetKeyboardState(state); + scancode = lKeyData >> 0x10 & 0xff; + + list = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list_count * sizeof(TRANSMSG) + sizeof(DWORD)); + ((DWORD*)list)[0] = list_count; + + if (data->immKbd->imeInfo.fdwProperty & IME_PROP_KBD_CHAR_FIRST) + { + if (!is_himc_ime_unicode(data)) + ToAscii(data->lastVK, scancode, state, &chr, 0); + uVirtKey = MAKELONG(data->lastVK,chr); + } + else + uVirtKey = data->lastVK; + + msg_count = data->immKbd->pImeToAsciiEx(uVirtKey, scancode, state, list, 0, imc); + TRACE("%i messages generated\n",msg_count); + if (msg_count && msg_count <= list_count) + { + int i; + LPTRANSMSG msgs = (LPTRANSMSG)((LPBYTE)list + sizeof(DWORD)); + + for (i = 0; i < msg_count; i++) + ImmInternalPostIMEMessage(data, msgs[i].message, msgs[i].wParam, msgs[i].lParam); + } + else if (msg_count > list_count) + ImmGenerateMessage(imc); + + HeapFree(GetProcessHeap(),0,list); + + return (msg_count > 0); +} + +/*********************************************************************** +* ImmProcessKey(IMM32.@) +* ( Undocumented, called from user32.dll ) +*/ +BOOL WINAPI ImmProcessKey(HWND hwnd, HKL hKL, UINT vKey, LPARAM lKeyData, DWORD unknown) +{ + InputContextData *data; + HIMC imc = ImmGetContext(hwnd); + BYTE state[256]; + + TRACE("%p %p %x %x %x\n",hwnd, hKL, vKey, (UINT)lKeyData, unknown); + + if (imc) + data = (InputContextData*)imc; + else + return FALSE; + + if (!data->immKbd->hIME || !data->immKbd->pImeProcessKey) + return FALSE; + + GetKeyboardState(state); + data->lastVK = vKey; + + if (data->immKbd->pImeProcessKey(imc, vKey, lKeyData, state)) + { + WCHAR key; + UINT scancode; + + scancode = lKeyData >> 0x10 & 0xff; + ToUnicodeEx(vKey, scancode, state, &key, 1, 0, hKL); + return ImmTranslateMessage(hwnd, WM_KEYDOWN, key, lKeyData ); + } + + return FALSE; +} diff --git a/dlls/imm32/imm32.spec b/dlls/imm32/imm32.spec index 0ecd1f93fa8..4e0b0232cdb 100644 --- a/dlls/imm32/imm32.spec +++ b/dlls/imm32/imm32.spec @@ -72,7 +72,7 @@ @ stub ImmLockImeDpi @ stdcall ImmNotifyIME(long long long long) @ stub ImmPenAuxInput -@ stub ImmProcessKey +@ stdcall ImmProcessKey(long long long long long) @ stub ImmPutImeMenuItemsIntoMappedFile @ stdcall ImmReSizeIMCC(long long) @ stub ImmRegisterClient @@ -99,7 +99,7 @@ @ stub ImmShowSoftKeyboard @ stdcall ImmSimulateHotKey(long long) @ stub ImmSystemHandler -@ stub ImmTranslateMessage +@ stdcall ImmTranslateMessage(long long long long) @ stub ImmUnlockClientImc @ stdcall ImmUnlockIMC(long) @ stdcall ImmUnlockIMCC(long) diff --git a/dlls/jscript/tests/jscript.c b/dlls/jscript/tests/jscript.c index 2fec01ca467..a54aa4863ba 100644 --- a/dlls/jscript/tests/jscript.c +++ b/dlls/jscript/tests/jscript.c @@ -68,7 +68,7 @@ static void test_safety(IUnknown *unk) INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER |INTERFACESAFE_FOR_UNTRUSTED_CALLER, INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER); - ok(hres == E_FAIL, "SetInterfaceSafetyOptions failed: %08x\n, expected E_FAIL", hres); + ok(hres == E_FAIL, "SetInterfaceSafetyOptions failed: %08x, expected E_FAIL\n", hres); hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER, diff --git a/dlls/kernel32/dosmem.c b/dlls/kernel32/dosmem.c index a976cba99ce..f3aad4c938b 100644 --- a/dlls/kernel32/dosmem.c +++ b/dlls/kernel32/dosmem.c @@ -142,9 +142,8 @@ static LONG WINAPI dosmem_handler(EXCEPTION_POINTERS* except) { if (except->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) { - DWORD addr = except->ExceptionRecord->ExceptionInformation[1]; - if (addr >= (ULONG_PTR)DOSMEM_dosmem + DOSMEM_protect && - addr < (ULONG_PTR)DOSMEM_dosmem + DOSMEM_SIZE) + char *addr = (char *)except->ExceptionRecord->ExceptionInformation[1]; + if (addr >= DOSMEM_dosmem + DOSMEM_protect && addr < DOSMEM_dosmem + DOSMEM_SIZE) { if (load_winedos()) return EXCEPTION_CONTINUE_EXECUTION; } @@ -159,42 +158,58 @@ static LONG WINAPI dosmem_handler(EXCEPTION_POINTERS* except) */ static char* setup_dos_mem(void) { - int sys_offset = 0; + size_t size; int page_size = getpagesize(); void *addr = NULL; + void * const low_64k = (void *)DOSMEM_64KB; - if (wine_mmap_is_in_reserved_area( NULL, DOSMEM_SIZE ) != 1) + /* check without the first 64K */ + + if (wine_mmap_is_in_reserved_area( low_64k, DOSMEM_SIZE - DOSMEM_64KB ) != 1) { - addr = wine_anon_mmap( (void *)page_size, DOSMEM_SIZE-page_size, - PROT_READ | PROT_WRITE, 0 ); - if (addr == (void *)page_size) addr = NULL; /* we got what we wanted */ - else munmap( addr, DOSMEM_SIZE - page_size ); + addr = wine_anon_mmap( low_64k, DOSMEM_SIZE - DOSMEM_64KB, PROT_READ | PROT_WRITE, 0 ); + if (addr != low_64k) + { + if (addr != MAP_FAILED) munmap( addr, DOSMEM_SIZE - DOSMEM_64KB ); + ERR("Cannot use first megabyte for DOS address space, please report\n" ); + /* allocate the DOS area somewhere else */ + if (!(DOSMEM_dosmem = VirtualAlloc( NULL, DOSMEM_SIZE, MEM_RESERVE, PAGE_NOACCESS ))) + { + ERR( "Cannot allocate DOS memory\n" ); + ExitProcess(1); + } + return DOSMEM_dosmem; + } } - if (!addr) - { - /* now reserve from address 0 */ - wine_anon_mmap( NULL, DOSMEM_SIZE, PROT_NONE, MAP_FIXED ); + /* now try to allocate the low 64K too */ - /* inform the memory manager that there is a mapping here, but don't commit yet */ - VirtualAlloc( NULL, DOSMEM_SIZE, MEM_RESERVE | MEM_SYSTEM, PAGE_NOACCESS ); - sys_offset = 0xf0000; - DOSMEM_protect = DOSMEM_64KB; - } - else + if (wine_mmap_is_in_reserved_area( NULL, DOSMEM_64KB ) != 1) { - ERR("Cannot use first megabyte for DOS address space, please report\n" ); - /* allocate the DOS area somewhere else */ - addr = VirtualAlloc( NULL, DOSMEM_SIZE, MEM_RESERVE, PAGE_NOACCESS ); - if (!addr) + addr = wine_anon_mmap( (void *)page_size, DOSMEM_64KB - page_size, PROT_READ | PROT_WRITE, 0 ); + if (addr == (void *)page_size) { - ERR( "Cannot allocate DOS memory\n" ); - ExitProcess(1); + addr = NULL; + TRACE( "successfully mapped low 64K range\n" ); + } + else + { + if (addr != MAP_FAILED) munmap( addr, DOSMEM_64KB - page_size ); + addr = low_64k; + TRACE( "failed to map low 64K range\n" ); } } - DOSMEM_dosmem = addr; - RtlAddVectoredExceptionHandler(FALSE, dosmem_handler); - return (char*)addr + sys_offset; + else addr = NULL; + + /* now reserve the whole range */ + size = (char *)DOSMEM_SIZE - (char *)addr; + wine_anon_mmap( addr, size, PROT_NONE, MAP_FIXED ); + + /* inform the memory manager that there is a mapping here, but don't commit yet */ + VirtualAlloc( addr, size, MEM_RESERVE | MEM_SYSTEM, PAGE_NOACCESS ); + DOSMEM_protect = DOSMEM_64KB; + DOSMEM_dosmem = NULL; + return (char *)0xf0000; /* store sysmem in high addresses for now */ } @@ -208,6 +223,7 @@ BOOL DOSMEM_Init(void) { char* sysmem = setup_dos_mem(); + RtlAddVectoredExceptionHandler(FALSE, dosmem_handler); DOSMEM_0000H = GLOBAL_CreateBlock( GMEM_FIXED, sysmem, DOSMEM_64KB, 0, WINE_LDT_FLAGS_DATA ); DOSMEM_BiosDataSeg = GLOBAL_CreateBlock( GMEM_FIXED, sysmem + 0x400, diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 8d040bdf111..fe523d6825b 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -715,12 +715,12 @@ static void init_windows_dirs(void) DIR_System = buffer; } - if (GetFileAttributesW( DIR_Windows ) == INVALID_FILE_ATTRIBUTES) - MESSAGE( "Warning: the specified Windows directory %s is not accessible.\n", - debugstr_w(DIR_Windows) ); - if (GetFileAttributesW( DIR_System ) == INVALID_FILE_ATTRIBUTES) - MESSAGE( "Warning: the specified System directory %s is not accessible.\n", - debugstr_w(DIR_System) ); + if (!CreateDirectoryW( DIR_Windows, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) + ERR( "directory %s could not be created, error %u\n", + debugstr_w(DIR_Windows), GetLastError() ); + if (!CreateDirectoryW( DIR_System, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) + ERR( "directory %s could not be created, error %u\n", + debugstr_w(DIR_System), GetLastError() ); TRACE_(file)( "WindowsDir = %s\n", debugstr_w(DIR_Windows) ); TRACE_(file)( "SystemDir = %s\n", debugstr_w(DIR_System) ); diff --git a/dlls/kernel32/tests/environ.c b/dlls/kernel32/tests/environ.c index 958da24dd3f..e6dd1fca5d3 100644 --- a/dlls/kernel32/tests/environ.c +++ b/dlls/kernel32/tests/environ.c @@ -25,6 +25,17 @@ #include "winbase.h" #include "winerror.h" +static BOOL (WINAPI *pGetComputerNameExA)(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD); +static BOOL (WINAPI *pGetComputerNameExW)(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD); + +static void init_functionpointers(void) +{ + HMODULE hkernel32 = GetModuleHandleA("kernel32.dll"); + + pGetComputerNameExA = (void *)GetProcAddress(hkernel32, "GetComputerNameExA"); + pGetComputerNameExW = (void *)GetProcAddress(hkernel32, "GetComputerNameExW"); +} + static void test_GetSetEnvironmentVariableA(void) { char buf[256]; @@ -231,12 +242,11 @@ static void test_ExpandEnvironmentStringsA(void) /* Try to get the required buffer size 'the natural way' */ strcpy(buf, "%EnvVar%"); ret_size = ExpandEnvironmentStringsA(buf, NULL, 0); - /* v5.1.2600.2945 (XP SP2) returns len + 2 here! */ - ok(ret_size == strlen(value)+1 || ret_size == strlen(value)+2 || ret_size == 0 /* Win95 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", - ret_size, lstrlenA(value)+1); - if (ret_size == strlen(value)+2) - trace("ExpandEnvironmentStrings is buggy: it returned len + 2\n"); + ok(ret_size == strlen(value)+1 || /* win98 */ + ret_size == strlen(value)+2 || /* win2k, XP, win2k3 */ + ret_size == 0 /* Win95 */, + "ExpandEnvironmentStrings returned %d instead of %d, %d or %d\n", + ret_size, lstrlenA(value)+1, lstrlenA(value)+2, 0); /* Again, side-stepping the Win95 bug */ ret_size = ExpandEnvironmentStringsA(buf, buf1, 0); @@ -291,9 +301,6 @@ static void test_ExpandEnvironmentStringsA(void) SetEnvironmentVariableA("EnvVar", NULL); } -static BOOL (WINAPI *pGetComputerNameExA)(COMPUTER_NAME_FORMAT,LPSTR,LPDWORD); -static BOOL (WINAPI *pGetComputerNameExW)(COMPUTER_NAME_FORMAT,LPWSTR,LPDWORD); - static void test_GetComputerName(void) { DWORD size; @@ -347,19 +354,31 @@ static void test_GetComputerName(void) ok(ret, "GetComputerNameW failed with error %d\n", GetLastError()); HeapFree(GetProcessHeap(), 0, nameW); } +} + +static void test_GetComputerNameExA(void) +{ + DWORD size; + BOOL ret; + LPSTR name; + DWORD error; + + static const int MAX_COMP_NAME = 32767; - pGetComputerNameExA = (void *)GetProcAddress(GetModuleHandle("kernel32.dll"), "GetComputerNameExA"); if (!pGetComputerNameExA) { - skip("GetComputerNameExA function not implemented, so not testing\n"); + skip("GetComputerNameExA function not implemented\n"); return; } size = 0; ret = pGetComputerNameExA(ComputerNameDnsDomain, (LPSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExA should have failed with ERROR_MORE_DATA instead of %d\n", error); - trace("domain size is %d\n", size); + ok(ret == 0, "Expected 0, got %d\n", ret); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + + /* size is not set in win2k */ + size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsDomain, name, &size); @@ -370,8 +389,11 @@ static void test_GetComputerName(void) size = 0; ret = pGetComputerNameExA(ComputerNameDnsFullyQualified, (LPSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExA should have failed with ERROR_MORE_DATA instead of %d\n", error); - trace("fully qualified hostname size is %d\n", size); + ok(ret == 0, "Expected 0, got %d\n", ret); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + + /* size is not set in win2k */ + size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsFullyQualified, name, &size); @@ -382,8 +404,11 @@ static void test_GetComputerName(void) size = 0; ret = pGetComputerNameExA(ComputerNameDnsHostname, (LPSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExA should have failed with ERROR_MORE_DATA instead of %d\n", error); - trace("hostname size is %d\n", size); + ok(ret == 0, "Expected 0, got %d\n", ret); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + + /* size is not set in win2k */ + size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsHostname, name, &size); @@ -394,19 +419,29 @@ static void test_GetComputerName(void) size = 0; ret = pGetComputerNameExA(ComputerNameNetBIOS, (LPSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExA should have failed with ERROR_MORE_DATA instead of %d\n", error); - trace("NetBIOS size is %d\n", size); + ok(ret == 0, "Expected 0, got %d\n", ret); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + + /* size is not set in win2k */ + size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameNetBIOS, name, &size); ok(ret, "GetComputerNameExA(ComputerNameNetBIOS) failed with error %d\n", GetLastError()); trace("NetBIOS name is \"%s\"\n", name); HeapFree(GetProcessHeap(), 0, name); +} + +static void test_GetComputerNameExW(void) +{ + DWORD size; + BOOL ret; + LPWSTR nameW; + DWORD error; - pGetComputerNameExW = (void *)GetProcAddress(GetModuleHandle("kernel32.dll"), "GetComputerNameExW"); if (!pGetComputerNameExW) { - skip("GetComputerNameExW function not implemented, so not testing\n"); + skip("GetComputerNameExW function not implemented\n"); return; } @@ -453,8 +488,12 @@ static void test_GetComputerName(void) START_TEST(environ) { + init_functionpointers(); + test_GetSetEnvironmentVariableA(); test_GetSetEnvironmentVariableW(); test_ExpandEnvironmentStringsA(); test_GetComputerName(); + test_GetComputerNameExA(); + test_GetComputerNameExW(); } diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 47f50b15a01..60e6f114a8c 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -1002,7 +1002,9 @@ static void test_CompareStringA(void) ok(ret == 2, "a vs a expected 2, got %d\n", ret); ret = CompareStringA(lcid, 0, "a\0b", 4, "a", 2); - ok(ret == 3, "a\\0b vs a expected 3, got %d\n", ret); + ok(ret == CSTR_EQUAL || /* win2k */ + ret == CSTR_GREATER_THAN, + "a\\0b vs a expected CSTR_EQUAL or CSTR_GREATER_THAN, got %d\n", ret); ret = CompareStringA(lcid, 0, "\2", 2, "\1", 2); todo_wine ok(ret != 2, "\\2 vs \\1 expected unequal\n"); diff --git a/dlls/kernel32/tests/volume.c b/dlls/kernel32/tests/volume.c index f238146a0fb..9a21db1badc 100644 --- a/dlls/kernel32/tests/volume.c +++ b/dlls/kernel32/tests/volume.c @@ -49,7 +49,7 @@ static void test_query_dos_deviceA(void) static void test_FindFirstVolume(void) { - char volume[50]; + char volume[51]; HANDLE handle; if (!pFindFirstVolumeA) { @@ -65,7 +65,7 @@ static void test_FindFirstVolume(void) handle = pFindFirstVolumeA( volume, 49 ); ok( handle == INVALID_HANDLE_VALUE, "succeeded with short buffer\n" ); ok( GetLastError() == ERROR_FILENAME_EXCED_RANGE, "wrong error %u\n", GetLastError() ); - handle = pFindFirstVolumeA( volume, 50 ); + handle = pFindFirstVolumeA( volume, 51 ); ok( handle != INVALID_HANDLE_VALUE, "failed err %u\n", GetLastError() ); if (handle != INVALID_HANDLE_VALUE) { diff --git a/dlls/mshtml/Makefile.in b/dlls/mshtml/Makefile.in index a19428a8e12..97ae6f133a5 100644 --- a/dlls/mshtml/Makefile.in +++ b/dlls/mshtml/Makefile.in @@ -10,6 +10,7 @@ EXTRADEFS = -DCOM_NO_WINDOWS_H C_SRCS = \ conpoint.c \ + dispex.c \ editor.c \ hlink.c \ htmlanchor.c \ diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c new file mode 100644 index 00000000000..6596f76bc0e --- /dev/null +++ b/dlls/mshtml/dispex.c @@ -0,0 +1,231 @@ +/* + * Copyright 2008 Jacek Caban for CodeWeavers + * + * 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 + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" + +#include "wine/debug.h" + +#include "mshtml_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(mshtml); + +static ITypeLib *typelib; +static ITypeInfo *typeinfos[LAST_tid]; + +static REFIID tid_ids[] = { + &IID_IHTMLWindow2, +}; + +HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo) +{ + HRESULT hres; + + if(!typelib) { + ITypeLib *tl; + + hres = LoadRegTypeLib(&LIBID_MSHTML, 4, 0, LOCALE_SYSTEM_DEFAULT, &tl); + if(FAILED(hres)) { + ERR("LoadRegTypeLib failed: %08x\n", hres); + return hres; + } + + if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) + ITypeLib_Release(tl); + } + + if(!typeinfos[tid]) { + ITypeInfo *typeinfo; + + hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &typeinfo); + if(FAILED(hres)) { + ERR("GetTypeInfoOfGuid failed: %08x\n", hres); + return hres; + } + + if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), typeinfo, NULL)) + ITypeInfo_Release(typeinfo); + } + + *typeinfo = typeinfos[tid]; + return S_OK; +} + +void release_typelib(void) +{ + unsigned i; + + if(!typelib) + return; + + for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) + if(typeinfos[i]) + ITypeInfo_Release(typeinfos[i]); + + ITypeLib_Release(typelib); +} + +#define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface) + +static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + + return IUnknown_QueryInterface(This->outer, riid, ppv); +} + +static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + + return IUnknown_AddRef(This->outer); +} + +static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + + return IUnknown_Release(This->outer); +} + +static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + + TRACE("(%p)->(%p)\n", This, pctinfo); + + *pctinfo = 1; + return S_OK; +} + +static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, + LCID lcid, DISPID *rgDispId) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, + VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%x)\n", This, id); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%x %p)\n", This, id, pbstrName); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%x %x %p)\n", This, grfdex, id, pid); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) +{ + DispatchEx *This = DISPATCHEX_THIS(iface); + FIXME("(%p)->(%p)\n", This, ppunk); + return E_NOTIMPL; +} + +#undef DISPATCHEX_THIS + +static IDispatchExVtbl DispatchExVtbl = { + DispatchEx_QueryInterface, + DispatchEx_AddRef, + DispatchEx_Release, + DispatchEx_GetTypeInfoCount, + DispatchEx_GetTypeInfo, + DispatchEx_GetIDsOfNames, + DispatchEx_Invoke, + DispatchEx_GetDispID, + DispatchEx_InvokeEx, + DispatchEx_DeleteMemberByName, + DispatchEx_DeleteMemberByDispID, + DispatchEx_GetMemberProperties, + DispatchEx_GetMemberName, + DispatchEx_GetNextDispID, + DispatchEx_GetNameSpaceParent +}; + +void init_dispex(DispatchEx *dispex, IUnknown *outer) +{ + dispex->lpIDispatchExVtbl = &DispatchExVtbl; + dispex->outer = outer; +} diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 92a7f9aab78..005c6290a70 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -289,7 +289,7 @@ static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCo return S_OK; } - *p = create_all_collection(get_node(This, (nsIDOMNode*)nselem)); + *p = create_all_collection(get_node(This, (nsIDOMNode*)nselem, TRUE)); nsIDOMElement_Release(nselem); return S_OK; @@ -331,7 +331,7 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement return S_OK; } - node = get_node(This, (nsIDOMNode*)nsbody); + node = get_node(This, (nsIDOMNode*)nsbody, TRUE); nsIDOMHTMLElement_Release(nsbody); IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p); diff --git a/dlls/mshtml/htmldoc3.c b/dlls/mshtml/htmldoc3.c index 43880008280..3b109e983c0 100644 --- a/dlls/mshtml/htmldoc3.c +++ b/dlls/mshtml/htmldoc3.c @@ -137,7 +137,7 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I ERR("GetDocumentElement failed: %08x\n", nsres); } if(nselem) { - node = get_node(This, (nsIDOMNode *)nselem); + node = get_node(This, (nsIDOMNode *)nselem, TRUE); nsIDOMDocument_Release(nsdoc); IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p); diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index b7fac23ea91..6dab3a1bf8f 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -1067,7 +1067,7 @@ static void create_child_list(HTMLDocument *doc, HTMLElement *elem, elem_vector nsres = nsIDOMNode_GetNodeType(iter, &node_type); if(NS_SUCCEEDED(nsres) && node_type == ELEMENT_NODE) - elem_vector_add(buf, HTMLELEM_NODE_THIS(get_node(doc, iter))); + elem_vector_add(buf, HTMLELEM_NODE_THIS(get_node(doc, iter, TRUE))); } } @@ -1111,7 +1111,7 @@ static void create_all_list(HTMLDocument *doc, HTMLDOMNode *elem, elem_vector *b nsres = nsIDOMNode_GetNodeType(iter, &node_type); if(NS_SUCCEEDED(nsres) && node_type == ELEMENT_NODE) { - HTMLDOMNode *node = get_node(doc, iter); + HTMLDOMNode *node = get_node(doc, iter, TRUE); elem_vector_add(buf, HTMLELEM_NODE_THIS(node)); create_all_list(doc, node, buf); diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index e098a83df1e..a5df57590f9 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -370,7 +370,7 @@ static HTMLDOMNode *create_node(HTMLDocument *doc, nsIDOMNode *nsnode) * (better) find a way to store HTMLDOMelement pointer in nsIDOMNode. */ -HTMLDOMNode *get_node(HTMLDocument *This, nsIDOMNode *nsnode) +HTMLDOMNode *get_node(HTMLDocument *This, nsIDOMNode *nsnode, BOOL create) { HTMLDOMNode *iter = This->nodes, *ret; @@ -380,7 +380,7 @@ HTMLDOMNode *get_node(HTMLDocument *This, nsIDOMNode *nsnode) iter = iter->next; } - if(iter) + if(iter || !create) return iter; ret = create_node(This, nsnode); diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c index 73af3b0cfbf..20a35ae6273 100644 --- a/dlls/mshtml/htmloption.c +++ b/dlls/mshtml/htmloption.c @@ -469,7 +469,7 @@ static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory return E_FAIL; } - hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(get_node(This->doc, (nsIDOMNode*)nselem)), + hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(get_node(This->doc, (nsIDOMNode*)nselem, TRUE)), &IID_IHTMLOptionElement, (void**)optelem); nsIDOMElement_Release(nselem); diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 0f57069cf3b..7ae121ab659 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -55,6 +55,9 @@ static HRESULT WINAPI HTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID rii }else if(IsEqualGUID(&IID_IHTMLWindow2, riid)) { TRACE("(%p)->(IID_IHTMLWindow2 %p)\n", This, ppv); *ppv = HTMLWINDOW2(This); + }else if(IsEqualGUID(&IID_IHTMLWindow3, riid)) { + TRACE("(%p)->(IID_IHTMLWindow2 %p)\n", This, ppv); + *ppv = HTMLWINDOW3(This); } if(*ppv) { @@ -762,6 +765,183 @@ static const IHTMLWindow2Vtbl HTMLWindow2Vtbl = { HTMLWindow2_get_external }; +#define HTMLWINDOW3_THIS(iface) DEFINE_THIS(HTMLWindow, HTMLWindow3, iface) + +static HRESULT WINAPI HTMLWindow3_QueryInterface(IHTMLWindow3 *iface, REFIID riid, void **ppv) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + + return IHTMLWindow2_QueryInterface(HTMLWINDOW2(This), riid, ppv); +} + +static ULONG WINAPI HTMLWindow3_AddRef(IHTMLWindow3 *iface) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + + return IHTMLWindow2_AddRef(HTMLWINDOW2(This)); +} + +static ULONG WINAPI HTMLWindow3_Release(IHTMLWindow3 *iface) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + + return IHTMLWindow2_Release(HTMLWINDOW2(This)); +} + +static HRESULT WINAPI HTMLWindow3_GetTypeInfoCount(IHTMLWindow3 *iface, UINT *pctinfo) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%p)\n", This, pctinfo); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_GetTypeInfo(IHTMLWindow3 *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_GetIDsOfNames(IHTMLWindow3 *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, + LCID lcid, DISPID *rgDispId) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_Invoke(IHTMLWindow3 *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_get_screenLeft(IHTMLWindow3 *iface, long *p) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_get_screenTop(IHTMLWindow3 *iface, long *p) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_attachEvent(IHTMLWindow3 *iface, BSTR event, IDispatch *pDisp, VARIANT_BOOL *pfResult) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%s %p %p)\n", This, debugstr_w(event), pDisp, pfResult); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_detachEvent(IHTMLWindow3 *iface, BSTR event, IDispatch *pDisp) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_setTimeout(IHTMLWindow3 *iface, VARIANT *expression, long msec, + VARIANT *language, long *timerID) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%p(%d) %ld %p %p)\n", This, expression, V_VT(expression), msec, language, timerID); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_setInterval(IHTMLWindow3 *iface, VARIANT *expression, long msec, + VARIANT *language, long *timerID) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%p %ld %p %p)\n", This, expression, msec, language, timerID); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_print(IHTMLWindow3 *iface) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_put_onbeforeprint(IHTMLWindow3 *iface, VARIANT v) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_get_onbeforeprint(IHTMLWindow3 *iface, VARIANT *p) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_put_onafterprint(IHTMLWindow3 *iface, VARIANT v) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->()\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_get_onafterprint(IHTMLWindow3 *iface, VARIANT *p) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_get_clipboardData(IHTMLWindow3 *iface, IHTMLDataTransfer **p) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLWindow3_showModelessDialog(IHTMLWindow3 *iface, BSTR url, + VARIANT *varArgIn, VARIANT *options, IHTMLWindow2 **pDialog) +{ + HTMLWindow *This = HTMLWINDOW3_THIS(iface); + FIXME("(%p)->(%s %p %p %p)\n", This, debugstr_w(url), varArgIn, options, pDialog); + return E_NOTIMPL; +} + +#undef HTMLWINDOW3_THIS + +static const IHTMLWindow3Vtbl HTMLWindow3Vtbl = { + HTMLWindow3_QueryInterface, + HTMLWindow3_AddRef, + HTMLWindow3_Release, + HTMLWindow3_GetTypeInfoCount, + HTMLWindow3_GetTypeInfo, + HTMLWindow3_GetIDsOfNames, + HTMLWindow3_Invoke, + HTMLWindow3_get_screenLeft, + HTMLWindow3_get_screenTop, + HTMLWindow3_attachEvent, + HTMLWindow3_detachEvent, + HTMLWindow3_setTimeout, + HTMLWindow3_setInterval, + HTMLWindow3_print, + HTMLWindow3_put_onbeforeprint, + HTMLWindow3_get_onbeforeprint, + HTMLWindow3_put_onafterprint, + HTMLWindow3_get_onafterprint, + HTMLWindow3_get_clipboardData, + HTMLWindow3_showModelessDialog +}; + static const char wineConfig_func[] = "window.__defineGetter__(\"external\",function() {\n" " return window.__wineWindow__.external;\n" @@ -869,6 +1049,7 @@ HTMLWindow *HTMLWindow_Create(HTMLDocument *doc) HTMLWindow *ret = heap_alloc(sizeof(HTMLWindow)); ret->lpHTMLWindow2Vtbl = &HTMLWindow2Vtbl; + ret->lpHTMLWindow3Vtbl = &HTMLWindow3Vtbl; ret->ref = 1; ret->nswindow = NULL; ret->doc = doc; diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index 0389833d0d7..1c52c5a07be 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -49,47 +49,6 @@ DWORD mshtml_tls = 0; static HINSTANCE shdoclc = NULL; -static ITypeLib *typelib; -static ITypeInfo *typeinfos[LAST_tid]; - -static REFIID tid_ids[] = { - &IID_IHTMLWindow2 -}; - -HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo) -{ - HRESULT hres; - - if(!typelib) { - ITypeLib *tl; - - hres = LoadRegTypeLib(&LIBID_MSHTML, 4, 0, LOCALE_SYSTEM_DEFAULT, &tl); - if(FAILED(hres)) { - ERR("LoadRegTypeLib failed: %08x\n", hres); - return hres; - } - - if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) - ITypeLib_Release(tl); - } - - if(!typeinfos[tid]) { - ITypeInfo *typeinfo; - - hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &typeinfo); - if(FAILED(hres)) { - ERR("GetTypeInfoOfGuid failed: %08x\n", hres); - return hres; - } - - if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), typeinfo, NULL)) - ITypeInfo_Release(typeinfo); - } - - *typeinfo = typeinfos[tid]; - return S_OK; -} - static void thread_detach(void) { thread_data_t *thread_data; @@ -107,16 +66,7 @@ static void thread_detach(void) static void process_detach(void) { close_gecko(); - - if(typelib) { - unsigned i; - - for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) - if(typeinfos[i]) - ITypeInfo_Release(typeinfos[i]); - - ITypeLib_Release(typelib); - } + release_typelib(); if(shdoclc) FreeLibrary(shdoclc); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 2976fa84b2c..ce75611682c 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -21,6 +21,7 @@ #include "mshtml.h" #include "mshtmhst.h" #include "hlink.h" +#include "dispex.h" #include "wine/list.h" #include "wine/unicode.h" @@ -56,8 +57,23 @@ typedef struct ConnectionPoint ConnectionPoint; typedef struct BSCallback BSCallback; typedef struct nsChannelBSC nsChannelBSC; +/* NOTE: make sure to keep in sync with dispex.c */ +typedef enum { + IHTMLWindow2_tid, + LAST_tid +} tid_t; + +typedef struct { + const IDispatchExVtbl *lpIDispatchExVtbl; + + IUnknown *outer; +} DispatchEx; + +void init_dispex(DispatchEx*,IUnknown*); + typedef struct { const IHTMLWindow2Vtbl *lpHTMLWindow2Vtbl; + const IHTMLWindow3Vtbl *lpHTMLWindow3Vtbl; LONG ref; @@ -281,6 +297,7 @@ typedef struct { } HTMLTextContainer; #define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl) +#define HTMLWINDOW3(x) ((IHTMLWindow3*) &(x)->lpHTMLWindow3Vtbl) #define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl) #define HTMLDOC3(x) ((IHTMLDocument3*) &(x)->lpHTMLDocument3Vtbl) @@ -334,6 +351,8 @@ typedef struct { #define HTMLOPTFACTORY(x) ((IHTMLOptionElementFactory*) &(x)->lpHTMLOptionElementFactoryVtbl) #define HTMLLOCATION(x) ((IHTMLLocation*) &(x)->lpHTMLLocationVtbl) +#define DISPATCHEX(x) ((IDispatchEx*) &(x)->lpIDispatchExVtbl) + #define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc))) #define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface) @@ -411,7 +430,7 @@ void set_document_bscallback(HTMLDocument*,nsChannelBSC*); void set_current_mon(HTMLDocument*,IMoniker*); HRESULT start_binding(HTMLDocument*,BSCallback*,IBindCtx*); -HRESULT bind_mon_to_buffer(HTMLDocument*,IMoniker*,void**); +HRESULT bind_mon_to_buffer(HTMLDocument*,IMoniker*,void**,DWORD*); nsChannelBSC *create_channelbsc(IMoniker*); HRESULT channelbsc_load_stream(nsChannelBSC*,IStream*); @@ -447,7 +466,7 @@ void HTMLDOMNode_destructor(HTMLDOMNode*); HRESULT HTMLElement_QI(HTMLDOMNode*,REFIID,void**); void HTMLElement_destructor(HTMLDOMNode*); -HTMLDOMNode *get_node(HTMLDocument*,nsIDOMNode*); +HTMLDOMNode *get_node(HTMLDocument*,nsIDOMNode*,BOOL); void release_nodes(HTMLDocument*); void release_script_hosts(HTMLDocument*); @@ -513,13 +532,8 @@ HWND get_thread_hwnd(void); void push_task(task_t*); void remove_doc_tasks(const HTMLDocument*); -/* typelibs */ -enum tid_t { - IHTMLWindow2_tid, - LAST_tid -}; - -HRESULT get_typeinfo(enum tid_t, ITypeInfo**); +HRESULT get_typeinfo(tid_t,ITypeInfo**); +void release_typelib(void); DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); DEFINE_GUID(CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B); diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 9ed1dea3a28..78ae19d88ab 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -807,7 +807,7 @@ static BufferBSC *create_bufferbsc(IMoniker *mon) return ret; } -HRESULT bind_mon_to_buffer(HTMLDocument *doc, IMoniker *mon, void **buf) +HRESULT bind_mon_to_buffer(HTMLDocument *doc, IMoniker *mon, void **buf, DWORD *size) { BufferBSC *bsc = create_bufferbsc(mon); HRESULT hres; @@ -820,6 +820,7 @@ HRESULT bind_mon_to_buffer(HTMLDocument *doc, IMoniker *mon, void **buf) if(SUCCEEDED(hres)) { *buf = bsc->buf; bsc->buf = NULL; + *size = bsc->bsc.readed; bsc->size = 0; } } diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index e46b8fa05ec..c172e0ddc44 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -1073,7 +1073,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList FIXME("aContextFlags=%08x\n", aContextFlags); }; - show_context_menu(This->doc, dwID, &pt, (IDispatch*)HTMLDOMNODE(get_node(This->doc, aNode))); + show_context_menu(This->doc, dwID, &pt, (IDispatch*)HTMLDOMNODE(get_node(This->doc, aNode, TRUE))); return NS_OK; } diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index d1bcdca7310..1a1e7e8bea4 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); typedef struct { + DispatchEx dispex; const IOmNavigatorVtbl *lpIOmNavigatorVtbl; LONG ref; @@ -53,6 +54,9 @@ static HRESULT WINAPI OmNavigator_QueryInterface(IOmNavigator *iface, REFIID rii }else if(IsEqualGUID(&IID_IDispatch, riid)) { TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); *ppv = OMNAVIGATOR(This); + }else if(IsEqualGUID(&IID_IDispatchEx, riid)) { + TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv); + *ppv = DISPATCHEX(&This->dispex); }else if(IsEqualGUID(&IID_IOmNavigator, riid)) { TRACE("(%p)->(IID_IOmNavigator %p)\n", This, ppv); *ppv = OMNAVIGATOR(This); @@ -305,5 +309,7 @@ IOmNavigator *OmNavigator_Create(void) ret->lpIOmNavigatorVtbl = &OmNavigatorVtbl; ret->ref = 1; + init_dispex(&ret->dispex, (IUnknown*)OMNAVIGATOR(ret)); + return OMNAVIGATOR(ret); } diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 15a939ca47d..41572961828 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -27,6 +27,7 @@ #include "winuser.h" #include "ole2.h" #include "activscp.h" +#include "activdbg.h" #include "objsafe.h" #include "wine/debug.h" @@ -44,11 +45,13 @@ typedef struct { const IActiveScriptSiteVtbl *lpIActiveScriptSiteVtbl; const IActiveScriptSiteInterruptPollVtbl *lpIActiveScriptSiteInterruptPollVtbl; const IActiveScriptSiteWindowVtbl *lpIActiveScriptSiteWindowVtbl; + const IActiveScriptSiteDebug32Vtbl *lpIActiveScriptSiteDebug32Vtbl; LONG ref; IActiveScript *script; IActiveScriptParse *parse; + IActiveScriptParseProcedure *parse_proc; SCRIPTSTATE script_state; @@ -61,6 +64,7 @@ typedef struct { #define ACTSCPSITE(x) ((IActiveScriptSite*) &(x)->lpIActiveScriptSiteVtbl) #define ACTSCPPOLL(x) ((IActiveScriptSiteInterruptPoll*) &(x)->lpIActiveScriptSiteInterruptPollVtbl) #define ACTSCPWIN(x) ((IActiveScriptSiteWindow*) &(x)->lpIActiveScriptSiteWindowVtbl) +#define ACTSCPDBG32(x) ((IActiveScriptSiteDebug32*) &(x)->lpIActiveScriptSiteDebug32Vtbl) static BOOL init_script_engine(ScriptHost *script_host) { @@ -144,7 +148,12 @@ static BOOL init_script_engine(ScriptHost *script_host) if(FAILED(hres)) WARN("AddNamedItem failed: %08x\n", hres); - /* FIXME: QI for IActiveScriptParseProcedure2 and IActiveScriptParseProcedure */ + hres = IActiveScript_QueryInterface(script_host->script, &IID_IActiveScriptParseProcedure2, + (void**)&script_host->parse_proc); + if(FAILED(hres)) { + /* FIXME: QI for IActiveScriptParseProcedure */ + WARN("Could not get IActiveScriptParseProcedure iface: %08x\n", hres); + } return TRUE; } @@ -164,6 +173,11 @@ static void release_script_engine(ScriptHost *This) IActiveScript_Close(This->script); default: + if(This->parse_proc) { + IActiveScriptParseProcedure_Release(This->parse_proc); + This->parse_proc = NULL; + } + if(This->parse) { IActiveScriptParse_Release(This->parse); This->parse = NULL; @@ -205,6 +219,9 @@ static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface, }else if(IsEqualGUID(&IID_IActiveScriptSiteWindow, riid)) { TRACE("(%p)->(IID_IActiveScriptSiteWindow %p)\n", This, ppv); *ppv = ACTSCPWIN(This); + }else if(IsEqualGUID(&IID_IActiveScriptSiteDebug32, riid)) { + TRACE("(%p)->(IID_IActiveScriptSiteDebug32 %p)\n", This, ppv); + *ppv = ACTSCPDBG32(This); }else { FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); return E_NOINTERFACE; @@ -426,6 +443,70 @@ static const IActiveScriptSiteWindowVtbl ActiveScriptSiteWindowVtbl = { ActiveScriptSiteWindow_EnableModeless }; +#define ACTSCPDBG32_THIS(iface) DEFINE_THIS(ScriptHost, IActiveScriptSiteDebug32, iface) + +static HRESULT WINAPI ActiveScriptSiteDebug32_QueryInterface(IActiveScriptSiteDebug32 *iface, + REFIID riid, void **ppv) +{ + ScriptHost *This = ACTSCPDBG32_THIS(iface); + return IActiveScriptSite_QueryInterface(ACTSCPSITE(This), riid, ppv); +} + +static ULONG WINAPI ActiveScriptSiteDebug32_AddRef(IActiveScriptSiteDebug32 *iface) +{ + ScriptHost *This = ACTSCPDBG32_THIS(iface); + return IActiveScriptSite_AddRef(ACTSCPSITE(This)); +} + +static ULONG WINAPI ActiveScriptSiteDebug32_Release(IActiveScriptSiteDebug32 *iface) +{ + ScriptHost *This = ACTSCPDBG32_THIS(iface); + return IActiveScriptSite_Release(ACTSCPSITE(This)); +} + +static HRESULT WINAPI ActiveScriptSiteDebug32_GetDocumentContextFromPosition(IActiveScriptSiteDebug32 *iface, + DWORD dwSourceContext, ULONG uCharacterOffset, ULONG uNumChars, IDebugDocumentContext **ppsc) +{ + ScriptHost *This = ACTSCPDBG32_THIS(iface); + FIXME("(%p)->(%x %u %u %p)\n", This, dwSourceContext, uCharacterOffset, uNumChars, ppsc); + return E_NOTIMPL; +} + +static HRESULT WINAPI ActiveScriptSiteDebug32_GetApplication(IActiveScriptSiteDebug32 *iface, IDebugApplication32 **ppda) +{ + ScriptHost *This = ACTSCPDBG32_THIS(iface); + FIXME("(%p)->(%p)\n", This, ppda); + return E_NOTIMPL; +} + +static HRESULT WINAPI ActiveScriptSiteDebug32_GetRootApplicationNode(IActiveScriptSiteDebug32 *iface, + IDebugApplicationNode **ppdanRoot) +{ + ScriptHost *This = ACTSCPDBG32_THIS(iface); + FIXME("(%p)->(%p)\n", This, ppdanRoot); + return E_NOTIMPL; +} + +static HRESULT WINAPI ActiveScriptSiteDebug32_OnScriptErrorDebug(IActiveScriptSiteDebug32 *iface, + IActiveScriptErrorDebug *pErrorDebug, BOOL *pfEnterDebugger, BOOL *pfCallOnScriptErrorWhenContinuing) +{ + ScriptHost *This = ACTSCPDBG32_THIS(iface); + FIXME("(%p)->(%p %p %p)\n", This, pErrorDebug, pfEnterDebugger, pfCallOnScriptErrorWhenContinuing); + return E_NOTIMPL; +} + +#undef ACTSCPDBG32_THIS + +static const IActiveScriptSiteDebug32Vtbl ActiveScriptSiteDebug32Vtbl = { + ActiveScriptSiteDebug32_QueryInterface, + ActiveScriptSiteDebug32_AddRef, + ActiveScriptSiteDebug32_Release, + ActiveScriptSiteDebug32_GetDocumentContextFromPosition, + ActiveScriptSiteDebug32_GetApplication, + ActiveScriptSiteDebug32_GetRootApplicationNode, + ActiveScriptSiteDebug32_OnScriptErrorDebug +}; + static ScriptHost *create_script_host(HTMLDocument *doc, GUID *guid) { ScriptHost *ret; @@ -435,6 +516,7 @@ static ScriptHost *create_script_host(HTMLDocument *doc, GUID *guid) ret->lpIActiveScriptSiteVtbl = &ActiveScriptSiteVtbl; ret->lpIActiveScriptSiteInterruptPollVtbl = &ActiveScriptSiteInterruptPollVtbl; ret->lpIActiveScriptSiteWindowVtbl = &ActiveScriptSiteWindowVtbl; + ret->lpIActiveScriptSiteDebug32Vtbl = &ActiveScriptSiteDebug32Vtbl; ret->ref = 1; ret->doc = doc; ret->script_state = SCRIPTSTATE_UNINITIALIZED; @@ -477,6 +559,7 @@ static void parse_extern_script(ScriptHost *script_host, LPCWSTR src) IMoniker *mon; char *buf; WCHAR *text; + DWORD len, size=0; HRESULT hres; static const WCHAR wine_schemaW[] = {'w','i','n','e',':'}; @@ -488,13 +571,16 @@ static void parse_extern_script(ScriptHost *script_host, LPCWSTR src) if(FAILED(hres)) return; - hres = bind_mon_to_buffer(script_host->doc, mon, (void**)&buf); + hres = bind_mon_to_buffer(script_host->doc, mon, (void**)&buf, &size); IMoniker_Release(mon); if(FAILED(hres)) return; - text = heap_strdupAtoW(buf); + len = MultiByteToWideChar(CP_ACP, 0, buf, size, NULL, 0); + text = heap_alloc((len+1)*sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, buf, size, text, len); heap_free(buf); + text[len] = 0; parse_text(script_host, text); diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index d041a2c67bb..5e2acde70ca 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -169,6 +169,13 @@ static REFIID const location_iids[] = { NULL }; +static REFIID const window_iids[] = { + &IID_IDispatch, + &IID_IHTMLWindow2, + &IID_IHTMLWindow3, + NULL +}; + typedef struct { const char *tag; REFIID *iids; @@ -1038,6 +1045,7 @@ static void test_navigator(IHTMLDocument2 *doc) hres = IHTMLDocument2_get_parentWindow(doc, &window); ok(hres == S_OK, "parentWidnow failed: %08x\n", hres); + test_ifaces((IUnknown*)window, window_iids); hres = IHTMLWindow2_get_navigator(window, &navigator); ok(hres == S_OK, "get_navigator failed: %08x\n", hres); diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 9f1d73d05da..34a7f24372a 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -1530,7 +1530,7 @@ static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface) return E_NOTIMPL; } -static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAsign, DWORD dwWhichMoniker, +static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmon) { ok(0, "unexpected call\n"); diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index 72b9ce050de..2fbc0bf3ae9 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -1183,7 +1183,7 @@ static HRESULT WINAPI HTMLTxtRange_parentElement(IHTMLTxtRange *iface, IHTMLElem return S_OK; } - node = get_node(This->doc, nsnode); + node = get_node(This->doc, nsnode, TRUE); nsIDOMNode_Release(nsnode); return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)parent); diff --git a/dlls/msi/format.c b/dlls/msi/format.c index f58f51745b0..454142ad7ce 100644 --- a/dlls/msi/format.c +++ b/dlls/msi/format.c @@ -921,28 +921,13 @@ UINT WINAPI MsiFormatRecordW( MSIHANDLE hInstall, MSIHANDLE hRecord, HRESULT hr; IWineMsiRemotePackage *remote_package; BSTR value = NULL; - DWORD len; awstring wstr; remote_package = (IWineMsiRemotePackage *)msi_get_remote( hInstall ); if (remote_package) { - len = 0; hr = IWineMsiRemotePackage_FormatRecord( remote_package, hRecord, - NULL, &len ); - if (FAILED(hr)) - goto done; - - len++; - value = SysAllocStringLen( NULL, len ); - if (!value) - { - r = ERROR_OUTOFMEMORY; - goto done; - } - - hr = IWineMsiRemotePackage_FormatRecord( remote_package, hRecord, - value, &len ); + &value ); if (FAILED(hr)) goto done; diff --git a/dlls/msi/msiserver.idl b/dlls/msi/msiserver.idl index d5b47acbf4a..37aa91efb75 100644 --- a/dlls/msi/msiserver.idl +++ b/dlls/msi/msiserver.idl @@ -70,7 +70,7 @@ interface IWineMsiRemotePackage : IUnknown HRESULT SetComponentState( [in] BSTR component, [in] INSTALLSTATE state ); HRESULT GetLanguage( [out] LANGID *language ); HRESULT SetInstallLevel( [in] int level ); - HRESULT FormatRecord( [in] MSIHANDLE record, [out] BSTR value, [out] DWORD *size ); + HRESULT FormatRecord( [in] MSIHANDLE record, [out] BSTR *value ); HRESULT EvaluateCondition( [in] BSTR condition ); } diff --git a/dlls/msi/package.c b/dlls/msi/package.c index a587a63b2a9..f11b0688424 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1812,10 +1812,19 @@ static HRESULT WINAPI mrp_SetInstallLevel( IWineMsiRemotePackage *iface, int lev } static HRESULT WINAPI mrp_FormatRecord( IWineMsiRemotePackage *iface, MSIHANDLE record, - BSTR value, DWORD *size ) + BSTR *value) { + DWORD size = 0; msi_remote_package_impl* This = mrp_from_IWineMsiRemotePackage( iface ); - UINT r = MsiFormatRecordW(This->package, record, (LPWSTR)value, size); + UINT r = MsiFormatRecordW(This->package, record, NULL, &size); + if (r == ERROR_SUCCESS) + { + *value = SysAllocStringLen(NULL, size); + if (!*value) + return E_OUTOFMEMORY; + size++; + r = MsiFormatRecordW(This->package, record, *value, &size); + } return HRESULT_FROM_WIN32(r); } diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c index 7f03948d444..3c2bc229c26 100644 --- a/dlls/msxml3/main.c +++ b/dlls/msxml3/main.c @@ -35,6 +35,10 @@ #include "msxml_private.h" +#ifdef HAVE_LIBXSLT +#include +#endif + WINE_DEFAULT_DEBUG_CHANNEL(msxml); static HINSTANCE hInstance; @@ -171,10 +175,16 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) #ifdef HAVE_LIBXML2 xmlInitParser(); #endif +#ifdef HAVE_XSLTINIT + xsltInit(); +#endif hInstance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); break; case DLL_PROCESS_DETACH: +#ifdef HAVE_LIBXSLT + xsltCleanupGlobals(); +#endif #ifdef HAVE_LIBXML2 xmlCleanupParser(); process_detach(); diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c index ee4e1b25adc..75064607d5d 100644 --- a/dlls/msxml3/node.c +++ b/dlls/msxml3/node.c @@ -33,6 +33,17 @@ #include "msxml_private.h" +#ifdef HAVE_LIBXSLT +# ifdef HAVE_LIBXSLT_PATTERN_H +# include +# endif +# ifdef HAVE_LIBXSLT_TRANSFORM_H +# include +# endif +# include +# include +#endif + #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(msxml); @@ -1030,8 +1041,61 @@ static HRESULT WINAPI xmlnode_transformNode( IXMLDOMNode* styleSheet, BSTR* xmlString) { - FIXME("\n"); +#ifdef HAVE_LIBXSLT + xmlnode *This = impl_from_IXMLDOMNode( iface ); + xmlnode *pStyleSheet = NULL; + xsltStylesheetPtr xsltSS = NULL; + xmlDocPtr result = NULL; + IXMLDOMNode *ssNew; + + TRACE("%p %p %p\n", This, styleSheet, xmlString); + + if(!styleSheet || !xmlString) + return E_INVALIDARG; + + *xmlString = NULL; + + if(IXMLDOMNode_QueryInterface(styleSheet, &IID_IXMLDOMNode, (LPVOID)&ssNew) == S_OK) + { + pStyleSheet = impl_from_IXMLDOMNode( ssNew ); + + xsltSS = xsltParseStylesheetDoc( pStyleSheet->node->doc); + if(xsltSS) + { + result = xsltApplyStylesheet(xsltSS, This->node->doc, NULL); + if(result) + { + xmlBufferPtr pXmlBuf; + int nSize; + + pXmlBuf = xmlBufferCreate(); + if(pXmlBuf) + { + nSize = xmlNodeDump(pXmlBuf, NULL, (xmlNodePtr)result, 0, 0); + if(nSize > 0) + { + const xmlChar *pContent; + + pContent = xmlBufferContent(pXmlBuf); + *xmlString = bstr_from_xmlChar(pContent); + + xmlBufferFree(pXmlBuf); + } + } + } + } + + IXMLDOMNode_Release(ssNew); + } + + if(*xmlString == NULL) + *xmlString = SysAllocStringLen(NULL, 0); + + return S_OK; +#else + FIXME("libxslt headers were not found at compile time\n"); return E_NOTIMPL; +#endif } static HRESULT WINAPI xmlnode_selectNodes( diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 9c6eb66d041..32d3b937dc7 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -119,6 +119,35 @@ static const CHAR szExampleXML[] = " \n" "\n"; +static const CHAR szTransformXML[] = +"\n" +"\n" +"Hello World\n" +""; + +static const CHAR szTransformSSXML[] = +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"

\n" +" \n" +"

\n" +" \n" +" \n" +"
\n" +"
"; + +static const CHAR szTransformOutput[] = +"\n" +"

\n" +"Hello World\n" +"

\n"; + static const WCHAR szNonExistentFile[] = { 'c', ':', '\\', 'N', 'o', 'n', 'e', 'x', 'i', 's', 't', 'e', 'n', 't', '.', 'x', 'm', 'l', 0 }; @@ -3130,6 +3159,51 @@ static void test_DocumentSaveToDocument(void) IXMLDOMDocument_Release(doc); } +static void test_testTransforms(void) +{ + IXMLDOMDocument *doc = NULL; + IXMLDOMDocument *docSS = NULL; + IXMLDOMNode *pNode; + VARIANT_BOOL bSucc; + + HRESULT hr; + + hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&doc ); + if( hr != S_OK ) + return; + + hr = CoCreateInstance( &CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument2, (LPVOID*)&docSS ); + if( hr != S_OK ) + { + IXMLDOMDocument_Release(doc); + return; + } + + hr = IXMLDOMDocument_loadXML(doc, _bstr_(szTransformXML), &bSucc); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMDocument_loadXML(docSS, _bstr_(szTransformSSXML), &bSucc); + ok(hr == S_OK, "ret %08x\n", hr ); + + hr = IXMLDOMDocument_QueryInterface(docSS, &IID_IXMLDOMNode, (LPVOID*)&pNode ); + ok(hr == S_OK, "ret %08x\n", hr ); + if(hr == S_OK) + { + BSTR bOut; + + hr = IXMLDOMDocument_transformNode(doc, pNode, &bOut); + ok(hr == S_OK, "ret %08x\n", hr ); + ok( !lstrcmpW( bOut, _bstr_(szTransformOutput) ), "Stylesheet output not correct\n"); + + IXMLDOMNode_Release(pNode); + } + + IXMLDOMDocument_Release(docSS); + IXMLDOMDocument_Release(doc); + + free_bstrs(); +} + START_TEST(domdoc) { HRESULT r; @@ -3152,6 +3226,7 @@ START_TEST(domdoc) test_xmlTypes(); test_nodeTypeTests(); test_DocumentSaveToDocument(); + test_testTransforms(); CoUninitialize(); } diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c index ddabb676d84..c5146e2b3e2 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -839,47 +839,6 @@ static int server_connect( const char *serverdir ) /*********************************************************************** - * rm_rf - * - * Remove a directory and all its contents; helper for create_config_dir. - */ -static void rm_rf( const char *path ) -{ - int err = errno; /* preserve errno */ - DIR *dir; - char *buffer, *p; - struct stat st; - struct dirent *de; - - if (!(buffer = malloc( strlen(path) + 256 + 1 ))) goto done; - strcpy( buffer, path ); - p = buffer + strlen(buffer); - *p++ = '/'; - - if ((dir = opendir( path ))) - { - while ((de = readdir( dir ))) - { - if (!strcmp( de->d_name, "." ) || !strcmp( de->d_name, ".." )) continue; - strcpy( p, de->d_name ); - if (unlink( buffer ) != -1) continue; - if (errno == EISDIR || - (errno == EPERM && !lstat( buffer, &st ) && S_ISDIR(st.st_mode))) - { - /* recurse in the sub-directory */ - rm_rf( buffer ); - } - } - closedir( dir ); - } - free( buffer ); - rmdir( path ); -done: - errno = err; -} - - -/*********************************************************************** * create_config_dir * * Create the wine configuration dir (~/.wine). @@ -887,55 +846,38 @@ done: static void create_config_dir(void) { const char *p, *config_dir = wine_get_config_dir(); - char *tmp_dir; - int fd; pid_t pid, wret; - if (!(tmp_dir = malloc( strlen(config_dir) + sizeof("-XXXXXX") ))) - fatal_error( "out of memory\n" ); - if ((p = strrchr( config_dir, '/' )) && p != config_dir) { struct stat st; + char *tmp_dir; + if (!(tmp_dir = malloc( p + 1 - config_dir ))) fatal_error( "out of memory\n" ); memcpy( tmp_dir, config_dir, p - config_dir ); tmp_dir[p - config_dir] = 0; if (!stat( tmp_dir, &st ) && st.st_uid != getuid()) fatal_error( "'%s' is not owned by you, refusing to create a configuration directory there\n", tmp_dir ); + free( tmp_dir ); } - strcpy( tmp_dir, config_dir ); - strcat( tmp_dir, "-XXXXXX" ); - if ((fd = mkstemps( tmp_dir, 0 )) == -1) - fatal_perror( "can't get temp file name for %s", config_dir ); - close( fd ); - unlink( tmp_dir ); - if (mkdir( tmp_dir, 0777 ) == -1) - fatal_perror( "cannot create temp dir %s", tmp_dir ); + if (mkdir( config_dir, 0777 ) == -1 && errno != EEXIST) + fatal_perror( "cannot create directory %s", config_dir ); MESSAGE( "wine: creating configuration directory '%s'...\n", config_dir ); pid = fork(); - if (pid == -1) - { - rmdir( tmp_dir ); - fatal_perror( "fork" ); - } + if (pid == -1) fatal_perror( "fork" ); + if (!pid) { - char *argv[6]; + char *argv[3]; static char argv0[] = "tools/wineprefixcreate", - argv1[] = "--quiet", - argv2[] = "--wait", - argv3[] = "--prefix"; + argv1[] = "--quiet"; argv[0] = argv0; argv[1] = argv1; - argv[2] = argv2; - argv[3] = argv3; - argv[4] = tmp_dir; - argv[5] = NULL; + argv[2] = NULL; wine_exec_wine_binary( argv[0], argv, NULL ); - rmdir( tmp_dir ); fatal_perror( "could not exec wineprefixcreate" ); } else @@ -947,19 +889,8 @@ static void create_config_dir(void) if (wret == -1 && errno != EINTR) fatal_perror( "wait4" ); } if (!WIFEXITED(status) || WEXITSTATUS(status)) - { - rm_rf( tmp_dir ); fatal_error( "wineprefixcreate failed while creating '%s'.\n", config_dir ); - } - } - if (rename( tmp_dir, config_dir ) == -1) - { - rm_rf( tmp_dir ); - if (errno != EEXIST && errno != ENOTEMPTY) - fatal_perror( "rename '%s' to '%s'", tmp_dir, config_dir ); - /* else it was probably created by a concurrent wine process */ } - free( tmp_dir ); MESSAGE( "wine: '%s' created successfully.\n", config_dir ); } diff --git a/dlls/ole32/antimoniker.c b/dlls/ole32/antimoniker.c index e6f811bd165..5c907b7e19c 100644 --- a/dlls/ole32/antimoniker.c +++ b/dlls/ole32/antimoniker.c @@ -532,7 +532,7 @@ static ULONG WINAPI AntiMonikerROTDataImpl_Release(IROTData* iface) } /****************************************************************************** - * AntiMonikerIROTData_GetComparaisonData + * AntiMonikerIROTData_GetComparisonData ******************************************************************************/ static HRESULT WINAPI AntiMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData, diff --git a/dlls/ole32/classmoniker.c b/dlls/ole32/classmoniker.c index 514990a5bb8..5c95b0a1532 100644 --- a/dlls/ole32/classmoniker.c +++ b/dlls/ole32/classmoniker.c @@ -627,9 +627,9 @@ static ULONG WINAPI ClassMonikerROTData_Release(IROTData* iface) } /****************************************************************************** - * ClassMonikerIROTData_GetComparaisonData + * ClassMonikerIROTData_GetComparisonData ******************************************************************************/ -static HRESULT WINAPI ClassMonikerROTData_GetComparaisonData(IROTData* iface, +static HRESULT WINAPI ClassMonikerROTData_GetComparisonData(IROTData* iface, BYTE* pbData, ULONG cbMax, ULONG* pcbData) @@ -687,7 +687,7 @@ static const IROTDataVtbl ROTDataVtbl = ClassMonikerROTData_QueryInterface, ClassMonikerROTData_AddRef, ClassMonikerROTData_Release, - ClassMonikerROTData_GetComparaisonData + ClassMonikerROTData_GetComparisonData }; /****************************************************************************** diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index ad15219a6aa..a74e71a12e6 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -1312,42 +1312,21 @@ static HRESULT WINAPI OLEClipbrd_IDataObject_QueryGetData( IDataObject* iface, LPFORMATETC pformatetc) { - /* - * Declare "This" pointer - */ - OLEClipbrd *This = (OLEClipbrd *)iface; - TRACE("(%p, %p)\n", iface, pformatetc); - /* - * If we have a data source placed on the clipboard (via OleSetClipboard) - * simply delegate to the source object's QueryGetData - */ - if ( This->pIDataObjectSrc ) - { - return IDataObject_QueryGetData(This->pIDataObjectSrc, pformatetc); - } - if (!pformatetc) return E_INVALIDARG; -/* - if ( pformatetc->dwAspect != DVASPECT_CONTENT ) - return DV_E_DVASPECT; -*/ - if ( pformatetc->lindex != -1 ) - return DV_E_LINDEX; - /* TODO: Handle TYMED_IStorage media which were put on the clipboard - * by copying the storage into global memory. We must convert this - * TYMED_HGLOBAL back to TYMED_IStorage. - */ - if ( pformatetc->tymed != TYMED_HGLOBAL ) - return DV_E_TYMED; + if ( pformatetc->dwAspect != DVASPECT_CONTENT ) + return DV_E_FORMATETC; + + if ( pformatetc->lindex != -1 ) + return DV_E_FORMATETC; /* * Delegate to the Windows clipboard function IsClipboardFormatAvailable */ - return (IsClipboardFormatAvailable(pformatetc->cfFormat)) ? S_OK : DV_E_FORMATETC; + return (IsClipboardFormatAvailable(pformatetc->cfFormat)) ? S_OK : DV_E_CLIPFORMAT; } /************************************************************************ diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c index 7737919d30b..74c867a2a8e 100644 --- a/dlls/ole32/filemoniker.c +++ b/dlls/ole32/filemoniker.c @@ -1264,7 +1264,7 @@ FileMonikerROTDataImpl_Release(IROTData* iface) } /****************************************************************************** - * FileMonikerIROTData_GetComparaisonData + * FileMonikerIROTData_GetComparisonData */ static HRESULT WINAPI FileMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData, diff --git a/dlls/ole32/itemmoniker.c b/dlls/ole32/itemmoniker.c index 8cab4f98f1f..1a8822a596c 100644 --- a/dlls/ole32/itemmoniker.c +++ b/dlls/ole32/itemmoniker.c @@ -956,7 +956,7 @@ ULONG WINAPI ItemMonikerROTDataImpl_Release(IROTData* iface) } /****************************************************************************** - * ItemMonikerIROTData_GetComparaisonData + * ItemMonikerIROTData_GetComparisonData ******************************************************************************/ HRESULT WINAPI ItemMonikerROTDataImpl_GetComparisonData(IROTData* iface, BYTE* pbData, diff --git a/dlls/ole32/tests/clipboard.c b/dlls/ole32/tests/clipboard.c index 0127ce5e44c..e365ee8fc69 100644 --- a/dlls/ole32/tests/clipboard.c +++ b/dlls/ole32/tests/clipboard.c @@ -57,6 +57,9 @@ typedef struct EnumFormatImpl { UINT cur; } EnumFormatImpl; +static BOOL expect_DataObjectImpl_QueryGetData = TRUE; +static ULONG DataObjectImpl_GetData_calls = 0; + static HRESULT EnumFormatImpl_Create(FORMATETC *fmtetc, UINT size, LPENUMFORMATETC *lplpformatetc); static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFIID riid, LPVOID *ppvObj) @@ -194,6 +197,8 @@ static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pfor { DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl_GetData_calls++; + if(pformatetc->lindex != -1) return DV_E_LINDEX; @@ -223,6 +228,9 @@ static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject* iface, FORMATETC UINT i; BOOL foundFormat = FALSE; + if (!expect_DataObjectImpl_QueryGetData) + ok(0, "unexpected call to DataObjectImpl_QueryGetData\n"); + if(pformatetc->lindex != -1) return DV_E_LINDEX; @@ -316,6 +324,97 @@ static HRESULT DataObjectImpl_CreateText(LPCSTR text, LPDATAOBJECT *lplpdataobj) return S_OK; } +static void test_get_clipboard(void) +{ + HRESULT hr; + IDataObject *data_obj; + FORMATETC fmtetc; + STGMEDIUM stgmedium; + + hr = OleGetClipboard(NULL); + ok(hr == E_INVALIDARG, "OleGetClipboard(NULL) should return E_INVALIDARG instead of 0x%08x\n", hr); + + hr = OleGetClipboard(&data_obj); + ok(hr == S_OK, "OleGetClipboard failed with error 0x%08x\n", hr); + + /* test IDataObject_QueryGetData */ + + /* clipboard's IDataObject_QueryGetData shouldn't defer to our IDataObject_QueryGetData */ + expect_DataObjectImpl_QueryGetData = FALSE; + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + hr = IDataObject_QueryGetData(data_obj, &fmtetc); + ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08x\n", hr); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.dwAspect = 0xdeadbeef; + hr = IDataObject_QueryGetData(data_obj, &fmtetc); + ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.dwAspect = DVASPECT_THUMBNAIL; + hr = IDataObject_QueryGetData(data_obj, &fmtetc); + ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.lindex = 256; + hr = IDataObject_QueryGetData(data_obj, &fmtetc); + ok(hr == DV_E_FORMATETC, "IDataObject_QueryGetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.cfFormat = CF_RIFF; + hr = IDataObject_QueryGetData(data_obj, &fmtetc); + ok(hr == DV_E_CLIPFORMAT, "IDataObject_QueryGetData should have failed with DV_E_CLIPFORMAT instead of 0x%08x\n", hr); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.tymed = TYMED_FILE; + hr = IDataObject_QueryGetData(data_obj, &fmtetc); + ok(hr == S_OK, "IDataObject_QueryGetData failed with error 0x%08x\n", hr); + + expect_DataObjectImpl_QueryGetData = TRUE; + + /* test IDataObject_GetData */ + + DataObjectImpl_GetData_calls = 0; + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); + ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); + ReleaseStgMedium(&stgmedium); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.dwAspect = 0xdeadbeef; + hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); + ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); + ReleaseStgMedium(&stgmedium); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.dwAspect = DVASPECT_THUMBNAIL; + hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); + ok(hr == S_OK, "IDataObject_GetData failed with error 0x%08x\n", hr); + ReleaseStgMedium(&stgmedium); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.lindex = 256; + hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); + todo_wine + ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.cfFormat = CF_RIFF; + hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); + ok(hr == DV_E_FORMATETC, "IDataObject_GetData should have failed with DV_E_FORMATETC instead of 0x%08x\n", hr); + + InitFormatEtc(fmtetc, CF_TEXT, TYMED_HGLOBAL); + fmtetc.tymed = TYMED_FILE; + hr = IDataObject_GetData(data_obj, &fmtetc, &stgmedium); + ok(hr == DV_E_TYMED, "IDataObject_GetData should have failed with DV_E_TYMED instead of 0x%08x\n", hr); + + ok(DataObjectImpl_GetData_calls == 6, "DataObjectImpl_GetData should have been called 6 times instead of %d times\n", DataObjectImpl_GetData_calls); + + IDataObject_Release(data_obj); +} + static void test_set_clipboard(void) { HRESULT hr; @@ -350,6 +449,8 @@ static void test_set_clipboard(void) hr = OleIsCurrentClipboard(data2); ok(hr == S_FALSE, "did not expect current clipboard to be data2, hr = 0x%08x\n", hr); + test_get_clipboard(); + hr = OleSetClipboard(data2); ok(hr == S_OK, "failed to set clipboard to data2, hr = 0x%08x\n", hr); hr = OleIsCurrentClipboard(data1); diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index acea8545ed4..a1b9c15698f 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -2550,8 +2550,9 @@ static void test_local_server(void) hr = CoGetClassObject(&CLSID_WineOOPTest, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, NULL, &IID_IClassFactory, (LPVOID*)&cf); ok(hr == CO_E_SERVER_STOPPING || /* NT */ + hr == REGDB_E_CLASSNOTREG || /* win2k */ hr == S_OK /* Win9x */, - "CoGetClassObject should have returned CO_E_SERVER_STOPPING instead of 0x%08x\n", hr); + "CoGetClassObject should have returned CO_E_SERVER_STOPPING or REGDB_E_CLASSNOTREG instead of 0x%08x\n", hr); hr = CoRevokeClassObject(cookie); ok_ole_success(hr, CoRevokeClassObject); @@ -2594,8 +2595,9 @@ static DWORD CALLBACK get_global_interface_proc(LPVOID pv) IClassFactory *cf; hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(params->git, params->cookie, &IID_IClassFactory, (void **)&cf); - ok(hr == CO_E_NOTINITIALIZED, - "IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED instead of 0x%08x\n", + ok(hr == CO_E_NOTINITIALIZED || + hr == E_UNEXPECTED, /* win2k */ + "IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED or E_UNEXPECTED instead of 0x%08x\n", hr); CoInitialize(NULL); diff --git a/dlls/oleaut32/dispatch.c b/dlls/oleaut32/dispatch.c index 8ab1c5e73f5..057e39a46a4 100644 --- a/dlls/oleaut32/dispatch.c +++ b/dlls/oleaut32/dispatch.c @@ -192,7 +192,7 @@ HRESULT WINAPI CreateStdDispatch( * Method, property and parameter names can be localised. The details required to * map names to methods and parameters are collected in a type library, usually * output by an IDL compiler using the objects IDL description. This information is - * accessible programatically through the ITypeLib interface (for a type library), + * accessible programmatically through the ITypeLib interface (for a type library), * and the ITypeInfo interface (for an object within the type library). Type information * can also be created at run-time using CreateDispTypeInfo(). * diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index 47b146169b7..05a29344021 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -22,7 +22,7 @@ * * BUGS * - * Support PICTYPE_BITMAP and PICTYPE_ICON, altough only bitmaps very well.. + * Support PICTYPE_BITMAP and PICTYPE_ICON, although only bitmaps very well.. * Lots of methods are just stubs. * * diff --git a/dlls/oleaut32/recinfo.c b/dlls/oleaut32/recinfo.c index cc111533e46..710cf1a58d2 100644 --- a/dlls/oleaut32/recinfo.c +++ b/dlls/oleaut32/recinfo.c @@ -211,7 +211,7 @@ static HRESULT WINAPI IRecordInfoImpl_RecordClear(IRecordInfo *iface, PVOID pvEx var = ((PBYTE)pvExisting)+This->fields[i].offset; switch(This->fields[i].vt) { case VT_BSTR: - /* NOTE: Windows implementatino reads DWORD (len) before string, + /* NOTE: Windows implementation reads DWORD (len) before string, * but it seems to do nothing with this */ *(BSTR*)var = NULL; break; diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index 5a16716067a..34cfd9141c8 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -483,7 +483,7 @@ HRESULT WINAPI SafeArrayAllocDescriptor(UINT cDims, SAFEARRAY **ppsaOut) * Failure: An HRESULT error code indicating the error. * * NOTES - * - This function does not chack that vt is an allowed VARTYPE. + * - This function does not check that vt is an allowed VARTYPE. * - Unlike SafeArrayAllocDescriptor(), vt is associated with the array. * See SafeArray. */ diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index b20ed6cd695..a5a462c6546 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -1050,7 +1050,7 @@ static void test_VarParseNumFromStr(void) EXPECT(1,NUMPRS_HEX_OCT,0,1,0,0); EXPECT2(0,FAILDIG); - /* Doesn't recognise hex in .asm sytax */ + /* Doesn't recognise hex in .asm syntax */ CONVERT("0h", NUMPRS_HEX_OCT); EXPECT(1,NUMPRS_HEX_OCT,0,1,0,0); EXPECT2(0,FAILDIG); @@ -5261,7 +5261,7 @@ static void test_VarCat(void) } } - /* Runnning single comparison tests to compare outputs */ + /* Running single comparison tests to compare outputs */ /* Test concat strings */ V_VT(&left) = VT_BSTR; @@ -6273,7 +6273,7 @@ static void test_VarCmp(void) } } - /* VARCMP{,EX} run each 4 tests with a permutation of all posible + /* VARCMP{,EX} run each 4 tests with a permutation of all possible input variants with (1) and without (0) VT_RESERVED set. The order of the permutations is (0,0); (1,0); (0,1); (1,1) */ VARCMP(INT,4711,I2,4711,VARCMP_EQ); @@ -6859,11 +6859,20 @@ static void test_VarPow(void) "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); hres = pVarPow(&cy, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), - "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); + if (hres == S_OK) + { + ok(hres == S_OK && V_VT(&result) == VT_R8, + "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + S_OK, hres, vtstr(V_VT(&result))); + ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), + "VARPOW: CY value %f, expected %f\n", V_R8(&result), 4.0); + } + else + { + ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, + "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", + DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); + } hres = pVarPow(&left, &cy, &result); ok(hres == S_OK && V_VT(&result) == VT_R8, @@ -6887,11 +6896,20 @@ static void test_VarPow(void) "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); hres = pVarPow(&dec, &right, &result); - ok(hres == S_OK && V_VT(&result) == VT_R8, - "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", - S_OK, hres, vtstr(V_VT(&result))); - ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), - "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); + if (hres == S_OK) + { + ok(hres == S_OK && V_VT(&result) == VT_R8, + "VARPOW: expected coerced hres 0x%X type VT_R8, got hres 0x%X type %s!\n", + S_OK, hres, vtstr(V_VT(&result))); + ok(hres == S_OK && EQ_DOUBLE(V_R8(&result), 4.0), + "VARPOW: DECIMAL value %f, expected %f\n", V_R8(&result), 4.0); + } + else + { + ok(hres == DISP_E_BADVARTYPE && V_VT(&result) == VT_EMPTY, + "VARPOW: expected coerced hres 0x%X type VT_EMPTY, got hres 0x%X type %s!\n", + DISP_E_BADVARTYPE, hres, vtstr(V_VT(&result))); + } SysFreeString(num2_str); SysFreeString(num3_str); diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index b2ad4153072..acd393a9f6f 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -3322,7 +3322,7 @@ static void test_VarDateFromStr(void) CHECKPTR(VarDateFromStr); CHECKPTR(SystemTimeToVariantTime); - /* Some date formats are relative, so we need to find the cuurent year */ + /* Some date formats are relative, so we need to find the current year */ GetSystemTime(&st); st.wHour = st.wMinute = st.wSecond = st.wMilliseconds = 0; DFS(NULL); EXPECT_MISMATCH; @@ -4928,7 +4928,7 @@ static void test_VarBstrCmp(void) bstr = SysAllocString(sz); bstrempty = SysAllocString(szempty); - /* NULL handling. Yepp, MSDN is totaly wrong here */ + /* NULL handling. Yepp, MSDN is totally wrong here */ VARBSTRCMP(NULL,NULL,0,VARCMP_EQ); VARBSTRCMP(bstr,NULL,0,VARCMP_GT); VARBSTRCMP(NULL,bstr,0,VARCMP_LT); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 2d0e7ba0c04..123810b2690 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -998,7 +998,7 @@ typedef struct tagITypeInfoImpl const ITypeInfo2Vtbl *lpVtbl; const ITypeCompVtbl *lpVtblTypeComp; LONG ref; - BOOL no_free_data; /* don't free data structurees */ + BOOL no_free_data; /* don't free data structures */ TYPEATTR TypeAttr ; /* _lots_ of type information. */ ITypeLibImpl * pTypeLib; /* back pointer to typelib */ int index; /* index in this typelib; */ @@ -2624,7 +2624,7 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength) pTypeLibImpl->ctCustData = MSFT_CustData(&cx, tlbHeader.CustomDataOffset, &pTypeLibImpl->pCustData); } - /* fill in typedescriptions */ + /* fill in type descriptions */ if(tlbSegDir.pTypdescTab.length > 0) { int i, j, cTD = tlbSegDir.pTypdescTab.length / (2*sizeof(INT)); @@ -3377,7 +3377,7 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI, SLTG_DoFuncs(pBlk, pBlk + pTITail->funcs_off, pTI, pTITail->cFuncs, pNameTable, ref_lookup); /* this is necessary to cope with MSFT typelibs that set cFuncs to the number - * of dispinterface functons including the IDispatch ones, so + * of dispinterface functions including the IDispatch ones, so * ITypeInfo::GetFuncDesc takes the real value for cFuncs from cbSizeVft */ pTI->TypeAttr.cbSizeVft = pTI->TypeAttr.cFuncs * sizeof(void *); diff --git a/dlls/oleaut32/ungif.c b/dlls/oleaut32/ungif.c index 39b89845171..9cb56932bca 100644 --- a/dlls/oleaut32/ungif.c +++ b/dlls/oleaut32/ungif.c @@ -616,7 +616,7 @@ DGifDecompressLine(GifFileType * GifFile, LastCode = Private->LastCode; if (StackPtr != 0) { - /* Let pop the stack off before continueing to read the gif file: */ + /* Let pop the stack off before continuing to read the gif file: */ while (StackPtr != 0 && i < LineLen) Line[i++] = Stack[--StackPtr]; } @@ -626,7 +626,7 @@ DGifDecompressLine(GifFileType * GifFile, return GIF_ERROR; if (CrntCode == EOFCode) { - /* Note however that usually we will not be here as we will stop + /* Note, however, that usually we will not be here as we will stop * decoding as soon as we got all the pixel, or EOF code will * not be read at all, and DGifGetLine/Pixel clean everything. */ if (i != LineLen - 1 || Private->PixelCount != 0) { diff --git a/dlls/oleaut32/ungif.h b/dlls/oleaut32/ungif.h index 6b54a1bd5ae..e71dad8b3aa 100644 --- a/dlls/oleaut32/ungif.h +++ b/dlls/oleaut32/ungif.h @@ -44,7 +44,7 @@ * History: * 14 Jun 89 - Version 1.0 by Gershon Elber. * 3 Sep 90 - Version 1.1 by Gershon Elber (Support for Gif89, Unique names) - * 15 Sep 90 - Version 2.0 by Eric S. Raymond (Changes to suoport GIF slurp) + * 15 Sep 90 - Version 2.0 by Eric S. Raymond (Changes to support GIF slurp) * 26 Jun 96 - Version 3.0 by Eric S. Raymond (Full GIF89 support) * 17 Dec 98 - Version 4.0 by Toshio Kuratomi (Fix extension writing code) *****************************************************************************/ diff --git a/dlls/oleaut32/varformat.c b/dlls/oleaut32/varformat.c index 23b7e57a2e0..399009c8a3d 100644 --- a/dlls/oleaut32/varformat.c +++ b/dlls/oleaut32/varformat.c @@ -151,7 +151,7 @@ static const WCHAR szPercentZeroStar_d[] = { '%','0','*','d','\0' }; * Common format definitions */ - /* Fomat types */ + /* Format types */ #define FMT_TYPE_UNKNOWN 0x0 #define FMT_TYPE_GENERAL 0x1 #define FMT_TYPE_NUMBER 0x2 diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index abfcfcc2abd..c44d810cbf8 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -6,7 +6,7 @@ * Copyright 2005 Daniel Remenak * Copyright 2006 Google (Benjamin Arai) * - * The alorithm for conversion from Julian days to day/month/year is based on + * The algorithm for conversion from Julian days to day/month/year is based on * that devised by Henry Fliegel, as implemented in PostgreSQL, which is * Copyright 1994-7 Regents of the University of California * @@ -1108,7 +1108,7 @@ static HRESULT VARIANT_RollUdate(UDATE *lpUd) { lpUd->st.wMonth--; /* Previous month */ if (lpUd->st.wMonth == 2 && IsLeapYear(lpUd->st.wYear)) - lpUd->st.wDay = 29; /* Februaury has 29 days on leap years */ + lpUd->st.wDay = 29; /* February has 29 days on leap years */ else lpUd->st.wDay = days[lpUd->st.wMonth]; /* Last day of the month */ } @@ -1119,7 +1119,7 @@ static HRESULT VARIANT_RollUdate(UDATE *lpUd) /* Possibly need to roll the date forward */ if (lpUd->st.wMonth == 2 && IsLeapYear(lpUd->st.wYear)) - rollForward = lpUd->st.wDay - 29; /* Februaury has 29 days on leap years */ + rollForward = lpUd->st.wDay - 29; /* February has 29 days on leap years */ else rollForward = lpUd->st.wDay - days[lpUd->st.wMonth]; @@ -1915,7 +1915,7 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags, * NOTES * - The smallest favoured type present in dwVtBits that can represent the * number in pNumprs without losing precision is used. - * - Signed types are preferrred over unsigned types of the same size. + * - Signed types are preferred over unsigned types of the same size. * - Preferred types in order are: integer, float, double, currency then decimal. * - Rounding (dropping of decimal points) occurs without error. See VarI8FromR8() * for details of the rounding method. @@ -1924,7 +1924,7 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags, * design?): If some other VTBIT's for integers are specified together * with VTBIT_I8 and the number will fit only in a VT_I8 Windows will "cast" * the number to the smallest requested integer truncating this way the - * number. Wine dosn't implement this "feature" (yet?). + * number. Wine doesn't implement this "feature" (yet?). */ HRESULT WINAPI VarNumFromParseNum(NUMPARSE *pNumprs, BYTE *rgbDig, ULONG dwVtBits, VARIANT *pVarDst) @@ -2517,7 +2517,7 @@ HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out) else hres = DISP_E_BADVARTYPE; - /* if resutl type is not S_OK, then no need to go further */ + /* if result type is not S_OK, then no need to go further */ if (hres != S_OK) { V_VT(out) = resultvt; diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index 82310388250..93c5615fb73 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -5311,7 +5311,7 @@ static HRESULT VARIANT_DI_normalize(VARIANT_DI * val, int exponent2, int isDoubl VARIANT_int_add(val->bitsnum, 3, &x, 1); } } - /* This step is requierd in order to remove excess bits of precision from the + /* This step is requiered in order to remove excess bits of precision from the end of the bit representation, down to the precision guaranteed by the floating point number. */ if (isDouble) { @@ -7348,7 +7348,7 @@ VARIANT_MakeDate_OK: * * RETURNS * Success: S_OK. pdateOut contains the converted value. - * FAILURE: An HRESULT error code indicating the prolem. + * FAILURE: An HRESULT error code indicating the problem. * * NOTES * Any date format that can be created using the date formats from lcid diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index 29f9ccec7d8..1a3b7706165 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -97,7 +97,7 @@ static void test_pbuffers(HDC hdc) * and a pixelformat that's only available for offscreen rendering (this means that only * wglChoosePixelFormatARB and friends know about the format. * - * The first thing we need are pixelformats with pbuffer capabilites. + * The first thing we need are pixelformats with pbuffer capabilities. */ res = pwglChoosePixelFormatARB(hdc, iAttribList, NULL, MAX_FORMATS, iFormats, &nFormats); if(res <= 0) @@ -214,7 +214,7 @@ static void test_choosepixelformat(HDC hdc) * This test tries to proof the DONTCARE behavior by passing an almost 'empty' pfd to * ChoosePixelFormat. The pfd only has some really needed flags (RGBA, window, double buffer) set. * Further a 32 bit color buffer has been requested. The idea is that when a format with e.g. depth or stencil bits - * is returned, while there are also 'better' candidates in the list wihtout them (but located AFTER the returned one) + * is returned, while there are also 'better' candidates in the list without them (but located AFTER the returned one) * that an option set to zero means DONTCARE. We try to proof this by checking the aux/depth/stencil bits. * Proofing this behavior for the color bits isn't possible as all formats have red/green/blue/(alpha), so we assume * that if it holds for aux/depth/stencil it also holds for the others. diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c index e17acc92f5f..c51434fee2c 100644 --- a/dlls/powrprof/powrprof.c +++ b/dlls/powrprof/powrprof.c @@ -207,29 +207,23 @@ BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY p) BOOLEAN WINAPI IsPwrHibernateAllowed(VOID) { - /* FIXME: See note #2 */ SYSTEM_POWER_CAPABILITIES PowerCaps; - FIXME("() stub!\n"); NtPowerInformation(SystemPowerCapabilities, NULL, 0, &PowerCaps, sizeof(PowerCaps)); - return FALSE; + return PowerCaps.SystemS4 && PowerCaps.HiberFilePresent; } BOOLEAN WINAPI IsPwrShutdownAllowed(VOID) { - /* FIXME: See note #2 */ SYSTEM_POWER_CAPABILITIES PowerCaps; - FIXME("() stub!\n"); NtPowerInformation(SystemPowerCapabilities, NULL, 0, &PowerCaps, sizeof(PowerCaps)); - return FALSE; + return PowerCaps.SystemS5; } BOOLEAN WINAPI IsPwrSuspendAllowed(VOID) { - /* FIXME: See note #2 */ SYSTEM_POWER_CAPABILITIES PowerCaps; - FIXME("() stub!\n"); NtPowerInformation(SystemPowerCapabilities, NULL, 0, &PowerCaps, sizeof(PowerCaps)); - return FALSE; + return PowerCaps.SystemS1 && PowerCaps.SystemS2 && PowerCaps.SystemS3; } BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY pGlobalPowerPolicy) diff --git a/dlls/pstorec/pstorec.c b/dlls/pstorec/pstorec.c index 6e2b5a59c2b..debb222797a 100644 --- a/dlls/pstorec/pstorec.c +++ b/dlls/pstorec/pstorec.c @@ -264,7 +264,7 @@ static HRESULT WINAPI PStore_fnDeleteItem( IPStore* This, PST_KEY Key, */ static HRESULT WINAPI PStore_fnReadItem( IPStore* This, PST_KEY Key, const GUID* pItemType, const GUID* pItemSubtype, LPCWSTR szItemName, - DWORD *cbData, BYTE** pbData, PPST_PROMPTIFO pPromptInfo, DWORD dwFlags) + DWORD *cbData, BYTE** pbData, PPST_PROMPTINFO pPromptInfo, DWORD dwFlags) { FIXME("%p %08x %s %s %s %p %p %p %08x\n", This, Key, debugstr_guid(pItemType), debugstr_guid(pItemSubtype), @@ -277,7 +277,7 @@ static HRESULT WINAPI PStore_fnReadItem( IPStore* This, PST_KEY Key, */ static HRESULT WINAPI PStore_fnWriteItem( IPStore* This, PST_KEY Key, const GUID* pItemType, const GUID* pItemSubtype, LPCWSTR szItemName, - DWORD cbData, BYTE* ppbData, PPST_PROMPTIFO pPromptInfo, + DWORD cbData, BYTE* ppbData, PPST_PROMPTINFO pPromptInfo, DWORD dwDefaultConfirmationStyle, DWORD dwFlags) { FIXME("%p %08x %s %s %s %d %p %p %08x\n", This, Key, @@ -291,7 +291,7 @@ static HRESULT WINAPI PStore_fnWriteItem( IPStore* This, PST_KEY Key, */ static HRESULT WINAPI PStore_fnOpenItem( IPStore* This, PST_KEY Key, const GUID* pItemType, const GUID* pItemSubtype, LPCWSTR szItemName, - PST_ACCESSMODE ModeFlags, PPST_PROMPTIFO pProomptInfo, DWORD dwFlags ) + PST_ACCESSMODE ModeFlags, PPST_PROMPTINFO pProomptInfo, DWORD dwFlags ) { FIXME("%p %08x %s %s %p %08x %p %08x\n", This, Key, debugstr_guid(pItemType), debugstr_guid(pItemSubtype), diff --git a/dlls/qmgr/Makefile.in b/dlls/qmgr/Makefile.in index de636dbfe8d..57609ca23c9 100644 --- a/dlls/qmgr/Makefile.in +++ b/dlls/qmgr/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = qmgr.dll -IMPORTS = advpack wininet urlmon ole32 advapi32 kernel32 +IMPORTS = wininet urlmon ole32 advapi32 kernel32 EXTRALIBS = -luuid C_SRCS = \ diff --git a/dlls/qmgr/qmgr_main.c b/dlls/qmgr/qmgr_main.c index 2a21a2803ea..5094874dab1 100644 --- a/dlls/qmgr/qmgr_main.c +++ b/dlls/qmgr/qmgr_main.c @@ -141,6 +141,9 @@ static HRESULT register_server(BOOL do_register) { HRESULT hr; STRTABLEA strtable; + HMODULE hAdvpack; + HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable); + static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0}; TRACE("(%x)\n", do_register); @@ -150,9 +153,12 @@ static HRESULT register_server(BOOL do_register) return hr; } + hAdvpack = LoadLibraryW(wszAdvpack); + pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall"); + hr = init_register_strtable(&strtable); if (SUCCEEDED(hr)) - hr = RegInstallA(hInst, do_register ? "RegisterDll" : "UnregisterDll", + hr = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", &strtable); cleanup_register_strtable(&strtable); diff --git a/dlls/qmgr/tests/enum_jobs.c b/dlls/qmgr/tests/enum_jobs.c index 2b7363155e3..f95404c041c 100644 --- a/dlls/qmgr/tests/enum_jobs.c +++ b/dlls/qmgr/tests/enum_jobs.c @@ -209,6 +209,7 @@ static void test_Next_walkList_2(void) if(hres != S_OK) { skip("Unable to get file from test_enumJobs\n"); + HeapFree(GetProcessHeap(), 0, jobs); return; } ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08x\n", hres); @@ -219,6 +220,8 @@ static void test_Next_walkList_2(void) if (jobs[i]) IBackgroundCopyFile_Release(jobs[i]); } + + HeapFree(GetProcessHeap(), 0, jobs); } /* Test Next Error conditions */ diff --git a/dlls/qmgr/tests/job.c b/dlls/qmgr/tests/job.c index 52d4e8296d0..36201f8194f 100644 --- a/dlls/qmgr/tests/job.c +++ b/dlls/qmgr/tests/job.c @@ -416,6 +416,8 @@ static void test_CompleteLocalURL(void) if (!urlA || !urlB) { skip("Unable to allocate memory for URLs\n"); + HeapFree(GetProcessHeap(), 0, urlA); + HeapFree(GetProcessHeap(), 0, urlB); return; } @@ -428,6 +430,8 @@ static void test_CompleteLocalURL(void) if (hres != S_OK) { skip("Unable to add file to job\n"); + HeapFree(GetProcessHeap(), 0, urlA); + HeapFree(GetProcessHeap(), 0, urlB); return; } @@ -435,6 +439,8 @@ static void test_CompleteLocalURL(void) if (hres != S_OK) { skip("Unable to add file to job\n"); + HeapFree(GetProcessHeap(), 0, urlA); + HeapFree(GetProcessHeap(), 0, urlB); return; } diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index b8a1b19b9a3..83d212cae95 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -146,11 +146,14 @@ static HRESULT AVIDec_ProcessEnd(TransformFilterImpl* pTransformFilter) TRACE("(%p)->()\n", This); + if (!This->hvid) + return S_OK; + result = ICDecompressEnd(This->hvid); if (result != ICERR_OK) { ERR("Cannot stop processing (%d)\n", result); - return E_FAIL; + return E_FAIL; } return S_OK; } diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index 0d9aed7e3fc..89c02d45e0b 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -3,6 +3,7 @@ * * Copyright 2003 Robert Shearman * Copyright 2004-2005 Christian Costa + * Copyright 2008 Maarten Lankhorst * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,6 +22,7 @@ /* FIXME: * - we don't do anything with indices yet (we could use them when seeking) * - we don't support multiple RIFF sections (i.e. large AVI files > 2Gb) + * - Memory leaks, and lots of them */ #include "quartz_private.h" @@ -28,12 +30,11 @@ #include "pin.h" #include "uuids.h" +#include "vfw.h" #include "aviriff.h" #include "vfwmsgs.h" #include "amvideo.h" -#include "fourcc.h" - #include "wine/unicode.h" #include "wine/debug.h" @@ -42,6 +43,12 @@ #include "parser.h" +#define TWOCCFromFOURCC(fcc) HIWORD(fcc) + +/* four character codes used in AVI files */ +#define ckidINFO mmioFOURCC('I','N','F','O') +#define ckidREC mmioFOURCC('R','E','C',' ') + WINE_DEFAULT_DEBUG_CHANNEL(quartz); typedef struct StreamData @@ -49,6 +56,11 @@ typedef struct StreamData DWORD dwSampleSize; FLOAT fSamplesPerSec; DWORD dwLength; + + AVISTREAMHEADER streamheader; + DWORD entries; + AVISTDINDEX **stdindex; + DWORD frames; } StreamData; typedef struct AVISplitterImpl @@ -59,6 +71,12 @@ typedef struct AVISplitterImpl LONGLONG CurrentChunkOffset; /* in media time */ LONGLONG EndOfFile; AVIMAINHEADER AviHeader; + AVIEXTHEADER ExtHeader; + + /* TODO: Handle old style index, probably by creating an opendml style new index from it for within StreamData */ + AVIOLDINDEX *oldindex; + DWORD offset; + StreamData *streams; } AVISplitterImpl; @@ -132,6 +150,7 @@ static HRESULT AVISplitter_Sample(LPVOID iface, IMediaSample * pSample) WORD streamId; Parser_OutputPin * pOutputPin; BOOL bSyncPoint = TRUE; + BYTE *fcc = (BYTE *)&This->CurrentChunk.fcc; if (This->CurrentChunkOffset >= tStart) offset_src = (long)BYTES_FROM_MEDIATIME(This->CurrentChunkOffset - tStart) + sizeof(RIFFCHUNK); @@ -140,15 +159,16 @@ static HRESULT AVISplitter_Sample(LPVOID iface, IMediaSample * pSample) switch (This->CurrentChunk.fcc) { - case ckidJUNK: - case aviFCC('i','d','x','1'): /* Index is not handled */ + case ckidAVIOLDINDEX: /* Should not be popping up here! */ + ERR("There should be no index in the stream data!\n"); + case ckidAVIPADDING: /* silently ignore */ if (S_FALSE == AVISplitter_NextChunk(&This->CurrentChunkOffset, &This->CurrentChunk, &tStart, &tStop, pbSrcStream, FALSE)) bMoreData = FALSE; continue; - case ckidLIST: + case FOURCC_LIST: /* We only handle the 'rec ' list which contains the stream data */ - if ((*(DWORD*)(pbSrcStream + BYTES_FROM_MEDIATIME(This->CurrentChunkOffset-tStart) + sizeof(RIFFCHUNK))) == aviFCC('r','e','c',' ')) + if ((*(DWORD*)(pbSrcStream + BYTES_FROM_MEDIATIME(This->CurrentChunkOffset-tStart) + sizeof(RIFFCHUNK))) == ckidREC) { /* FIXME: We only advanced to the first chunk inside the list without keeping track that we are in it. * This is not clean and the parser should be improved for that but it is enough for most AVI files. */ @@ -190,11 +210,18 @@ static HRESULT AVISplitter_Sample(LPVOID iface, IMediaSample * pSample) #endif } + if (fcc[0] == 'i' && fcc[1] == 'x') + { + if (S_FALSE == AVISplitter_NextChunk(&This->CurrentChunkOffset, &This->CurrentChunk, &tStart, &tStop, pbSrcStream, FALSE)) + bMoreData = FALSE; + continue; + } + streamId = StreamFromFOURCC(This->CurrentChunk.fcc); if (streamId > This->Parser.cStreams) { - ERR("Corrupted AVI file (contains stream id %d, but supposed to only have %d streams)\n", streamId, This->Parser.cStreams); + ERR("Corrupted AVI file (contains stream id (%s) %d, but supposed to only have %d streams)\n", debugstr_an((char *)&This->CurrentChunk.fcc, 4), streamId, This->Parser.cStreams); hr = E_FAIL; break; } @@ -335,6 +362,127 @@ static HRESULT AVISplitter_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt) return S_FALSE; } +static HRESULT AVISplitter_ProcessIndex(AVISplitterImpl *This, AVISTDINDEX **index, LONGLONG qwOffset, DWORD cb) +{ + AVISTDINDEX *pIndex; + int x; + long rest; + + *index = NULL; + if (cb < sizeof(AVISTDINDEX)) + { + FIXME("size %u too small\n", cb); + return E_INVALIDARG; + } + + pIndex = CoTaskMemAlloc(cb); + if (!pIndex) + return E_OUTOFMEMORY; + + IAsyncReader_SyncRead(((PullPin *)This->Parser.ppPins[0])->pReader, qwOffset, cb, (BYTE *)pIndex); + pIndex = CoTaskMemRealloc(pIndex, pIndex->cb); + if (!pIndex) + return E_OUTOFMEMORY; + + IAsyncReader_SyncRead(((PullPin *)This->Parser.ppPins[0])->pReader, qwOffset, pIndex->cb, (BYTE *)pIndex); + rest = pIndex->cb - sizeof(AVISUPERINDEX) + sizeof(RIFFCHUNK) + sizeof(pIndex->aIndex[0]) * ANYSIZE_ARRAY; + + TRACE("wLongsPerEntry: %hd\n", pIndex->wLongsPerEntry); + TRACE("bIndexSubType: %hd\n", pIndex->bIndexSubType); + TRACE("bIndexType: %hd\n", pIndex->bIndexType); + TRACE("nEntriesInUse: %u\n", pIndex->nEntriesInUse); + TRACE("dwChunkId: %.4s\n", (char *)&pIndex->dwChunkId); + TRACE("qwBaseOffset: %x%08x\n", (DWORD)(pIndex->qwBaseOffset >> 32), (DWORD)pIndex->qwBaseOffset); + TRACE("dwReserved_3: %u\n", pIndex->dwReserved_3); + + if (pIndex->bIndexType != AVI_INDEX_OF_CHUNKS + || pIndex->wLongsPerEntry != 2 + || rest < (pIndex->nEntriesInUse * sizeof(DWORD) * pIndex->wLongsPerEntry) + || (pIndex->bIndexSubType != AVI_INDEX_SUB_DEFAULT)) + { + FIXME("Invalid index chunk encountered\n"); + return E_INVALIDARG; + } + + for (x = 0; x < pIndex->nEntriesInUse; ++x) + { + BOOL keyframe = !(pIndex->aIndex[x].dwOffset >> 31); + DWORDLONG offset = pIndex->qwBaseOffset + (pIndex->aIndex[x].dwOffset & ~(1<<31)); + TRACE("dwOffset: %x%08x\n", (DWORD)(offset >> 32), (DWORD)offset); + TRACE("dwSize: %u\n", pIndex->aIndex[x].dwSize); + TRACE("Frame is a keyframe: %s\n", keyframe ? "yes" : "no"); + } + + *index = pIndex; + return S_OK; +} + +static HRESULT AVISplitter_ProcessOldIndex(AVISplitterImpl *This) +{ + ULONGLONG mov_pos = BYTES_FROM_MEDIATIME(This->CurrentChunkOffset) - sizeof(DWORD); + AVIOLDINDEX *pAviOldIndex = This->oldindex; + int relative = -1; + int x; + + for (x = 0; x < pAviOldIndex->cb / sizeof(pAviOldIndex->aIndex[0]); ++x) + { + DWORD temp, temp2 = 0, offset, chunkid; + PullPin *pin = This->Parser.pInputPin; + + offset = pAviOldIndex->aIndex[x].dwOffset; + chunkid = pAviOldIndex->aIndex[x].dwChunkId; + + /* Only scan once, or else this will take too long */ + if (relative == -1) + { + IAsyncReader_SyncRead(pin->pReader, offset, sizeof(DWORD), (BYTE *)&temp); + relative = (chunkid != temp); + + if (chunkid == mmioFOURCC('7','F','x','x') + && ((char *)&temp)[0] == 'i' && ((char *)&temp)[1] == 'x') + relative = FALSE; + + if (relative) + { + if (offset + mov_pos < BYTES_FROM_MEDIATIME(This->EndOfFile)) + IAsyncReader_SyncRead(pin->pReader, offset + mov_pos, sizeof(DWORD), (BYTE *)&temp2); + + if (chunkid == mmioFOURCC('7','F','x','x') + && ((char *)&temp2)[0] == 'i' && ((char *)&temp2)[1] == 'x') + { + /* Do nothing, all is great */ + } + else if (temp2 != chunkid) + { + ERR("Faulty index or bug in handling: Wanted FCC: %s, Abs FCC: %s (@ %x), Rel FCC: %s (@ %.0x%08x)\n", + debugstr_an((char *)&chunkid, 4), debugstr_an((char *)&temp, 4), offset, + debugstr_an((char *)&temp2, 4), (DWORD)((mov_pos + offset) >> 32), (DWORD)(mov_pos + offset)); + relative = -1; + } + } + } + + TRACE("Scanned dwChunkId: %s\n", debugstr_an((char *)&temp, 4)); + TRACE("dwChunkId: %.4s\n", (char *)&chunkid); + TRACE("dwFlags: %08x\n", pAviOldIndex->aIndex[x].dwFlags); + TRACE("dwOffset (%s): %08x\n", relative ? "relative" : "absolute", offset); + TRACE("dwSize: %08x\n", pAviOldIndex->aIndex[x].dwSize); + } + + if (relative == -1) + { + FIXME("Dropping index: no idea whether it is relative or absolute\n"); + CoTaskMemFree(This->oldindex); + This->oldindex = NULL; + } + else if (!relative) + This->offset = 0; + else + This->offset = (DWORD)mov_pos; + + return S_OK; +} + static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE * pData, DWORD cb) { PIN_INFO piOutput; @@ -348,15 +496,20 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE static const WCHAR wszStreamTemplate[] = {'S','t','r','e','a','m',' ','%','0','2','d',0}; StreamData *stream; + AVISTDINDEX **stdindex = NULL; + DWORD nstdindex = 0; + props.cbAlign = 1; props.cbPrefix = 0; props.cbBuffer = 0x20000; props.cBuffers = 2; - + ZeroMemory(&amt, sizeof(amt)); piOutput.dir = PINDIR_OUTPUT; piOutput.pFilter = (IBaseFilter *)This; wsprintfW(piOutput.achName, wszStreamTemplate, This->Parser.cStreams); + This->streams = CoTaskMemRealloc(This->streams, sizeof(StreamData) * (This->Parser.cStreams+1)); + stream = This->streams + This->Parser.cStreams; for (pChunk = (const RIFFCHUNK *)pData; ((const BYTE *)pChunk >= pData) && ((const BYTE *)pChunk + sizeof(RIFFCHUNK) < pData + cb) && (pChunk->cb > 0); @@ -369,6 +522,7 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE { const AVISTREAMHEADER * pStrHdr = (const AVISTREAMHEADER *)pChunk; TRACE("processing stream header\n"); + stream->streamheader = *pStrHdr; fSamplesPerSec = (float)pStrHdr->dwRate / (float)pStrHdr->dwScale; @@ -383,6 +537,7 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE amt.formattype = FORMAT_WaveFormatEx; break; default: + FIXME("fccType %.4s not handled yet\n", (char *)&pStrHdr->fccType); amt.formattype = FORMAT_None; } amt.majortype = MEDIATYPE_Video; @@ -448,9 +603,60 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE case ckidSTREAMHANDLERDATA: FIXME("process stream handler data\n"); break; - case ckidJUNK: + case ckidAVIPADDING: TRACE("JUNK chunk ignored\n"); break; + case ckidAVISUPERINDEX: + { + const AVISUPERINDEX *pIndex = (const AVISUPERINDEX *)pChunk; + int x; + long rest = pIndex->cb - sizeof(AVISUPERINDEX) + sizeof(RIFFCHUNK) + sizeof(pIndex->aIndex[0]) * ANYSIZE_ARRAY; + + if (pIndex->cb < sizeof(AVISUPERINDEX) - sizeof(RIFFCHUNK)) + { + FIXME("size %u\n", pIndex->cb); + break; + } + + if (nstdindex > 0) + { + ERR("Stream %d got more then 1 superindex?\n", This->Parser.cStreams); + break; + } + + TRACE("wLongsPerEntry: %hd\n", pIndex->wLongsPerEntry); + TRACE("bIndexSubType: %hd\n", pIndex->bIndexSubType); + TRACE("bIndexType: %hd\n", pIndex->bIndexType); + TRACE("nEntriesInUse: %u\n", pIndex->nEntriesInUse); + TRACE("dwChunkId: %.4s\n", (char *)&pIndex->dwChunkId); + if (pIndex->dwReserved[0]) + TRACE("dwReserved[0]: %u\n", pIndex->dwReserved[0]); + if (pIndex->dwReserved[2]) + TRACE("dwReserved[1]: %u\n", pIndex->dwReserved[1]); + if (pIndex->dwReserved[2]) + TRACE("dwReserved[2]: %u\n", pIndex->dwReserved[2]); + + if (pIndex->bIndexType != AVI_INDEX_OF_INDEXES + || pIndex->wLongsPerEntry != 4 + || rest < (pIndex->nEntriesInUse * sizeof(DWORD) * pIndex->wLongsPerEntry) + || (pIndex->bIndexSubType != AVI_INDEX_SUB_2FIELD && pIndex->bIndexSubType != AVI_INDEX_SUB_DEFAULT)) + { + FIXME("Invalid index chunk encountered\n"); + break; + } + + for (x = 0; x < pIndex->nEntriesInUse; ++x) + { + TRACE("qwOffset: %x%08x\n", (DWORD)(pIndex->aIndex[x].qwOffset >> 32), (DWORD)pIndex->aIndex[x].qwOffset); + TRACE("dwSize: %u\n", pIndex->aIndex[x].dwSize); + TRACE("dwDuration: %u (unreliable)\n", pIndex->aIndex[x].dwDuration); + + ++nstdindex; + stdindex = CoTaskMemRealloc(stdindex, sizeof(*stdindex) * nstdindex); + AVISplitter_ProcessIndex(This, &stdindex[nstdindex-1], pIndex->aIndex[x].qwOffset, pIndex->aIndex[x].dwSize); + } + break; + } default: FIXME("unknown chunk type \"%.04s\" ignored\n", (LPCSTR)&pChunk->fcc); } @@ -466,17 +672,142 @@ static HRESULT AVISplitter_ProcessStreamList(AVISplitterImpl * This, const BYTE TRACE("fSamplesPerSec = %f\n", (double)fSamplesPerSec); TRACE("dwSampleSize = %x\n", dwSampleSize); TRACE("dwLength = %x\n", dwLength); - This->streams = CoTaskMemRealloc(This->streams, sizeof(StreamData) * (This->Parser.cStreams+1)); - stream = This->streams + This->Parser.cStreams; + stream->fSamplesPerSec = fSamplesPerSec; stream->dwSampleSize = dwSampleSize; stream->dwLength = dwLength; /* TODO: Use this for mediaseeking */ + stream->entries = nstdindex; + stream->stdindex = stdindex; hr = Parser_AddPin(&(This->Parser), &piOutput, &props, &amt); + CoTaskMemFree(amt.pbFormat); return hr; } +static HRESULT AVISplitter_ProcessODML(AVISplitterImpl * This, const BYTE * pData, DWORD cb) +{ + const RIFFCHUNK * pChunk; + + for (pChunk = (const RIFFCHUNK *)pData; + ((const BYTE *)pChunk >= pData) && ((const BYTE *)pChunk + sizeof(RIFFCHUNK) < pData + cb) && (pChunk->cb > 0); + pChunk = (const RIFFCHUNK *)((const BYTE*)pChunk + sizeof(RIFFCHUNK) + pChunk->cb) + ) + { + switch (pChunk->fcc) + { + case ckidAVIEXTHEADER: + { + int x; + const AVIEXTHEADER * pExtHdr = (const AVIEXTHEADER *)pChunk; + + TRACE("processing extension header\n"); + if (pExtHdr->cb != sizeof(AVIEXTHEADER) - sizeof(RIFFCHUNK)) + { + FIXME("Size: %u\n", pExtHdr->cb); + break; + } + TRACE("dwGrandFrames: %u\n", pExtHdr->dwGrandFrames); + for (x = 0; x < 61; ++x) + if (pExtHdr->dwFuture[x]) + FIXME("dwFuture[%i] = %u (0x%08x)\n", x, pExtHdr->dwFuture[x], pExtHdr->dwFuture[x]); + This->ExtHeader = *pExtHdr; + break; + } + default: + FIXME("unknown chunk type \"%.04s\" ignored\n", (LPCSTR)&pChunk->fcc); + } + } + + return S_OK; +} + +static HRESULT AVISplitter_InitializeStreams(AVISplitterImpl *This) +{ + int x; + + if (This->oldindex) + { + DWORD nMax, n; + + for (x = 0; x < This->Parser.cStreams; ++x) + { + This->streams[x].frames = 0; + } + + nMax = This->oldindex->cb / sizeof(This->oldindex->aIndex[0]); + + /* Ok, maybe this is more an excercize to see if I interpret everything correctly or not, but that is useful for now */ + for (n = 0; n < nMax; ++n) + { + DWORD streamId = StreamFromFOURCC(This->oldindex->aIndex[n].dwChunkId); + if (streamId >= This->Parser.cStreams) + { + FIXME("Stream id %s ignored\n", debugstr_an((char*)&This->oldindex->aIndex[n].dwChunkId, 4)); + continue; + } + + if (This->streams[streamId].streamheader.dwSampleSize) + This->streams[streamId].frames += This->oldindex->aIndex[n].dwSize / This->streams[streamId].streamheader.dwSampleSize; + else + ++This->streams[streamId].frames; + } + + for (x = 0; x < This->Parser.cStreams; ++x) + { + if ((DWORD)This->streams[x].frames != This->streams[x].streamheader.dwLength) + { + FIXME("stream %u: frames found: %u, frames meant to be found: %u\n", x, (DWORD)This->streams[x].frames, This->streams[x].streamheader.dwLength); + } + } + + } + else if (!This->streams[0].entries) + { + for (x = 0; x < This->Parser.cStreams; ++x) + { + This->streams[x].frames = This->streams[x].streamheader.dwLength; + } + } + + /* Not much here yet */ + for (x = 0; x < This->Parser.cStreams; ++x) + { + StreamData *stream = This->streams + x; + /* WOEI! */ + double fps; + int y; + DWORD64 frames = 0; + + fps = (double)stream->streamheader.dwRate / (float)stream->streamheader.dwScale; + if (stream->stdindex) + { + for (y = 0; y < stream->entries; ++y) + { + frames += stream->stdindex[y]->nEntriesInUse; + } + } + else frames = stream->frames; + + frames *= stream->streamheader.dwScale; + /* Keep accuracy as high as possible for duration */ + This->Parser.mediaSeeking.llDuration = frames * 10000000; + This->Parser.mediaSeeking.llDuration /= stream->streamheader.dwRate; + This->Parser.mediaSeeking.llStop = This->Parser.mediaSeeking.llDuration; + This->Parser.mediaSeeking.llCurrent = 0; + + frames /= stream->streamheader.dwRate; + + TRACE("fps: %f\n", fps); + TRACE("Duration: %d days, %d hours, %d minutes and %d seconds\n", (DWORD)(frames / 86400), + (DWORD)((frames % 86400) / 3600), (DWORD)((frames % 3600) / 60), (DWORD)(frames % 60)); + } + + return S_OK; +} + +static HRESULT AVISplitter_Disconnect(LPVOID iface); + /* FIXME: fix leaks on failure here */ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) { @@ -486,29 +817,33 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) LONGLONG pos = 0; /* in bytes */ BYTE * pBuffer; RIFFCHUNK * pCurrentChunk; + LONGLONG total, avail; + int x; + DWORD indexes; + AVISplitterImpl * pAviSplit = (AVISplitterImpl *)This->pin.pinInfo.pFilter; hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list); pos += sizeof(list); - if (list.fcc != ckidRIFF) + if (list.fcc != FOURCC_RIFF) { ERR("Input stream not a RIFF file\n"); return E_FAIL; } - if (list.fccListType != ckidAVI) + if (list.fccListType != formtypeAVI) { ERR("Input stream not an AVI RIFF file\n"); return E_FAIL; } hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list); - if (list.fcc != ckidLIST) + if (list.fcc != FOURCC_LIST) { ERR("Expected LIST chunk, but got %.04s\n", (LPSTR)&list.fcc); return E_FAIL; } - if (list.fccListType != ckidHEADERLIST) + if (list.fccListType != listtypeAVIHEADER) { ERR("Header list expected. Got: %.04s\n", (LPSTR)&list.fccListType); return E_FAIL; @@ -529,7 +864,7 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) /* AVIMAINHEADER includes the structure that is pCurrentChunk at the moment */ memcpy(&pAviSplit->AviHeader, pCurrentChunk, sizeof(pAviSplit->AviHeader)); break; - case ckidLIST: + case FOURCC_LIST: pList = (RIFFLIST *)pCurrentChunk; switch (pList->fccListType) { @@ -537,11 +872,11 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) hr = AVISplitter_ProcessStreamList(pAviSplit, (BYTE *)pCurrentChunk + sizeof(RIFFLIST), pCurrentChunk->cb + sizeof(RIFFCHUNK) - sizeof(RIFFLIST)); break; case ckidODML: - FIXME("process ODML header\n"); + hr = AVISplitter_ProcessODML(pAviSplit, (BYTE *)pCurrentChunk + sizeof(RIFFLIST), pCurrentChunk->cb + sizeof(RIFFCHUNK) - sizeof(RIFFLIST)); break; } break; - case ckidJUNK: + case ckidAVIPADDING: /* ignore */ break; default: @@ -559,32 +894,104 @@ static HRESULT AVISplitter_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) pos += sizeof(RIFFCHUNK) + list.cb; hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list); - while (list.fcc == ckidJUNK || (list.fcc == ckidLIST && list.fccListType == ckidINFO)) + while (list.fcc == ckidAVIPADDING || (list.fcc == FOURCC_LIST && list.fccListType == ckidINFO)) { pos += sizeof(RIFFCHUNK) + list.cb; + hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list); } - if (list.fcc != ckidLIST) + if (list.fcc != FOURCC_LIST) { ERR("Expected LIST, but got %.04s\n", (LPSTR)&list.fcc); return E_FAIL; } - if (list.fccListType != ckidAVIMOVIE) + if (list.fccListType != listtypeAVIMOVIE) { ERR("Expected AVI movie list, but got %.04s\n", (LPSTR)&list.fccListType); return E_FAIL; } + IAsyncReader_Length(This->pReader, &total, &avail); + + /* FIXME: AVIX files are added ("eXtended") beyond the "AVI " length, and thus won't be played here */ if (hr == S_OK) { - pAviSplit->CurrentChunkOffset = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFLIST)); - pAviSplit->EndOfFile = MEDIATIME_FROM_BYTES(pos + list.cb + sizeof(RIFFLIST)); + This->rtStart = pAviSplit->CurrentChunkOffset = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFLIST)); + pos += list.cb + sizeof(RIFFCHUNK); + + pAviSplit->EndOfFile = This->rtStop = MEDIATIME_FROM_BYTES(pos); + if (pos > total) + { + ERR("File smaller (%x%08x) then EndOfFile (%x%08x)\n", (DWORD)(total >> 32), (DWORD)total, (DWORD)(pAviSplit->EndOfFile >> 32), (DWORD)pAviSplit->EndOfFile); + return E_FAIL; + } + hr = IAsyncReader_SyncRead(This->pReader, BYTES_FROM_MEDIATIME(pAviSplit->CurrentChunkOffset), sizeof(pAviSplit->CurrentChunk), (BYTE *)&pAviSplit->CurrentChunk); } + /* Now peek into the idx1 index, if available */ + if (hr == S_OK && (total - pos) > sizeof(RIFFCHUNK)) + { + memset(&list, 0, sizeof(list)); + + hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list); + if (list.fcc == ckidAVIOLDINDEX) + { + pAviSplit->oldindex = CoTaskMemRealloc(pAviSplit->oldindex, list.cb + sizeof(RIFFCHUNK)); + if (pAviSplit->oldindex) + { + hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(RIFFCHUNK) + list.cb, (BYTE *)pAviSplit->oldindex); + if (hr == S_OK) + { + hr = AVISplitter_ProcessOldIndex(pAviSplit); + } + else + { + CoTaskMemFree(pAviSplit->oldindex); + pAviSplit->oldindex = NULL; + hr = S_OK; + } + } + } + } + + indexes = 0; + for (x = 0; x < pAviSplit->Parser.cStreams; ++x) + if (pAviSplit->streams[x].entries) + ++indexes; + + if (indexes) + { + CoTaskMemFree(pAviSplit->oldindex); + pAviSplit->oldindex = NULL; + if (indexes < pAviSplit->Parser.cStreams) + { + /* This error could possible be survived by switching to old type index, + * but I would rather find out why it doesn't find everything here + */ + ERR("%d indexes expected, but only have %d\n", indexes, pAviSplit->Parser.cStreams); + indexes = 0; + } + } + else if (!indexes && pAviSplit->oldindex) + indexes = pAviSplit->Parser.cStreams; + + if (!indexes && pAviSplit->AviHeader.dwFlags & AVIF_MUSTUSEINDEX) + { + FIXME("No usable index was found!\n"); + hr = E_FAIL; + } + + /* Now, set up the streams */ + if (hr == S_OK) + hr = AVISplitter_InitializeStreams(pAviSplit); + if (hr != S_OK) + { + AVISplitter_Disconnect(pAviSplit); return E_FAIL; + } TRACE("AVI File ok\n"); @@ -604,6 +1011,32 @@ static HRESULT AVISplitter_Cleanup(LPVOID iface) return S_OK; } +static HRESULT AVISplitter_Disconnect(LPVOID iface) +{ + AVISplitterImpl *This = iface; + int x; + + /* TODO: Remove other memory that's allocated during connect */ + CoTaskMemFree(This->oldindex); + This->oldindex = NULL; + + for (x = 0; x < This->Parser.cStreams; ++x) + { + int i; + + StreamData *stream = &This->streams[x]; + + for (i = 0; i < stream->entries; ++i) + CoTaskMemFree(stream->stdindex[i]); + + CoTaskMemFree(stream->stdindex); + } + CoTaskMemFree(This->streams); + This->streams = NULL; + + return S_OK; +} + HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv) { HRESULT hr; @@ -621,8 +1054,9 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv) This->pCurrentSample = NULL; This->streams = NULL; + This->oldindex = NULL; - hr = Parser_Create(&(This->Parser), &CLSID_AviSplitter, AVISplitter_Sample, AVISplitter_QueryAccept, AVISplitter_InputPin_PreConnect, AVISplitter_Cleanup, NULL, NULL, NULL); + hr = Parser_Create(&(This->Parser), &CLSID_AviSplitter, AVISplitter_Sample, AVISplitter_QueryAccept, AVISplitter_InputPin_PreConnect, AVISplitter_Cleanup, AVISplitter_Disconnect, NULL, NULL, NULL); if (FAILED(hr)) return hr; diff --git a/dlls/quartz/control.c b/dlls/quartz/control.c index fcd86d23f29..63bc3719339 100644 --- a/dlls/quartz/control.c +++ b/dlls/quartz/control.c @@ -102,7 +102,7 @@ static const IUnknownVtbl IInner_VTable = SeekInner_Release }; -/* Generic functions for aggegration */ +/* Generic functions for aggregation */ static HRESULT WINAPI SeekOuter_QueryInterface(PassThruImpl *This, REFIID riid, LPVOID *ppv) { if (This->bAggregatable) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 529f836323b..50892c09845 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -56,7 +56,7 @@ typedef struct DSoundRenderImpl LONG refCount; CRITICAL_SECTION csFilter; FILTER_STATE state; - REFERENCE_TIME rtStreamStart; + REFERENCE_TIME rtStreamStart, rtLastStop; IReferenceClock * pClock; FILTER_INFO filterInfo; @@ -79,21 +79,38 @@ typedef struct DSoundRenderImpl long pan; } DSoundRenderImpl; +/* Seeking is not needed for a renderer, rely on newsegment for the appropiate changes */ static HRESULT sound_mod_stop(IBaseFilter *iface) { - FIXME("(%p) stub\n", iface); + TRACE("(%p)\n", iface); return S_OK; } static HRESULT sound_mod_start(IBaseFilter *iface) { - FIXME("(%p) stub\n", iface); + TRACE("(%p)\n", iface); + return S_OK; } static HRESULT sound_mod_rate(IBaseFilter *iface) { - FIXME("(%p) stub\n", iface); + DSoundRenderImpl *This = (DSoundRenderImpl *)iface; + + WAVEFORMATEX *format = (WAVEFORMATEX*)This->pInputPin->pin.mtCurrent.pbFormat; + DWORD freq = format->nSamplesPerSec; + double rate = This->mediaSeeking.dRate; + + freq = (DWORD)((double)freq * rate); + + TRACE("(%p)\n", iface); + + if (freq > DSBFREQUENCY_MAX) + return VFW_E_UNSUPPORTED_AUDIO; + + if (freq < DSBFREQUENCY_MIN) + return VFW_E_UNSUPPORTED_AUDIO; + return S_OK; } @@ -224,23 +241,30 @@ static HRESULT DSoundRender_Sample(LPVOID iface, IMediaSample * pSample) TRACE("%p %p\n", iface, pSample); + /* Slightly incorrect, Pause completes when a frame is received so we should signal + * pause completion here, but for sound receiving a single frame doesn't make sense + */ if (This->state == State_Paused) return S_FALSE; if (This->state == State_Stopped) - return VFW_E_WRONG_STATE; + return S_FALSE; hr = IMediaSample_GetPointer(pSample, &pbSrcStream); if (FAILED(hr)) { ERR("Cannot get pointer to sample data (%x)\n", hr); - return hr; + return hr; } hr = IMediaSample_GetTime(pSample, &tStart, &tStop); if (FAILED(hr)) ERR("Cannot get sample time (%x)\n", hr); + if (This->rtLastStop != tStart && (IMediaSample_IsDiscontinuity(pSample) == S_FALSE)) + FIXME("Unexpected discontinuity: Last: %lld, tStart: %lld\n", This->rtLastStop, tStart); + This->rtLastStop = tStop; + cbSrcStream = IMediaSample_GetActualDataLength(pSample); TRACE("Sample data ptr = %p, size = %ld\n", pbSrcStream, cbSrcStream); @@ -372,7 +396,7 @@ static HRESULT WINAPI DSoundRender_QueryInterface(IBaseFilter * iface, REFIID ri return S_OK; } - if (!IsEqualIID(riid, &IID_IPin)) + if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow)) FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); return E_NOINTERFACE; @@ -673,6 +697,7 @@ static HRESULT WINAPI DSoundRender_InputPin_ReceiveConnection(IPin * iface, IPin EnterCriticalSection(This->pin.pCritSec); { DSImpl = (DSoundRenderImpl*)This->pin.pinInfo.pFilter; + DSImpl->rtLastStop = -1; if (This->pin.pConnectedTo) hr = VFW_E_ALREADY_CONNECTED; diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index b2d6838a109..d31e1502e51 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -394,7 +394,7 @@ static HRESULT WINAPI AsyncReader_QueryInterface(IBaseFilter * iface, REFIID rii return S_OK; } - if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IMediaSeeking)) + if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IMediaSeeking) && !IsEqualIID(riid, &IID_IVideoWindow)) FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); return E_NOINTERFACE; @@ -783,7 +783,7 @@ static HRESULT AcceptProcAFR(LPVOID iface, const AM_MEDIA_TYPE *pmt) return S_FALSE; } -/* overriden pin functions */ +/* overridden pin functions */ static HRESULT WINAPI FileAsyncReaderPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) { diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 94e400396c8..ee31068b706 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -2126,7 +2126,9 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, TRACE("State: %s\n", state == State_Running ? "Running" : (state == State_Paused ? "Paused" : (state == State_Stopped ? "Stopped" : "UNKNOWN"))); if ((dwCurrentFlags & 0x7) == AM_SEEKING_AbsolutePositioning) + { This->position = *pCurrent; + } else if ((dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning) FIXME("Adjust method %x not handled yet!\n", dwCurrentFlags & 0x7); @@ -2140,6 +2142,12 @@ static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, args.curflags = dwCurrentFlags; args.stopflags = dwStopFlags; hr = all_renderers_seek(This, found_setposition, (DWORD_PTR)&args); + + if (This->refClock && ((dwCurrentFlags & 0x7) != AM_SEEKING_NoPositioning)) + { + /* Update start time, prevents weird jumps */ + IReferenceClock_GetTime(This->refClock, &This->start_time); + } LeaveCriticalSection(&This->cs); return hr; diff --git a/dlls/quartz/fourcc.h b/dlls/quartz/fourcc.h deleted file mode 100644 index 317b4321d7d..00000000000 --- a/dlls/quartz/fourcc.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Common FOURCC - * - * Copyright 2003 Robert Shearman - * - * 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 - */ - -#define FromHex(n) (((n) >= 'A') ? ((n) + 10 - 'A') : ((n) - '0')) -#define StreamFromFOURCC(fcc) ((WORD) ((FromHex(LOBYTE(LOWORD(fcc))) << 4) + (FromHex(HIBYTE(LOWORD(fcc)))))) -#define TWOCCFromFOURCC(fcc) HIWORD(fcc) - -#ifndef aviTWOCC -#define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8)) -#endif - -/* FIXME: endianess? */ -#define aviFCC(ch0, ch1, ch2, ch3) ((DWORD)(BYTE)(ch3) << 24 | (DWORD)(BYTE)(ch2) << 16 | (DWORD)(BYTE)(ch1) << 8 | ((DWORD)(BYTE)(ch0))) - -/* four character codes used in AVI files */ -#define ckidAVI aviFCC('A','V','I',' ') -#define ckidRIFF aviFCC('R','I','F','F') -#define ckidLIST aviFCC('L','I','S','T') -#define ckidJUNK aviFCC('J','U','N','K') -#define ckidINFO aviFCC('I','N','F','O') -#define ckidHEADERLIST aviFCC('h','d','r','l') -#define ckidAVIMOVIE aviFCC('m','o','v','i') -#define ckidSTREAMNAME aviFCC('s','t','r','n') -#define ckidSTREAMHANDLERDATA aviFCC('s','t','r','d') -#ifndef ckidMAINAVIHEADER -# define ckidMAINAVIHEADER aviFCC('a','v','i','h') -# define ckidODML aviFCC('o','d','m','l') -# define ckidAVIEXTHEADER aviFCC('d','m','l','h') -# define ckidSTREAMLIST aviFCC('s','t','r','l') -# define ckidSTREAMHEADER aviFCC('s','t','r','h') -# define ckidSTREAMFORMAT aviFCC('s','t','r','f') -# define ckidAVIOLDINDEX aviFCC('i','d','x','1') -# define ckidAVISUPERINDEX aviFCC('i','n','d','x') -#endif -#ifndef streamtypeVIDEO -#define streamtypeVIDEO aviFCC('v','i','d','s') -#define streamtypeAUDIO aviFCC('a','u','d','s') -#define streamtypeMIDI aviFCC('m','i','d','s') -#define streamtypeTEXT aviFCC('t','x','t','s') -#endif -#define cktypeDIBbits aviTWOCC('d','b') -#define cktypeDIBcompressed aviTWOCC('d','c') -#define cktypePALchange aviTWOCC('p','c') -#define cktypeWAVEbytes aviTWOCC('w','b') diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index 6b68cf5ae19..b473b57e65e 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -586,7 +586,10 @@ static HRESULT WINAPI StdMediaSample2_SetSyncPoint(IMediaSample2 * iface, BOOL b TRACE("(%s)\n", bIsSyncPoint ? "TRUE" : "FALSE"); - This->props.dwSampleFlags = (This->props.dwSampleFlags & ~AM_SAMPLE_SPLICEPOINT) | bIsSyncPoint ? AM_SAMPLE_SPLICEPOINT : 0; + if (bIsSyncPoint) + This->props.dwSampleFlags |= AM_SAMPLE_SPLICEPOINT; + else + This->props.dwSampleFlags &= ~AM_SAMPLE_SPLICEPOINT; return S_OK; } @@ -606,7 +609,10 @@ static HRESULT WINAPI StdMediaSample2_SetPreroll(IMediaSample2 * iface, BOOL bIs TRACE("(%s)\n", bIsPreroll ? "TRUE" : "FALSE"); - This->props.dwSampleFlags = (This->props.dwSampleFlags & ~AM_SAMPLE_PREROLL) | bIsPreroll ? AM_SAMPLE_PREROLL : 0; + if (bIsPreroll) + This->props.dwSampleFlags &= ~AM_SAMPLE_PREROLL; + else + This->props.dwSampleFlags |= AM_SAMPLE_PREROLL; return S_OK; } diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c index 757717474a9..9af8973bba9 100644 --- a/dlls/quartz/mpegsplit.c +++ b/dlls/quartz/mpegsplit.c @@ -708,7 +708,7 @@ static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin) This->Parser.pInputPin->rtStop = MEDIATIME_FROM_BYTES(This->EndOfFile); This->Parser.pInputPin->rtStart = This->Parser.pInputPin->rtCurrent = MEDIATIME_FROM_BYTES(This->header_bytes); - /* http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm has a whole readup on audio headers */ + /* http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm has a whole read up on audio headers */ while (pos + 3 < This->EndOfFile) { LONGLONG length = 0; @@ -865,6 +865,12 @@ static HRESULT MPEGSplitter_seek(IBaseFilter *iface) return hr; } +static HRESULT MPEGSplitter_destroy(LPVOID iface) +{ + /* TODO: Find memory leaks etc */ + return S_OK; +} + HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv) { MPEGSplitterImpl *This; @@ -890,7 +896,7 @@ HRESULT MPEGSplitter_create(IUnknown * pUnkOuter, LPVOID * ppv) } This->seek_entries = 64; - hr = Parser_Create(&(This->Parser), &CLSID_MPEG1Splitter, MPEGSplitter_process_sample, MPEGSplitter_query_accept, MPEGSplitter_pre_connect, MPEGSplitter_cleanup, NULL, MPEGSplitter_seek, NULL); + hr = Parser_Create(&(This->Parser), &CLSID_MPEG1Splitter, MPEGSplitter_process_sample, MPEGSplitter_query_accept, MPEGSplitter_pre_connect, MPEGSplitter_cleanup, MPEGSplitter_destroy, NULL, MPEGSplitter_seek, NULL); if (FAILED(hr)) { CoTaskMemFree(This); diff --git a/dlls/quartz/nullrenderer.c b/dlls/quartz/nullrenderer.c index 191771b8c40..d871e679db7 100644 --- a/dlls/quartz/nullrenderer.c +++ b/dlls/quartz/nullrenderer.c @@ -249,7 +249,7 @@ static HRESULT WINAPI NullRendererInner_QueryInterface(IUnknown * iface, REFIID return S_OK; } - if (!IsEqualIID(riid, &IID_IPin)) + if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow)) FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); return E_NOINTERFACE; diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index a369de2ea0e..a0e14f167bf 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -53,7 +53,7 @@ static inline ParserImpl *impl_from_IMediaSeeking( IMediaSeeking *iface ) } -HRESULT Parser_Create(ParserImpl* pParser, const CLSID* pClsid, PFN_PROCESS_SAMPLE fnProcessSample, PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect, PFN_CLEANUP fnCleanup, CHANGEPROC stop, CHANGEPROC current, CHANGEPROC rate) +HRESULT Parser_Create(ParserImpl* pParser, const CLSID* pClsid, PFN_PROCESS_SAMPLE fnProcessSample, PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect, PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, CHANGEPROC stop, CHANGEPROC current, CHANGEPROC rate) { HRESULT hr; PIN_INFO piInput; @@ -68,6 +68,7 @@ HRESULT Parser_Create(ParserImpl* pParser, const CLSID* pClsid, PFN_PROCESS_SAMP pParser->state = State_Stopped; pParser->pClock = NULL; pParser->fnCleanup = fnCleanup; + pParser->fnDisconnect = fnDisconnect; ZeroMemory(&pParser->filterInfo, sizeof(FILTER_INFO)); pParser->cStreams = 0; @@ -132,7 +133,7 @@ static HRESULT WINAPI Parser_QueryInterface(IBaseFilter * iface, REFIID riid, LP return S_OK; } - if (!IsEqualIID(riid, &IID_IPin)) + if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow)) FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); return E_NOINTERFACE; @@ -680,7 +681,7 @@ static const IPinVtbl Parser_OutputPin_Vtbl = OutputPin_NewSegment }; -static HRESULT WINAPI Parser_InputPin_Disconnect(IPin * iface) +static HRESULT WINAPI Parser_PullPin_Disconnect(IPin * iface) { HRESULT hr; IPinImpl *This = (IPinImpl *)iface; @@ -692,10 +693,11 @@ static HRESULT WINAPI Parser_InputPin_Disconnect(IPin * iface) if (This->pConnectedTo) { FILTER_STATE state; + ParserImpl *Parser = (ParserImpl *)This->pinInfo.pFilter; hr = IBaseFilter_GetState(This->pinInfo.pFilter, 0, &state); - if (SUCCEEDED(hr) && (state == State_Stopped)) + if (SUCCEEDED(hr) && (state == State_Stopped) && SUCCEEDED(Parser->fnDisconnect(Parser))) { IPin_Release(This->pConnectedTo); This->pConnectedTo = NULL; @@ -738,7 +740,7 @@ static const IPinVtbl Parser_InputPin_Vtbl = PullPin_Release, OutputPin_Connect, Parser_PullPin_ReceiveConnection, - Parser_InputPin_Disconnect, + Parser_PullPin_Disconnect, IPinImpl_ConnectedTo, IPinImpl_ConnectionMediaType, IPinImpl_QueryPinInfo, diff --git a/dlls/quartz/parser.h b/dlls/quartz/parser.h index 0bba06262bc..3ca342e108e 100644 --- a/dlls/quartz/parser.h +++ b/dlls/quartz/parser.h @@ -24,6 +24,7 @@ typedef HRESULT (*PFN_PROCESS_SAMPLE) (LPVOID iface, IMediaSample * pSample); typedef HRESULT (*PFN_QUERY_ACCEPT) (LPVOID iface, const AM_MEDIA_TYPE * pmt); typedef HRESULT (*PFN_PRE_CONNECT) (IPin * iface, IPin * pConnectPin); typedef HRESULT (*PFN_CLEANUP) (LPVOID iface); +typedef HRESULT (*PFN_DISCONNECT) (LPVOID iface); struct ParserImpl { @@ -35,6 +36,7 @@ struct ParserImpl REFERENCE_TIME rtStreamStart; IReferenceClock * pClock; PFN_CLEANUP fnCleanup; + PFN_DISCONNECT fnDisconnect; FILTER_INFO filterInfo; CLSID clsid; @@ -54,4 +56,5 @@ typedef struct Parser_OutputPin HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PROPERTIES * props, const AM_MEDIA_TYPE * amt); -HRESULT Parser_Create(ParserImpl*, const CLSID*, PFN_PROCESS_SAMPLE, PFN_QUERY_ACCEPT, PFN_PRE_CONNECT, PFN_CLEANUP, CHANGEPROC stop, CHANGEPROC current, CHANGEPROC rate); +HRESULT Parser_Create(ParserImpl*, const CLSID*, PFN_PROCESS_SAMPLE, PFN_QUERY_ACCEPT, PFN_PRE_CONNECT, + PFN_CLEANUP, PFN_DISCONNECT, CHANGEPROC stop, CHANGEPROC current, CHANGEPROC rate); diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index 96c4b827001..0c333f7c128 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -246,7 +246,7 @@ static HRESULT InputPin_Init(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPi pPinImpl->pAllocator = NULL; pPinImpl->tStart = 0; pPinImpl->tStop = 0; - pPinImpl->dRate = 0; + pPinImpl->dRate = 1.0; pPinImpl->pin.lpVtbl = InputPin_Vtbl; pPinImpl->lpVtblMemInput = &MemInputPin_Vtbl; pPinImpl->flushing = pPinImpl->end_of_stream = 0; @@ -1198,6 +1198,7 @@ static HRESULT PullPin_Init(const IPinVtbl *PullPin_Vtbl, const PIN_INFO * pPinI pPinImpl->rtStart = 0; pPinImpl->rtCurrent = 0; pPinImpl->rtStop = ((LONGLONG)0x7fffffff << 32) | 0xffffffff; + pPinImpl->dRate = 1.0; pPinImpl->state = State_Stopped; InitializeCriticalSection(&pPinImpl->thread_lock); @@ -1381,7 +1382,11 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface) TRACE("Start\n"); - while (This->rtCurrent < This->rtStop && hr == S_OK && !This->stop_playback) + if (This->rtCurrent >= This->rtStop) + { + FIXME("Send an EndOfStream?\n"); + } + else do { /* FIXME: to improve performance by quite a bit this should be changed * so that one sample is processed while one sample is fetched. However, @@ -1426,7 +1431,7 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface) if (pSample) IMediaSample_Release(pSample); - } + } while (This->rtCurrent < This->rtStop && hr == S_OK && !This->stop_playback); CoUninitialize(); EnterCriticalSection(This->pin.pCritSec); diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c index dbb84a74dce..b090e5bdcc6 100644 --- a/dlls/quartz/transform.c +++ b/dlls/quartz/transform.c @@ -54,11 +54,8 @@ static HRESULT TransformFilter_Sample(LPVOID iface, IMediaSample * pSample) TRACE("%p %p\n", iface, pSample); - if (This->state == State_Paused) - return S_FALSE; - if (This->state == State_Stopped) - return VFW_E_WRONG_STATE; + return S_FALSE; return This->pFuncsTable->pfnProcessSampleData(This, pSample); } @@ -139,21 +136,25 @@ static const IMediaSeekingVtbl TransformFilter_Seeking_Vtbl = MediaSeekingImpl_GetPreroll }; +/* These shouldn't be implemented by default. + * Usually only source filters should implement these + * and even it's not needed all of the time + */ static HRESULT TransformFilter_ChangeCurrent(IBaseFilter *iface) { - FIXME("(%p) filter hasn't implemented current position change!\n", iface); + TRACE("(%p) filter hasn't implemented current position change!\n", iface); return S_OK; } static HRESULT TransformFilter_ChangeStop(IBaseFilter *iface) { - FIXME("(%p) filter hasn't implemented stop position change!\n", iface); + TRACE("(%p) filter hasn't implemented stop position change!\n", iface); return S_OK; } static HRESULT TransformFilter_ChangeRate(IBaseFilter *iface) { - FIXME("(%p) filter hasn't implemented rate change!\n", iface); + TRACE("(%p) filter hasn't implemented rate change!\n", iface); return S_OK; } @@ -248,7 +249,7 @@ static HRESULT WINAPI TransformFilter_QueryInterface(IBaseFilter * iface, REFIID return S_OK; } - if (!IsEqualIID(riid, &IID_IPin)) + if (!IsEqualIID(riid, &IID_IPin) && !IsEqualIID(riid, &IID_IVideoWindow)) FIXME("No interface for %s!\n", qzdebugstr_guid(riid)); return E_NOINTERFACE; diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index f363b82ed1d..48faf55d8ec 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -35,7 +35,9 @@ #include "evcode.h" #include "strmif.h" #include "ddraw.h" +#include "dvdmedia.h" +#include "assert.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -263,7 +265,6 @@ static const IMemInputPinVtbl MemInputPin_Vtbl = static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, DWORD size) { - VIDEOINFOHEADER* format; AM_MEDIA_TYPE amt; HRESULT hr = S_OK; DDSURFACEDESC sdesc; @@ -271,6 +272,7 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, int height; LPBYTE palette = NULL; HDC hDC; + BITMAPINFOHEADER *bmiHeader; TRACE("%p %p %d\n", This, data, size); @@ -280,23 +282,39 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, ERR("Unable to retrieve media type\n"); return hr; } - format = (VIDEOINFOHEADER*)amt.pbFormat; - - TRACE("biSize = %d\n", format->bmiHeader.biSize); - TRACE("biWidth = %d\n", format->bmiHeader.biWidth); - TRACE("biHeight = %d\n", format->bmiHeader.biHeight); - TRACE("biPlanes = %d\n", format->bmiHeader.biPlanes); - TRACE("biBitCount = %d\n", format->bmiHeader.biBitCount); - TRACE("biCompression = %s\n", debugstr_an((LPSTR)&(format->bmiHeader.biCompression), 4)); - TRACE("biSizeImage = %d\n", format->bmiHeader.biSizeImage); - - width = format->bmiHeader.biWidth; - height = format->bmiHeader.biHeight; - palette = ((LPBYTE)&format->bmiHeader) + format->bmiHeader.biSize; + + if (IsEqualIID(&amt.formattype, &FORMAT_VideoInfo)) + { + bmiHeader = &((VIDEOINFOHEADER *)amt.pbFormat)->bmiHeader; + } + else if (IsEqualIID(&amt.formattype, &FORMAT_VideoInfo2)) + { + bmiHeader = &((VIDEOINFOHEADER2 *)amt.pbFormat)->bmiHeader; + } + else + { + FIXME("Unknown type %s\n", debugstr_guid(&amt.subtype)); + return VFW_E_RUNTIME_ERROR; + } + + + TRACE("biSize = %d\n", bmiHeader->biSize); + TRACE("biWidth = %d\n", bmiHeader->biWidth); + TRACE("biHeight = %d\n", bmiHeader->biHeight); + TRACE("biPlanes = %d\n", bmiHeader->biPlanes); + TRACE("biBitCount = %d\n", bmiHeader->biBitCount); + TRACE("biCompression = %s\n", debugstr_an((LPSTR)&(bmiHeader->biCompression), 4)); + TRACE("biSizeImage = %d\n", bmiHeader->biSizeImage); + + width = bmiHeader->biWidth; + height = bmiHeader->biHeight; + palette = ((LPBYTE)bmiHeader) + bmiHeader->biSize; if (!This->init) { - /* Honor previously set WindowPos */ + if (!This->WindowPos.right || !This->WindowPos.bottom) + This->WindowPos = This->SourceRect; + TRACE("WindowPos: %d %d %d %d\n", This->WindowPos.left, This->WindowPos.top, This->WindowPos.right, This->WindowPos.bottom); SetWindowPos(This->hWnd, NULL, This->WindowPos.left, @@ -304,8 +322,9 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, This->WindowPos.right - This->WindowPos.left, This->WindowPos.bottom - This->WindowPos.top, SWP_NOZORDER|SWP_NOMOVE); + GetClientRect(This->hWnd, &This->DestRect); - This->init = TRUE; + This->init = TRUE; } hDC = GetDC(This->hWnd); @@ -321,10 +340,9 @@ static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, StretchDIBits(hDC, This->DestRect.left, This->DestRect.top, This->DestRect.right -This->DestRect.left, This->DestRect.bottom - This->DestRect.top, This->SourceRect.left, This->SourceRect.top, This->SourceRect.right - This->SourceRect.left, This->SourceRect.bottom - This->SourceRect.top, - data, (BITMAPINFO*)&format->bmiHeader, DIB_RGB_COLORS, SRCCOPY); + data, (BITMAPINFO *)bmiHeader, DIB_RGB_COLORS, SRCCOPY); ReleaseDC(This->hWnd, hDC); - if (This->AutoShow) ShowWindow(This->hWnd, SW_SHOW); @@ -339,8 +357,11 @@ static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample) REFERENCE_TIME tStart, tStop; HRESULT hr; + if (This->state == State_Stopped) + return S_FALSE; + TRACE("%p %p\n", iface, pSample); - + hr = IMediaSample_GetPointer(pSample, &pbSrcStream); if (FAILED(hr)) { @@ -385,17 +406,29 @@ static HRESULT VideoRenderer_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB8)) { VideoRendererImpl* This = (VideoRendererImpl*) iface; - VIDEOINFOHEADER* format = (VIDEOINFOHEADER*)pmt->pbFormat; - if (!IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) + if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) + { + VIDEOINFOHEADER *format = (VIDEOINFOHEADER *)pmt->pbFormat; + This->SourceRect.left = 0; + This->SourceRect.top = 0; + This->SourceRect.right = This->VideoWidth = format->bmiHeader.biWidth; + This->SourceRect.bottom = This->VideoHeight = format->bmiHeader.biHeight; + } + else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2)) + { + VIDEOINFOHEADER2 *format2 = (VIDEOINFOHEADER2 *)pmt->pbFormat; + + This->SourceRect.left = 0; + This->SourceRect.top = 0; + This->SourceRect.right = This->VideoWidth = format2->bmiHeader.biWidth; + This->SourceRect.bottom = This->VideoHeight = format2->bmiHeader.biHeight; + } + else { WARN("Format type %s not supported\n", debugstr_guid(&pmt->formattype)); return S_FALSE; } - This->SourceRect.left = 0; - This->SourceRect.top = 0; - This->SourceRect.right = This->VideoWidth = format->bmiHeader.biWidth; - This->SourceRect.bottom = This->VideoHeight = format->bmiHeader.biHeight; return S_OK; } return S_FALSE; @@ -460,7 +493,7 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv) HRESULT VideoRendererDefault_create(IUnknown * pUnkOuter, LPVOID * ppv) { - /* TODO: Attenmpt to use the VMR-7 renderer instead when possible */ + /* TODO: Attempt to use the VMR-7 renderer instead when possible */ return VideoRenderer_create(pUnkOuter, ppv); } diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index 55fad4cc538..5aef9ef2ced 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -27,8 +27,6 @@ #include "vfwmsgs.h" #include "mmsystem.h" -#include "fourcc.h" - #include "wine/unicode.h" #include "wine/debug.h" @@ -48,10 +46,32 @@ typedef struct WAVEParserImpl LONGLONG StartOfFile; /* in media time */ LONGLONG EndOfFile; DWORD dwSampleSize; - FLOAT fSamplesPerSec; + DWORD nSamplesPerSec; DWORD dwLength; } WAVEParserImpl; +static LONGLONG bytepos_to_duration(WAVEParserImpl *This, LONGLONG bytepos) +{ + LONGLONG duration = BYTES_FROM_MEDIATIME(bytepos - This->StartOfFile); + duration *= 10000000; + duration /= (This->dwSampleSize * This->nSamplesPerSec); + + return duration; +} + +static LONGLONG duration_to_bytepos(WAVEParserImpl *This, LONGLONG duration) +{ + LONGLONG bytepos; + + bytepos = (This->dwSampleSize * This->nSamplesPerSec); + bytepos *= duration; + bytepos /= 10000000; + bytepos += BYTES_FROM_MEDIATIME(This->StartOfFile); + bytepos -= bytepos % This->dwSampleSize; + + return MEDIATIME_FROM_BYTES(bytepos); +} + static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample) { WAVEParserImpl *This = (WAVEParserImpl *)iface; @@ -65,7 +85,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample) long cbDstStream; long chunk_remaining_bytes = 0; long offset_src = 0; - + hr = IMediaSample_GetPointer(pSample, &pbSrcStream); hr = IMediaSample_GetTime(pSample, &tStart, &tStop); @@ -76,17 +96,36 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample) pOutputPin = (Parser_OutputPin *)This->Parser.ppPins[1]; + /* Try to get rid of the current sample in case we had a S_FALSE last time */ + if (This->pCurrentSample && (IMediaSample_GetActualDataLength(This->pCurrentSample) == IMediaSample_GetSize(This->pCurrentSample))) + { + HRESULT hr; + + /* Unset advancement */ + This->Parser.pInputPin->rtCurrent -= MEDIATIME_FROM_BYTES(cbSrcStream); + + hr = OutputPin_SendSample(&pOutputPin->pin, This->pCurrentSample); + + if (hr != S_OK) + return hr; + + IMediaSample_Release(This->pCurrentSample); + This->pCurrentSample = NULL; + + This->Parser.pInputPin->rtCurrent += MEDIATIME_FROM_BYTES(cbSrcStream); + } + if (tStop < This->StartOfFile) - return S_OK; + return S_OK; if (tStart < This->StartOfFile) - offset_src = BYTES_FROM_MEDIATIME(This->StartOfFile - tStart); + offset_src = BYTES_FROM_MEDIATIME(This->StartOfFile - tStart); while (bMoreData) { if (!This->pCurrentSample) { - /* cache media sample until it is ready to be despatched + /* cache media sample until it is ready to be dispatched * (i.e. we reach the end of the chunk) */ hr = OutputPin_GetDeliveryBuffer(&pOutputPin->pin, &This->pCurrentSample, NULL, NULL, 0); @@ -126,36 +165,39 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample) if (SUCCEEDED(hr)) { - REFERENCE_TIME tAviStart, tAviStop; + REFERENCE_TIME tAviStart, tAviStop, tOffset; - /* FIXME: hack */ - if (pOutputPin->dwSamplesProcessed == 0) { - IMediaSample_SetDiscontinuity(This->pCurrentSample, TRUE); - IMediaSample_SetSyncPoint(This->pCurrentSample, TRUE); - } + IMediaSample_SetDiscontinuity(This->pCurrentSample, pOutputPin->dwSamplesProcessed == 0); + IMediaSample_SetSyncPoint(This->pCurrentSample, TRUE); pOutputPin->dwSamplesProcessed++; - if (This->dwSampleSize) - tAviStart = (LONGLONG)ceil(10000000.0 * (float)(pOutputPin->dwSamplesProcessed - 1) * (float)IMediaSample_GetActualDataLength(This->pCurrentSample) / ((float)This->dwSampleSize * This->fSamplesPerSec)); - else - tAviStart = (LONGLONG)ceil(10000000.0 * (float)(pOutputPin->dwSamplesProcessed - 1) / (float)This->fSamplesPerSec); - if (This->dwSampleSize) - tAviStop = (LONGLONG)ceil(10000000.0 * (float)pOutputPin->dwSamplesProcessed * (float)IMediaSample_GetActualDataLength(This->pCurrentSample) / ((float)This->dwSampleSize * This->fSamplesPerSec)); - else - tAviStop = (LONGLONG)ceil(10000000.0 * (float)pOutputPin->dwSamplesProcessed / (float)This->fSamplesPerSec); + tOffset = MEDIATIME_FROM_BYTES(offset_src + chunk_remaining_bytes - IMediaSample_GetActualDataLength(This->pCurrentSample)); + tAviStart = bytepos_to_duration(This, tStart + tOffset); + + tOffset += MEDIATIME_FROM_BYTES(IMediaSample_GetActualDataLength(This->pCurrentSample)); + tAviStop = bytepos_to_duration(This, tStart + tOffset); IMediaSample_SetTime(This->pCurrentSample, &tAviStart, &tAviStop); hr = OutputPin_SendSample(&pOutputPin->pin, This->pCurrentSample); - if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) + if (hr != S_OK && hr != VFW_E_NOT_CONNECTED && hr != S_FALSE) ERR("Error sending sample (%x)\n", hr); } - if (This->pCurrentSample) + if (This->pCurrentSample && hr != S_FALSE) + { IMediaSample_Release(This->pCurrentSample); - - This->pCurrentSample = NULL; + This->pCurrentSample = NULL; + } + if (hr == S_FALSE) + { + /* Break out */ + This->Parser.pInputPin->rtCurrent -= MEDIATIME_FROM_BYTES(cbSrcStream - offset_src - chunk_remaining_bytes); + hr = S_OK; + break; + } + } else { @@ -169,7 +211,7 @@ static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample * pSample) offset_src += chunk_remaining_bytes; } - if (tStop >= This->EndOfFile) + if (tStop >= This->EndOfFile || (bytepos_to_duration(This, tStop) >= This->Parser.mediaSeeking.llStop)) { int i; @@ -213,6 +255,55 @@ static HRESULT WAVEParser_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt) return S_FALSE; } +static HRESULT WAVEParserImpl_seek(IBaseFilter *iface) +{ + WAVEParserImpl *This = (WAVEParserImpl *)iface; + PullPin *pPin = This->Parser.pInputPin; + IPin *victim = NULL; + LONGLONG newpos, curpos, endpos, bytepos; + + newpos = This->Parser.mediaSeeking.llCurrent; + curpos = bytepos_to_duration(This, pPin->rtCurrent); + endpos = bytepos_to_duration(This, This->EndOfFile); + bytepos = duration_to_bytepos(This, newpos); + + if (newpos > endpos) + { + WARN("Requesting position %x%08x beyond end of stream %x%08x\n", (DWORD)(newpos>>32), (DWORD)newpos, (DWORD)(endpos>>32), (DWORD)endpos); + return E_INVALIDARG; + } + + if (curpos/1000000 == newpos/1000000) + { + TRACE("Requesting position %x%08x same as current position %x%08x\n", (DWORD)(newpos>>32), (DWORD)newpos, (DWORD)(curpos>>32), (DWORD)curpos); + return S_OK; + } + + TRACE("Moving sound to %08u bytes!\n", (DWORD)BYTES_FROM_MEDIATIME(bytepos)); + + EnterCriticalSection(&pPin->thread_lock); + IPin_BeginFlush((IPin *)pPin); + + /* Make sure this is done while stopped, BeginFlush takes care of this */ + EnterCriticalSection(&This->Parser.csFilter); + IPin_ConnectedTo(This->Parser.ppPins[1], &victim); + if (victim) + { + IPin_NewSegment(victim, newpos, endpos, pPin->dRate); + IPin_Release(victim); + } + + pPin->rtStart = pPin->rtCurrent = bytepos; + ((Parser_OutputPin *)This->Parser.ppPins[1])->dwSamplesProcessed = 0; + LeaveCriticalSection(&This->Parser.csFilter); + + TRACE("Done flushing\n"); + IPin_EndFlush((IPin *)pPin); + LeaveCriticalSection(&pPin->thread_lock); + + return S_OK; +} + static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) { PullPin *This = (PullPin *)iface; @@ -233,7 +324,7 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) hr = IAsyncReader_SyncRead(This->pReader, pos, sizeof(list), (BYTE *)&list); pos += sizeof(list); - if (list.fcc != ckidRIFF) + if (list.fcc != FOURCC_RIFF) { ERR("Input stream not a RIFF file\n"); return E_FAIL; @@ -296,9 +387,17 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin) pWAVEParser->dwSampleSize = ((WAVEFORMATEX*)amt.pbFormat)->nBlockAlign; IAsyncReader_Length(This->pReader, &length, &avail); pWAVEParser->dwLength = length / (ULONGLONG)pWAVEParser->dwSampleSize; - pWAVEParser->fSamplesPerSec = ((WAVEFORMATEX*)amt.pbFormat)->nAvgBytesPerSec / ((WAVEFORMATEX*)amt.pbFormat)->nBlockAlign; + pWAVEParser->nSamplesPerSec = ((WAVEFORMATEX*)amt.pbFormat)->nSamplesPerSec; hr = Parser_AddPin(&(pWAVEParser->Parser), &piOutput, &props, &amt); - + CoTaskMemFree(amt.pbFormat); + + pWAVEParser->Parser.mediaSeeking.llCurrent = 0; + pWAVEParser->Parser.mediaSeeking.llStop = pWAVEParser->Parser.mediaSeeking.llDuration = bytepos_to_duration(pWAVEParser, pWAVEParser->EndOfFile); + TRACE("Duration: %lld seconds\n", pWAVEParser->Parser.mediaSeeking.llDuration / (LONGLONG)10000000); + + This->rtStop = pWAVEParser->EndOfFile; + This->rtStart = pWAVEParser->StartOfFile; + TRACE("WAVE File ok\n"); return hr; @@ -317,6 +416,12 @@ static HRESULT WAVEParser_Cleanup(LPVOID iface) return S_OK; } +static HRESULT WAVEParser_disconnect(LPVOID iface) +{ + /* TODO: Find and plug memory leaks */ + return S_OK; +} + HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv) { HRESULT hr; @@ -334,7 +439,7 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv) This->pCurrentSample = NULL; - hr = Parser_Create(&(This->Parser), &CLSID_WAVEParser, WAVEParser_Sample, WAVEParser_QueryAccept, WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, NULL, NULL, NULL); + hr = Parser_Create(&(This->Parser), &CLSID_WAVEParser, WAVEParser_Sample, WAVEParser_QueryAccept, WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, WAVEParser_disconnect, NULL, WAVEParserImpl_seek, NULL); if (FAILED(hr)) return hr; diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 39827bcfcd8..7eaf7691040 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3207,7 +3207,12 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, case EM_SETTARGETDEVICE: if (wParam == 0) { - editor->bWordWrap = (lParam == 0); + BOOL new = (lParam == 0); + if (editor->bWordWrap != new) + { + editor->bWordWrap = new; + ME_RewrapRepaint(editor); + } } else FIXME("Unsupported yet non NULL device in EM_SETTARGETDEVICE\n"); break; diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index d5cb3c7d504..625f7dd97cb 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -595,7 +595,7 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type) switch (type) { case 1: - /*Scroll absolutly*/ + /*Scroll absolutely*/ si.nPos = value; break; case 2: @@ -628,7 +628,7 @@ void ME_Scroll(ME_TextEditor *editor, int value, int type) void ME_UpdateScrollBar(ME_TextEditor *editor) { - /* Note that this is the only funciton that should ever call SetScrolLInfo + /* Note that this is the only function that should ever call SetScrolLInfo * with SIF_PAGE or SIF_RANGE. SetScrollPos and SetScrollRange should never * be used at all. */ diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 43b2a96ad46..8ede1e246ce 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -341,7 +341,7 @@ void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt) if (lf->lfItalic) fmt->dwEffects |= CFM_ITALIC; if (lf->lfUnderline) fmt->dwEffects |= CFM_UNDERLINE; /* notice that if a logfont was created with underline due to CFM_LINK, this - would add an erronious CFM_UNDERLINE. This isn't currently ever a problem */ + would add an erronous CFM_UNDERLINE. This isn't currently ever a problem */ if (lf->lfStrikeOut) fmt->dwEffects |= CFM_STRIKEOUT; fmt->bPitchAndFamily = lf->lfPitchAndFamily; fmt->bCharSet = lf->lfCharSet; diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 090eaad0320..f8a3d6a956c 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -852,7 +852,7 @@ static void test_EM_SCROLL(void) "a LONG LINE LONG LINE LONG LINE LONG LINE LONG LINE " "LONG LINE LONG LINE LONG LINE LONG LINE LONG LINE " "LONG LINE \nb\nc\nd\ne"); - for (j = 0; j < 12; j++) /* reset scrol position to top */ + for (j = 0; j < 12; j++) /* reset scroll position to top */ SendMessage(hwndRichEdit, EM_SCROLL, SB_PAGEUP, 0); /* get first visible line */ @@ -1532,7 +1532,7 @@ static DWORD CALLBACK test_EM_GETMODIFY_esCallback(DWORD_PTR dwCookie, { const char** str = (const char**)dwCookie; int size = strlen(*str); - if(size > 3) /* let's make it peice-meal for fun */ + if(size > 3) /* let's make it piecemeal for fun */ size = 3; *pcb = cb; if (*pcb > size) { diff --git a/dlls/riched20/undo.c b/dlls/riched20/undo.c index 426daf4ba1f..43f88103758 100644 --- a/dlls/riched20/undo.c +++ b/dlls/riched20/undo.c @@ -247,7 +247,7 @@ void ME_Undo(ME_TextEditor *editor) { if (!editor->pUndoStack) return; - /* watch out for uncommited transactions ! */ + /* watch out for uncommitted transactions ! */ assert(editor->pUndoStack->type == diUndoEndTransaction); editor->nUndoMode = umAddToRedo; @@ -280,7 +280,7 @@ void ME_Redo(ME_TextEditor *editor) { if (!editor->pRedoStack) return; - /* watch out for uncommited transactions ! */ + /* watch out for uncommitted transactions ! */ assert(editor->pRedoStack->type == diUndoEndTransaction); editor->nUndoMode = umAddBackToUndo; diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index c49658155ec..5841dc91a3c 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -24,7 +24,7 @@ * - transmit_as/represent as * - Multi-dimensional arrays * - Conversion functions (NdrConvert) - * - Checks for integer addition overflow in base type and user marshall functions + * - Checks for integer addition overflow in user marshall functions */ #include @@ -1901,7 +1901,7 @@ unsigned char * WINAPI NdrPointerMarshall(PMIDL_STUB_MESSAGE pStubMsg, TRACE("(%p,%p,%p)\n", pStubMsg, pMemory, pFormat); - /* incremement the buffer here instead of in PointerMarshall, + /* Increment the buffer here instead of in PointerMarshall, * as that is used by embedded pointers which already handle the incrementing * the buffer, and shouldn't write any additional pointer data to the wire */ if (*pFormat != RPC_FC_RP) @@ -2003,11 +2003,70 @@ void WINAPI NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* p /*********************************************************************** * NdrSimpleTypeUnmarshall [RPCRT4.@] + * + * Unmarshall a base type. + * + * NOTES + * Doesn't check that the buffer is long enough before copying, so the caller + * should do this. */ void WINAPI NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar ) { - NdrBaseTypeUnmarshall(pStubMsg, &pMemory, &FormatChar, 0); +#define BASE_TYPE_UNMARSHALL(type) \ + ALIGN_POINTER(pStubMsg->Buffer, sizeof(type)); \ + TRACE("pMemory: %p\n", pMemory); \ + *(type *)pMemory = *(type *)pStubMsg->Buffer; \ + pStubMsg->Buffer += sizeof(type); + + switch(FormatChar) + { + case RPC_FC_BYTE: + case RPC_FC_CHAR: + case RPC_FC_SMALL: + case RPC_FC_USMALL: + BASE_TYPE_UNMARSHALL(UCHAR); + TRACE("value: 0x%02x\n", *pMemory); + break; + case RPC_FC_WCHAR: + case RPC_FC_SHORT: + case RPC_FC_USHORT: + BASE_TYPE_UNMARSHALL(USHORT); + TRACE("value: 0x%04x\n", *(USHORT *)pMemory); + break; + case RPC_FC_LONG: + case RPC_FC_ULONG: + case RPC_FC_ERROR_STATUS_T: + case RPC_FC_ENUM32: + BASE_TYPE_UNMARSHALL(ULONG); + TRACE("value: 0x%08x\n", *(ULONG *)pMemory); + break; + case RPC_FC_FLOAT: + BASE_TYPE_UNMARSHALL(float); + TRACE("value: %f\n", *(float *)pMemory); + break; + case RPC_FC_DOUBLE: + BASE_TYPE_UNMARSHALL(double); + TRACE("value: %f\n", *(double *)pMemory); + break; + case RPC_FC_HYPER: + BASE_TYPE_UNMARSHALL(ULONGLONG); + TRACE("value: %s\n", wine_dbgstr_longlong(*(ULONGLONG *)pMemory)); + break; + case RPC_FC_ENUM16: + ALIGN_POINTER(pStubMsg->Buffer, sizeof(USHORT)); + TRACE("pMemory: %p\n", pMemory); + /* 16-bits on the wire, but int in memory */ + *(UINT *)pMemory = *(USHORT *)pStubMsg->Buffer; + pStubMsg->Buffer += sizeof(USHORT); + TRACE("value: 0x%08x\n", *(UINT *)pMemory); + break; + case RPC_FC_IGNORE: + break; + default: + FIXME("Unhandled base type: 0x%02x\n", FormatChar); + } +#undef BASE_TYPE_UNMARSHALL } /*********************************************************************** @@ -6013,7 +6072,7 @@ static unsigned char *WINAPI NdrBaseTypeUnmarshall( TRACE("*ppMemory: %p\n", *ppMemory); \ **(type **)ppMemory = *(type *)pStubMsg->Buffer; \ } \ - pStubMsg->Buffer += sizeof(type); + safe_buffer_increment(pStubMsg, sizeof(type)); switch(*pFormat) { diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 347db48cfac..06a7afab6c4 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -448,7 +448,7 @@ static void client_do_args_old_format(PMIDL_STUB_MESSAGE pStubMsg, /* counter */ unsigned short i; - /* NOTE: V1 style format does't terminate on the number_of_params + /* NOTE: V1 style format doesn't terminate on the number_of_params * condition as it doesn't have this attribute. Instead it * terminates when the stack size given in the header is exceeded. */ @@ -837,7 +837,7 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma return RetVal; } -/* calls a function with the specificed arguments, restoring the stack +/* Calls a function with the specified arguments, restoring the stack * properly afterwards as we don't know the calling convention of the * function */ #if defined __i386__ && defined _MSC_VER diff --git a/dlls/rpcrt4/ndr_stubless.h b/dlls/rpcrt4/ndr_stubless.h index 6ee5ff6d186..35a228d2094 100644 --- a/dlls/rpcrt4/ndr_stubless.h +++ b/dlls/rpcrt4/ndr_stubless.h @@ -35,7 +35,7 @@ typedef struct _NDR_PROC_HEADER * RPC_FC_BIND_PRIMITIVE = 32 - Implicit handle using handle_t created by * calling application * RPC_FC_AUTO_HANDLE = 33 - Automatic handle - * RPC_FC_CALLBACK_HANDLE = 34 - undocmented + * RPC_FC_CALLBACK_HANDLE = 34 - undocumented */ unsigned char handle_type; diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index d670a88d603..87ac4138b04 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -725,8 +725,8 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingA( RPC_CSTR StringBinding, RPC_BIND if (ret == RPC_S_OK) ret = RPCRT4_CreateBindingA(&bind, FALSE, (char*)Protseq); - if (ret == RPC_S_OK) - ret = RPCRT4_SetBindingObject(bind, &Uuid); + if (ret != RPC_S_OK) return ret; + ret = RPCRT4_SetBindingObject(bind, &Uuid); if (ret == RPC_S_OK) ret = RPCRT4_CompleteBindingA(bind, (char*)NetworkAddr, (char*)Endpoint, (char*)Options); @@ -764,8 +764,8 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingW( RPC_WSTR StringBinding, RPC_BIND if (ret == RPC_S_OK) ret = RPCRT4_CreateBindingW(&bind, FALSE, Protseq); - if (ret == RPC_S_OK) - ret = RPCRT4_SetBindingObject(bind, &Uuid); + if (ret != RPC_S_OK) return ret; + ret = RPCRT4_SetBindingObject(bind, &Uuid); if (ret == RPC_S_OK) ret = RPCRT4_CompleteBindingW(bind, NetworkAddr, Endpoint, Options); diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index 02e1dcd5600..8e565afdfc4 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -265,7 +265,7 @@ int WINAPI UuidEqual(UUID *Uuid1, UUID *Uuid2, RPC_STATUS *Status) * * PARAMS * UUID *Uuid [I] Uuid to compare - * RPC_STATUS *Status [O] retuns RPC_S_OK + * RPC_STATUS *Status [O] returns RPC_S_OK * * RETURNS * TRUE/FALSE @@ -944,8 +944,14 @@ int WINAPI I_RpcExceptionFilter(ULONG ExceptionCode) TRACE("0x%x\n", ExceptionCode); switch (ExceptionCode) { - case EXCEPTION_ACCESS_VIOLATION: - case EXCEPTION_ILLEGAL_INSTRUCTION: + case STATUS_DATATYPE_MISALIGNMENT: + case STATUS_BREAKPOINT: + case STATUS_ACCESS_VIOLATION: + case STATUS_ILLEGAL_INSTRUCTION: + case STATUS_PRIVILEGED_INSTRUCTION: + case STATUS_INSTRUCTION_MISALIGNMENT: + case STATUS_STACK_OVERFLOW: + case STATUS_POSSIBLE_DEADLOCK: return EXCEPTION_CONTINUE_SEARCH; default: return EXCEPTION_EXECUTE_HANDLER; diff --git a/dlls/rpcrt4/rpcss_np_client.h b/dlls/rpcrt4/rpcss_np_client.h index db65d432bca..b00066de518 100644 --- a/dlls/rpcrt4/rpcss_np_client.h +++ b/dlls/rpcrt4/rpcss_np_client.h @@ -23,4 +23,4 @@ HANDLE RPC_RpcssNPConnect(void); BOOL RPCRT4_SendReceiveNPMsg(HANDLE, PRPCSS_NP_MESSAGE, char *, PRPCSS_NP_REPLY); -#endif /* __RPCSS_NP_CLINET_H */ +#endif /* __RPCSS_NP_CLIENT_H */ diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 6987b557bab..5419f73a0e6 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -698,7 +698,7 @@ todo_wine { my_alloc_called = 0; ok(StubMsg.MemorySize == 0, "%s: memorysize touched in unmarshal\n", msgpfx); - /* if we're a server we still use the suppiled memory */ + /* If we're a server we still use the supplied memory */ StubMsg.Buffer = StubMsg.BufferStart; StubMsg.IsClient = 0; ptr = NdrSimpleStructUnmarshall( &StubMsg, &mem, formattypes, 0 ); diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index ace8aff4050..9fd99938da7 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -610,6 +610,46 @@ static void test_RpcStringBindingParseA(void) ok(options == NULL, "options was %p instead of NULL\n", options); } +static void test_I_RpcExceptionFilter(void) +{ + ULONG exception; + int retval; + int (WINAPI *pI_RpcExceptionFilter)(ULONG) = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "I_RpcExceptionFilter"); + + if (!pI_RpcExceptionFilter) + { + skip("I_RpcExceptionFilter not exported\n"); + return; + } + + for (exception = 0; exception < STATUS_REG_NAT_CONSUMPTION; exception++) + { + /* skip over uninteresting bits of the number space */ + if (exception == 2000) exception = 0x40000000; + if (exception == 0x40000005) exception = 0x80000000; + if (exception == 0x80000005) exception = 0xc0000000; + + retval = pI_RpcExceptionFilter(exception); + switch (exception) + { + case STATUS_DATATYPE_MISALIGNMENT: + case STATUS_BREAKPOINT: + case STATUS_ACCESS_VIOLATION: + case STATUS_ILLEGAL_INSTRUCTION: + case STATUS_PRIVILEGED_INSTRUCTION: + case 0xc00000aa /* STATUS_INSTRUCTION_MISALIGNMENT */: + case STATUS_STACK_OVERFLOW: + case 0xc0000194 /* STATUS_POSSIBLE_DEADLOCK */: + ok(retval == EXCEPTION_CONTINUE_SEARCH, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", + exception, EXCEPTION_CONTINUE_SEARCH, retval); + break; + default: + ok(retval == EXCEPTION_EXECUTE_HANDLER, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", + exception, EXCEPTION_EXECUTE_HANDLER, retval); + } + } +} + START_TEST( rpc ) { trace ( " ** Uuid Conversion and Comparison Tests **\n" ); @@ -620,4 +660,5 @@ START_TEST( rpc ) test_towers(); test_I_RpcMapWin32Status(); test_RpcStringBindingParseA(); + test_I_RpcExceptionFilter(); } diff --git a/dlls/rsaenh/mpi.c b/dlls/rsaenh/mpi.c index 45c3b94d600..23207dd3795 100644 --- a/dlls/rsaenh/mpi.c +++ b/dlls/rsaenh/mpi.c @@ -367,7 +367,7 @@ fast_s_mp_mul_digs (const mp_int * a, const mp_int * b, mp_int * c, int digs) tmpx = a->dp + tx; tmpy = b->dp + ty; - /* this is the number of times the loop will iterrate, essentially its + /* This is the number of times the loop will iterate, essentially it's while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); @@ -444,7 +444,7 @@ fast_s_mp_mul_high_digs (const mp_int * a, const mp_int * b, mp_int * c, int dig tmpx = a->dp + tx; tmpy = b->dp + ty; - /* this is the number of times the loop will iterrate, essentially its + /* This is the number of times the loop will iterate, essentially it's while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); @@ -544,7 +544,7 @@ int fast_s_mp_sqr (const mp_int * a, mp_int * b) tmpx = a->dp + tx; tmpy = a->dp + ty; - /* this is the number of times the loop will iterrate, essentially its + /* This is the number of times the loop will iterate, essentially it's while (tx++ < a->used && ty-- >= 0) { ... } */ iy = MIN(a->used-tx, ty+1); @@ -2259,7 +2259,7 @@ __ERR:mp_clear_multi (&x, &y, &u, &v, &A, &B, &C, &D, NULL); * are saved. Note also that the call to mp_mul can end up back * in this function if the a0, a1, b0, or b1 are above the threshold. * This is known as divide-and-conquer and leads to the famous - * O(N**lg(3)) or O(N**1.584) work which is asymptopically lower than + * O(N**lg(3)) or O(N**1.584) work which is asymptotically lower than * the standard O(N**2) that the baseline/comba methods use. * Generally though the overhead of this method doesn't pay off * until a certain size (N ~ 80) is reached. diff --git a/dlls/rsaenh/rc2.c b/dlls/rsaenh/rc2.c index 82b7bd3d694..6b0d2a5689c 100644 --- a/dlls/rsaenh/rc2.c +++ b/dlls/rsaenh/rc2.c @@ -70,7 +70,7 @@ int rc2_setup(const unsigned char *key, int keylen, int bits, int rounds, rc2_ke * key schedule. One which is normal, and anther which has a hook to * use a reduced key length. * BSAFE uses the 'retarded' version. What I previously shipped is - * the same as specifying 1024 for the 'bits' parameter. Bsafe uses + * the same as specifying 1024 for the 'bits' parameter. BSAFE uses * a version where the bits parameter is the same as len*8 */ /* Seems like MS uses the 'retarded' version, too. * Adjust effective keylen bits */ diff --git a/dlls/sane.ds/capability.c b/dlls/sane.ds/capability.c index ad6a166a8b6..6b6867e02a6 100644 --- a/dlls/sane.ds/capability.c +++ b/dlls/sane.ds/capability.c @@ -147,8 +147,8 @@ TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action) twCC = TWCC_CAPUNSUPPORTED; break; case CAP_XFERCOUNT: - /* This is a required capability that every source need to - support but we havev't implemented yet. */ + /* This is a required capability that every source needs to + support but we haven't implemented it yet. */ twCC = TWCC_SUCCESS; break; /*case ICAP_COMPRESSION:*/ diff --git a/dlls/sane.ds/sane_i.h b/dlls/sane.ds/sane_i.h index 11b6eeb9e20..c1f0bee1be6 100644 --- a/dlls/sane.ds/sane_i.h +++ b/dlls/sane.ds/sane_i.h @@ -70,7 +70,7 @@ struct tagActiveDS BOOL sane_param_valid; /* true if valid sane_param*/ INT deviceIndex; /* index of the current device */ #endif - /* Capabiblities */ + /* Capabilities */ TW_UINT16 capXferMech; /* ICAP_XFERMECH */ } activeDS; diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index bf952eff865..2b0f92075ed 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -3110,6 +3110,11 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyA( SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } + if (PropertyBufferSize && PropertyBuffer == NULL) + { + SetLastError(ERROR_INVALID_DATA); + return FALSE; + } devInfo = (struct DeviceInfo *)DeviceInfoData->Reserved; if (Property < sizeof(PropertyMap) / sizeof(PropertyMap[0]) && PropertyMap[Property].nameA) @@ -3118,14 +3123,14 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyA( LONG l = RegQueryValueExA(devInfo->key, PropertyMap[Property].nameA, NULL, PropertyRegDataType, PropertyBuffer, &size); - if (RequiredSize) - *RequiredSize = size; - if (!PropertyBuffer) - ; /* do nothing, ret is already FALSE, last error is already set */ + if (l == ERROR_MORE_DATA || !PropertyBufferSize) + SetLastError(ERROR_INSUFFICIENT_BUFFER); else if (!l) ret = TRUE; else SetLastError(l); + if (RequiredSize) + *RequiredSize = size; } return ret; } @@ -3166,6 +3171,11 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW( SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } + if (PropertyBufferSize && PropertyBuffer == NULL) + { + SetLastError(ERROR_INVALID_DATA); + return FALSE; + } devInfo = (struct DeviceInfo *)DeviceInfoData->Reserved; if (Property < sizeof(PropertyMap) / sizeof(PropertyMap[0]) && PropertyMap[Property].nameW) @@ -3174,14 +3184,14 @@ BOOL WINAPI SetupDiGetDeviceRegistryPropertyW( LONG l = RegQueryValueExW(devInfo->key, PropertyMap[Property].nameW, NULL, PropertyRegDataType, PropertyBuffer, &size); - if (RequiredSize) - *RequiredSize = size; - if (!PropertyBuffer) - ; /* do nothing, ret is already FALSE, last error is already set */ + if (l == ERROR_MORE_DATA || !PropertyBufferSize) + SetLastError(ERROR_INSUFFICIENT_BUFFER); else if (!l) ret = TRUE; else SetLastError(l); + if (RequiredSize) + *RequiredSize = size; } return ret; } diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c index ca9e0694c22..e46a8214f0f 100644 --- a/dlls/setupapi/fakedll.c +++ b/dlls/setupapi/fakedll.c @@ -276,6 +276,27 @@ static BOOL is_fake_dll( HANDLE h ) return !memcmp( dos + 1, fakedll_signature, sizeof(fakedll_signature) ); } +/* create directories leading to a given file */ +static void create_directories( const WCHAR *name ) +{ + WCHAR *path, *p; + + /* create the directory/directories */ + path = HeapAlloc(GetProcessHeap(), 0, (strlenW(name) + 1)*sizeof(WCHAR)); + strcpyW(path, name); + + p = strchrW(path, '\\'); + while (p != NULL) + { + *p = 0; + if (!CreateDirectoryW(path, NULL)) + TRACE("Couldn't create directory %s - error: %d\n", wine_dbgstr_w(path), GetLastError()); + *p = '\\'; + p = strchrW(p+1, '\\'); + } + HeapFree(GetProcessHeap(), 0, path); +} + /*********************************************************************** * create_fake_dll */ @@ -285,6 +306,13 @@ BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) HMODULE module; BOOL ret; + /* check for empty name which means to only create the directory */ + if (name[strlenW(name) - 1] == '\\') + { + create_directories( name ); + return TRUE; + } + /* first check for an existing file */ h = CreateFileW( name, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); if (h != INVALID_HANDLE_VALUE) @@ -301,27 +329,7 @@ BOOL create_fake_dll( const WCHAR *name, const WCHAR *source ) } else { - if (GetLastError() == ERROR_PATH_NOT_FOUND) - { - WCHAR *path; - WCHAR *pathel; - - /* create the directory/directories */ - path = HeapAlloc(GetProcessHeap(), 0, (strlenW(name) + 1)*sizeof(WCHAR)); - strcpyW(path, name); - - pathel = strchrW(path, '\\'); - while (pathel != NULL) - { - *pathel = 0; - if (!CreateDirectoryW(path, NULL)) - TRACE("Couldn't create directory %s - error: %d\n", wine_dbgstr_w(path), GetLastError()); - *pathel = '\\'; - pathel = strchrW(pathel+1, '\\'); - } - - HeapFree(GetProcessHeap(), 0, path); - } + if (GetLastError() == ERROR_PATH_NOT_FOUND) create_directories( name ); h = CreateFileW( name, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL ); if (h == INVALID_HANDLE_VALUE) diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index 3c5534732fd..321d4d4196c 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -28,6 +28,7 @@ #include "wingdi.h" #include "winuser.h" #include "winnls.h" +#include "winsvc.h" #include "setupapi.h" #include "setupapi_private.h" #include "wine/unicode.h" @@ -72,12 +73,25 @@ static const WCHAR DelReg[] = {'D','e','l','R','e','g',0}; static const WCHAR BitReg[] = {'B','i','t','R','e','g',0}; static const WCHAR UpdateInis[] = {'U','p','d','a','t','e','I','n','i','s',0}; static const WCHAR CopyINF[] = {'C','o','p','y','I','N','F',0}; +static const WCHAR AddService[] = {'A','d','d','S','e','r','v','i','c','e',0}; +static const WCHAR DelService[] = {'D','e','l','S','e','r','v','i','c','e',0}; static const WCHAR UpdateIniFields[] = {'U','p','d','a','t','e','I','n','i','F','i','e','l','d','s',0}; static const WCHAR RegisterDlls[] = {'R','e','g','i','s','t','e','r','D','l','l','s',0}; static const WCHAR UnregisterDlls[] = {'U','n','r','e','g','i','s','t','e','r','D','l','l','s',0}; static const WCHAR ProfileItems[] = {'P','r','o','f','i','l','e','I','t','e','m','s',0}; static const WCHAR WineFakeDlls[] = {'W','i','n','e','F','a','k','e','D','l','l','s',0}; - +static const WCHAR DisplayName[] = {'D','i','s','p','l','a','y','N','a','m','e',0}; +static const WCHAR Description[] = {'D','e','s','c','r','i','p','t','i','o','n',0}; +static const WCHAR ServiceBinary[] = {'S','e','r','v','i','c','e','B','i','n','a','r','y',0}; +static const WCHAR StartName[] = {'S','t','a','r','t','N','a','m','e',0}; +static const WCHAR LoadOrderGroup[] = {'L','o','a','d','O','r','d','e','r','G','r','o','u','p',0}; +static const WCHAR ServiceType[] = {'S','e','r','v','i','c','e','T','y','p','e',0}; +static const WCHAR StartType[] = {'S','t','a','r','t','T','y','p','e',0}; +static const WCHAR ErrorControl[] = {'E','r','r','o','r','C','o','n','t','r','o','l',0}; + +static const WCHAR ServicesKey[] = {'S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'S','e','r','v','i','c','e','s',0}; /*********************************************************************** * get_field_string @@ -104,6 +118,24 @@ static WCHAR *get_field_string( INFCONTEXT *context, DWORD index, WCHAR *buffer, /*********************************************************************** + * dup_section_line_field + * + * Retrieve the contents of a field in a newly-allocated buffer. + */ +static WCHAR *dup_section_line_field( HINF hinf, const WCHAR *section, const WCHAR *line, DWORD index ) +{ + INFCONTEXT context; + DWORD size; + WCHAR *buffer; + + if (!SetupFindFirstLineW( hinf, section, line, &context )) return NULL; + if (!SetupGetStringFieldW( &context, index, NULL, 0, &size )) return NULL; + if (!(buffer = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) return NULL; + if (!SetupGetStringFieldW( &context, index, buffer, size, NULL )) buffer[0] = 0; + return buffer; +} + +/*********************************************************************** * copy_files_callback * * Called once for each CopyFiles entry in a given section. @@ -1000,8 +1032,9 @@ void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, LPCWSTR cmdline, I static const WCHAR nt_platformW[] = {'.','n','t',0}; #endif static const WCHAR nt_genericW[] = {'.','n','t',0}; + static const WCHAR servicesW[] = {'.','S','e','r','v','i','c','e','s',0}; - WCHAR *s, *path, section[MAX_PATH + sizeof(nt_platformW)/sizeof(WCHAR)]; + WCHAR *s, *path, section[MAX_PATH + (sizeof(nt_platformW) + sizeof(servicesW)) / sizeof(WCHAR)]; void *callback_context; UINT mode; HINF hinf; @@ -1044,6 +1077,8 @@ void WINAPI InstallHinfSectionW( HWND hwnd, HINSTANCE handle, LPCWSTR cmdline, I SetupDefaultQueueCallbackW, callback_context, NULL, NULL ); SetupTermDefaultQueueCallback( callback_context ); + strcatW( section, servicesW ); + SetupInstallServicesFromInfSectionW( hinf, section, 0 ); SetupCloseInfFile( hinf ); /* FIXME: should check the mode and maybe reboot */ @@ -1066,15 +1101,214 @@ void WINAPI InstallHinfSectionA( HWND hwnd, HINSTANCE handle, LPCSTR cmdline, IN } } + +/*********************************************************************** + * add_service + * + * Create a new service. Helper for SetupInstallServicesFromInfSectionW. + */ +static BOOL add_service( SC_HANDLE scm, HINF hinf, const WCHAR *name, const WCHAR *section, DWORD flags ) +{ + struct registry_callback_info info; + SC_HANDLE service; + INFCONTEXT context; + SERVICE_DESCRIPTIONW descr; + WCHAR *display_name, *start_name, *load_order, *binary_path; + INT service_type = 0, start_type = 0, error_control = 0; + DWORD size; + HKEY hkey; + + /* first the mandatory fields */ + + if (!SetupFindFirstLineW( hinf, section, ServiceType, &context ) || + !SetupGetIntField( &context, 1, &service_type )) + { + SetLastError( ERROR_BAD_SERVICE_INSTALLSECT ); + return FALSE; + } + if (!SetupFindFirstLineW( hinf, section, StartType, &context ) || + !SetupGetIntField( &context, 1, &start_type )) + { + SetLastError( ERROR_BAD_SERVICE_INSTALLSECT ); + return FALSE; + } + if (!SetupFindFirstLineW( hinf, section, ErrorControl, &context ) || + !SetupGetIntField( &context, 1, &error_control )) + { + SetLastError( ERROR_BAD_SERVICE_INSTALLSECT ); + return FALSE; + } + if (!(binary_path = dup_section_line_field( hinf, section, ServiceBinary, 1 ))) + { + SetLastError( ERROR_BAD_SERVICE_INSTALLSECT ); + return FALSE; + } + + /* now the optional fields */ + + display_name = dup_section_line_field( hinf, section, DisplayName, 1 ); + start_name = dup_section_line_field( hinf, section, StartName, 1 ); + load_order = dup_section_line_field( hinf, section, LoadOrderGroup, 1 ); + descr.lpDescription = dup_section_line_field( hinf, section, Description, 1 ); + + /* FIXME: Dependencies field */ + /* FIXME: Security field */ + + TRACE( "service %s display %s type %x start %x error %x binary %s order %s startname %s flags %x\n", + debugstr_w(name), debugstr_w(display_name), service_type, start_type, error_control, + debugstr_w(binary_path), debugstr_w(load_order), debugstr_w(start_name), flags ); + + service = CreateServiceW( scm, name, display_name, SERVICE_ALL_ACCESS, + service_type, start_type, error_control, binary_path, + load_order, NULL, NULL, start_name, NULL ); + if (service) + { + if (descr.lpDescription) ChangeServiceConfig2W( service, SERVICE_CONFIG_DESCRIPTION, &descr ); + } + else + { + if (GetLastError() != ERROR_SERVICE_EXISTS) goto done; + service = OpenServiceW( scm, name, SERVICE_QUERY_CONFIG|SERVICE_CHANGE_CONFIG|SERVICE_START ); + if (!service) goto done; + + if (flags & (SPSVCINST_NOCLOBBER_DISPLAYNAME | SPSVCINST_NOCLOBBER_STARTTYPE | + SPSVCINST_NOCLOBBER_ERRORCONTROL | SPSVCINST_NOCLOBBER_LOADORDERGROUP)) + { + QUERY_SERVICE_CONFIGW *config = NULL; + + if (!QueryServiceConfigW( service, NULL, 0, &size ) && + GetLastError() == ERROR_INSUFFICIENT_BUFFER) + config = HeapAlloc( GetProcessHeap(), 0, size ); + if (config && QueryServiceConfigW( service, config, size, &size )) + { + if (flags & SPSVCINST_NOCLOBBER_STARTTYPE) start_type = config->dwStartType; + if (flags & SPSVCINST_NOCLOBBER_ERRORCONTROL) error_control = config->dwErrorControl; + if (flags & SPSVCINST_NOCLOBBER_DISPLAYNAME) + { + HeapFree( GetProcessHeap(), 0, display_name ); + display_name = strdupW( config->lpDisplayName ); + } + if (flags & SPSVCINST_NOCLOBBER_LOADORDERGROUP) + { + HeapFree( GetProcessHeap(), 0, load_order ); + load_order = strdupW( config->lpLoadOrderGroup ); + } + } + HeapFree( GetProcessHeap(), 0, config ); + } + TRACE( "changing %s display %s type %x start %x error %x binary %s loadorder %s startname %s\n", + debugstr_w(name), debugstr_w(display_name), service_type, start_type, error_control, + debugstr_w(binary_path), debugstr_w(load_order), debugstr_w(start_name) ); + + ChangeServiceConfigW( service, service_type, start_type, error_control, binary_path, + load_order, NULL, NULL, start_name, NULL, display_name ); + + if (!(flags & SPSVCINST_NOCLOBBER_DESCRIPTION)) + ChangeServiceConfig2W( service, SERVICE_CONFIG_DESCRIPTION, &descr ); + } + + /* execute the AddReg, DelReg and BitReg entries */ + + info.default_root = 0; + if (!RegOpenKeyW( HKEY_LOCAL_MACHINE, ServicesKey, &hkey )) + { + RegOpenKeyW( hkey, name, &info.default_root ); + RegCloseKey( hkey ); + } + if (info.default_root) + { + info.delete = TRUE; + iterate_section_fields( hinf, section, DelReg, registry_callback, &info ); + info.delete = FALSE; + iterate_section_fields( hinf, section, AddReg, registry_callback, &info ); + RegCloseKey( info.default_root ); + } + iterate_section_fields( hinf, section, BitReg, bitreg_callback, NULL ); + + if (flags & SPSVCINST_STARTSERVICE) StartServiceW( service, 0, NULL ); + CloseServiceHandle( service ); + +done: + if (!service) WARN( "failed err %u\n", GetLastError() ); + HeapFree( GetProcessHeap(), 0, binary_path ); + HeapFree( GetProcessHeap(), 0, display_name ); + HeapFree( GetProcessHeap(), 0, start_name ); + HeapFree( GetProcessHeap(), 0, load_order ); + HeapFree( GetProcessHeap(), 0, descr.lpDescription ); + return service != 0; +} + + +/*********************************************************************** + * del_service + * + * Delete service. Helper for SetupInstallServicesFromInfSectionW. + */ +static BOOL del_service( SC_HANDLE scm, HINF hinf, const WCHAR *name, DWORD flags ) +{ + BOOL ret; + SC_HANDLE service; + SERVICE_STATUS status; + + if (!(service = OpenServiceW( scm, name, SERVICE_STOP | DELETE ))) + { + if (GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST) return TRUE; + WARN( "cannot open %s err %u\n", debugstr_w(name), GetLastError() ); + return FALSE; + } + if (flags & SPSVCINST_STOPSERVICE) ControlService( service, SERVICE_CONTROL_STOP, &status ); + TRACE( "deleting %s\n", debugstr_w(name) ); + ret = DeleteService( service ); + CloseServiceHandle( service ); + return ret; +} + + /*********************************************************************** * SetupInstallServicesFromInfSectionW (SETUPAPI.@) */ -BOOL WINAPI SetupInstallServicesFromInfSectionW( HINF Inf, PCWSTR SectionName, DWORD Flags) +BOOL WINAPI SetupInstallServicesFromInfSectionW( HINF hinf, PCWSTR section, DWORD flags ) { - FIXME("(%p, %s, %d) stub!\n", Inf, debugstr_w(SectionName), Flags); - return FALSE; + WCHAR service_name[MAX_INF_STRING_LENGTH]; + WCHAR service_section[MAX_INF_STRING_LENGTH]; + SC_HANDLE scm; + INFCONTEXT context; + INT section_flags; + BOOL ok, ret = FALSE; + + if (!(scm = OpenSCManagerW( NULL, NULL, SC_MANAGER_ALL_ACCESS ))) return FALSE; + + if (!(ok = SetupFindFirstLineW( hinf, section, AddService, &context ))) + SetLastError( ERROR_SECTION_NOT_FOUND ); + while (ok) + { + if (!SetupGetStringFieldW( &context, 1, service_name, MAX_INF_STRING_LENGTH, NULL )) + continue; + if (!SetupGetIntField( &context, 2, §ion_flags )) section_flags = 0; + if (!SetupGetStringFieldW( &context, 3, service_section, MAX_INF_STRING_LENGTH, NULL )) + continue; + if (!(ret = add_service( scm, hinf, service_name, service_section, section_flags | flags ))) + goto done; + ok = SetupFindNextMatchLineW( &context, AddService, &context ); + } + + if (!(ok = SetupFindFirstLineW( hinf, section, DelService, &context ))) + SetLastError( ERROR_SECTION_NOT_FOUND ); + while (ok) + { + if (!SetupGetStringFieldW( &context, 1, service_name, MAX_INF_STRING_LENGTH, NULL )) + continue; + if (!SetupGetIntField( &context, 2, §ion_flags )) section_flags = 0; + if (!(ret = del_service( scm, hinf, service_name, section_flags | flags ))) goto done; + ok = SetupFindNextMatchLineW( &context, AddService, &context ); + } + if (ret) SetLastError( ERROR_SUCCESS ); + done: + CloseServiceHandle( scm ); + return ret; } + /*********************************************************************** * SetupInstallServicesFromInfSectionA (SETUPAPI.@) */ diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c index e63639afdf6..3212d5a546c 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -73,29 +73,6 @@ struct file_queue }; -static inline WCHAR *strdupW( const WCHAR *str ) -{ - WCHAR *ret = NULL; - if (str) - { - int len = (strlenW(str) + 1) * sizeof(WCHAR); - if ((ret = HeapAlloc( GetProcessHeap(), 0, len ))) memcpy( ret, str, len ); - } - return ret; -} - -static inline char *strdupWtoA( const WCHAR *str ) -{ - char *ret = NULL; - if (str) - { - DWORD len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL ); - if ((ret = HeapAlloc( GetProcessHeap(), 0, len ))) - WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL ); - } - return ret; -} - /* append a file operation to a queue */ static inline void queue_file_op( struct file_op_queue *queue, struct file_op *op ) { diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h index a3fe223390b..caf1d3bfd39 100644 --- a/dlls/setupapi/setupapi_private.h +++ b/dlls/setupapi/setupapi_private.h @@ -29,6 +29,29 @@ #define REGPART_RENAME "\\Rename" #define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager" +static inline WCHAR *strdupW( const WCHAR *str ) +{ + WCHAR *ret = NULL; + if (str) + { + int len = (lstrlenW(str) + 1) * sizeof(WCHAR); + if ((ret = HeapAlloc( GetProcessHeap(), 0, len ))) memcpy( ret, str, len ); + } + return ret; +} + +static inline char *strdupWtoA( const WCHAR *str ) +{ + char *ret = NULL; + if (str) + { + DWORD len = WideCharToMultiByte( CP_ACP, 0, str, -1, NULL, 0, NULL, NULL ); + if ((ret = HeapAlloc( GetProcessHeap(), 0, len ))) + WideCharToMultiByte( CP_ACP, 0, str, -1, ret, len, NULL, NULL ); + } + return ret; +} + static inline WCHAR *strdupAtoW( const char *str ) { WCHAR *ret = NULL; diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index 7f63afcc1df..f3f6c99ca92 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -45,17 +45,24 @@ static HKEY (WINAPI *pSetupDiOpenClassRegKeyExA)(GUID*,REGSAM,DWORD,PCSTR,PV static HKEY (WINAPI *pSetupDiOpenDevRegKey)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, DWORD, DWORD, REGSAM); static HKEY (WINAPI *pSetupDiCreateDevRegKeyW)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, DWORD, DWORD, HINF, PCWSTR); static BOOL (WINAPI *pSetupDiCreateDeviceInfoA)(HDEVINFO, PCSTR, GUID *, PCSTR, HWND, DWORD, PSP_DEVINFO_DATA); +static BOOL (WINAPI *pSetupDiCreateDeviceInfoW)(HDEVINFO, PCWSTR, GUID *, PCWSTR, HWND, DWORD, PSP_DEVINFO_DATA); static BOOL (WINAPI *pSetupDiGetDeviceInstanceIdA)(HDEVINFO, PSP_DEVINFO_DATA, PSTR, DWORD, PDWORD); static BOOL (WINAPI *pSetupDiGetDeviceInterfaceDetailA)(HDEVINFO, PSP_DEVICE_INTERFACE_DATA, PSP_DEVICE_INTERFACE_DETAIL_DATA_A, DWORD, PDWORD, PSP_DEVINFO_DATA); static BOOL (WINAPI *pSetupDiGetDeviceInterfaceDetailW)(HDEVINFO, PSP_DEVICE_INTERFACE_DATA, PSP_DEVICE_INTERFACE_DETAIL_DATA_W, DWORD, PDWORD, PSP_DEVINFO_DATA); static BOOL (WINAPI *pSetupDiRegisterDeviceInfo)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, PSP_DETSIG_CMPPROC, PVOID, PSP_DEVINFO_DATA); static HDEVINFO (WINAPI *pSetupDiGetClassDevsA)(CONST GUID *, LPCSTR, HWND, DWORD); +static HDEVINFO (WINAPI *pSetupDiGetClassDevsW)(CONST GUID *, LPCWSTR, HWND, DWORD); +static BOOL (WINAPI *pSetupDiSetDeviceRegistryPropertyA)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, const BYTE *, DWORD); +static BOOL (WINAPI *pSetupDiSetDeviceRegistryPropertyW)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, const BYTE *, DWORD); +static BOOL (WINAPI *pSetupDiGetDeviceRegistryPropertyA)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, PDWORD, PBYTE, DWORD, PDWORD); +static BOOL (WINAPI *pSetupDiGetDeviceRegistryPropertyW)(HDEVINFO, PSP_DEVINFO_DATA, DWORD, PDWORD, PBYTE, DWORD, PDWORD); static void init_function_pointers(void) { hSetupAPI = GetModuleHandleA("setupapi.dll"); pSetupDiCreateDeviceInfoA = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoA"); + pSetupDiCreateDeviceInfoW = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoW"); pSetupDiCreateDeviceInfoList = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoList"); pSetupDiCreateDeviceInfoListExW = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInfoListExW"); pSetupDiCreateDeviceInterfaceA = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDeviceInterfaceA"); @@ -72,6 +79,11 @@ static void init_function_pointers(void) pSetupDiCreateDevRegKeyW = (void *)GetProcAddress(hSetupAPI, "SetupDiCreateDevRegKeyW"); pSetupDiRegisterDeviceInfo = (void *)GetProcAddress(hSetupAPI, "SetupDiRegisterDeviceInfo"); pSetupDiGetClassDevsA = (void *)GetProcAddress(hSetupAPI, "SetupDiGetClassDevsA"); + pSetupDiGetClassDevsW = (void *)GetProcAddress(hSetupAPI, "SetupDiGetClassDevsW"); + pSetupDiSetDeviceRegistryPropertyA = (void *)GetProcAddress(hSetupAPI, "SetupDiSetDeviceRegistryPropertyA"); + pSetupDiSetDeviceRegistryPropertyW = (void *)GetProcAddress(hSetupAPI, "SetupDiSetDeviceRegistryPropertyW"); + pSetupDiGetDeviceRegistryPropertyA = (void *)GetProcAddress(hSetupAPI, "SetupDiGetDeviceRegistryPropertyA"); + pSetupDiGetDeviceRegistryPropertyW = (void *)GetProcAddress(hSetupAPI, "SetupDiGetDeviceRegistryPropertyW"); } /* RegDeleteTreeW from dlls/advapi32/registry.c */ @@ -844,6 +856,192 @@ static void testRegisterAndGetDetail(void) pSetupDiDestroyDeviceInfoList(set); } +static void testDeviceRegistryPropertyA() +{ + HDEVINFO set; + GUID guid = {0x6a55b5a4, 0x3f65, 0x11db, {0xb7,0x04, + 0x00,0x11,0x95,0x5c,0x2b,0xdb}}; + SP_DEVINFO_DATA devInfo = { sizeof(SP_DEVINFO_DATA), { 0 } }; + CHAR devName[] = "LEGACY_BOGUS"; + CHAR friendlyName[] = "Bogus"; + CHAR buf[6] = ""; + DWORD buflen = 6; + DWORD size; + DWORD regType; + BOOL ret; + + SetLastError(0xdeadbeef); + set = pSetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); + ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsA failed: %08x\n", + GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiCreateDeviceInfoA(set, devName, &guid, NULL, NULL, + DICD_GENERATE_ID, &devInfo); + ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyA(NULL, NULL, -1, NULL, 0); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyA(set, NULL, -1, NULL, 0); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyA(set, &devInfo, -1, NULL, 0); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_REG_PROPERTY, + "Expected ERROR_INVALID_REG_PROPERTY, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, 0); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_DATA, + "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, + (PBYTE)friendlyName, buflen); + ok(ret, "SetupDiSetDeviceRegistryPropertyA failed: %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyA(NULL, NULL, -1, NULL, NULL, 0, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyA(set, NULL, -1, NULL, NULL, 0, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, -1, NULL, NULL, 0, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_REG_PROPERTY, + "Expected ERROR_INVALID_REG_PROPERTY, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, NULL, buflen, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_DATA, + "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, NULL, 0, &size); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %08x\n", GetLastError()); + ok(buflen == size, "Unexpected size: %d\n", size); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, (PBYTE)buf, buflen, NULL); + ok(ret, "SetupDiGetDeviceRegistryPropertyA failed: %08x\n", GetLastError()); + ok(!lstrcmpiA(friendlyName, buf), "Unexpected property\n"); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, + ®Type, (PBYTE)buf, buflen, NULL); + ok(ret, "SetupDiGetDeviceRegistryPropertyA failed: %08x\n", GetLastError()); + ok(!lstrcmpiA(friendlyName, buf), "Unexpected value of property\n"); + ok(regType == REG_SZ, "Unexpected type of property: %d\n", regType); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, 0); + ok(ret, "SetupDiSetDeviceRegistryPropertyA failed: %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyA(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, (PBYTE)buf, buflen, &size); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_DATA, + "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); + pSetupDiDestroyDeviceInfoList(set); +} + +static void testDeviceRegistryPropertyW() +{ + HDEVINFO set; + GUID guid = {0x6a55b5a4, 0x3f65, 0x11db, {0xb7,0x04, + 0x00,0x11,0x95,0x5c,0x2b,0xdb}}; + SP_DEVINFO_DATA devInfo = { sizeof(SP_DEVINFO_DATA), { 0 } }; + WCHAR devName[] = {'L','E','G','A','C','Y','_','B','O','G','U','S',0}; + WCHAR friendlyName[] = {'B','o','g','u','s',0}; + WCHAR buf[6] = {0}; + DWORD buflen = 6 * sizeof(WCHAR); + DWORD size; + DWORD regType; + BOOL ret; + + SetLastError(0xdeadbeef); + set = pSetupDiGetClassDevsW(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); + ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed: %08x\n", + GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiCreateDeviceInfoW(set, devName, &guid, NULL, NULL, + DICD_GENERATE_ID, &devInfo); + ok(ret, "SetupDiCreateDeviceInfoW failed: %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyW(NULL, NULL, -1, NULL, 0); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyW(set, NULL, -1, NULL, 0); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyW(set, &devInfo, -1, NULL, 0); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_REG_PROPERTY, + "Expected ERROR_INVALID_REG_PROPERTY, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, 0); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_DATA, + "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, + (PBYTE)friendlyName, buflen); + ok(ret, "SetupDiSetDeviceRegistryPropertyW failed: %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyW(NULL, NULL, -1, NULL, NULL, 0, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyW(set, NULL, -1, NULL, NULL, 0, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, -1, NULL, NULL, 0, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_REG_PROPERTY, + "Expected ERROR_INVALID_REG_PROPERTY, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, NULL, buflen, NULL); + ok(!ret && GetLastError() == ERROR_INVALID_DATA, + "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, NULL, 0, &size); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %08x\n", GetLastError()); + ok(buflen == size, "Unexpected size: %d\n", size); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, (PBYTE)buf, buflen, NULL); + ok(ret, "SetupDiGetDeviceRegistryPropertyW failed: %08x\n", GetLastError()); + ok(!lstrcmpiW(friendlyName, buf), "Unexpected property\n"); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, + ®Type, (PBYTE)buf, buflen, NULL); + ok(ret, "SetupDiGetDeviceRegistryPropertyW failed: %08x\n", GetLastError()); + ok(!lstrcmpiW(friendlyName, buf), "Unexpected value of property\n"); + ok(regType == REG_SZ, "Unexpected type of property: %d\n", regType); + SetLastError(0xdeadbeef); + ret = pSetupDiSetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, 0); + ok(ret, "SetupDiSetDeviceRegistryPropertyW failed: %08x\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = pSetupDiGetDeviceRegistryPropertyW(set, &devInfo, SPDRP_FRIENDLYNAME, + NULL, (PBYTE)buf, buflen, &size); + todo_wine + ok(!ret && GetLastError() == ERROR_INVALID_DATA, + "Expected ERROR_INVALID_DATA, got %08x\n", GetLastError()); + pSetupDiDestroyDeviceInfoList(set); +} + START_TEST(devinst) { init_function_pointers(); @@ -865,4 +1063,6 @@ START_TEST(devinst) testGetDeviceInterfaceDetail(); testDevRegKey(); testRegisterAndGetDetail(); + testDeviceRegistryPropertyA(); + testDeviceRegistryPropertyW(); } diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c index 5a99eaa876b..0044f019e4b 100644 --- a/dlls/setupapi/tests/install.c +++ b/dlls/setupapi/tests/install.c @@ -166,7 +166,6 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_SECTION_NOT_FOUND, "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); SetupCloseInfFile(infhandle); @@ -179,7 +178,6 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_SECTION_NOT_FOUND, "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); SetupCloseInfFile(infhandle); @@ -192,7 +190,6 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); SetupCloseInfFile(infhandle); @@ -205,7 +202,6 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); SetupCloseInfFile(infhandle); @@ -218,7 +214,6 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); SetupCloseInfFile(infhandle); @@ -231,7 +226,6 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); SetupCloseInfFile(infhandle); @@ -244,7 +238,6 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); - todo_wine ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); SetupCloseInfFile(infhandle); @@ -256,12 +249,9 @@ static void test_install_svc_from(void) infhandle = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); - todo_wine - { ok(ret, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); - } SetupCloseInfFile(infhandle); DeleteFile(inffile); @@ -269,12 +259,10 @@ static void test_install_svc_from(void) /* Open the service to see if it's really there */ svc_handle = OpenServiceA(scm_handle, "Winetest", DELETE); - todo_wine ok(svc_handle != NULL, "Service was not created\n"); SetLastError(0xdeadbeef); ret = DeleteService(svc_handle); - todo_wine ok(ret, "Service could not be deleted : %d\n", GetLastError()); CloseServiceHandle(svc_handle); @@ -341,12 +329,10 @@ static void test_driver_install(void) /* Open the service to see if it's really there */ svc_handle = OpenServiceA(scm_handle, "Winetest", DELETE); - todo_wine ok(svc_handle != NULL, "Service was not created\n"); SetLastError(0xdeadbeef); ret = DeleteService(svc_handle); - todo_wine ok(ret, "Service could not be deleted : %d\n", GetLastError()); CloseServiceHandle(svc_handle); diff --git a/dlls/shdocvw/shdocvw.inf b/dlls/shdocvw/shdocvw.inf index 5bc37d86fac..b765e24530e 100644 --- a/dlls/shdocvw/shdocvw.inf +++ b/dlls/shdocvw/shdocvw.inf @@ -120,7 +120,7 @@ HKCR,"InternetShortcut",,,"Internet Shortcut" HKCR,"InternetShortcut","EditFlags",2,"2" HKCR,"InternetShortcut","IsShortcut",, HKCR,"InternetShortcut","NeverShowExt",, -HKCR,"InternetShortcut\CLSID",,,"%CLSID_InteretShortcut%" +HKCR,"InternetShortcut\CLSID",,,"%CLSID_InternetShortcut%" HKCR,"InternetShortcut\DefaultIcon",,,"url.dll,0" HKCR,"InternetShortcut\shell\open\command",,,"rundll32.exe shdocvw.dll,OpenURL %l" HKCR,"InternetShortcut\shell\print\command",,,"rundll32.exe mshtml.dll,PrintHTML ""%1""" diff --git a/dlls/shdocvw/tests/webbrowser.c b/dlls/shdocvw/tests/webbrowser.c index 0f337edadc8..29890764cd0 100644 --- a/dlls/shdocvw/tests/webbrowser.c +++ b/dlls/shdocvw/tests/webbrowser.c @@ -671,7 +671,7 @@ static HRESULT WINAPI ClientSite_SaveObject(IOleClientSite *iface) return E_NOTIMPL; } -static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAsign, DWORD dwWhichMoniker, +static HRESULT WINAPI ClientSite_GetMoniker(IOleClientSite *iface, DWORD dwAssign, DWORD dwWhichMoniker, IMoniker **ppmon) { ok(0, "unexpected call\n"); diff --git a/dlls/shell32/shell32_De.rc b/dlls/shell32/shell32_De.rc index 73068d43e9b..f5e02913845 100644 --- a/dlls/shell32/shell32_De.rc +++ b/dlls/shell32/shell32_De.rc @@ -149,7 +149,7 @@ FONT 10, "MS Shell Dlg" LTEXT "", IDC_ABOUT_STATIC_TEXT1, 40, 10, 137, 10 LTEXT "", IDC_ABOUT_STATIC_TEXT2, 40, 22, 137, 10 LTEXT "Wine Version %s", IDC_ABOUT_STATIC_TEXT3, 40, 34, 170, 10 - LTEXT "WINE wurde für Sie gekeltert von:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10 + LTEXT "Wine wurde für Sie gekeltert von:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 diff --git a/dlls/shell32/shell32_Ko.rc b/dlls/shell32/shell32_Ko.rc index 87eb2814429..e410bd90c04 100644 --- a/dlls/shell32/shell32_Ko.rc +++ b/dlls/shell32/shell32_Ko.rc @@ -138,18 +138,19 @@ ICON "", IDD_ICON, 10, 10, 16, 16 LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 } - -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 220, 152 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "%s Á¤º¸" +CAPTION " %s Á¤º¸" FONT 10, "MS Shell Dlg" { -DEFPUSHBUTTON "È®ÀÎ", IDOK, 153, 133, 50, 12, WS_TABSTOP -LISTBOX IDC_ABOUT_LISTBOX, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER + DEFPUSHBUTTON "È®ÀÎ", IDOK, 153, 133, 60, 12, WS_TABSTOP + PUSHBUTTON "Wine ¶óÀ̼¾½º(&l)...", IDC_ABOUT_LICENSE, 153, 113, 60, 12, WS_TABSTOP + LISTBOX IDC_ABOUT_LISTBOX, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER ICON "", stc1, 10, 10, 30, 30 - LTEXT "", IDC_ABOUT_STATIC_TEXT1, 40, 10, 137, 10 - LTEXT "", IDC_ABOUT_STATIC_TEXT2, 40, 22, 137, 10 -LTEXT "WineÀº ´ç½ÅÀ» À§ÇØ Á¦°øµÇ¾ú½À´Ï´Ù.:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10 + LTEXT "", IDC_ABOUT_STATIC_TEXT1, 42, 10, 170, 10 + LTEXT "", IDC_ABOUT_STATIC_TEXT2, 42, 22, 170, 10 + LTEXT "%s ½ÇÇàÁß", IDC_ABOUT_STATIC_TEXT3, 42, 34, 170, 10 + LTEXT "Wine was brought to you by:", IDC_ABOUT_WINE_TEXT, 8, 54, 204, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 diff --git a/dlls/shell32/shell32_Si.rc b/dlls/shell32/shell32_Si.rc index d10ab6b5a56..af7e5f2ab2b 100644 --- a/dlls/shell32/shell32_Si.rc +++ b/dlls/shell32/shell32_Si.rc @@ -138,17 +138,19 @@ FONT 8, "MS Shell Dlg" LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0 } -SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 210, 152 +SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 220, 152 STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "O %s" FONT 10, "MS Shell Dlg" { - DEFPUSHBUTTON "V redu", IDOK, 153, 133, 50, 12, WS_TABSTOP + DEFPUSHBUTTON "V redu", IDOK, 153, 133, 60, 12, WS_TABSTOP + PUSHBUTTON "&Licenčna pog.", IDC_ABOUT_LICENSE, 153, 113, 60, 12, WS_TABSTOP LISTBOX IDC_ABOUT_LISTBOX, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER ICON "", stc1, 10, 10, 30, 30 - LTEXT "", IDC_ABOUT_STATIC_TEXT1, 40, 10, 137, 10 - LTEXT "", IDC_ABOUT_STATIC_TEXT2, 40, 22, 137, 10 - LTEXT "Wine smo ustvarili:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10 + LTEXT "", IDC_ABOUT_STATIC_TEXT1, 42, 10, 170, 10 + LTEXT "", IDC_ABOUT_STATIC_TEXT2, 42, 22, 170, 10 + LTEXT "Različica Wine: %s", IDC_ABOUT_STATIC_TEXT3, 42, 34, 170, 10 + LTEXT "Wine smo ustvarili:", IDC_ABOUT_WINE_TEXT, 8, 54, 204, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -250,4 +252,22 @@ STRINGTABLE IDS_NEWFOLDER "Nova mapa" } +STRINGTABLE +{ + IDS_LICENSE_CAPTION, "Licenčna pogodba za Wine" +IDS_LICENSE, +"Wine 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.\n\n\ +Wine 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.\n\n\ +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." +} + + #pragma code_page(default) diff --git a/dlls/shlwapi/istream.c b/dlls/shlwapi/istream.c index b82623e45fa..c5c8c06b158 100644 --- a/dlls/shlwapi/istream.c +++ b/dlls/shlwapi/istream.c @@ -119,13 +119,10 @@ static HRESULT WINAPI IStream_fnRead(IStream *iface, void* pv, ULONG cb, ULONG* TRACE("(%p,%p,0x%08x,%p)\n", This, pv, cb, pcbRead); - if (!pv) - return STG_E_INVALIDPOINTER; - if (!ReadFile(This->hFile, pv, cb, &dwRead, NULL)) { - ERR("error %d reading file\n", GetLastError()); - return HRESULT_FROM_WIN32(GetLastError()); + WARN("error %d reading file\n", GetLastError()); + return S_FALSE; } if (pcbRead) *pcbRead = dwRead; @@ -142,16 +139,13 @@ static HRESULT WINAPI IStream_fnWrite(IStream *iface, const void* pv, ULONG cb, TRACE("(%p,%p,0x%08x,%p)\n", This, pv, cb, pcbWritten); - if (!pv) - return STG_E_INVALIDPOINTER; - switch (STGM_ACCESS_MODE(This->dwMode)) { case STGM_WRITE: case STGM_READWRITE: break; default: - return E_FAIL; + return STG_E_ACCESSDENIED; } if (!WriteFile(This->hFile, pv, cb, &dwWritten, NULL)) @@ -176,7 +170,7 @@ static HRESULT WINAPI IStream_fnSeek(IStream *iface, LARGE_INTEGER dlibMove, IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */ dwPos = SetFilePointer(This->hFile, dlibMove.u.LowPart, NULL, dwOrigin); if( dwPos == INVALID_SET_FILE_POINTER ) - return E_FAIL; + return HRESULT_FROM_WIN32(GetLastError()); if (pNewPos) { @@ -224,7 +218,7 @@ static HRESULT WINAPI IStream_fnCopyTo(IStream *iface, IStream* pstm, ULARGE_INT pcbWritten->QuadPart = 0; if (!pstm) - return STG_E_INVALIDPOINTER; + return S_OK; IStream_fnCommit(iface, 0); /* If ever buffered, this will be needed */ @@ -418,9 +412,6 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode, *lppStream = NULL; - if (dwMode & STGM_TRANSACTED) - return E_INVALIDARG; - /* Access */ switch (STGM_ACCESS_MODE(dwMode)) { @@ -440,6 +431,9 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode, /* Sharing */ switch (STGM_SHARE_MODE(dwMode)) { + case 0: + dwShare = FILE_SHARE_READ|FILE_SHARE_WRITE; + break; case STGM_SHARE_DENY_READ: dwShare = FILE_SHARE_WRITE; break; @@ -459,7 +453,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode, switch(STGM_CREATE_MODE(dwMode)) { case STGM_FAILIFTHERE: - dwCreate = OPEN_EXISTING; + dwCreate = bCreate ? CREATE_NEW : OPEN_EXISTING; break; case STGM_CREATE: dwCreate = CREATE_ALWAYS; @@ -473,12 +467,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(LPCWSTR lpszPath, DWORD dwMode, dwAttributes, 0); if(hFile == INVALID_HANDLE_VALUE) - { - HRESULT hRet = (HRESULT)GetLastError(); - if(hRet > 0) - hRet = HRESULT_FROM_WIN32(hRet); - return hRet; - } + return HRESULT_FROM_WIN32(GetLastError()); *lppStream = IStream_Create(lpszPath, hFile, dwMode); @@ -503,6 +492,9 @@ HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode, if (!lpszPath || !lppStream) return E_INVALIDARG; + if ((dwMode & (STGM_CONVERT|STGM_DELETEONRELEASE|STGM_TRANSACTED)) != 0) + return E_INVALIDARG; + return SHCreateStreamOnFileEx(lpszPath, dwMode, 0, FALSE, NULL, lppStream); } @@ -528,7 +520,8 @@ HRESULT WINAPI SHCreateStreamOnFileA(LPCSTR lpszPath, DWORD dwMode, TRACE("(%s,%d,%p)\n", debugstr_a(lpszPath), dwMode, lppStream); if (!lpszPath) - return E_INVALIDARG; + return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND); + MultiByteToWideChar(0, 0, lpszPath, -1, szPath, MAX_PATH); return SHCreateStreamOnFileW(szPath, dwMode, lppStream); } diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c index 7172e31f764..527fa2416fd 100644 --- a/dlls/shlwapi/tests/istream.c +++ b/dlls/shlwapi/tests/istream.c @@ -185,56 +185,52 @@ static void test_IStream_invalid_operations(IStream * stream, DWORD mode) } -static void test_SHCreateStreamOnFileA(DWORD mode) +static void test_SHCreateStreamOnFileA(DWORD mode, DWORD stgm) { IStream * stream; HRESULT ret; ULONG refcount; static const char * test_file = "c:\\test.txt"; - trace("SHCreateStreamOnFileA: testing mode %d\n", mode); + trace("SHCreateStreamOnFileA: testing mode %d, STGM flags %08x\n", mode, stgm); /* invalid arguments */ stream = NULL; - ret = (*pSHCreateStreamOnFileA)(NULL, mode, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileA)(NULL, mode | stgm, &stream); ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); #if 0 /* This test crashes on WinXP SP2 */ - ret = (*pSHCreateStreamOnFileA)(test_file, mode, NULL); + ret = (*pSHCreateStreamOnFileA)(test_file, mode | stgm, NULL); ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); #endif stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CONVERT, &stream); + ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CONVERT | stgm, &stream); ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_DELETEONRELEASE, &stream); + ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_DELETEONRELEASE | stgm, &stream); ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_TRANSACTED, &stream); + ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_TRANSACTED | stgm, &stream); ok(ret == E_INVALIDARG, "SHCreateStreamOnFileA: expected E_INVALIDARG, got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); /* file does not exist */ stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_FAILIFTHERE, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream); stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CREATE, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CREATE | stgm, &stream); ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n"); if (stream) { @@ -249,10 +245,8 @@ static void test_SHCreateStreamOnFileA(DWORD mode) /* file exists */ stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_FAILIFTHERE, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n"); if (stream) { @@ -263,10 +257,8 @@ static void test_SHCreateStreamOnFileA(DWORD mode) } stream = NULL; - ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CREATE, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileA)(test_file, mode | STGM_CREATE | stgm, &stream); ok(ret == S_OK, "SHCreateStreamOnFileA: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileA: expected a valid IStream object, got NULL\n"); if (stream) { @@ -280,57 +272,54 @@ static void test_SHCreateStreamOnFileA(DWORD mode) } -static void test_SHCreateStreamOnFileW(DWORD mode) +static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm) { IStream * stream; HRESULT ret; ULONG refcount; static const WCHAR test_file[] = { 'c', ':', '\\', 't', 'e', 's', 't', '.', 't', 'x', 't', '\0' }; - trace("SHCreateStreamOnFileW: testing mode %d\n", mode); + trace("SHCreateStreamOnFileW: testing mode %d, STGM flags %08x\n", mode, stgm); /* invalid arguments */ stream = NULL; - ret = (*pSHCreateStreamOnFileW)(NULL, mode, &stream); + ret = (*pSHCreateStreamOnFileW)(NULL, mode | stgm, &stream); ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) || /* XP */ ret == E_INVALIDARG /* Vista */, "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) or E_INVALIDARG, got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); #if 0 /* This test crashes on WinXP SP2 */ - ret = (*pSHCreateStreamOnFileW)(test_file, mode, NULL); + ret = (*pSHCreateStreamOnFileW)(test_file, mode | stgm, NULL); ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); #endif stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CONVERT, &stream); + ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CONVERT | stgm, &stream); ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_DELETEONRELEASE, &stream); + ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_DELETEONRELEASE | stgm, &stream); ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_TRANSACTED, &stream); + ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_TRANSACTED | stgm, &stream); ok(ret == E_INVALIDARG, "SHCreateStreamOnFileW: expected E_INVALIDARG, got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); /* file does not exist */ stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_FAILIFTHERE, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream); stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CREATE, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CREATE | stgm, &stream); ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n"); if (stream) { @@ -345,10 +334,8 @@ static void test_SHCreateStreamOnFileW(DWORD mode) /* file exists */ stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_FAILIFTHERE, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream); ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n"); if (stream) { @@ -359,10 +346,8 @@ static void test_SHCreateStreamOnFileW(DWORD mode) } stream = NULL; - ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CREATE, &stream); - todo_wine + ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_CREATE | stgm, &stream); ok(ret == S_OK, "SHCreateStreamOnFileW: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileW: expected a valid IStream object, got NULL\n"); if (stream) { @@ -397,7 +382,6 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode, 0, FALSE, template, &stream); - todo_wine ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream); @@ -419,16 +403,13 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) return; } } else { - todo_wine ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret); } ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream); stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_FAILIFTHERE | stgm, 0, TRUE, NULL, &stream); - todo_wine ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); if (stream) { @@ -442,9 +423,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); - todo_wine ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); if (stream) { @@ -458,9 +437,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); - todo_wine ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); if (stream) { @@ -476,9 +453,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_FAILIFTHERE | stgm, 0, FALSE, NULL, &stream); - todo_wine ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); if (stream) { @@ -490,15 +465,12 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_FAILIFTHERE | stgm, 0, TRUE, NULL, &stream); - todo_wine ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "SHCreateStreamOnFileEx: expected HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), got 0x%08x\n", ret); ok(stream == NULL, "SHCreateStreamOnFileEx: expected a NULL IStream object, got %p\n", stream); stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, FALSE, NULL, &stream); - todo_wine ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); if (stream) { @@ -510,9 +482,7 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) stream = NULL; ret = (*pSHCreateStreamOnFileEx)(test_file, mode | STGM_CREATE | stgm, 0, TRUE, NULL, &stream); - todo_wine ok(ret == S_OK, "SHCreateStreamOnFileEx: expected S_OK, got 0x%08x\n", ret); - todo_wine ok(stream != NULL, "SHCreateStreamOnFileEx: expected a valid IStream object, got NULL\n"); if (stream) { @@ -522,7 +492,6 @@ static void test_SHCreateStreamOnFileEx(DWORD mode, DWORD stgm) ok(refcount == 0, "SHCreateStreamOnFileEx: expected 0, got %d\n", refcount); } - todo_wine ok(DeleteFileW(test_file), "SHCreateStreamOnFileEx: could not delete the test file, got error %d\n", GetLastError()); } @@ -535,6 +504,14 @@ START_TEST(istream) STGM_READWRITE }; + static const DWORD stgm_sharing[] = { + 0, + STGM_SHARE_DENY_NONE, + STGM_SHARE_DENY_READ, + STGM_SHARE_DENY_WRITE, + STGM_SHARE_EXCLUSIVE + }; + static const DWORD stgm_flags[] = { 0, STGM_CONVERT, @@ -545,7 +522,7 @@ START_TEST(istream) STGM_TRANSACTED | STGM_CONVERT | STGM_DELETEONRELEASE }; - int i, j; + int i, j, k; hShlwapi = GetModuleHandleA("shlwapi.dll"); @@ -563,15 +540,17 @@ START_TEST(istream) skip("SHCreateStreamOnFileEx not found.\n"); for (i = 0; i != sizeof(stgm_access)/sizeof(stgm_access[0]); i++) { - if (pSHCreateStreamOnFileA) - test_SHCreateStreamOnFileA(stgm_access[i]); + for (j = 0; j != sizeof(stgm_sharing)/sizeof(stgm_sharing[0]); j ++) { + if (pSHCreateStreamOnFileA) + test_SHCreateStreamOnFileA(stgm_access[i], stgm_sharing[j]); - if (pSHCreateStreamOnFileW) - test_SHCreateStreamOnFileW(stgm_access[i]); + if (pSHCreateStreamOnFileW) + test_SHCreateStreamOnFileW(stgm_access[i], stgm_sharing[j]); - if (pSHCreateStreamOnFileEx) { - for (j = 0; j != sizeof(stgm_flags)/sizeof(stgm_flags[0]); j++) - test_SHCreateStreamOnFileEx(stgm_access[i], stgm_flags[j]); + if (pSHCreateStreamOnFileEx) { + for (k = 0; k != sizeof(stgm_flags)/sizeof(stgm_flags[0]); k++) + test_SHCreateStreamOnFileEx(stgm_access[i], stgm_sharing[j] | stgm_flags[k]); + } } } } diff --git a/dlls/urlmon/internet.c b/dlls/urlmon/internet.c index b8168ab86c4..8bde7b4790f 100644 --- a/dlls/urlmon/internet.c +++ b/dlls/urlmon/internet.c @@ -298,3 +298,12 @@ HRESULT WINAPI CoInternetQueryInfo(LPCWSTR pwzUrl, QUERYOPTION QueryOption, return S_OK; } + +/*********************************************************************** + * CoInternetSetFeatureEnabled (URLMON.@) + */ +HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST feature, DWORD flags, BOOL enable) +{ + FIXME("%d, 0x%08x, %x, stub\n", feature, flags, enable); + return E_NOTIMPL; +} diff --git a/dlls/urlmon/urlmon.spec b/dlls/urlmon/urlmon.spec index 1fa2f941c34..0f3c9c250c3 100644 --- a/dlls/urlmon/urlmon.spec +++ b/dlls/urlmon/urlmon.spec @@ -19,6 +19,7 @@ @ stdcall CoInternetGetSession(long ptr long) @ stdcall CoInternetParseUrl(wstr long long wstr long ptr long) @ stdcall CoInternetQueryInfo(ptr long long ptr long ptr long) +@ stdcall CoInternetSetFeatureEnabled(long long long) @ stub CompareSecurityIds @ stub CopyBindInfo @ stdcall CopyStgMedium(ptr ptr) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index 27f10b73598..d1ba2c159e1 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -567,9 +567,8 @@ static LRESULT WINAPI ButtonWndProcA( HWND hWnd, UINT uMsg, WPARAM wParam, LPARA /********************************************************************** * Convert button styles to flags used by DrawText. - * TODO: handle WS_EX_RIGHT extended style. */ -static UINT BUTTON_BStoDT(DWORD style) +static UINT BUTTON_BStoDT( DWORD style, DWORD ex_style ) { UINT dtStyle = DT_NOCLIP; /* We use SelectClipRgn to limit output */ @@ -593,6 +592,8 @@ static UINT BUTTON_BStoDT(DWORD style) /* all other flavours have left aligned text */ } + if (ex_style & WS_EX_RIGHT) dtStyle = DT_RIGHT | (dtStyle & ~(DT_LEFT | DT_CENTER)); + /* DrawText ignores vertical alignment for multiline text, * but we use these flags to align label manually. */ @@ -626,10 +627,11 @@ static UINT BUTTON_BStoDT(DWORD style) static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc) { LONG style = GetWindowLongW( hwnd, GWL_STYLE ); + LONG ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE ); WCHAR *text; ICONINFO iconInfo; BITMAP bm; - UINT dtStyle = BUTTON_BStoDT(style); + UINT dtStyle = BUTTON_BStoDT( style, ex_style ); RECT r = *rc; INT n; diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index 14eebe8e831..0e66b7d0776 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -1107,7 +1107,7 @@ static void CBDropDown( LPHEADCOMBO lphc ) { if (nItems < 5) nDroppedHeight = (nItems+1)*nIHeight; - else + else if (nDroppedHeight < 6*nIHeight) nDroppedHeight = 6*nIHeight; } } diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index df6a40879fa..153a2a4f089 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -2148,8 +2148,19 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, } else { + BITMAPFILEHEADER * bmfh; + if (!(ptr = map_fileW( name, NULL ))) return 0; info = (BITMAPINFO *)(ptr + sizeof(BITMAPFILEHEADER)); + bmfh = (BITMAPFILEHEADER *)ptr; + if (!( bmfh->bfType == 0x4d42 /* 'BM' */ && + bmfh->bfReserved1 == 0 && + bmfh->bfReserved2 == 0)) + { + WARN("Invalid/unsupported bitmap format!\n"); + UnmapViewOfFile( ptr ); + return 0; + } } size = bitmap_info_size(info, DIB_RGB_COLORS); diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index b2bfe1cc33a..dba946b6b4b 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -211,9 +211,9 @@ static void EDIT_LockBuffer(EDITSTATE *es); static BOOL EDIT_MakeFit(EDITSTATE *es, UINT size); static BOOL EDIT_MakeUndoFit(EDITSTATE *es, UINT size); static void EDIT_MoveBackward(EDITSTATE *es, BOOL extend); -static void EDIT_MoveEnd(EDITSTATE *es, BOOL extend); +static void EDIT_MoveEnd(EDITSTATE *es, BOOL extend, BOOL ctrl); static void EDIT_MoveForward(EDITSTATE *es, BOOL extend); -static void EDIT_MoveHome(EDITSTATE *es, BOOL extend); +static void EDIT_MoveHome(EDITSTATE *es, BOOL extend, BOOL ctrl); static void EDIT_MoveWordBackward(EDITSTATE *es, BOOL extend); static void EDIT_MoveWordForward(EDITSTATE *es, BOOL extend); static void EDIT_PaintLine(EDITSTATE *es, HDC hdc, INT line, BOOL rev); @@ -1030,38 +1030,22 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, break; case WM_IME_STARTCOMPOSITION: - /* - * FIXME in IME: This message is not always sent like it should be - */ - if (es->selection_start != es->selection_end) - { - static const WCHAR empty_stringW[] = {0}; - EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE); - } es->composition_start = es->selection_end; es->composition_len = 0; break; case WM_IME_COMPOSITION: - { - int caret_pos = es->selection_end; - if (es->composition_len == 0) - { - if (es->selection_start != es->selection_end) - { - static const WCHAR empty_stringW[] = {0}; - EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE); - } - - es->composition_start = es->selection_end; - } - EDIT_ImeComposition(hwnd,lParam,es); - EDIT_SetCaretPos(es, caret_pos, es->flags & EF_AFTER_WRAP); + EDIT_ImeComposition(hwnd, lParam, es); break; - } case WM_IME_ENDCOMPOSITION: - es->composition_len= 0; + if (es->composition_len > 0) + { + static const WCHAR empty_stringW[] = {0}; + EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE); + es->selection_end = es->selection_start; + es->composition_len= 0; + } break; case WM_IME_COMPOSITIONFULL: @@ -1277,9 +1261,9 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta current_line->width = (INT)LOWORD(GetTabbedTextExtentW(dc, current_position, current_line->net_length, es->tabs_count, es->tabs)); } - else if (orig_net_length < current_line->net_length && - current_line == start_line && - current_line->index != nstart_index) { + else if (current_line == start_line && + current_line->index != nstart_index && + orig_net_length < current_line->net_length) { /* The previous line expanded but it's still not as wide as the client rect */ /* The expansion is due to an upwards line wrap so we must partially include it in the update region */ @@ -2012,13 +1996,13 @@ static void EDIT_MoveDown_ML(EDITSTATE *es, BOOL extend) * EDIT_MoveEnd * */ -static void EDIT_MoveEnd(EDITSTATE *es, BOOL extend) +static void EDIT_MoveEnd(EDITSTATE *es, BOOL extend, BOOL ctrl) { BOOL after_wrap = FALSE; INT e; /* Pass a high value in x to make sure of receiving the end of the line */ - if (es->style & ES_MULTILINE) + if (!ctrl && (es->style & ES_MULTILINE)) e = EDIT_CharFromPos(es, 0x3fffffff, HIWORD(EDIT_EM_PosFromChar(es, es->selection_end, es->flags & EF_AFTER_WRAP)), &after_wrap); else @@ -2058,12 +2042,12 @@ static void EDIT_MoveForward(EDITSTATE *es, BOOL extend) * Home key: move to beginning of line. * */ -static void EDIT_MoveHome(EDITSTATE *es, BOOL extend) +static void EDIT_MoveHome(EDITSTATE *es, BOOL extend, BOOL ctrl) { INT e; /* Pass the x_offset in x to make sure of receiving the first position of the line */ - if (es->style & ES_MULTILINE) + if (!ctrl && (es->style & ES_MULTILINE)) e = EDIT_CharFromPos(es, -es->x_offset, HIWORD(EDIT_EM_PosFromChar(es, es->selection_end, es->flags & EF_AFTER_WRAP)), NULL); else @@ -4028,7 +4012,7 @@ static LRESULT EDIT_WM_Char(EDITSTATE *es, WCHAR c) case '\n': if (es->style & ES_MULTILINE) { if (es->style & ES_READONLY) { - EDIT_MoveHome(es, FALSE); + EDIT_MoveHome(es, FALSE, FALSE); EDIT_MoveDown_ML(es, FALSE); } else { static const WCHAR cr_lfW[] = {'\r','\n',0}; @@ -4565,10 +4549,10 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) EDIT_MoveForward(es, shift); break; case VK_HOME: - EDIT_MoveHome(es, shift); + EDIT_MoveHome(es, shift, control); break; case VK_END: - EDIT_MoveEnd(es, shift); + EDIT_MoveEnd(es, shift, control); break; case VK_PRIOR: if (es->style & ES_MULTILINE) @@ -4598,7 +4582,7 @@ static LRESULT EDIT_WM_KeyDown(EDITSTATE *es, INT key) } else if (control) { /* delete to end of line */ EDIT_EM_SetSel(es, (UINT)-1, 0, FALSE); - EDIT_MoveEnd(es, TRUE); + EDIT_MoveEnd(es, TRUE, FALSE); EDIT_WM_Clear(es); } else { /* delete character right of caret */ @@ -4813,6 +4797,9 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs, BOOL unicode) if (es->style & ES_COMBO) es->hwndListBox = GetDlgItem(es->hwndParent, ID_CB_LISTBOX); + /* FIXME: should we handle changes to WS_EX_RIGHT style after creation? */ + if (lpcs->dwExStyle & WS_EX_RIGHT) es->style |= ES_RIGHT; + /* Number overrides lowercase overrides uppercase (at least it * does in Win95). However I'll bet that ES_NUMBER would be * invalid under Win 3.1. @@ -5399,22 +5386,17 @@ static void EDIT_UpdateText(EDITSTATE *es, const RECT *rc, BOOL bErase) * The Following code is to handle inline editing from IMEs */ -static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) +static void EDIT_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es) { LONG buflen; LPWSTR lpCompStr = NULL; - HIMC hIMC; LPSTR lpCompStrAttr = NULL; DWORD dwBufLenAttr; - if (!(hIMC = ImmGetContext(hwnd))) - return; - buflen = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0); if (buflen < 0) { - ImmReleaseContext(hwnd, hIMC); return; } @@ -5422,7 +5404,6 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) if (!lpCompStr) { ERR("Unable to allocate IME CompositionString\n"); - ImmReleaseContext(hwnd,hIMC); return; } @@ -5445,7 +5426,6 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) { ERR("Unable to allocate IME Attribute String\n"); HeapFree(GetProcessHeap(),0,lpCompStr); - ImmReleaseContext(hwnd,hIMC); return; } ImmGetCompositionStringW(hIMC,GCS_COMPATTR, lpCompStrAttr, @@ -5476,22 +5456,16 @@ static void EDIT_GetCompositionStr(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) HeapFree(GetProcessHeap(),0,lpCompStrAttr); HeapFree(GetProcessHeap(),0,lpCompStr); - ImmReleaseContext(hwnd,hIMC); } -static void EDIT_GetResultStr(HWND hwnd, EDITSTATE *es) +static void EDIT_GetResultStr(HIMC hIMC, EDITSTATE *es) { LONG buflen; LPWSTR lpResultStr; - HIMC hIMC; - - if ( !(hIMC = ImmGetContext(hwnd))) - return; buflen = ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, NULL, 0); if (buflen <= 0) { - ImmReleaseContext(hwnd, hIMC); return; } @@ -5499,7 +5473,6 @@ static void EDIT_GetResultStr(HWND hwnd, EDITSTATE *es) if (!lpResultStr) { ERR("Unable to alloc buffer for IME string\n"); - ImmReleaseContext(hwnd, hIMC); return; } @@ -5517,13 +5490,29 @@ static void EDIT_GetResultStr(HWND hwnd, EDITSTATE *es) es->composition_len = 0; HeapFree(GetProcessHeap(),0,lpResultStr); - ImmReleaseContext(hwnd, hIMC); } static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) { + HIMC hIMC; + int cursor; + + if (es->composition_len == 0 && es->selection_start != es->selection_end) + { + static const WCHAR empty_stringW[] = {0}; + EDIT_EM_ReplaceSel(es, TRUE, empty_stringW, TRUE, TRUE); + es->composition_start = es->selection_end; + } + + hIMC = ImmGetContext(hwnd); + if (!hIMC) + return; + if (CompFlag & GCS_RESULTSTR) - EDIT_GetResultStr(hwnd,es); + EDIT_GetResultStr(hIMC, es); if (CompFlag & GCS_COMPSTR) - EDIT_GetCompositionStr(hwnd, CompFlag, es); + EDIT_GetCompositionStr(hIMC, CompFlag, es); + cursor = ImmGetCompositionStringW(hIMC, GCS_CURSORPOS, 0, 0); + ImmReleaseContext(hwnd, hIMC); + EDIT_SetCaretPos(es, es->selection_start + cursor, es->flags & EF_AFTER_WRAP); } diff --git a/dlls/user32/message.c b/dlls/user32/message.c index ce102de1cd4..7f3407ee3cb 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -35,6 +35,7 @@ #include "winnls.h" #include "dbt.h" #include "dde.h" +#include "imm.h" #include "wine/unicode.h" #include "wine/server.h" #include "user_private.h" @@ -2994,6 +2995,9 @@ BOOL WINAPI TranslateMessage( const MSG *msg ) TRACE_(key)("Translating key %s (%04lx), scancode %02x\n", SPY_GetVKeyName(msg->wParam), msg->wParam, LOBYTE(HIWORD(msg->lParam))); + if (ImmProcessKey(msg->hwnd, GetKeyboardLayout(0), msg->wParam, msg->lParam,0)) + return TRUE; + GetKeyboardState( state ); /* FIXME : should handle ToUnicode yielding 2 */ switch (ToUnicode(msg->wParam, HIWORD(msg->lParam), state, wp, 2, 0)) @@ -3359,7 +3363,7 @@ static BOOL CALLBACK bcast_childwindow( HWND hw, LPARAM lp ) { BroadcastParm *parm = (BroadcastParm*)lp; DWORD_PTR retval = 0; - LONG lresult; + LRESULT lresult; if (parm->flags & BSF_IGNORECURRENTTASK && WIN_IsCurrentProcess(hw)) { diff --git a/dlls/user32/resources/user32_Ko.rc b/dlls/user32/resources/user32_Ko.rc index c845578ab84..a4aaa3e0b5d 100644 --- a/dlls/user32/resources/user32_Ko.rc +++ b/dlls/user32/resources/user32_Ko.rc @@ -51,7 +51,6 @@ EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE MSGBOX DIALOG 100, 80, 216, 168 STYLE DS_MODALFRAME | DS_NOIDLEMSG | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -FONT 9, "MS Shell Dlg" BEGIN ICON "", 1088, 8, 20, 16, 16, WS_CHILD | WS_VISIBLE LTEXT "", 100, 32, 4, 176, 48, WS_CHILD | WS_VISIBLE | WS_GROUP | SS_NOPREFIX @@ -62,9 +61,9 @@ BEGIN PUSHBUTTON "¹«½Ã(&I)", 5, 208, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "¿¹(&Y)", 6, 256, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "¾Æ´Ï¿À(&N)", 7, 304, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Try Again", 10, 352, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Continue", 11, 400, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Help", 9, 448, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "´Ù½Ã ½Ãµµ(&T)", 10, 352, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "°è¼Ó(&C)," 11, 400, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "µµ¿ò¸»", 9, 448, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END MDI_MOREWINDOWS DIALOG FIXED IMPURE 20, 20, 232, 122 diff --git a/dlls/user32/static.c b/dlls/user32/static.c index df198754130..ca83a765c36 100644 --- a/dlls/user32/static.c +++ b/dlls/user32/static.c @@ -688,6 +688,9 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style ) return; } + if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_RIGHT) + wFormat = DT_RIGHT | (wFormat & ~(DT_LEFT | DT_CENTER)); + if (style & SS_NOPREFIX) wFormat |= DT_NOPREFIX; diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index 7ea79ad0119..40f3a1413f2 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -583,6 +583,111 @@ static void test_CreateIcon(void) DeleteObject(hbmColor); } +/* Shamelessly ripped from dlls/oleaut32/tests/olepicture.c */ +/* 1x1 pixel gif */ +static const unsigned char gifimage[35] = { +0x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff, +0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44, +0x01,0x00,0x3b +}; + +/* 1x1 pixel jpg */ +static const unsigned char jpgimage[285] = { +0xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x01,0x2c, +0x01,0x2c,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x05,0x03,0x04,0x04,0x04,0x03,0x05, +0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x07,0x0c,0x08,0x07,0x07,0x07,0x07,0x0f,0x0b, +0x0b,0x09,0x0c,0x11,0x0f,0x12,0x12,0x11,0x0f,0x11,0x11,0x13,0x16,0x1c,0x17,0x13, +0x14,0x1a,0x15,0x11,0x11,0x18,0x21,0x18,0x1a,0x1d,0x1d,0x1f,0x1f,0x1f,0x13,0x17, +0x22,0x24,0x22,0x1e,0x24,0x1c,0x1e,0x1f,0x1e,0xff,0xdb,0x00,0x43,0x01,0x05,0x05, +0x05,0x07,0x06,0x07,0x0e,0x08,0x08,0x0e,0x1e,0x14,0x11,0x14,0x1e,0x1e,0x1e,0x1e, +0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, +0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, +0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0xff,0xc0, +0x00,0x11,0x08,0x00,0x01,0x00,0x01,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11, +0x01,0xff,0xc4,0x00,0x15,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xff,0xc4,0x00,0x14,0x10,0x01,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xc4, +0x00,0x14,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0xff,0xc4,0x00,0x14,0x11,0x01,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xda,0x00,0x0c,0x03,0x01, +0x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xb2,0xc0,0x07,0xff,0xd9 +}; + +/* 1x1 pixel png */ +static const unsigned char pngimage[285] = { +0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52, +0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53, +0xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b, +0x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5, +0x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41, +0x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59, +0xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 +}; + +/* 1x1 pixel bmp */ +static const unsigned char bmpimage[66] = { +0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00, +0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00, +0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00, +0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x00, +0x00,0x00 +}; + +/* 2x2 pixel gif */ +static const unsigned char gif4pixel[42] = { +0x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00, +0x39,0x62,0xfc,0xff,0x1a,0xe5,0xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x02,0x00, +0x02,0x00,0x00,0x02,0x03,0x14,0x16,0x05,0x00,0x3b +}; + +static void test_LoadImageFile(const unsigned char * image_data, + unsigned int image_size, const char * ext, BOOL expect_success) +{ + HANDLE handle; + BOOL ret; + DWORD error, bytes_written; + char filename[64]; + + strcpy(filename, "test."); + strcat(filename, ext); + + /* Create the test image. */ + handle = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, + FILE_ATTRIBUTE_NORMAL, NULL); + ok(handle != INVALID_HANDLE_VALUE, "CreateFileA failed. %u\n", GetLastError()); + ret = WriteFile(handle, image_data, image_size, &bytes_written, NULL); + ok(bytes_written == image_size, "test file created improperly.\n"); + CloseHandle(handle); + + /* Load as cursor. For all tested formats, this should fail */ + SetLastError(0xdeadbeef); + handle = LoadImageA(NULL, filename, IMAGE_CURSOR, 0, 0, LR_LOADFROMFILE); + ok(handle == NULL, "LoadImage(%s) as IMAGE_CURSOR succeeded incorrectly.\n", ext); + error = GetLastError(); + ok(error == 0, "Last error: %u\n", error); + if (handle != NULL) DestroyCursor(handle); + + /* Load as icon. For all tested formats, this should fail */ + SetLastError(0xdeadbeef); + handle = LoadImageA(NULL, filename, IMAGE_ICON, 0, 0, LR_LOADFROMFILE); + ok(handle == NULL, "LoadImage(%s) as IMAGE_ICON succeeded incorrectly.\n", ext); + error = GetLastError(); + ok(error == 0, "Last error: %u\n", error); + if (handle != NULL) DestroyIcon(handle); + + /* Load as bitmap. Should succeed if bmp, fail for everything else */ + SetLastError(0xdeadbeef); + handle = LoadImageA(NULL, filename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); + if (expect_success) + ok(handle != NULL, "LoadImage(%s) as IMAGE_BITMAP failed.\n", ext); + else ok(handle == NULL, "LoadImage(%s) as IMAGE_BITMAP succeeded incorrectly.\n", ext); + error = GetLastError(); + ok(error == 0, "Last error: %u\n", error); + if (handle != NULL) DeleteObject(handle); + + DeleteFileA(filename); +} + static void test_LoadImage(void) { HANDLE handle; @@ -668,6 +773,12 @@ static void test_LoadImage(void) HeapFree(GetProcessHeap(), 0, icon_data); DeleteFileA("icon.ico"); + + test_LoadImageFile(bmpimage, sizeof(bmpimage), "bmp", 1); + test_LoadImageFile(gifimage, sizeof(gifimage), "gif", 0); + test_LoadImageFile(gif4pixel, sizeof(gif4pixel), "gif", 0); + test_LoadImageFile(jpgimage, sizeof(jpgimage), "jpg", 0); + test_LoadImageFile(pngimage, sizeof(pngimage), "png", 0); } static void test_DestroyCursor(void) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index a86698757f7..98fa42494fd 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -264,16 +264,16 @@ static const struct message WmSwitchChild[] = { { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_STATECHANGED }, /* in the 1st MDI child */ { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 }, /* in the 1st MDI child */ { WM_CHILDACTIVATE, sent|defwinproc }, /* in the 1st MDI child */ - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, /* in the 1st MDI child */ + { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, /* in the 1st MDI child */ { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in the 1st MDI child */ /* Lock redraw 2nd MDI child */ { WM_SETREDRAW, sent|wparam|defwinproc, 0 }, /* in the 2nd MDI child */ { HCBT_MINMAX, hook|lparam, 0, SW_NORMALNA }, /* Restore 2nd MDI child */ - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|0x8000 },/* in the 2nd MDI child */ + { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED },/* in the 2nd MDI child */ { WM_NCCALCSIZE, sent|wparam|defwinproc, 1 },/* in the 2nd MDI child */ { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, /* in the 2nd MDI child */ - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, /* in the 2nd MDI child */ + { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, /* in the 2nd MDI child */ { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, /* in the 2nd MDI child */ { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* in the 2nd MDI child */ /* Redraw 2nd MDI child */ @@ -303,6 +303,35 @@ static const struct message WmSwitchChild[] = { { 0 } }; +/* Switch visible not maximized mdi children */ +static const struct message WmSwitchNotMaximizedChild[] = { + /* Switch not maximized MDI child */ + { WM_MDIACTIVATE, sent },/* in the MDI client */ + { WM_WINDOWPOSCHANGING, sent|wparam,SWP_NOSIZE|SWP_NOMOVE },/* in the 2nd MDI child */ + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { WM_CHILDACTIVATE, sent },/* in the 2nd MDI child */ + /* Deactivate 1st MDI child */ + { WM_NCACTIVATE, sent|wparam|defwinproc, 0 }, /* in the 1st MDI child */ + { WM_MDIACTIVATE, sent|defwinproc }, /* in the 1st MDI child */ + /* Activate 2nd MDI child */ + { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE}, /* in the 2nd MDI child */ + { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, /* in the 2nd MDI child */ + { WM_SETVISIBLE, hook }, /* in the 1st MDI child */ + { WM_KILLFOCUS, sent|defwinproc }, /* in the 1st MDI child */ + { WM_IME_SETCONTEXT, sent|defwinproc }, /* in the 1st MDI child */ + { WM_IME_SETCONTEXT, sent }, /* in the MDI client */ + { WM_SETFOCUS, sent, 0 }, /* in the MDI client */ + { WM_SETVISIBLE, hook }, + { WM_KILLFOCUS, sent }, /* in the MDI client */ + { WM_IME_SETCONTEXT, sent }, /* in the MDI client */ + { WM_IME_SETCONTEXT, sent|defwinproc }, /* in the 1st MDI child */ + { WM_SETFOCUS, sent|defwinproc }, /* in the 2nd MDI child */ + { WM_MDIACTIVATE, sent|defwinproc }, /* in the 2nd MDI child */ + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE}, /* in the 2nd MDI child */ + { 0 } +}; + + /* SetWindowPos(SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE| SWP_NOZORDER|SWP_FRAMECHANGED) * for a visible overlapped window with WS_CLIPCHILDREN style set. @@ -400,7 +429,7 @@ static const struct message WmShowOverlappedSeq[] = { static const struct message WmShowMaxOverlappedSeq[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_GETMINMAXINFO, sent|defwinproc }, { WM_NCCALCSIZE, sent|wparam, TRUE }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, @@ -421,7 +450,7 @@ static const struct message WmShowMaxOverlappedSeq[] = { { WM_GETTEXT, sent|defwinproc|optional }, { WM_ERASEBKGND, sent|optional }, /* Win9x adds SWP_NOZORDER below */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, { WM_NCCALCSIZE, sent|optional }, @@ -505,9 +534,9 @@ static const struct message WmCreateMaxPopupSeq[] = { { WM_MOVE, sent }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, TRUE }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOREDRAW|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, @@ -543,9 +572,9 @@ static const struct message WmCreateInvisibleMaxPopupSeq[] = { { WM_MOVE, sent }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, TRUE }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOREDRAW|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, @@ -642,12 +671,12 @@ static const struct message WmShowVisMaxPopupSeq[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, { WM_GETTEXT, sent|optional }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, TRUE }, { WM_QUERYNEWPALETTE, sent|wparam|lparam|optional, 0, 0 }, { WM_NCPAINT, sent|wparam|optional, 1 }, { WM_ERASEBKGND, sent|optional }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, @@ -730,9 +759,9 @@ static const struct message WmCreateMaximizedChildSeq[] = { { WM_MOVE, sent }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, { WM_PARENTNOTIFY, sent|parent|wparam, WM_CREATE }, @@ -816,10 +845,10 @@ static const struct message WmShowChildSeq_4[] = { /* ShowWindow(SW_MINIMIZE) for child with invisible parent */ static const struct message WmShowChildInvisibleParentSeq_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MINIMIZED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, @@ -838,11 +867,11 @@ static const struct message WmShowChildInvisibleParentSeq_1r[] = { static const struct message WmShowChildInvisibleParentSeq_2[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, { 0 } @@ -855,11 +884,11 @@ static const struct message WmShowChildInvisibleParentSeq_2r[] = { /* ShowWindow(SW_SHOWMINIMIZED) for child with invisible parent */ static const struct message WmShowChildInvisibleParentSeq_3[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINIMIZED }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MINIMIZED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, @@ -877,10 +906,10 @@ static const struct message WmShowChildInvisibleParentSeq_3r[] = { /* ShowWindow(SW_SHOWMINNOACTIVE) for child with invisible parent */ static const struct message WmShowChildInvisibleParentSeq_4[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINNOACTIVE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOREDRAW|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MINIMIZED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, @@ -1994,9 +2023,9 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = { { WM_MOVE, sent }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in MDI frame */ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, @@ -2046,10 +2075,10 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { /* restore the 1st MDI child */ { WM_SETREDRAW, sent|wparam, 0 }, { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNORMAL }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, /* in MDI frame */ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, @@ -2068,10 +2097,10 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { { WM_MOVE, sent }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in MDI frame */ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, @@ -2134,9 +2163,9 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { { WM_MOVE, sent }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in MDI frame */ @@ -2236,10 +2265,10 @@ static const struct message WmCreateMDIchildInvisibleMaxSeq4[] = { { WM_MOVE, sent }, { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_STATECHANGED }, { WM_GETMINMAXINFO, sent|defwinproc }, { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in MDI frame */ @@ -2278,21 +2307,21 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { /* maximize the 1st MDI child */ { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent|defwinproc }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|defwinproc|wparam, 1 }, { WM_CHILDACTIVATE, sent|defwinproc|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* restore the 2nd MDI child */ { WM_SETREDRAW, sent|defwinproc|wparam, 0 }, { HCBT_MINMAX, hook|lparam, 0, SW_NORMALNA }, - { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|defwinproc|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI frame */ @@ -2455,13 +2484,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { { WM_MDIACTIVATE, sent }, { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNORMAL }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_SHOWWINDOW|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, /* in MDI child */ @@ -2521,7 +2550,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { static const struct message WmMaximizeMDIchildInvisibleSeq[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, @@ -2539,7 +2568,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = { { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in MDI frame */ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, @@ -2581,12 +2610,12 @@ static const struct message WmMaximizeMDIchildInvisibleParentSeq[] = { { WM_MDIMAXIMIZE, sent }, /* in MDI client */ { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_GETMINMAXINFO, sent|defwinproc }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, /* XP doesn't send it */ { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOREDRAW|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOREDRAW|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, @@ -2651,10 +2680,10 @@ static const struct message WmMaximizeMDIchildInvisibleParentSeq[] = { static const struct message WmMaximizeMDIchildVisibleSeq[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MAXIMIZE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MAXIMIZED }, /* in MDI frame */ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, @@ -2667,10 +2696,10 @@ static const struct message WmMaximizeMDIchildVisibleSeq[] = { /* ShowWindow(SW_RESTORE) for a visible maximized MDI child window */ static const struct message WmRestoreMDIchildVisibleSeq[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, /* in MDI frame */ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, @@ -2684,10 +2713,10 @@ static const struct message WmRestoreMDIchildVisibleSeq[] = { static const struct message WmRestoreMDIchildVisibleSeq_2[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, { WM_QUERYOPEN, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_NOCLIENTSIZE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_NOCLIENTSIZE|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 }, /* MDI child */ @@ -2702,9 +2731,9 @@ static const struct message WmRestoreMDIchildVisibleSeq_2[] = { /* ShowWindow(SW_MINIMIZE) for a visible restored MDI child window */ static const struct message WmMinimizeMDIchildVisibleSeq[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOCLIENTSIZE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOCLIENTSIZE|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc|wparam, SIZE_MINIMIZED }, { WM_CHILDACTIVATE, sent|wparam|lparam|defwinproc, 0, 0 }, @@ -2717,11 +2746,11 @@ static const struct message WmMinimizeMDIchildVisibleSeq[] = { /* ShowWindow(SW_RESTORE) for a not visible MDI child window */ static const struct message WmRestoreMDIchildInisibleSeq[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_NCCALCSIZE, sent|wparam, 1 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, 0, 0 }, { WM_CHILDACTIVATE, sent|wparam|lparam, 0, 0 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, { WM_SIZE, sent|defwinproc|wparam, SIZE_RESTORED }, /* in MDI frame */ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, @@ -3371,6 +3400,20 @@ static void test_mdi_messages(void) SendMessageA(mdi_client, WM_MDIACTIVATE, (WPARAM)mdi_child, 0); ok_sequence(WmSwitchChild, "Child did not switch correctly", TRUE); trace("end of test for switch maximized MDI children\n"); + flush_sequence(); + + /* Prepare for switching test of not maximized MDI children */ + ShowWindow( mdi_child, SW_NORMAL ); + ok(!IsZoomed(mdi_child), "wrong zoomed state for %p(Switch test)\n", mdi_child); + ok(!IsZoomed(mdi_child2), "wrong zoomed state for %p(Switch test)\n", mdi_child2); + active_child = (HWND)SendMessageA(mdi_client, WM_MDIGETACTIVE, 0, 0); + ok(active_child == mdi_child, "wrong active MDI child %p(Switch test)\n", active_child); + flush_sequence(); + + SendMessageA(mdi_client, WM_MDIACTIVATE, (WPARAM)mdi_child2, 0); + ok_sequence(WmSwitchNotMaximizedChild, "Not maximized child did not switch correctly", TRUE); + trace("end of test for switch not maximized MDI children\n"); + flush_sequence(); SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0); flush_sequence(); @@ -3380,7 +3423,7 @@ static void test_mdi_messages(void) SetFocus(0); flush_sequence(); - /* end of test for switch maximized MDI children */ + /* end of tests for switch maximized/not maximized MDI children */ mdi_cs.szClass = "MDI_child_Class"; mdi_cs.szTitle = "MDI child"; @@ -9215,16 +9258,16 @@ static const struct message WmShow[] = { }; static const struct message WmShowNoActivate_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNOACTIVATE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|0x8000 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, { 0 } }; static const struct message WmShowNoActivate_2[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNOACTIVATE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, { HCBT_SETFOCUS, hook|optional }, @@ -9246,11 +9289,11 @@ static const struct message WmShowNA_2[] = { }; static const struct message WmRestore_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, { HCBT_SETFOCUS, hook|optional }, /* win2000 sends it */ @@ -9268,11 +9311,11 @@ static const struct message WmRestore_2[] = { static const struct message WmRestore_3[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { HCBT_ACTIVATE, hook|optional }, /* win2003 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2003 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2003 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, { HCBT_SETFOCUS, hook|optional }, /* win2003 sends it */ @@ -9280,16 +9323,16 @@ static const struct message WmRestore_3[] = { }; static const struct message WmRestore_4[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|0x8000 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, { 0 } }; static const struct message WmRestore_5[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNORMAL }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|0x8000 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, { 0 } @@ -9317,10 +9360,10 @@ static const struct message WmHide_3[] = { }; static const struct message WmShowMinimized_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINIMIZED }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MINIMIZED }, { 0 } @@ -9329,24 +9372,24 @@ static const struct message WmMinimize_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MINIMIZED }, { 0 } }; static const struct message WmMinimize_2[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MINIMIZED }, { 0 } }; static const struct message WmMinimize_3[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MINIMIZED }, { 0 } @@ -9376,11 +9419,11 @@ static const struct message WmMinMax_4[] = { static const struct message WmShowMaximized_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMAXIMIZED }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, { HCBT_SETFOCUS, hook|optional }, /* win2003 sends it */ @@ -9393,8 +9436,8 @@ static const struct message WmShowMaximized_2[] = { { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_MOVE, sent|optional }, /* Win9x doesn't send it */ { WM_SIZE, sent|wparam|optional, SIZE_MAXIMIZED }, /* Win9x doesn't send it */ - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, { HCBT_SETFOCUS, hook }, @@ -9403,11 +9446,11 @@ static const struct message WmShowMaximized_2[] = { static const struct message WmShowMaximized_3[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMAXIMIZED }, { WM_GETMINMAXINFO, sent }, - { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|0x8000 }, + { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, { 0 } diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 320bd04ac4e..7623a67013a 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -2554,11 +2554,13 @@ static void test_EnumDisplaySettings(void) num = 1; while (1) { - SetLastError (0xdeadbeef); - if (!EnumDisplaySettings(NULL, num++, &devmode)) { - DWORD le = GetLastError(); - ok (le == ERROR_NO_MORE_FILES, "Last error on EnumDisplaySettings was %d, expected ERROR_NO_MORE_FILES\n", le); - break; + SetLastError (0xdeadbeef); + if (!EnumDisplaySettings(NULL, num++, &devmode)) { + DWORD le = GetLastError(); + ok(le == ERROR_NO_MORE_FILES || + le == 0xdeadbeef, /* XP, 2003 */ + "Expected ERROR_NO_MORE_FILES or 0xdeadbeef, got %d\n", le); + break; } } } diff --git a/dlls/wined3d/basetexture.c b/dlls/wined3d/basetexture.c index bc004c061d3..1f14a204b64 100644 --- a/dlls/wined3d/basetexture.c +++ b/dlls/wined3d/basetexture.c @@ -198,10 +198,12 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_FASTEST); checkGLcall("glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_FASTEST)"); + break; case WINED3DTEXF_LINEAR: glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST); checkGLcall("glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST)"); + break; default: WARN("Unexpected filter type %d, setting to GL_NICEST\n", FilterType); glTexParameteri(textureDimensions, GL_GENERATE_MIPMAP_HINT_SGIS, GL_NICEST); @@ -433,16 +435,17 @@ void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface state = samplerStates[WINED3DSAMP_MAGFILTER]; if (state < WINED3DTEXF_NONE || state > WINED3DTEXF_ANISOTROPIC) { FIXME("Unrecognized or unsupported MAGFILTER* value %d\n", state); + } else { + glValue = (*This->baseTexture.magLookup)[state - WINED3DTEXF_NONE]; + TRACE("ValueMAG=%d setting MAGFILTER to %x\n", state, glValue); + glTexParameteri(textureDimensions, GL_TEXTURE_MAG_FILTER, glValue); + /* We need to reset the Anisotropic filtering state when we change the mag filter to WINED3DTEXF_ANISOTROPIC (this seems a bit weird, check the documentation to see how it should be switched off. */ + if (GL_SUPPORT(EXT_TEXTURE_FILTER_ANISOTROPIC) && WINED3DTEXF_ANISOTROPIC == state && + textureDimensions != GL_TEXTURE_RECTANGLE_ARB) { + glTexParameteri(textureDimensions, GL_TEXTURE_MAX_ANISOTROPY_EXT, samplerStates[WINED3DSAMP_MAXANISOTROPY]); + } + This->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = state; } - glValue = (*This->baseTexture.magLookup)[state - WINED3DTEXF_NONE]; - TRACE("ValueMAG=%d setting MAGFILTER to %x\n", state, glValue); - glTexParameteri(textureDimensions, GL_TEXTURE_MAG_FILTER, glValue); - /* We need to reset the Anisotropic filtering state when we change the mag filter to WINED3DTEXF_ANISOTROPIC (this seems a bit weird, check the documentation to see how it should be switched off. */ - if (GL_SUPPORT(EXT_TEXTURE_FILTER_ANISOTROPIC) && WINED3DTEXF_ANISOTROPIC == state && - textureDimensions != GL_TEXTURE_RECTANGLE_ARB) { - glTexParameteri(textureDimensions, GL_TEXTURE_MAX_ANISOTROPY_EXT, samplerStates[WINED3DSAMP_MAXANISOTROPY]); - } - This->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = state; } if(textureDimensions != GL_TEXTURE_RECTANGLE_ARB && diff --git a/dlls/winedos/dosmem.c b/dlls/winedos/dosmem.c index 9829f1a5b88..876a3e7966a 100644 --- a/dlls/winedos/dosmem.c +++ b/dlls/winedos/dosmem.c @@ -506,14 +506,13 @@ BOOL DOSMEM_MapDosLayout(void) unsigned short sel; LDT_ENTRY entry; - if (DOSMEM_dosmem) + if (DOSMEM_dosmem || !VirtualProtect( NULL, DOSMEM_SIZE, PAGE_EXECUTE_READWRITE, NULL )) { - ERR( "Needs access to the first megabyte for DOS mode\n" ); + ERR( "Need full access to the first megabyte for DOS mode\n" ); ExitProcess(1); } MESSAGE( "Warning: unprotecting memory to allow real-mode calls.\n" " NULL pointer accesses will no longer be caught.\n" ); - VirtualProtect( NULL, DOSMEM_SIZE, PAGE_EXECUTE_READWRITE, NULL ); /* copy the BIOS and ISR area down */ memcpy( DOSMEM_dosmem, DOSMEM_sysmem, 0x400 + 0x100 ); DOSMEM_sysmem = DOSMEM_dosmem; diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index 3d7bebfd3df..f23592cfb36 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -4040,12 +4040,12 @@ INT X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan, if (!(obj_size = GetObjectW( hbitmap, sizeof(dib), &dib ))) return 0; bitmap_type = DIB_GetBitmapInfo( (BITMAPINFOHEADER*)info, &width, &tempHeight, &descr.infoBpp, &descr.compression); - descr.lines = tempHeight; if (bitmap_type == -1) { ERR("Invalid bitmap\n"); return 0; } + descr.lines = tempHeight; core_header = (bitmap_type == 0); colorPtr = (LPBYTE) info + (WORD) info->bmiHeader.biSize; diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c index 377e8f4b575..adbf585c993 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -51,6 +51,7 @@ #include "shlobj.h" /* DROPFILES */ #include "shellapi.h" +#include "wine/server.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(event); @@ -72,10 +73,12 @@ extern BOOL ximInComposeMode; #define DndURL 128 /* KDE drag&drop */ /* Event handlers */ -static void EVENT_FocusIn( HWND hwnd, XEvent *event ); -static void EVENT_FocusOut( HWND hwnd, XEvent *event ); -static void EVENT_PropertyNotify( HWND hwnd, XEvent *event ); -static void EVENT_ClientMessage( HWND hwnd, XEvent *event ); +static void X11DRV_FocusIn( HWND hwnd, XEvent *event ); +static void X11DRV_FocusOut( HWND hwnd, XEvent *event ); +static void X11DRV_Expose( HWND hwnd, XEvent *event ); +static void X11DRV_MapNotify( HWND hwnd, XEvent *event ); +static void X11DRV_PropertyNotify( HWND hwnd, XEvent *event ); +static void X11DRV_ClientMessage( HWND hwnd, XEvent *event ); struct event_handler { @@ -95,8 +98,8 @@ static struct event_handler handlers[MAX_EVENT_HANDLERS] = { MotionNotify, X11DRV_MotionNotify }, { EnterNotify, X11DRV_EnterNotify }, /* LeaveNotify */ - { FocusIn, EVENT_FocusIn }, - { FocusOut, EVENT_FocusOut }, + { FocusIn, X11DRV_FocusIn }, + { FocusOut, X11DRV_FocusOut }, { KeymapNotify, X11DRV_KeymapNotify }, { Expose, X11DRV_Expose }, /* GraphicsExpose */ @@ -114,12 +117,12 @@ static struct event_handler handlers[MAX_EVENT_HANDLERS] = /* ResizeRequest */ /* CirculateNotify */ /* CirculateRequest */ - { PropertyNotify, EVENT_PropertyNotify }, + { PropertyNotify, X11DRV_PropertyNotify }, { SelectionClear, X11DRV_SelectionClear }, { SelectionRequest, X11DRV_SelectionRequest }, /* SelectionNotify */ /* ColormapNotify */ - { ClientMessage, EVENT_ClientMessage }, + { ClientMessage, X11DRV_ClientMessage }, { MappingNotify, X11DRV_MappingNotify }, }; @@ -568,9 +571,9 @@ static const char * const focus_details[] = }; /********************************************************************** - * EVENT_FocusIn + * X11DRV_FocusIn */ -static void EVENT_FocusIn( HWND hwnd, XEvent *xev ) +static void X11DRV_FocusIn( HWND hwnd, XEvent *xev ) { XFocusChangeEvent *event = &xev->xfocus; XIC xic; @@ -602,11 +605,11 @@ static void EVENT_FocusIn( HWND hwnd, XEvent *xev ) /********************************************************************** - * EVENT_FocusOut + * X11DRV_FocusOut * * Note: only top-level windows get FocusOut events. */ -static void EVENT_FocusOut( HWND hwnd, XEvent *xev ) +static void X11DRV_FocusOut( HWND hwnd, XEvent *xev ) { XFocusChangeEvent *event = &xev->xfocus; HWND hwnd_tmp; @@ -659,6 +662,75 @@ static void EVENT_FocusOut( HWND hwnd, XEvent *xev ) /*********************************************************************** + * X11DRV_Expose + */ +static void X11DRV_Expose( HWND hwnd, XEvent *xev ) +{ + XExposeEvent *event = &xev->xexpose; + RECT rect; + struct x11drv_win_data *data; + int flags = RDW_INVALIDATE | RDW_ERASE; + + TRACE( "win %p (%lx) %d,%d %dx%d\n", + hwnd, event->window, event->x, event->y, event->width, event->height ); + + if (!(data = X11DRV_get_win_data( hwnd ))) return; + + if (event->window == data->whole_window) + { + rect.left = data->whole_rect.left + event->x; + rect.top = data->whole_rect.top + event->y; + flags |= RDW_FRAME; + } + else + { + rect.left = data->client_rect.left + event->x; + rect.top = data->client_rect.top + event->y; + } + rect.right = rect.left + event->width; + rect.bottom = rect.top + event->height; + + if (event->window != root_window) + { + SERVER_START_REQ( update_window_zorder ) + { + req->window = hwnd; + req->rect.left = rect.left; + req->rect.top = rect.top; + req->rect.right = rect.right; + req->rect.bottom = rect.bottom; + wine_server_call( req ); + } + SERVER_END_REQ; + + /* make position relative to client area instead of parent */ + OffsetRect( &rect, -data->client_rect.left, -data->client_rect.top ); + flags |= RDW_ALLCHILDREN; + } + + RedrawWindow( hwnd, &rect, 0, flags ); +} + + +/********************************************************************** + * X11DRV_MapNotify + */ +static void X11DRV_MapNotify( HWND hwnd, XEvent *event ) +{ + struct x11drv_win_data *data; + + if (!(data = X11DRV_get_win_data( hwnd ))) return; + if (!data->mapped) return; + + if (!data->managed) + { + HWND hwndFocus = GetFocus(); + if (hwndFocus && IsChild( hwnd, hwndFocus )) X11DRV_SetFocus(hwndFocus); /* FIXME */ + } +} + + +/*********************************************************************** * get_window_wm_state */ int get_window_wm_state( Display *display, struct x11drv_win_data *data ) @@ -755,9 +827,9 @@ static void handle_wm_state_notify( struct x11drv_win_data *data, XPropertyEvent /*********************************************************************** - * EVENT_PropertyNotify + * X11DRV_PropertyNotify */ -static void EVENT_PropertyNotify( HWND hwnd, XEvent *xev ) +static void X11DRV_PropertyNotify( HWND hwnd, XEvent *xev ) { XPropertyEvent *event = &xev->xproperty; struct x11drv_win_data *data; @@ -1130,9 +1202,9 @@ static const struct client_message_handler client_messages[] = /********************************************************************** - * EVENT_ClientMessage + * X11DRV_ClientMessage */ -static void EVENT_ClientMessage( HWND hwnd, XEvent *xev ) +static void X11DRV_ClientMessage( HWND hwnd, XEvent *xev ) { XClientMessageEvent *event = &xev->xclient; unsigned int i; diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index a1c229ef46e..e4a2dd764cc 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -1012,6 +1012,32 @@ INT IME_GetCursorPos() return rc; } +void IME_SetCursorPos(DWORD pos) +{ + LPINPUTCONTEXT lpIMC; + LPCOMPOSITIONSTRING compstr; + + if (!hSelectedFrom) + return; + + lpIMC = LockRealIMC(FROM_X11); + if (!lpIMC) + return; + + compstr = (LPCOMPOSITIONSTRING)ImmLockIMCC(lpIMC->hCompStr); + if (!compstr) + { + UnlockRealIMC(FROM_X11); + return; + } + + compstr->dwCursorPos = pos; + ImmUnlockIMCC(lpIMC->hCompStr); + UnlockRealIMC(FROM_X11); + GenerateIMEMessage(FROM_X11, WM_IME_COMPOSITION, pos, GCS_CURSORPOS); + return; +} + void IME_UpdateAssociation(HWND focus) { ImmGetContext(focus); diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 889396f9802..e6169badc79 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -968,7 +968,7 @@ static const WORD nonchar_key_vkey[256] = /* unused */ 0, 0, 0, 0, 0, 0, 0, 0, /* FF20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* FF28 */ - 0, 0, 0, 0, 0, 0, 0, 0, /* FF30 */ + 0, VK_HANGUL, 0, 0, VK_HANJA, 0, 0, 0, /* FF30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* FF38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* FF40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* FF48 */ @@ -1242,23 +1242,22 @@ void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD event_flags, DWORD * Updates internal state for , depending on key under X * */ -static inline void KEYBOARD_UpdateOneState ( int vkey, int state, DWORD time ) +static inline void KEYBOARD_UpdateOneState ( WORD vkey, WORD scan, int state, DWORD time ) { /* Do something if internal table state != X state for keycode */ - if (((key_state_table[vkey] & 0x80)!=0) != state) + if (((key_state_table[vkey & 0xff] & 0x80)!=0) != state) { - DWORD flags = 0; + DWORD flags = vkey & 0x100 ? KEYEVENTF_EXTENDEDKEY : 0; if (!state) flags |= KEYEVENTF_KEYUP; - if (vkey == VK_RSHIFT || vkey == VK_RCONTROL || vkey == VK_RMENU) flags |= KEYEVENTF_EXTENDEDKEY; TRACE("Adjusting state for vkey %#.2x. State before %#.2x\n", - vkey, key_state_table[vkey]); + vkey, key_state_table[vkey & 0xff]); /* Fake key being pressed inside wine */ - X11DRV_send_keyboard_input( vkey, 0, flags, time, 0, 0 ); + X11DRV_send_keyboard_input( vkey & 0xff, scan & 0xff, flags, time, 0, 0 ); - TRACE("State after %#.2x\n",key_state_table[vkey]); + TRACE("State after %#.2x\n", key_state_table[vkey & 0xff]); } } @@ -1273,7 +1272,7 @@ static inline void KEYBOARD_UpdateOneState ( int vkey, int state, DWORD time ) */ void X11DRV_KeymapNotify( HWND hwnd, XEvent *event ) { - int i, j, alt_r = 0, alt_l = 0, control_r = 0, control_l = 0, shift_r = 0, shift_l = 0; + int i, j; DWORD time = GetCurrentTime(); /* the minimum keycode is always greater or equal to 8, so we can @@ -1281,27 +1280,25 @@ void X11DRV_KeymapNotify( HWND hwnd, XEvent *event ) */ for (i = 1; i < 32; i++) { - if (!event->xkeymap.key_vector[i]) continue; for (j = 0; j < 8; j++) { - if (!(event->xkeymap.key_vector[i] & (1<xkeymap.key_vector[i] & (1<left >= virtual_screen_rect.right || rect->top >= virtual_screen_rect.bottom || @@ -160,11 +169,14 @@ static inline BOOL is_window_resizable( struct x11drv_win_data *data, DWORD styl /*********************************************************************** * get_mwm_decorations */ -static unsigned long get_mwm_decorations( DWORD style, DWORD ex_style ) +static unsigned long get_mwm_decorations( struct x11drv_win_data *data, + DWORD style, DWORD ex_style ) { unsigned long ret = 0; - if (!decorated_mode) return ret; + if (!decorated_mode) return 0; + + if (IsRectEmpty( &data->window_rect )) return 0; if (ex_style & WS_EX_TOOLWINDOW) return 0; @@ -196,7 +208,7 @@ static void get_x11_rect_offset( struct x11drv_win_data *data, RECT *rect ) style = GetWindowLongW( data->hwnd, GWL_STYLE ); ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); - decor = get_mwm_decorations( style, ex_style ); + decor = get_mwm_decorations( data, style, ex_style ); if (decor & MWM_DECOR_TITLE) style_mask |= WS_CAPTION; if (decor & MWM_DECOR_BORDER) @@ -845,16 +857,22 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) Window group_leader; Atom window_type; MwmHints mwm_hints; - DWORD style = GetWindowLongW( data->hwnd, GWL_STYLE ); - DWORD ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); - HWND owner = GetWindow( data->hwnd, GW_OWNER ); + DWORD style, ex_style; + HWND owner; if (data->hwnd == GetDesktopWindow()) { /* force some styles for the desktop to get the correct decorations */ - style |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; + style = WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; + ex_style = WS_EX_APPWINDOW; owner = 0; } + else + { + style = GetWindowLongW( data->hwnd, GWL_STYLE ); + ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); + owner = GetWindow( data->hwnd, GW_OWNER ); + } /* transient for hint */ if (owner) @@ -873,19 +891,20 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) set_size_hints( display, data, style ); /* set the WM_WINDOW_TYPE */ - window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL); if (style & WS_THICKFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL); + else if (ex_style & WS_EX_APPWINDOW) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL); else if (style & WS_DLGFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG); else if (ex_style & WS_EX_DLGMODALFRAME) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_DIALOG); #if 0 /* many window managers don't handle utility windows very well */ else if (ex_style & WS_EX_TOOLWINDOW) window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY); #endif + else window_type = x11drv_atom(_NET_WM_WINDOW_TYPE_NORMAL); XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE), XA_ATOM, 32, PropModeReplace, (unsigned char*)&window_type, 1); mwm_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; - mwm_hints.decorations = get_mwm_decorations( style, ex_style ); + mwm_hints.decorations = get_mwm_decorations( data, style, ex_style ); mwm_hints.functions = MWM_FUNC_MOVE; if (is_window_resizable( data, style )) mwm_hints.functions |= MWM_FUNC_RESIZE; if (style & WS_MINIMIZEBOX) mwm_hints.functions |= MWM_FUNC_MINIMIZE; @@ -1649,3 +1668,125 @@ int X11DRV_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw ) return TRUE; } + + +/*********************************************************************** + * is_netwm_supported + */ +static BOOL is_netwm_supported( Display *display, Atom atom ) +{ + static Atom *net_supported; + static int net_supported_count = -1; + int i; + + wine_tsx11_lock(); + if (net_supported_count == -1) + { + Atom type; + int format; + unsigned long count, remaining; + + if (!XGetWindowProperty( display, DefaultRootWindow(display), x11drv_atom(_NET_SUPPORTED), 0, + ~0UL, False, XA_ATOM, &type, &format, &count, + &remaining, (unsigned char **)&net_supported )) + net_supported_count = get_property_size( format, count ) / sizeof(Atom); + else + net_supported_count = 0; + } + wine_tsx11_unlock(); + + for (i = 0; i < net_supported_count; i++) + if (net_supported[i] == atom) return TRUE; + return FALSE; +} + + +/*********************************************************************** + * SysCommand (X11DRV.@) + * + * Perform WM_SYSCOMMAND handling. + */ +LRESULT X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam ) +{ + WPARAM hittest = wparam & 0x0f; + DWORD dwPoint; + int x, y, dir; + XEvent xev; + Display *display = thread_display(); + struct x11drv_win_data *data; + + if (!(data = X11DRV_get_win_data( hwnd ))) return -1; + if (!data->whole_window || !data->managed || !data->mapped) return -1; + + switch (wparam & 0xfff0) + { + case SC_MOVE: + if (!hittest) dir = _NET_WM_MOVERESIZE_MOVE_KEYBOARD; + else dir = _NET_WM_MOVERESIZE_MOVE; + break; + case SC_SIZE: + /* windows without WS_THICKFRAME are not resizable through the window manager */ + if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_THICKFRAME)) return -1; + + switch (hittest) + { + case WMSZ_LEFT: dir = _NET_WM_MOVERESIZE_SIZE_LEFT; break; + case WMSZ_RIGHT: dir = _NET_WM_MOVERESIZE_SIZE_RIGHT; break; + case WMSZ_TOP: dir = _NET_WM_MOVERESIZE_SIZE_TOP; break; + case WMSZ_TOPLEFT: dir = _NET_WM_MOVERESIZE_SIZE_TOPLEFT; break; + case WMSZ_TOPRIGHT: dir = _NET_WM_MOVERESIZE_SIZE_TOPRIGHT; break; + case WMSZ_BOTTOM: dir = _NET_WM_MOVERESIZE_SIZE_BOTTOM; break; + case WMSZ_BOTTOMLEFT: dir = _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT; break; + case WMSZ_BOTTOMRIGHT: dir = _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT; break; + default: dir = _NET_WM_MOVERESIZE_SIZE_KEYBOARD; break; + } + break; + + case SC_KEYMENU: + /* prevent a simple ALT press+release from activating the system menu, + * as that can get confusing on managed windows */ + if ((WCHAR)lparam) return -1; /* got an explicit char */ + if (GetMenu( hwnd )) return -1; /* window has a real menu */ + if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_SYSMENU)) return -1; /* no system menu */ + TRACE( "ignoring SC_KEYMENU wp %lx lp %lx\n", wparam, lparam ); + return 0; + + default: + return -1; + } + + if (IsZoomed(hwnd)) return -1; + + if (!is_netwm_supported( display, x11drv_atom(_NET_WM_MOVERESIZE) )) + { + TRACE( "_NET_WM_MOVERESIZE not supported\n" ); + return -1; + } + + dwPoint = GetMessagePos(); + x = (short)LOWORD(dwPoint); + y = (short)HIWORD(dwPoint); + + TRACE("hwnd %p, x %d, y %d, dir %d\n", hwnd, x, y, dir); + + xev.xclient.type = ClientMessage; + xev.xclient.window = X11DRV_get_whole_window(hwnd); + xev.xclient.message_type = x11drv_atom(_NET_WM_MOVERESIZE); + xev.xclient.serial = 0; + xev.xclient.display = display; + xev.xclient.send_event = True; + xev.xclient.format = 32; + xev.xclient.data.l[0] = x; /* x coord */ + xev.xclient.data.l[1] = y; /* y coord */ + xev.xclient.data.l[2] = dir; /* direction */ + xev.xclient.data.l[3] = 1; /* button */ + xev.xclient.data.l[4] = 0; /* unused */ + + /* need to ungrab the pointer that may have been automatically grabbed + * with a ButtonPress event */ + wine_tsx11_lock(); + XUngrabPointer( display, CurrentTime ); + XSendEvent(display, root_window, False, SubstructureNotifyMask, &xev); + wine_tsx11_unlock(); + return 0; +} diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index b12ded1e8b2..2f7ab13968c 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -42,18 +42,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv); #define SWP_AGG_NOPOSCHANGE \ (SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOZORDER) -#define _NET_WM_MOVERESIZE_SIZE_TOPLEFT 0 -#define _NET_WM_MOVERESIZE_SIZE_TOP 1 -#define _NET_WM_MOVERESIZE_SIZE_TOPRIGHT 2 -#define _NET_WM_MOVERESIZE_SIZE_RIGHT 3 -#define _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT 4 -#define _NET_WM_MOVERESIZE_SIZE_BOTTOM 5 -#define _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT 6 -#define _NET_WM_MOVERESIZE_SIZE_LEFT 7 -#define _NET_WM_MOVERESIZE_MOVE 8 /* movement only */ -#define _NET_WM_MOVERESIZE_SIZE_KEYBOARD 9 /* size via keyboard */ -#define _NET_WM_MOVERESIZE_MOVE_KEYBOARD 10 /* move via keyboard */ - #define _NET_WM_STATE_REMOVE 0 #define _NET_WM_STATE_ADD 1 #define _NET_WM_STATE_TOGGLE 2 @@ -61,57 +49,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv); static const char managed_prop[] = "__wine_x11_managed"; /*********************************************************************** - * X11DRV_Expose - */ -void X11DRV_Expose( HWND hwnd, XEvent *xev ) -{ - XExposeEvent *event = &xev->xexpose; - RECT rect; - struct x11drv_win_data *data; - int flags = RDW_INVALIDATE | RDW_ERASE; - - TRACE( "win %p (%lx) %d,%d %dx%d\n", - hwnd, event->window, event->x, event->y, event->width, event->height ); - - if (!(data = X11DRV_get_win_data( hwnd ))) return; - - if (event->window == data->whole_window) - { - rect.left = data->whole_rect.left + event->x; - rect.top = data->whole_rect.top + event->y; - flags |= RDW_FRAME; - } - else - { - rect.left = data->client_rect.left + event->x; - rect.top = data->client_rect.top + event->y; - } - rect.right = rect.left + event->width; - rect.bottom = rect.top + event->height; - - if (event->window != root_window) - { - SERVER_START_REQ( update_window_zorder ) - { - req->window = hwnd; - req->rect.left = rect.left; - req->rect.top = rect.top; - req->rect.right = rect.right; - req->rect.bottom = rect.bottom; - wine_server_call( req ); - } - SERVER_END_REQ; - - /* make position relative to client area instead of parent */ - OffsetRect( &rect, -data->client_rect.left, -data->client_rect.top ); - flags |= RDW_ALLCHILDREN; - } - - RedrawWindow( hwnd, &rect, 0, flags ); -} - - -/*********************************************************************** * update_net_wm_states */ static void update_net_wm_states( Display *display, struct x11drv_win_data *data ) @@ -136,7 +73,7 @@ static void update_net_wm_states( Display *display, struct x11drv_win_data *data { if ((style & WS_MAXIMIZE) && (style & WS_CAPTION) == WS_CAPTION) new_state |= (1 << NET_WM_STATE_MAXIMIZED); - else + else if (!(style & WS_MINIMIZE)) new_state |= (1 << NET_WM_STATE_FULLSCREEN); } else if (style & WS_MAXIMIZE) @@ -529,24 +466,6 @@ void X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, UINT swp_flags, } -/********************************************************************** - * X11DRV_MapNotify - */ -void X11DRV_MapNotify( HWND hwnd, XEvent *event ) -{ - struct x11drv_win_data *data; - - if (!(data = X11DRV_get_win_data( hwnd ))) return; - if (!data->mapped) return; - - if (!data->managed) - { - HWND hwndFocus = GetFocus(); - if (hwndFocus && IsChild( hwnd, hwndFocus )) X11DRV_SetFocus(hwndFocus); /* FIXME */ - } -} - - struct desktop_resize_data { RECT old_screen_rect; @@ -678,125 +597,3 @@ void X11DRV_ConfigureNotify( HWND hwnd, XEvent *xev ) SetWindowPos( hwnd, 0, x, y, cx, cy, flags ); } - - -/*********************************************************************** - * is_netwm_supported - */ -static BOOL is_netwm_supported( Display *display, Atom atom ) -{ - static Atom *net_supported; - static int net_supported_count = -1; - int i; - - wine_tsx11_lock(); - if (net_supported_count == -1) - { - Atom type; - int format; - unsigned long count, remaining; - - if (!XGetWindowProperty( display, DefaultRootWindow(display), x11drv_atom(_NET_SUPPORTED), 0, - ~0UL, False, XA_ATOM, &type, &format, &count, - &remaining, (unsigned char **)&net_supported )) - net_supported_count = get_property_size( format, count ) / sizeof(Atom); - else - net_supported_count = 0; - } - wine_tsx11_unlock(); - - for (i = 0; i < net_supported_count; i++) - if (net_supported[i] == atom) return TRUE; - return FALSE; -} - - -/*********************************************************************** - * SysCommand (X11DRV.@) - * - * Perform WM_SYSCOMMAND handling. - */ -LRESULT X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam ) -{ - WPARAM hittest = wparam & 0x0f; - DWORD dwPoint; - int x, y, dir; - XEvent xev; - Display *display = thread_display(); - struct x11drv_win_data *data; - - if (!(data = X11DRV_get_win_data( hwnd ))) return -1; - if (!data->whole_window || !data->managed || !data->mapped) return -1; - - switch (wparam & 0xfff0) - { - case SC_MOVE: - if (!hittest) dir = _NET_WM_MOVERESIZE_MOVE_KEYBOARD; - else dir = _NET_WM_MOVERESIZE_MOVE; - break; - case SC_SIZE: - /* windows without WS_THICKFRAME are not resizable through the window manager */ - if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_THICKFRAME)) return -1; - - switch (hittest) - { - case WMSZ_LEFT: dir = _NET_WM_MOVERESIZE_SIZE_LEFT; break; - case WMSZ_RIGHT: dir = _NET_WM_MOVERESIZE_SIZE_RIGHT; break; - case WMSZ_TOP: dir = _NET_WM_MOVERESIZE_SIZE_TOP; break; - case WMSZ_TOPLEFT: dir = _NET_WM_MOVERESIZE_SIZE_TOPLEFT; break; - case WMSZ_TOPRIGHT: dir = _NET_WM_MOVERESIZE_SIZE_TOPRIGHT; break; - case WMSZ_BOTTOM: dir = _NET_WM_MOVERESIZE_SIZE_BOTTOM; break; - case WMSZ_BOTTOMLEFT: dir = _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT; break; - case WMSZ_BOTTOMRIGHT: dir = _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT; break; - default: dir = _NET_WM_MOVERESIZE_SIZE_KEYBOARD; break; - } - break; - - case SC_KEYMENU: - /* prevent a simple ALT press+release from activating the system menu, - * as that can get confusing on managed windows */ - if ((WCHAR)lparam) return -1; /* got an explicit char */ - if (GetMenu( hwnd )) return -1; /* window has a real menu */ - if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_SYSMENU)) return -1; /* no system menu */ - TRACE( "ignoring SC_KEYMENU wp %lx lp %lx\n", wparam, lparam ); - return 0; - - default: - return -1; - } - - if (IsZoomed(hwnd)) return -1; - - if (!is_netwm_supported( display, x11drv_atom(_NET_WM_MOVERESIZE) )) - { - TRACE( "_NET_WM_MOVERESIZE not supported\n" ); - return -1; - } - - dwPoint = GetMessagePos(); - x = (short)LOWORD(dwPoint); - y = (short)HIWORD(dwPoint); - - TRACE("hwnd %p, x %d, y %d, dir %d\n", hwnd, x, y, dir); - - xev.xclient.type = ClientMessage; - xev.xclient.window = X11DRV_get_whole_window(hwnd); - xev.xclient.message_type = x11drv_atom(_NET_WM_MOVERESIZE); - xev.xclient.serial = 0; - xev.xclient.display = display; - xev.xclient.send_event = True; - xev.xclient.format = 32; - xev.xclient.data.l[0] = x; /* x coord */ - xev.xclient.data.l[1] = y; /* y coord */ - xev.xclient.data.l[2] = dir; /* direction */ - xev.xclient.data.l[3] = 1; /* button */ - xev.xclient.data.l[4] = 0; /* unused */ - - /* need to ungrab the pointer that may have been automatically grabbed - * with a ButtonPress event */ - wine_tsx11_lock(); - XUngrabPointer( display, CurrentTime ); - XSendEvent(display, root_window, False, SubstructureNotifyMask, &xev); - wine_tsx11_unlock(); - return 0; -} diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index e682f07d998..90a2abd9643 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -280,6 +280,7 @@ extern void IME_SetOpenStatus(BOOL fOpen); extern void IME_XIMPresent(BOOL present); extern LRESULT IME_SendMessageToSelectedHWND(UINT msg, WPARAM wParam, LPARAM lParam); extern INT IME_GetCursorPos(); +extern void IME_SetCursorPos(DWORD pos); extern void IME_UpdateAssociation(HWND focus); extern BOOL IME_SetCompositionString(DWORD dwIndex, LPCVOID lpComp, DWORD dwCompLen, LPCVOID lpRead, @@ -641,9 +642,7 @@ extern void X11DRV_MotionNotify( HWND hwnd, XEvent *event ); extern void X11DRV_EnterNotify( HWND hwnd, XEvent *event ); extern void X11DRV_KeyEvent( HWND hwnd, XEvent *event ); extern void X11DRV_KeymapNotify( HWND hwnd, XEvent *event ); -extern void X11DRV_Expose( HWND hwnd, XEvent *event ); extern void X11DRV_DestroyNotify( HWND hwnd, XEvent *event ); -extern void X11DRV_MapNotify( HWND hwnd, XEvent *event ); extern void X11DRV_ConfigureNotify( HWND hwnd, XEvent *event ); extern void X11DRV_SelectionRequest( HWND hWnd, XEvent *event ); extern void X11DRV_SelectionClear( HWND hWnd, XEvent *event ); diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c index d4df9f79a57..265f9c80608 100644 --- a/dlls/winex11.drv/xim.c +++ b/dlls/winex11.drv/xim.c @@ -35,6 +35,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv); +#ifndef HAVE_XICCALLBACK_CALLBACK +#define XICCallback XIMCallback +#define XICProc XIMProc +#endif + BOOL ximInComposeMode=FALSE; /* moved here from imm32 for dll separation */ @@ -43,7 +48,6 @@ static LPBYTE CompositionString = NULL; static DWORD dwCompStringSize = 0; static LPBYTE ResultString = NULL; static DWORD dwResultStringSize = 0; -static DWORD dwPreeditPos = 0; #define STYLE_OFFTHESPOT (XIMPreeditArea | XIMStatusArea) #define STYLE_OVERTHESPOT (XIMPreeditPosition | XIMStatusNothing) @@ -211,7 +215,6 @@ static int XIMPreEditStartCallback(XIC ic, XPointer client_data, XPointer call_d TRACE("PreEditStartCallback %p\n",ic); X11DRV_ImmSetOpenStatus(TRUE); ximInComposeMode = TRUE; - IME_SendMessageToSelectedHWND(EM_GETSEL, 0, (LPARAM)&dwPreeditPos); return -1; } @@ -220,7 +223,6 @@ static void XIMPreEditDoneCallback(XIC ic, XPointer client_data, XPointer call_d TRACE("PreeditDoneCallback %p\n",ic); ximInComposeMode = FALSE; X11DRV_ImmSetOpenStatus(FALSE); - dwPreeditPos = 0; } static void XIMPreEditDrawCallback(XIM ic, XPointer client_data, @@ -266,6 +268,7 @@ static void XIMPreEditDrawCallback(XIM ic, XPointer client_data, } else X11DRV_ImmSetInternalString (GCS_COMPSTR, sel, len, NULL, 0); + IME_SetCursorPos(P_DR->caret); } TRACE("Finished\n"); } @@ -306,8 +309,7 @@ static void XIMPreEditCaretCallback(XIC ic, XPointer client_data, FIXME("Not implemented\n"); break; } - IME_SendMessageToSelectedHWND( EM_SETSEL, dwPreeditPos + pos, - dwPreeditPos + pos); + IME_SetCursorPos(pos); P_C->position = pos; } TRACE("Finished\n"); @@ -501,11 +503,8 @@ XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data) XVaNestedList preedit = NULL; XVaNestedList status = NULL; XIC xic; - XICCallback destroy = {(XPointer)data, X11DRV_DestroyIC}; - XIMCallback P_StartCB; - XIMCallback P_DoneCB; - XIMCallback P_DrawCB; - XIMCallback P_CaretCB; + XICCallback destroy = {(XPointer)data, (XICProc)X11DRV_DestroyIC}; + XICCallback P_StartCB, P_DoneCB, P_DrawCB, P_CaretCB; LANGID langid = PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())); Window win = data->whole_window; @@ -531,13 +530,13 @@ XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data) /* create callbacks */ P_StartCB.client_data = NULL; - P_StartCB.callback = (XIMProc)XIMPreEditStartCallback; P_DoneCB.client_data = NULL; - P_DoneCB.callback = (XIMProc)XIMPreEditDoneCallback; P_DrawCB.client_data = NULL; - P_DrawCB.callback = (XIMProc)XIMPreEditDrawCallback; P_CaretCB.client_data = NULL; - P_CaretCB.callback = (XIMProc)XIMPreEditCaretCallback; + P_StartCB.callback = (XICProc)XIMPreEditStartCallback; + P_DoneCB.callback = (XICProc)XIMPreEditDoneCallback; + P_DrawCB.callback = (XICProc)XIMPreEditDrawCallback; + P_CaretCB.callback = (XICProc)XIMPreEditCaretCallback; if ((ximStyle & (XIMPreeditNothing | XIMPreeditNone)) == 0) { diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index e2ee9af0735..53e033197f4 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -3239,6 +3239,8 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, { DWORD dwBufferSize; DWORD dwStatusCode; + WCHAR encoding[20]; + static const WCHAR szChunked[] = {'c','h','u','n','k','e','d',0}; INTERNET_SendCallback(&lpwhr->hdr, lpwhr->hdr.dwContext, INTERNET_STATUS_RECEIVING_RESPONSE, NULL, 0); @@ -3264,6 +3266,15 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders, if (lpwhr->dwContentLength == 0) HTTP_FinishedReading(lpwhr); + /* Correct the case where both a Content-Length and Transfer-encoding = chuncked are set */ + + dwBufferSize = sizeof(encoding); + if (HTTP_HttpQueryInfoW(lpwhr, HTTP_QUERY_TRANSFER_ENCODING, encoding, &dwBufferSize, NULL) && + !strcmpiW(encoding, szChunked)) + { + lpwhr->dwContentLength = -1; + } + dwBufferSize = sizeof(dwStatusCode); if (!HTTP_HttpQueryInfoW(lpwhr,HTTP_QUERY_FLAG_NUMBER|HTTP_QUERY_STATUS_CODE, &dwStatusCode,&dwBufferSize,NULL)) diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index 429867a7dc9..ba16ed2e708 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -3114,6 +3114,7 @@ BOOL WINAPI FindNextUrlCacheEntryW( ) { FIXME("(%p, %p, %p) stub\n", hEnumHandle, lpNextCacheEntryInfo, lpdwNextCacheEntryInfoBufferSize); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } diff --git a/dlls/winmm/winmm_Si.rc b/dlls/winmm/winmm_Si.rc index 1146e746db0..c4c11d0d0ba 100644 --- a/dlls/winmm/winmm_Si.rc +++ b/dlls/winmm/winmm_Si.rc @@ -50,6 +50,7 @@ MIDIERR_NODEVICE, "Trenutna nastavitev MIDI se sklicuje na MIDI napravo, ki ni MIDIERR_INVALIDSETUP, "Trenutna nastavitev MIDI je pošodovana. Namestite originalno datoteko MIDIMAP.CFG v sistemsko mapo Oken in poskusite znova." /* MCI errors */ +MCIERR_INVALID_DEVICE_ID, "Neveljaven ID MCI naprave. Uporabite ID, ki ga vrne odpiranje MCI naprave." MCIERR_UNRECOGNIZED_KEYWORD, "Naveden parameter ukaza ni definiran v naboru MCI ukazov." MCIERR_UNRECOGNIZED_COMMAND, "Naveden ukaz je neveljaven MCI ukaz." MCIERR_HARDWARE, "Z večpredstavnostno napravo so težave. Preverite, ali naprava deluje pravilno ali pa se posvetujte z izdelovalcem." diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c index 3147ec0de5b..9551d8787f1 100644 --- a/dlls/wintab32/context.c +++ b/dlls/wintab32/context.c @@ -692,11 +692,21 @@ BOOL WINAPI WTGetW(HCTX hCtx, LPLOGCONTEXTW lpLogCtx) */ BOOL WINAPI WTSetA(HCTX hCtx, LPLOGCONTEXTA lpLogCtx) { - FIXME("(%p, %p): stub\n", hCtx, lpLogCtx); + LPOPENCONTEXT context; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + TRACE("hCtx=%p, lpLogCtx=%p\n", hCtx, lpLogCtx); - return FALSE; + if (!hCtx || !lpLogCtx) return FALSE; + + /* TODO: if cur process not owner of hCtx only modify + * attribs not locked by owner */ + + EnterCriticalSection(&csTablet); + context = TABLET_FindOpenContext(hCtx); + LOGCONTEXTAtoW(lpLogCtx, &context->context); + LeaveCriticalSection(&csTablet); + + return TRUE; } /*********************************************************************** @@ -704,11 +714,21 @@ BOOL WINAPI WTSetA(HCTX hCtx, LPLOGCONTEXTA lpLogCtx) */ BOOL WINAPI WTSetW(HCTX hCtx, LPLOGCONTEXTW lpLogCtx) { - FIXME("(%p, %p): stub\n", hCtx, lpLogCtx); + LPOPENCONTEXT context; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + TRACE("hCtx=%p, lpLogCtx=%p\n", hCtx, lpLogCtx); - return FALSE; + if (!hCtx || !lpLogCtx) return FALSE; + + /* TODO: if cur process not hCtx owner only modify + * attribs not locked by owner */ + + EnterCriticalSection(&csTablet); + context = TABLET_FindOpenContext(hCtx); + memmove(&context->context, lpLogCtx, sizeof(LOGCONTEXTW)); + LeaveCriticalSection(&csTablet); + + return TRUE; } /*********************************************************************** diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c index b7788b14d02..c5b1612d93b 100644 --- a/dlls/wintrust/wintrust_main.c +++ b/dlls/wintrust/wintrust_main.c @@ -151,7 +151,9 @@ static LONG WINTRUST_DefaultClose(HWND hwnd, GUID *actionID, if (provData) { - err = provData->psPfns->pfnCleanupPolicy(provData); + if (provData->psPfns->pfnCleanupPolicy) + err = provData->psPfns->pfnCleanupPolicy(provData); + WINTRUST_Free(provData->padwTrustStepErrors); WINTRUST_Free(provData->u.pPDSip); WINTRUST_Free(provData->psPfns); diff --git a/dlls/wldap32/wldap32_Fr.rc b/dlls/wldap32/wldap32_Fr.rc index a7257544e7b..8ea8d1c8bdd 100644 --- a/dlls/wldap32/wldap32_Fr.rc +++ b/dlls/wldap32/wldap32_Fr.rc @@ -56,7 +56,7 @@ STRINGTABLE DISCARDABLE 31 "" 32 "Objet inconnu" 33 "Problème d'alias" - 34 "Synatxe DN invalide" + 34 "Syntaxe DN invalide" 35 "Est une feuille" 36 "Problème de déréférencement d'alias" 37 "" diff --git a/fonts/tahoma.sfd b/fonts/tahoma.sfd index c62946f44c5..27eb125ef62 100644 --- a/fonts/tahoma.sfd +++ b/fonts/tahoma.sfd @@ -12,13 +12,13 @@ UnderlinePosition: -170 UnderlineWidth: 130 Ascent: 1638 Descent: 410 -XUID: [1021 135 1692684408 1110817] +XUID: [1021 135 1692684408 1110822] FSType: 0 OS2Version: 2 OS2_WeightWidthSlopeOnly: 0 OS2_UseTypoMetrics: 1 CreationTime: 1169210120 -ModificationTime: 1206566066 +ModificationTime: 1208293008 PfmFamily: 33 TTFWeight: 400 TTFWidth: 5 @@ -94,7 +94,7 @@ NameList: Adobe Glyph List DisplaySize: 16 AntiAlias: 1 FitToEm: 1 -WinInfo: 0 28 11 +WinInfo: 336 28 11 BeginPrivate: 10 BlueValues 27 [-30 0 1120 1177 1522 1522] OtherBlues 11 [-426 -426] @@ -108,7 +108,7 @@ SnapStemV 9 [184 203] ExpansionFactor 4 0.06 EndPrivate TeXData: 1 0 0 327680 163840 109226 571904 -1048576 109226 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144 -BeginChars: 65537 425 +BeginChars: 65537 430 StartChar: .notdef Encoding: 0 0 0 Width: 2048 @@ -9179,8 +9179,62 @@ Fore 936 1671 l 1 EndSplineSet EndChar +StartChar: uni0326 +Encoding: 806 806 425 +Width: 1118 +Flags: W +HStem: -411 276<447 524> +VStem: 361 308 +Fore +361 -411 m 1 + 447 -135 l 1 + 669 -135 l 1 + 524 -411 l 5 + 361 -411 l 1 +EndSplineSet +EndChar +StartChar: Scommaaccent +Encoding: 536 536 426 +Width: 1141 +Flags: W +HStem: -411 276<447 524> -17 164<338.667 837.867> 1369 163<435.993 753.733> +VStem: 89 206<1023.33 1289.2> 361 308 886 211<181.933 591> +Fore +Refer: 425 806 S 1 0 0 1 0 0 2 +Refer: 52 83 N 1 0 0 1 0 0 2 +EndChar +StartChar: uni021A +Encoding: 538 538 427 +Width: 1196 +Flags: W +HStem: -410 276<482 559> 0 21<498 701> 1318 171<3 498 701 1198> +VStem: 396 308 498 203<0 1318> +Fore +Refer: 425 806 S 1 0 0 1 35 1 2 +Refer: 53 84 N 1 0 0 1 0 0 2 +EndChar +StartChar: scommaaccent +Encoding: 537 537 428 +Width: 913 +Flags: W +HStem: -410 276<373 450> -41 154<298.856 587.533> 981 154<342.2 643.267> +VStem: 76 178<740.8 952.933> 287 308 696 189<143.6 347.133> +Fore +Refer: 425 806 S 1 0 0 1 -74 1 2 +Refer: 84 115 N 1 0 0 1 0 0 2 +EndChar +StartChar: uni021B +Encoding: 539 539 429 +Width: 684 +Flags: W +HStem: -410 276<303 380> 0 154<426 719> 977 143<20 155 340 719> +VStem: 155 185<274.336 977 1120 1438> 217 308 +Fore +Refer: 425 806 S 1 0 0 1 -144 1 2 +Refer: 85 116 N 1 0 0 1 0 0 2 +EndChar EndChars -BitmapFont: 9 425 7 2 1 +BitmapFont: 9 430 7 2 1 BDFChar: 0 0 9 1 7 0 6 rdo`RJqEt% BDFChar: 1 32 3 0 0 0 0 @@ -10031,8 +10085,18 @@ BDFChar: 423 371 5 0 4 -2 4 OH>QcE"Eid BDFChar: 424 175 5 0 3 7 7 n,NFg +BDFChar: 425 806 5 3 3 -1 -1 +J,fQL +BDFChar: 426 536 5 0 4 -2 6 +G^t<`#RKo"+92BA +BDFChar: 427 538 5 0 4 -2 6 +p`L\%+*05X7S"5WA`T0E;(Q EndBitmapFont -BitmapFont: 16 425 13 3 1 FontForge +BitmapFont: 16 430 13 3 1 FontForge BDFStartProperties: 36 FONT 1 "-FontForge-Tahoma-Normal-R-Normal--16-120-96-96-P-93-ISO10646-1" FONTBOUNDINGBOX 1 "21 16 0 -3" @@ -13650,5 +13754,15 @@ BDFChar: 423 371 9 0 7 -3 8 JUrB'JUrA>4TY`g BDFChar: 424 175 9 0 8 13 14 !!*%L +BDFChar: 425 806 9 2 4 -4 -2 +?pK5B +BDFChar: 426 536 9 0 7 -3 11 +5!a^LJ8bu!!!!@W1TW0*o@$~==%5}*trgdxl*B3Oz^kq9afWGE_{)KX;-L=O@~ z#DGj90vakl%d=@6YN@YPK0XRoAq>{xSwu^HJ_@<-d+t36DewL99-q%I_nx))*=y~! ze{0y6gO+(^lexZI-HRWJgw%-giYb%6IQzB8FHeZnygQ`l+c~`+*k9>ilZ3Y%_CB~Z_e!MJE|Yq_j44CW4vSzf=)@E zOrBTpoH}RT;$^GSw(wO$=4!rY!K~`f?|E-y1qybc@W=D2m({AU9OQ*P%u1YJJ#TjR znDdK89yx?jWwi?yE&fSCUKf!KmqcQHqHH^4*q`1#zRjAZCb|#W5_QnpuSTh_o4!-O zGJ;EFg8qb582iw=Pr6u#Txt4DHMi-6>uY!Xd!k3y=qZLmtIUxyF(uPF73dSwL;J1v zJM9xa-O_^9G2OLycsjw;oZ!qcVQ*`7YgOw_t+7`ZUM;#>cs1{8->bP-v(79zbMKjj zXKK&PJ9EdG87=?Ovb1GU%h1zXPCtG6iPP&(uRFcw^vcuAPgk9;JU#NyXI=Y5S#hB% zD=`$)v@kSA)vcGsQX_ZD-ReoXU!IqHWuDq3%j6#Qf~=M;YL_fgd)13FSMF0=)i%|r z3e|3zFArh+UO6H^li5M6BRy`=WXswdPWt1_GJ?=(@Xdp+r$ zq+>~^lDxynUL~W$~!3^r?jTtkUAuFX6pLX z{i&a)m86YMdnj#V+8b$C(z~P&OrMgzK7D`sI~m zE!kG>HK|T$a5;snmKfQLWZnY>%w6v51%pTxW5mj%Z)^on-|_1n$HVOm&$%% zzgJMsBG%~ge3jd@to(t<$nZr9*_;uh7(Y0|R`TwM9`@w(Bi~HOD(fM_!UMwR^;gW} zEIcx@aF*3PDn21wrl@}Hqpi-UOJz4*9962Y>PdAU!xO?^>N{L(7#5tZfPv&KI6sZfT>lwYf5A(v!EXz=JMDvLoDk37*CzaebDBSK9-H}i;&7atIBBAW6}2~EMQJa`X*L0_ zv=boTYP>04 znKmt2XB(9!J68qvfb?(kd~1!q#8_a=nqU!<9EINWrk;eb};yLr}vdGo5PXU&>D zf3a^-hX?nP`Ev`33WqtL<&n?gqLQY&H=ocGo))Dxt7kz1z)q znXF#2{;)MkZMH6M?UnQlo9-gLv&_ot}DYIApbzE25T5!%jY^Paogk`D@#Qy)VJFEDb zqz{%%l^AS060xQ;pCkF)%c|E_?}EPUJy~Y-)TZqj-1Yhuy!PAH{M`xu7uoL-PAs~Y z_xGgqwZit9bh@@83}sE2Hd$iv%UB86-_%PIAbb*ExK*vSmc20BzgiBdwP2lOq5sPl z`l!`b?B2e?HTHA36oyAxICAgWu6FN2-$Hw0cQB7D%Z`Dj&-ZS)AuYxfx4AsA<f$l1-=)Ngm43X`rD?2F)%2s|MzGlDk{I{>-4mCEs+TEGtbwj&kHod4 z`rOD{6U%<88J>^~6Q3b5M#ZIyih@+D`qR#F_8RUgw@cjahqkY-Of9n(Uh37f<cHXkN$O3*tmDS=XhT)Him!W_uZO`K;4N?zybq3p)8Gs6EnrOu zDc&HUOY-&s?A%)nh5*_r?_@w#_s#kUxkD*`C;jRm)WDliw^3%GOm9tDpB+Av=u*bTTx`CbFR0lxzu z0Cf4zf-k|}xNrLYf#;~oelI|wpPtp9401p}FbIqQTyFie)P5BE=YWOaKESc~SAi$M zGl28(bHnpDf!9GZ;126&qkfuGKg#_SeLr6He~)|ot=uPJN`M^)xIG7OZ-9m@K>HV< zV+oXk!2kmSH-qT_7YA^0;3wc`fSm_W9$?o2jx>OK1N1_HKLBp@flt6Wz>PleJ&a?+ zK{gyrfH^@}6ifps3(`6T*==xaLv5z&G3)?GF@@X--Gg^JbaFY*^R9bd z;rBAt14f;Fx);D@u`@>WblIz~8$i7ehx@WXKEUZd%JBgungv)q0967|C15$H1yuqs zfmgw=B=S>7;28MGIW6KLfTAEC3lexiE(^gFfR}>gnBZ_Q4om@bw81&iQwTl?h=(Ao z2(ppjv(PNK6QC?evP!D}4O`p}UDI>;{klT5f>YIJpyjkClZLs4~I z6<>62b}wfxoR?0HEZ>oJx@JQ*4sEzxth_yE;oT65>3LH3*jgafR%ty z6rx3l7O`DOw21At7C@d8Qk+700R4&(J^0ONIb zuak6j7S|!1&Sl*o=^BvEfDi`JWRNoq?wbZm462L)@eOj4LGCbS*gtXtuG_|9Kn*oW z8wQ>+Vs=N_mjA1U&-24ye9T#ZhK;5u^L=c!Owv8}X;DSIhI|}L|VL*c;c1+qC$<8`q zCk(nr+eURGfL)5XQY@w@LW&Bf9swM-Y6LJ={VU+06l_(00aS2})U3f$4H9V(NP|2Y zeUbKKU>6*Xf}=eQ)^wmhmT6QojhNCnX^oVueG0w-cuc3F>Fib~@O9Xv6Q??!(I){q zJDs@KYaRAef^`_CKMyccC#-bV)&C8AWQPcr>K6gI-k^dR?A)NiGI~4I=Qs=si9y^N zc)*wjW&%p4aW}xN1_{Q%8wRd5>>t?hh(Wb9XjcuqYaEMGY^a^NOe03cc>fWhSVP?) zRr~)5jG=8=+9AZyl2+g9ID;M1`Iy;`j4ijZdCa4ZEG}yH z7z_}f-@X`Kfy~i4N1Qo!WOR09e{^J|JjronmmOJWJ547=g=2gCPo-lAH(V@J-Rj1+ zg_0d!)LSWX#&GjwU7*R2%Dzq66#`eQGC)C8By+XY35iWkIM7un!b*`_)!$$) zc~#?BBEKNg)PPc#R$fJQJkza`I zjZKJ-R~0+sPEb@0yzY5e`*T#UU60BD7dqke1e#GpAnAI(aCDIX`90tgF3>^2Ern4E zk}Hakq9ai?PH?OS+W}Wj^;!!@VTAQqA(k6SqW3OvpQF~q_q=pYGoUkf5_8E~w7er=F8$RrY>rW3H@()poH;818EGn8X zruZ+O!J>*ch)CxVg~N-yCt|J@c_xMSun{HWZtAjZ^lp(YLqy_skGSdPVb?D#UPpf! z{l~}M)U)@Y4y9{E)SI-YPb?fW`JNLGOq2>~bxg!=xNY8y^43)s?iC3f5Ha7l?Vd%6 zQfSAEw7#DgtlMWSESCiFGGSZVq1)#!DSbcu+3!W#9TzFjDVsH8=8UR+D^Y;Kl2?YH zb+=Z@v{%qhDVw)w@!hkZ{F{i8A>!FLcfoBlN>^2OE=0j{6i%KuV{y6qLH6?ktB}O` zGv>{@Cg$uSktz$LhLkT@xM=6e?8zb!wbyx0jZn|m zHL5>Y&g-6(y1#lZdapYyW@LP4vD8++XUY(<#of6Im8%A*0#&F+s+-jmHA~G=3)M2U zUTro0XuM^dbUFrS*l+N3+*uKvR&;slZE}dQ-~j^3(H9&pkco zblK@!Pfuz%*KlXU{DuMb)%6?d*VI2+zq-DvzOw$_`YH8=^+P{7>DeX9$qmh{+YlP9 zDjtJjz0Q`S1UO|r_8g(^*@s|>kcWvfh;Quj>jaYn@}-9GGgw%d0}o}?a0 zMM-5z%aZmd9ZmW+Igorqa#ix?2^PQIM-vy_sQ`6;_o8dF=P7Nky0U6y({^;qf; zX>HR=(&ndCrG1!oKD~4Lg!HoXHR)$Ftc=8r!i;Gd%QJqL@l9r0=FH5)nHRINvesuE z%Q~0cIs3-!rP;sDKAPQ_6ROB5$|=oxDCa=Vn>m-dXLK*wCP}qp@d3&$6C1Jx}#Y>@}d*++MZ44);3N>zmy6xp}#zxr=fi%H5E=Blke=ySe9k z8@)UBF6ce6_xwJAK1qH0^;y(sbD!ha4!ic9z9oHM=-Zg*%S+4~m^Ui#=Xs@h%k$pJ zk8hPfB)>F&MgG?OL-}X>#rA7o*Q))lG?nb^ADE!B>fRjqCq-jJ!7Y4VEZCy5oVA0; zbV!zUYHc_y!@{TSGVgbxG{Iv-US9Zia8F*SOBs5d``+|nOyVpa)>CEF?H+btq^EG9 zLbhr62>Kg_yGp(r-pL)@cEqb4QipUBVdDPbv*ru-hfG`)nK;$?dPG8pG?}3KHuqlE zy&jcTmpC$CVbyxIgzmB7FU=jEN9i6J=}vaaixY~|Wuq#((rbUw+?)Ql6A_ie!k=0D zyr)9xDn(vai$fmCh{&U}EodH};v6kbfIjDo7pM-Y*C#{h0JU_}?*{B(yZ5cAjwPo_8!HU!OszD6OB_`it zf54zyqg%V-_2`y!6r=U&=R{6_a6}#%?nQ)ZMe`d82O9)5pyY8$_v%YLghmM?$L`)p)K|wa&;bbG$suc(vO( zw56Nc=zO}ROSfN<3))H-c_{MTfxKX;YAti0H#r@*er{KVYt(ATvn|tG70y?y!}(62 zHq*Iv+rae7@MCHP&~oOF4_}Zrzh4ad`zU?Z*?=kj0wGveE&MLlFJHDFn zohl`k#2CxDUldDPBR9gItH^j~aZRdP>pW94l+T8m{+%krXPD&-87rRAZ9rPMQ6335 z(tqvtL3U+$6K~zKeT=^{T*k;Ubd{m!==N@m_-1?G;M&V)SYbSKv|+BbPTr1O#?~;l zhOvhkyJ$yWoy}J+X zqTNILM8<B6Wk5%XHHaVO-K@Ygbh?VlFDzy_XR)CoqlW>JTBXZnAXxSGG--NFCk zOl^_0-;)_N%_-b7=&I3cBYm!&hxa6RUmJEeu{CWy1INr9kY>EZa)_fP;672l1k@hK zS360qa%R@f@~@NwY86;5naufNZCAC@X{_xYta95ffudA$dhdO#otv&n)nsHhX+NUY zx^%8Pws%8E=dm~P>)w82VaS>NQGVUCA6daRhNWV?vz1q3y_XG}=XuNP8qb{ybZzd4 zYwqxR4X-!6I=S$PWO3BzUFya(_KL4Q;#F-Ae(Y6e+O#um!yl7Wqhcfw6JBn3lrN@q z`oYA`>Ol`hpb;syh#$(W-Y!+|Pg2Q)YGYy)RaGnMD9^WUk?4+zxg2yWt){rkl$HOC zi&kmwpQ&o&;@t5;0<&jbbtqXS`yHRp6}6+}^Q@{K5)t|RuBdabh^QRVcqbTiMM=MN zUu3E_?tK2HcJAciP!lG67iy`<35C>^b|UBFKKEh`?ka}3h8#SbtX{P$mWsqK2UUR5 zICedF5^MoG!CpW$9QzXZBX|#d49)_|^jH=hi}tuy0Gr~7^>JySC+G);g3(|Cm=0!x zh2R13Ftumg6FfW(P!{(*_z&<3_!Ia5)Ppa;{{R&ED8GFu@+AUNpsz0|03*On;1^&f zmw+i_*?<*> z@Wl{LA7X`}J^-bmaR7xOl!fjA4*?bxqKFN#b0HQL!UaO?UI^CsdW`V>I>&{yDl zk$6@W&#K}(gQV()T(xipC9AbVrBdXHbwFitQ4{MmZi56Z>zH!5HHzo{D7g|>{FH!+ zk6hJWr`r%c5+GgK{(}d4E7Q!Js{4XJk~Q;QEeo`eJyG4zSGBLmBxZ>>#v@)&llXMs z5j~#JA+5FS&sx^{N1d79w3zprs4OeCh5k-jmiiMJ0xcg0ds<8&lBPTE)-UJh>z#jsy6baG-9bj;D*bzh}TAx3J|JF5=G3p$c(LT=t0jdj)Ai2&VEbfGtA& z5`00y6x9|a0;s9*0fqCbi2%n{3joGZAc!JJa<><%T~V+@y$zU4F_(fA2GQSuaRxqR z;Hw6685P6%7!Pn(g8*pYtOj|_Aio$Kvq5?>b^-jzAQBi*&L9#PL>+@jZ~PsENt#3& z6GKh%mr3e1iD@Qj#U!nm(*blgp@GTHnU4a}iMfsFVZvqe5Fo0WtlsJwYi`Bn@micM`FB9B!TFdJ$g(FAL;j^mbnE^ zl9rv+GJG{pI&0zgTG+yn{%wCEYj%?U1=XQJDxsoOck6ZbpL4qcJDxzLHCR#1>j!CKV-2pR_Q(O|s>WHKO<0f`I(uR#H1Fpt4v3{sY{ve^qN z#K1CxglOPf2EJtwcn$KFK~y&y-MSI5T9W`^!YC7eHT#26fD+Cm0GM}ZHy{_9)E6d2 zjfs&a?qxEsNj+mSuZf{1`Ou_9G^vCw8_O)Bly!}E0W!J8)!D*-Eq1^nn_Cny7FCo* zuCmxxi%4U!8x~t@xm0FHto?u@#ya9sJ4&yD;ni&itBU`R7Zi-rr>jrDpyaCdMBQ#D z%|t3#e(>AD$}lU6uTZ5$C@)^GWiAUfb&C&ZS$x#a;@5fh`MH*~x&%w3W4_R1TsLT= zWtX(fjl|he*{F0aYvYFeZd!Q7A6qCLb;nO+E@z|it<4j-?~C--@+)~s^M2F`-PSuX zs{X3}b2{Zj9D`6yRTy;&BBlHixQ<2QkK_m{8KG2)qy}yeLj5HKMYpJoqy_i)aRQDi z21IaGuKB-SbD!j@a3V!OReuEpQ=-fy0s3HWWf2xE>Nty4S==;i473Sxb|SzyoB3?~!^S^s zQiDy7v+)mmI*hQ%4>n$C>ixsDWBeaWr;<1H>FVPz zdFQJ36}phlq(@XXUJkA+avfu8w(fLGk<4i4)CnzK(B;Y0rCR24)cr3+zo@-aiB1y7 zEiVQK3F)!F*JJ(CTq8~WK+7l(B{wRY7WpO4{c9)9iECO`3+3rrHeSo3MhdS*+NX5eEhgPUjgT3sncR8_K8w59)e`juZq!077pN2|k>Im} zmI@Xr?v$zs?^e7Rsf#KB8Aahh>InD{5L3|^t%Ka)pAU#-k@5%r8aSN+8zQm(WgXwS zJx9tLvREXha|ba=I3^h}63fwJlA%qib8~M+3&Nw&grg=CSh%beulb$>Sfz#HNXbGP zw76GTl-U-_tz9n909>+gKntTS?v^$MoQ>f&hTB99d#L6$3%2KIN>5$J2i2erDeWBq zr?Dy8?EeB7WHX`t8Q{`tcb)) @@ -40,6 +45,7 @@ typedef struct _rifflist #define AVIF_WASCAPTUREFILE 0x00010000 #define AVIF_COPYRIGHTED 0x00020000 +#define ckidMAINAVIHEADER FCC('a','v','i','h') typedef struct _avimainheader { FOURCC fcc; @@ -57,6 +63,8 @@ typedef struct _avimainheader DWORD dwReserved[4]; } AVIMAINHEADER; +#define ckidODML FCC('o','d','m','l') +#define ckidAVIEXTHEADER FCC('d','m','l','h') typedef struct _aviextheader { FOURCC fcc; @@ -65,11 +73,23 @@ typedef struct _aviextheader DWORD dwFuture[61]; } AVIEXTHEADER; +#define ckidSTREAMLIST FCC('s','t','r','l') /* flags for dwFlags member of AVISTREAMHEADER */ #define AVISF_DISABLED 0x00000001 #define AVISF_VIDEO_PALCHANGES 0x00010000 +#ifndef ckidSTREAMHEADER +#define ckidSTREAMHEADER FCC('s','t','r','h') +#endif + +#ifndef streamtypeVIDEO +#define streamtypeVIDEO FCC('v','i','d','s') +#define streamtypeAUDIO FCC('a','u','d','s') +#define streamtypeMIDI FCC('m','i','d','s') +#define streamtypeTEXT FCC('t','x','t','s') +#endif + typedef struct _avistreamheader { FOURCC fcc; @@ -96,6 +116,11 @@ typedef struct _avistreamheader } rcFrame; } AVISTREAMHEADER; +#ifndef ckidSTREAMFORMAT +#define ckidSTREAMFORMAT FCC('s','t','r','f') +#endif +#define ckidAVIOLDINDEX FCC('i','d','x','1') + /* flags for dwFlags member of _avioldindex_entry */ #define AVIIF_LIST 0x00000001 #define AVIIF_KEYFRAME 0x00000010 @@ -112,7 +137,7 @@ typedef struct _avioldindex DWORD dwFlags; DWORD dwOffset; DWORD dwSize; - } aIndex[0]; + } aIndex[ANYSIZE_ARRAY]; } AVIOLDINDEX; typedef union _timecode @@ -158,7 +183,137 @@ typedef struct _avimetaindex DWORD nEntriesInUse; DWORD dwChunkId; DWORD dwReserved[3]; - DWORD adwIndex[0]; + DWORD adwIndex[ANYSIZE_ARRAY]; } AVIMETAINDEX; -/* FIXME: index structures missing */ +#define ckidAVISUPERINDEX FCC('i','n','d','x') +typedef struct _avisuperindex { + FOURCC fcc; + UINT cb; + WORD wLongsPerEntry; + BYTE bIndexSubType; + BYTE bIndexType; + DWORD nEntriesInUse; + DWORD dwChunkId; + DWORD dwReserved[3]; + struct _avisuperindex_entry { + DWORDLONG qwOffset; + DWORD dwSize; + DWORD dwDuration; + } aIndex[ANYSIZE_ARRAY]; +} AVISUPERINDEX; + +#define AVISTDINDEX_DELTAFRAME (0x80000000) +#define AVISTDINDEX_SIZEMASK (~0x80000000) + +typedef struct _avistdindex_entry { + DWORD dwOffset; + DWORD dwSize; +} AVISTDINDEX_ENTRY; + +typedef struct _avistdindex { + FOURCC fcc; + UINT cb; + WORD wLongsPerEntry; + BYTE bIndexSubType; + BYTE bIndexType; + DWORD nEntriesInUse; + DWORD dwChunkId; + DWORDLONG qwBaseOffset; + DWORD dwReserved_3; + AVISTDINDEX_ENTRY aIndex[ANYSIZE_ARRAY]; +} AVISTDINDEX; + +typedef struct _avitimedindex_entry { + DWORD dwOffset; + DWORD dwSize; + DWORD dwDuration; +} AVITIMEDINDEX_ENTRY; + +typedef struct _avitimedindex { + FOURCC fcc; + UINT cb; + WORD wLongsPerEntry; + BYTE bIndexSubType; + BYTE bIndexType; + DWORD nEntriesInUse; + DWORD dwChunkId; + DWORDLONG qwBaseOffset; + DWORD dwReserved_3; + AVITIMEDINDEX_ENTRY aIndex[ANYSIZE_ARRAY]; + /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */ +} AVITIMEDINDEX; + +typedef struct _avitimecodeindex { + FOURCC fcc; + UINT cb; + WORD wLongsPerEntry; + BYTE bIndexSubType; + BYTE bIndexType; + DWORD nEntriesInUse; + DWORD dwChunkId; + DWORD dwReserved[3]; + TIMECODEDATA aIndex[ANYSIZE_ARRAY]; +} AVITIMECODEINDEX; + +typedef struct _avitcdlindex_entryA { + DWORD dwTick; + TIMECODE time; + DWORD dwSMPTEflags; + DWORD dwUser; + CHAR szReelId[12]; +} AVITCDLINDEX_ENTRYA; + +typedef struct _avitcdlindex_entryW { + DWORD dwTick; + TIMECODE time; + DWORD dwSMPTEflags; + DWORD dwUser; + WCHAR szReelId[12]; +} AVITCDLINDEX_ENTRYW; + +typedef struct _avitcdlindexA { + FOURCC fcc; + UINT cb; + WORD wLongsPerEntry; + BYTE bIndexSubType; + BYTE bIndexType; + DWORD nEntriesInUse; + DWORD dwChunkId; + DWORD dwReserved[3]; + AVITCDLINDEX_ENTRYA aIndex[ANYSIZE_ARRAY]; + /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */ +} AVITCDLINDEXA; + +typedef struct _avitcdlindexW { + FOURCC fcc; + UINT cb; + WORD wLongsPerEntry; + BYTE bIndexSubType; + BYTE bIndexType; + DWORD nEntriesInUse; + DWORD dwChunkId; + DWORD dwReserved[3]; + AVITCDLINDEX_ENTRYW aIndex[ANYSIZE_ARRAY]; + /* DWORD adwTrailingFill[ANYSIZE_ARRAY]; */ +} AVITCDLINDEXW; + +#define AVITCDLINDEX_ENTRY WINELIB_NAME_AW(AVITCDLINDEX_ENTRY) +#define AVITCDLINDEX WINELIB_NAME_AW(AVITCDLINDEX) + +typedef struct _avifieldindex_chunk { + FOURCC fcc; + DWORD cb; + WORD wLongsPerEntry; + BYTE bIndexSubType; + BYTE bIndexType; + DWORD nEntriesInUse; + DWORD dwChunkId; + DWORDLONG qwBaseOffset; + DWORD dwReserved3; + struct _avifieldindex_entry { + DWORD dwOffset; + DWORD dwSize; + DWORD dwOffsetField2; + } aIndex[ANYSIZE_ARRAY]; +} AVIFIELDINDEX, * PAVIFIELDINDEX; diff --git a/include/axextend.idl b/include/axextend.idl index 03ca1873196..26a70868941 100644 --- a/include/axextend.idl +++ b/include/axextend.idl @@ -958,7 +958,8 @@ cpp_quote("#define KSPROPERTY_SUPPORT_SET 2") [ object, uuid(31efac30-515c-11d0-a9aa-00aa0061be93), - pointer_default(unique) + pointer_default(unique), + local ] interface IKsPropertySet : IUnknown { diff --git a/include/config.h.in b/include/config.h.in index ac464dbf19e..8763be3049b 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -945,6 +945,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_X11_XUTIL_H +/* Define to 1 if `callback' is member of `XICCallback'. */ +#undef HAVE_XICCALLBACK_CALLBACK + /* Define if you have the XKB extension */ #undef HAVE_XKB @@ -957,6 +960,9 @@ /* Define if Xrender has the XRenderSetPictureTransform function */ #undef HAVE_XRENDERSETPICTURETRANSFORM +/* Define to 1 if you have the `xsltInit' function. */ +#undef HAVE_XSLTINIT + /* Define to 1 if you have the `_pclose' function. */ #undef HAVE__PCLOSE diff --git a/include/d3dx9.h b/include/d3dx9.h index dce0aeb18d5..50b1b5a235a 100644 --- a/include/d3dx9.h +++ b/include/d3dx9.h @@ -24,6 +24,7 @@ #include "d3d9.h" #include "d3dx9math.h" #include "d3dx9core.h" +#include "d3dx9tex.h" #define _FACDD 0x876 #define MAKE_DDHRESULT(code) MAKE_HRESULT(1, _FACDD, code) diff --git a/include/d3dx9tex.h b/include/d3dx9tex.h new file mode 100644 index 00000000000..8e553e0d793 --- /dev/null +++ b/include/d3dx9tex.h @@ -0,0 +1,697 @@ +/* + * Copyright (C) 2008 Tony Wasserka + * + * 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 + +#ifndef __WINE_D3DX9TEX_H +#define __WINE_D3DX9TEX_H + +/********************************************** + ***************** Definitions **************** + **********************************************/ +#define D3DX_FILTER_NONE 0x00000001 +#define D3DX_FILTER_POINT 0x00000002 +#define D3DX_FILTER_LINEAR 0x00000003 +#define D3DX_FILTER_TRIANGLE 0x00000004 +#define D3DX_FILTER_BOX 0x00000005 +#define D3DX_FILTER_MIRROR_U 0x00010000 +#define D3DX_FILTER_MIRROR_V 0x00020000 +#define D3DX_FILTER_MIRROR_W 0x00040000 +#define D3DX_FILTER_MIRROR 0x00070000 +#define D3DX_FILTER_DITHER 0x00080000 +#define D3DX_FILTER_DITHER_DIFFUSION 0x00100000 +#define D3DX_FILTER_SRGB_IN 0x00200000 +#define D3DX_FILTER_SRGB_OUT 0x00400000 +#define D3DX_FILTER_SRGB 0x00600000 + +#define D3DX_NORMALMAP_MIRROR_U 0x00010000 +#define D3DX_NORMALMAP_MIRROR_V 0x00020000 +#define D3DX_NORMALMAP_MIRROR 0x00030000 +#define D3DX_NORMALMAP_INVERTSIGN 0x00080000 +#define D3DX_NORMALMAP_COMPUTE_OCCLUSION 0x00100000 + +#define D3DX_CHANNEL_RED 0x00000001 +#define D3DX_CHANNEL_BLUE 0x00000002 +#define D3DX_CHANNEL_GREEN 0x00000004 +#define D3DX_CHANNEL_ALPHA 0x00000008 +#define D3DX_CHANNEL_LUMINANCE 0x00000010 + +/********************************************** + **************** Typedefs **************** + **********************************************/ +typedef enum _D3DXIMAGE_FILEFORMAT +{ + D3DXIFF_BMP, + D3DXIFF_JPG, + D3DXIFF_TGA, + D3DXIFF_PNG, + D3DXIFF_DDS, + D3DXIFF_PPM, + D3DXIFF_DIB, + D3DXIFF_FORCE_DWORD = 0x7fffffff +} D3DXIMAGE_FILEFORMAT; + +typedef struct _D3DXIMAGE_INFO +{ + UINT Width; + UINT Height; + UINT Depth; + UINT MipLevels; + D3DFORMAT Format; + D3DRESOURCETYPE ResourceType; + D3DXIMAGE_FILEFORMAT ImageFileFormat; +} D3DXIMAGE_INFO; + +/********************************************** + ****************** Functions ***************** + **********************************************/ +/* Typedefs for callback functions */ +typedef VOID (WINAPI *LPD3DXFILL2D)(D3DXVECTOR4 *out, CONST D3DXVECTOR2 *texcoord, CONST D3DXVECTOR2 *texelsize, LPVOID data); +typedef VOID (WINAPI *LPD3DXFILL3D)(D3DXVECTOR4 *out, CONST D3DXVECTOR3 *texcoord, CONST D3DXVECTOR3 *texelsize, LPVOID data); + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Image Information */ +HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info); +HRESULT WINAPI D3DXGetImageInfoFromFileW(LPCWSTR file, D3DXIMAGE_INFO *info); +#define D3DXGetImageInfoFromFile WINELIB_NAME_AW(D3DXGetImageInfoFromFile) + +HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3DXIMAGE_INFO *info); +HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D3DXIMAGE_INFO *info); +#define D3DXGetImageInfoFromResource WINELIB_NAME_AW(D3DXGetImageInfoFromResource) + +HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(LPCVOID data, UINT datasize, D3DXIMAGE_INFO *info); + + +/* Surface Loading/Saving */ +HRESULT WINAPI D3DXLoadSurfaceFromFileA( LPDIRECT3DSURFACE9 destsurface, + CONST PALETTEENTRY *destpalette, + CONST RECT *destrect, + LPCSTR srcfile, + CONST RECT *srcrect, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); + +HRESULT WINAPI D3DXLoadSurfaceFromFileW( LPDIRECT3DSURFACE9 destsurface, + CONST PALETTEENTRY *destpalette, + CONST RECT *destrect, + LPCWSTR srcfile, + CONST RECT *srcrect, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); +#define D3DXLoadSurfaceFromFile WINELIB_NAME_AW(D3DXLoadSurfaceFromFile) + +HRESULT WINAPI D3DXLoadSurfaceFromResourceA( LPDIRECT3DSURFACE9 destsurface, + CONST PALETTEENTRY *destpalette, + CONST RECT *destrect, + HMODULE srcmodule, + LPCSTR resource, + CONST RECT *srcrect, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); + +HRESULT WINAPI D3DXLoadSurfaceFromResourceW( LPDIRECT3DSURFACE9 destsurface, + CONST PALETTEENTRY *destpalette, + CONST RECT *destrect, + HMODULE srcmodule, + LPCWSTR resource, + CONST RECT *srcrect, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); +#define D3DXLoadSurfaceFromResource WINELIB_NAME_AW(D3DXLoadSurfaceFromResource) + +HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(LPDIRECT3DSURFACE9 destsurface, + CONST PALETTEENTRY *destpalette, + CONST RECT*destrect, + LPCVOID srcdata, + UINT srcdatasize, + CONST RECT *srcrect, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); + +HRESULT WINAPI D3DXLoadSurfaceFromSurface( LPDIRECT3DSURFACE9 destsurface, + CONST PALETTEENTRY *destpalette, + CONST RECT *destrect, + LPDIRECT3DSURFACE9 srcsurface, + CONST PALETTEENTRY *srcpalette, + CONST RECT *srcrect, + DWORD filter, + D3DCOLOR colorkey); + +HRESULT WINAPI D3DXLoadSurfaceFromMemory( LPDIRECT3DSURFACE9 destsurface, + CONST PALETTEENTRY *destpalette, + CONST RECT *destrect, + LPCVOID srcmemory, + D3DFORMAT srcformat, + UINT srcpitch, + CONST PALETTEENTRY *srcpalette, + CONST RECT *srcrect, + DWORD filter, + D3DCOLOR colorkey); + +HRESULT WINAPI D3DXSaveSurfaceToFileA( LPCSTR destfile, + D3DXIMAGE_FILEFORMAT destformat, + LPDIRECT3DSURFACE9 srcsurface, + CONST PALETTEENTRY *srcpalette, + CONST RECT *srcrect); + +HRESULT WINAPI D3DXSaveSurfaceToFileW( LPCWSTR destfile, + D3DXIMAGE_FILEFORMAT destformat, + LPDIRECT3DSURFACE9 srcsurface, + CONST PALETTEENTRY *srcpalette, + CONST RECT *srcrect); +#define D3DXSaveSurfaceToFile WINELIB_NAME_AW(D3DXSaveSurfaceToFile) + + +/* Volume Loading/Saving */ +HRESULT WINAPI D3DXLoadVolumeFromFileA( LPDIRECT3DVOLUME9 destvolume, + CONST PALETTEENTRY *destpalette, + CONST D3DBOX *destbox, + LPCSTR srcfile, + CONST D3DBOX *srcbox, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); + +HRESULT WINAPI D3DXLoadVolumeFromFileW( LPDIRECT3DVOLUME9 destVolume, + CONST PALETTEENTRY *destpalette, + CONST D3DBOX *destbox, + LPCWSTR srcfile, + CONST D3DBOX *srcbox, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); +#define D3DXLoadVolumeFromFile WINELIB_NAME_AW(D3DXLoadVolumeFromFile) + +HRESULT WINAPI D3DXLoadVolumeFromResourceA( LPDIRECT3DVOLUME9 destVolume, + CONST PALETTEENTRY *destpalette, + CONST D3DBOX *destbox, + HMODULE srcmodule, + LPCSTR resource, + CONST D3DBOX *srcbox, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); + +HRESULT WINAPI D3DXLoadVolumeFromResourceW( LPDIRECT3DVOLUME9 destVolume, + CONST PALETTEENTRY *destpalette, + CONST D3DBOX *destbox, + HMODULE srcmodule, + LPCWSTR resource, + CONST D3DBOX *srcbox, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); +#define D3DXLoadVolumeFromResource WINELIB_NAME_AW(D3DXLoadVolumeFromResource) + +HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(LPDIRECT3DVOLUME9 destvolume, + CONST PALETTEENTRY *destpalette, + CONST D3DBOX *destbox, + LPCVOID srcdata, + UINT srcdatasize, + CONST D3DBOX *srcbox, + DWORD filter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo); + +HRESULT WINAPI D3DXLoadVolumeFromVolume( LPDIRECT3DVOLUME9 destvolume, + CONST PALETTEENTRY *destpalette, + CONST D3DBOX *destbox, + LPDIRECT3DVOLUME9 srcvolume, + CONST PALETTEENTRY *srcpalette, + CONST D3DBOX *srcbox, + DWORD filter, + D3DCOLOR colorkey); + +HRESULT WINAPI D3DXLoadVolumeFromMemory( LPDIRECT3DVOLUME9 destvolume, + CONST PALETTEENTRY *destpalette, + CONST D3DBOX *destbox, + LPCVOID srcmemory, + D3DFORMAT srcformat, + UINT srcrowpitch, + UINT srcslicepitch, + CONST PALETTEENTRY *srcpalette, + CONST D3DBOX *srcbox, + DWORD filter, + D3DCOLOR colorkey); + +HRESULT WINAPI D3DXSaveVolumeToFileA( LPCSTR destfile, + D3DXIMAGE_FILEFORMAT destformat, + LPDIRECT3DVOLUME9 srcvolume, + CONST PALETTEENTRY *srcpalette, + CONST D3DBOX *srcbox); + +HRESULT WINAPI D3DXSaveVolumeToFileW( LPCWSTR destfile, + D3DXIMAGE_FILEFORMAT destformat, + LPDIRECT3DVOLUME9 srcvolume, + CONST PALETTEENTRY *srcpalette, + CONST D3DBOX *srcbox); +#define D3DXSaveVolumeToFile WINELIB_NAME_AW(D3DXSaveVolumeToFile) + + +/* Texture, cube texture and volume texture creation */ +HRESULT WINAPI D3DXCheckTextureRequirements( LPDIRECT3DDEVICE9 device, + UINT *width, + UINT *height, + UINT *miplevels, + DWORD usage, + D3DFORMAT *format, + D3DPOOL pool); +HRESULT WINAPI D3DXCheckCubeTextureRequirements( LPDIRECT3DDEVICE9 device, + UINT *size, + UINT *miplevels, + DWORD usage, + D3DFORMAT *format, + D3DPOOL pool); + +HRESULT WINAPI D3DXCheckVolumeTextureRequirements(LPDIRECT3DDEVICE9 device, + UINT *width, + UINT *height, + UINT *depth, + UINT *miplevels, + DWORD usage, + D3DFORMAT *format, + D3DPOOL pool); + +HRESULT WINAPI D3DXCreateTexture( LPDIRECT3DDEVICE9 device, + UINT width, + UINT height, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + LPDIRECT3DTEXTURE9 *texture); + +HRESULT WINAPI D3DXCreateCubeTexture( LPDIRECT3DDEVICE9 device, + UINT size, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + LPDIRECT3DCUBETEXTURE9 *cube); + +HRESULT WINAPI D3DXCreateVolumeTexture(LPDIRECT3DDEVICE9 device, + UINT width, + UINT height, + UINT depth, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + LPDIRECT3DVOLUMETEXTURE9 *volume); + +HRESULT WINAPI D3DXCreateTextureFromFileA( LPDIRECT3DDEVICE9 device, + LPCSTR srcfile, + LPDIRECT3DTEXTURE9 *texture); + +HRESULT WINAPI D3DXCreateTextureFromFileW( LPDIRECT3DDEVICE9 device, + LPCWSTR srcfile, + LPDIRECT3DTEXTURE9 *texture); +#define D3DXCreateTextureFromFile WINELIB_NAME_AW(D3DXCreateTextureFromFile) + +HRESULT WINAPI D3DXCreateCubeTextureFromFileA( LPDIRECT3DDEVICE9 device, + LPCSTR srcfile, + LPDIRECT3DCUBETEXTURE9 *cube); + +HRESULT WINAPI D3DXCreateCubeTextureFromFileW( LPDIRECT3DDEVICE9 device, + LPCWSTR srcfile, + LPDIRECT3DCUBETEXTURE9 *cube); +#define D3DXCreateCubeTextureFromFile WINELIB_NAME_AW(D3DXCreateCubeTextureFromFile) + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(LPDIRECT3DDEVICE9 device, + LPCSTR srcfile, + LPDIRECT3DVOLUMETEXTURE9 *volume); + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileW(LPDIRECT3DDEVICE9 device, + LPCWSTR srcfile, + LPDIRECT3DVOLUMETEXTURE9 *volume); +#define D3DXCreateVolumeTextureFromFile WINELIB_NAME_AW(D3DXCreateVolumeTextureFromFile) + +HRESULT WINAPI D3DXCreateTextureFromResourceA( LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCSTR resource, + LPDIRECT3DTEXTURE9 *texture); + +HRESULT WINAPI D3DXCreateTextureFromResourceW( LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCWSTR resource, + LPDIRECT3DTEXTURE9 *texture); +#define D3DXCreateTextureFromResource WINELIB_NAME_AW(D3DXCreateTextureFromResource) + +HRESULT WINAPI D3DXCreateCubeTextureFromResourceA( LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCSTR resource, + LPDIRECT3DCUBETEXTURE9 *cube); +HRESULT WINAPI D3DXCreateCubeTextureFromResourceW( LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCWSTR resource, + LPDIRECT3DCUBETEXTURE9 *cube); +#define D3DXCreateCubeTextureFromResource WINELIB_NAME_AW(D3DXCreateCubeTextureFromResource) + +HRESULT WINAPI D3DXCreateVolumeTextureFromResourceA(LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCSTR resource, + LPDIRECT3DVOLUMETEXTURE9 *volume); +HRESULT WINAPI D3DXCreateVolumeTextureFromResourceW(LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCWSTR resource, + LPDIRECT3DVOLUMETEXTURE9 *volume); +#define D3DXCreateVolumeTextureFromResource WINELIB_NAME_AW(D3DXCreateVolumeTextureFromResource) + +HRESULT WINAPI D3DXCreateTextureFromFileExA( LPDIRECT3DDEVICE9 device, + LPCSTR srcfile, + UINT width, + UINT height, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DTEXTURE9 *texture); + +HRESULT WINAPI D3DXCreateTextureFromFileExW( LPDIRECT3DDEVICE9 device, + LPCWSTR srcfile, + UINT width, + UINT height, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DTEXTURE9 *texture); +#define D3DXCreateTextureFromFileEx WINELIB_NAME_AW(D3DXCreateTextureFromFileEx) + +HRESULT WINAPI D3DXCreateCubeTextureFromFileExA( LPDIRECT3DDEVICE9 device, + LPCSTR srcfile, + UINT size, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DCUBETEXTURE9 *cube); + +HRESULT WINAPI D3DXCreateCubeTextureFromFileExW( LPDIRECT3DDEVICE9 device, + LPCWSTR srcfile, + UINT size, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DCUBETEXTURE9 *cube); +#define D3DXCreateCubeTextureFromFileEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromFileEx) + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(LPDIRECT3DDEVICE9 device, + LPCSTR srcfile, + UINT width, + UINT height, + UINT depth, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DVOLUMETEXTURE9 *volume); + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileExW(LPDIRECT3DDEVICE9 device, + LPCWSTR srcfile, + UINT width, + UINT height, + UINT depth, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DVOLUMETEXTURE9 *volume); +#define D3DXCreateVolumeTextureFromFileEx WINELIB_NAME_AW(D3DXCreateVolumeTextureFromFileEx) + +HRESULT WINAPI D3DXCreateTextureFromResourceExA( LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCSTR resource, + UINT width, + UINT height, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DTEXTURE9 *texture); + +HRESULT WINAPI D3DXCreateTextureFromResourceExW( LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCWSTR resource, + UINT width, + UINT height, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DTEXTURE9 *texture); +#define D3DXCreateTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateTextureFromResourceEx) + +HRESULT WINAPI D3DXCreateCubeTextureFromResourceExA( LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCSTR resource, + UINT size, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DCUBETEXTURE9 *cube); + +HRESULT WINAPI D3DXCreateCubeTextureFromResourceExW( LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCWSTR resource, + UINT size, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DCUBETEXTURE9 *cube); +#define D3DXCreateCubeTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromResourceEx) + +HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExA(LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCSTR resource, + UINT width, + UINT height, + UINT depth, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DVOLUMETEXTURE9 *volume); + +HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExW(LPDIRECT3DDEVICE9 device, + HMODULE srcmodule, + LPCWSTR resource, + UINT width, + UINT height, + UINT depth, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DVOLUMETEXTURE9 *volume); +#define D3DXCreateVolumeTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateVolumeTextureFromResourceEx) + +HRESULT WINAPI D3DXCreateTextureFromFileInMemory( LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatasize, + LPDIRECT3DTEXTURE9* texture); + +HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory( LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatasize, + LPDIRECT3DCUBETEXTURE9* cube); + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatasize, + LPDIRECT3DVOLUMETEXTURE9 *volume); + +HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx( LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatasize, + UINT width, + UINT height, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DTEXTURE9 *texture); + +HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx( LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatasize, + UINT size, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DCUBETEXTURE9 *cube); + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 device, + LPCVOID srcdata, + UINT srcdatasize, + UINT width, + UINT height, + UINT depth, + UINT miplevels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mipfilter, + D3DCOLOR colorkey, + D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, + LPDIRECT3DVOLUMETEXTURE9 *volume); + +HRESULT WINAPI D3DXSaveTextureToFileA(LPCSTR destfile, + D3DXIMAGE_FILEFORMAT destformat, + LPDIRECT3DBASETEXTURE9 srctexture, + CONST PALETTEENTRY *srcpalette); +HRESULT WINAPI D3DXSaveTextureToFileW(LPCWSTR destfile, + D3DXIMAGE_FILEFORMAT destformat, + LPDIRECT3DBASETEXTURE9 srctexture, + CONST PALETTEENTRY *srcpalette); +#define D3DXSaveTextureToFile WINELIB_NAME_AW(D3DXSaveTextureToFile) + + +/* Other functions */ +HRESULT WINAPI D3DXFilterTexture( LPDIRECT3DBASETEXTURE9 texture, + CONST PALETTEENTRY *palette, + UINT srclevel, + DWORD filter); +#define D3DXFilterCubeTexture D3DXFilterTexture +#define D3DXFilterVolumeTexture D3DXFilterTexture + +HRESULT WINAPI D3DXFillTexture( LPDIRECT3DTEXTURE9 texture, + LPD3DXFILL2D function, + LPVOID data); + +HRESULT WINAPI D3DXFillCubeTexture( LPDIRECT3DCUBETEXTURE9 cube, + LPD3DXFILL3D function, + LPVOID data); + +HRESULT WINAPI D3DXFillVolumeTexture( LPDIRECT3DVOLUMETEXTURE9 volume, + LPD3DXFILL3D function, + LPVOID data); + +HRESULT WINAPI D3DXFillTextureTX( LPDIRECT3DTEXTURE9 texture, + CONST DWORD *function, + CONST D3DXVECTOR4 *constants, + UINT numconstants); + +HRESULT WINAPI D3DXFillCubeTextureTX( LPDIRECT3DCUBETEXTURE9 cube, + CONST DWORD *function, + CONST D3DXVECTOR4 *constants, + UINT numconstants); + +HRESULT WINAPI D3DXFillVolumeTextureTX(LPDIRECT3DVOLUMETEXTURE9 volume, + CONST DWORD *function, + CONST D3DXVECTOR4 *constants, + UINT numconstants); + +HRESULT WINAPI D3DXComputeNormalMap( LPDIRECT3DTEXTURE9 texture, + LPDIRECT3DTEXTURE9 srctexture, + CONST PALETTEENTRY *srcpalette, + DWORD flags, + DWORD channel, + FLOAT amplitude); + + +#ifdef __cplusplus +} +#endif + +#endif /* __WINE_D3DX9TEX_H */ diff --git a/include/ddk/imm.h b/include/ddk/imm.h index c492092fa99..ee10b273616 100644 --- a/include/ddk/imm.h +++ b/include/ddk/imm.h @@ -84,6 +84,24 @@ typedef struct tagCOMPOSITIONSTRING { DWORD dwPrivateOffset; } COMPOSITIONSTRING, *LPCOMPOSITIONSTRING; +typedef struct tagGUIDELINE { + DWORD dwSize; + DWORD dwLevel; + DWORD dwIndex; + DWORD dwStrLen; + DWORD dwStrOffset; + DWORD dwPrivateSize; + DWORD dwPrivateOffset; +} GUIDELINE, *LPGUIDELINE; + +typedef struct tagCANDIDATEINFO { + DWORD dwSize; + DWORD dwCount; + DWORD dwOffset[32]; + DWORD dwPrivateSize; + DWORD dwPrivateOffset; +} CANDIDATEINFO, *LPCANDIDATEINFO; + LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC); BOOL WINAPI ImmUnlockIMC(HIMC); DWORD WINAPI ImmGetIMCLockCount(HIMC); diff --git a/include/dimm.idl b/include/dimm.idl index ab74d4acda2..07e04b2e22f 100644 --- a/include/dimm.idl +++ b/include/dimm.idl @@ -185,7 +185,8 @@ interface IEnumRegisterWordW : IUnknown [ object, uuid(09b5eab0-f997-11d1-93d4-0060b067b86e), - pointer_default(unique) + pointer_default(unique), + local ] interface IEnumInputContext : IUnknown { @@ -206,7 +207,8 @@ interface IEnumInputContext : IUnknown [ object, uuid(08c0e040-62d1-11d1-9326-0060b067b86e), - pointer_default(unique) + pointer_default(unique), + local ] interface IActiveIMMApp : IUnknown { diff --git a/include/dpnathlp.h b/include/dpnathlp.h index 68c04560b0d..c1fa3c917ba 100644 --- a/include/dpnathlp.h +++ b/include/dpnathlp.h @@ -23,7 +23,7 @@ extern "C" { #endif -HRESULT DirectPlayNATHelpCreate(const PGUID pIID, void ** ppvInterface); +HRESULT DirectPlayNATHelpCreate(LPCGUID pIID, LPVOID *ppvInterface); DEFINE_GUID(CLSID_DirectPlayNATHelpUPnP, 0xb9c2e9c4,0x68c1,0x4d42,0xa7,0xa1,0xe7,0x6a,0x26,0x98,0x2a,0xd6); DEFINE_GUID(CLSID_DirectPlayNATHelpPAST, 0x963ab779,0x16a1,0x477c,0xa3,0x6d,0xcb,0x5e,0x71,0x19,0x38,0xf7); diff --git a/dlls/rpcrt4/rpcss_np_client.h b/include/dvdmedia.h similarity index 52% copy from dlls/rpcrt4/rpcss_np_client.h copy to include/dvdmedia.h index db65d432bca..9a2999490e7 100644 --- a/dlls/rpcrt4/rpcss_np_client.h +++ b/include/dvdmedia.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002 Greg Turner + * Copyright (C) 2008 Maarten Lankhorst * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,11 +16,29 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __WINE_RPCSS_NP_CLIENT_H -#define __WINE_RPCSS_NP_CLIENT_H +#ifndef __DVDMEDIA_H__ +#define __DVDMEDIA_H__ -/* rpcss_np_client.c */ -HANDLE RPC_RpcssNPConnect(void); -BOOL RPCRT4_SendReceiveNPMsg(HANDLE, PRPCSS_NP_MESSAGE, char *, PRPCSS_NP_REPLY); +#define AMCONTROL_USED 0x00000001 +#define AMCONTROL_PAD_TO_4x3 0x00000002 +#define AMCONTROL_PAD_TO_16x9 0x00000004 -#endif /* __RPCSS_NP_CLINET_H */ +typedef struct tagVIDEOINFOHEADER2 { + RECT rcSource; + RECT rcTarget; + DWORD dwBitRate; + DWORD dwBitErrorRate; + REFERENCE_TIME AvgTimePerFrame; + DWORD dwInterlaceFlags; + DWORD dwCopyProtectFlags; + DWORD dwPictAspectRatioX; + DWORD dwPictAspectRatioY; + union { + DWORD dwControlFlags; + DWORD dwReserved1; + } DUMMYUNIONNAME; + DWORD dwReserved2; + BITMAPINFOHEADER bmiHeader; +} VIDEOINFOHEADER2; + +#endif /* __DVDMEDIA_H__ */ diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index e92c646c651..215864a3afc 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -182,12 +182,14 @@ GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill*,ARGB); GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *,GDIPCONST GpMatrix*); GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathLine2(GpPath*,GDIPCONST GpPointF*,INT); +GpStatus WINGDIPAPI GdipAddPathLine2I(GpPath*,GDIPCONST GpPoint*,INT); GpStatus WINGDIPAPI GdipAddPathLineI(GpPath*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathPath(GpPath*,GDIPCONST GpPath*,BOOL); GpStatus WINGDIPAPI GdipClonePath(GpPath*,GpPath**); @@ -196,6 +198,7 @@ GpStatus WINGDIPAPI GdipClosePathFigures(GpPath*); GpStatus WINGDIPAPI GdipCreatePath(GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF*,GDIPCONST BYTE*,INT, GpFillMode,GpPath**); +GpStatus WINGDIPAPI GdipCreatePath2I(GDIPCONST GpPoint*,GDIPCONST BYTE*,INT,GpFillMode,GpPath**); GpStatus WINGDIPAPI GdipDeletePath(GpPath*); GpStatus WINGDIPAPI GdipGetPathFillMode(GpPath*,GpFillMode*); GpStatus WINGDIPAPI GdipGetPathPoints(GpPath*,GpPointF*,INT); @@ -217,6 +220,8 @@ GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix**); GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**); GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *,GDIPCONST GpPointF*, GpMatrix**); +GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect*,GDIPCONST GpPoint*,GpMatrix**); + GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*); GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix*,REAL*); GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder); @@ -224,6 +229,7 @@ GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix*,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT); +GpStatus WINGDIPAPI GdipVectorTransformMatrixPoints(GpMatrix*,GpPointF*,INT); GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*); @@ -239,6 +245,7 @@ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath*,GpPath*,GpLineCap,REAL, GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*); GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap*,GpLineCap, GpLineCap); +GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*); GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap*,INT,INT,ARGB*); GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap*,INT,INT,ARGB); @@ -316,6 +323,7 @@ GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); GpStatus WINGDIPAPI GdipSetStringFormatHotkeyPrefix(GpStringFormat*,INT); GpStatus WINGDIPAPI GdipSetStringFormatLineAlign(GpStringFormat*,StringAlignment); GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming); +GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat*,GpStringFormat**); #ifdef __cplusplus } diff --git a/include/imm.h b/include/imm.h index 85848e63749..1b4cc71eb3e 100644 --- a/include/imm.h +++ b/include/imm.h @@ -538,6 +538,7 @@ BOOL WINAPI ImmIsUIMessageA(HWND, UINT, WPARAM, LPARAM); BOOL WINAPI ImmIsUIMessageW(HWND, UINT, WPARAM, LPARAM); #define ImmIsUIMessage WINELIB_NAME_AW(ImmIsUIMessage) BOOL WINAPI ImmNotifyIME(HIMC, DWORD, DWORD, DWORD); +BOOL WINAPI ImmProcessKey(HWND, HKL, UINT, LPARAM, DWORD); BOOL WINAPI ImmRegisterWordA(HKL, LPCSTR, DWORD, LPCSTR); BOOL WINAPI ImmRegisterWordW(HKL, LPCWSTR, DWORD, LPCWSTR); #define ImmRegisterWord WINELIB_NAME_AW(ImmRegisterWord) diff --git a/include/indexsrv.idl b/include/indexsrv.idl index 85e4e669b9d..397e69190b3 100644 --- a/include/indexsrv.idl +++ b/include/indexsrv.idl @@ -50,7 +50,6 @@ typedef enum tagWORDREP_BREAK_TYPE * IWordSink interface */ [ - unique, uuid(cc907054-c058-101a-b554-08002b33b0e6), object, local @@ -77,7 +76,6 @@ interface IWordSink : IUnknown * IPhraseSink interface */ [ - unique, uuid(cc906ff0-c058-101a-b554-08002b33b0e6), object, local @@ -99,7 +97,6 @@ interface IPhraseSink: IUnknown * IWordBreaker interface */ [ - unique, uuid(d53552c8-77e3-101a-b552-08002b33b0e6), object, local diff --git a/include/mshtmdid.h b/include/mshtmdid.h index 64ae3cc835e..c77619e3ef6 100644 --- a/include/mshtmdid.h +++ b/include/mshtmdid.h @@ -1322,7 +1322,7 @@ #define DISPID_IHTMLWINDOW2_FRAMES 1100 #define DISPID_IHTMLWINDOW2_DEFAULTSTATUS 1101 #define DISPID_IHTMLWINDOW2_STATUS 1102 -#define DISPID_IHTMLWINDOW2_SETTIMEOUT 1103 +#define DISPID_IHTMLWINDOW2_SETTIMEOUT 1172 #define DISPID_IHTMLWINDOW2_CLEARTIMEOUT 1104 #define DISPID_IHTMLWINDOW2_ALERT 1105 #define DISPID_IHTMLWINDOW2_CONFIRM 1110 @@ -1339,7 +1339,7 @@ #define DISPID_IHTMLWINDOW2_BLUR 1159 #define DISPID_IHTMLWINDOW2_SCROLL 1160 #define DISPID_IHTMLWINDOW2_CLIENTINFORMATION 1161 -#define DISPID_IHTMLWINDOW2_SETINTERVAL 1162 +#define DISPID_IHTMLWINDOW2_SETINTERVAL 1173 #define DISPID_IHTMLWINDOW2_CLEARINTERVAL 1163 #define DISPID_IHTMLWINDOW2_OFFSCREENBUFFERING 1164 #define DISPID_IHTMLWINDOW2_EXECSCRIPT 1165 diff --git a/include/mshtml.idl b/include/mshtml.idl index f82391dc1f2..16ff754778b 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -4488,6 +4488,74 @@ interface IHTMLWindow2 : IHTMLFramesCollection2 } /***************************************************************************** + * IHTMLWindow3 interface + */ +[ + odl, + oleautomation, + dual, + uuid(3050f4ae-98b5-11cf-bb82-00aa00bdce0b) +] +interface IHTMLWindow3 : IDispatch +{ + [propget, id(DISPID_IHTMLWINDOW3_SCREENLEFT)] + HRESULT screenLeft([out, retval] long *p); + + [propget, id(DISPID_IHTMLWINDOW3_SCREENTOP)] + HRESULT screenTop([out, retval] long *p); + + [id(DISPID_IHTMLWINDOW3_ATTACHEVENT)] + HRESULT attachEvent( + [in] BSTR event, + [in] IDispatch *pDisp, + [out, retval] VARIANT_BOOL *pfResult); + + [id(DISPID_IHTMLWINDOW3_DETACHEVENT)] + HRESULT detachEvent( + [in] BSTR event, + [in] IDispatch *pDisp); + + [id(DISPID_IHTMLWINDOW3_SETTIMEOUT)] + HRESULT setTimeout( + [in] VARIANT *expression, + [in] long msec, + [in, optional] VARIANT *language, + [out, retval] long *timerID); + + [id(DISPID_IHTMLWINDOW3_SETINTERVAL)] + HRESULT setInterval( + [in] VARIANT *expression, + [in] long msec, + [in, optional] VARIANT *language, + [out, retval] long *timerID); + + [id(DISPID_IHTMLWINDOW3_PRINT)] + HRESULT print(); + + [propput, id(DISPID_IHTMLWINDOW3_ONBEFOREPRINT), displaybind, bindable] + HRESULT onbeforeprint([in] VARIANT v); + + [propget, id(DISPID_IHTMLWINDOW3_ONBEFOREPRINT), displaybind, bindable] + HRESULT onbeforeprint([out, retval] VARIANT *p); + + [propput, id(DISPID_IHTMLWINDOW3_ONAFTERPRINT), displaybind, bindable] + HRESULT onafterprint([in] VARIANT v); + + [propget, id(DISPID_IHTMLWINDOW3_ONAFTERPRINT), displaybind, bindable] + HRESULT onafterprint([out, retval] VARIANT *p); + + [propget, id(DISPID_IHTMLWINDOW3_CLIPBOARDDATA)] + HRESULT clipboardData([out, retval] IHTMLDataTransfer **p); + + [id(DISPID_IHTMLWINDOW3_SHOWMODELESSDIALOG)] + HRESULT showModelessDialog( + [in, defaultvalue("")] BSTR url, + [in, optional] VARIANT *varArgIn, + [in, optional] VARIANT *options, + [out, retval] IHTMLWindow2 **pDialog); +} + +/***************************************************************************** * DispHTMLWindow2 dispinterface */ [ diff --git a/include/pstore.idl b/include/pstore.idl index 06f5132a5c5..ee184d4503f 100644 --- a/include/pstore.idl +++ b/include/pstore.idl @@ -42,9 +42,13 @@ typedef struct _PST_PROVIDERINFO LPWSTR szProviderName; } PST_PROVIDERINFO, *PPST_PROVIDERINFO; -typedef void *PPST_PROMPTIFO; - - +typedef struct _PST_PROMPTINFO +{ + DWORD cbSize; + DWORD dwPromptFlags; + HWND hwndApp; + LPCWSTR szPrompt; +} PST_PROMPTINFO, *PPST_PROMPTINFO; typedef struct { DWORD cbSize; @@ -71,13 +75,6 @@ typedef struct { LPWSTR szDisplayName; } PST_TYPEINFO, *PPST_TYPEINFO; -typedef struct { - DWORD cbSize; - DWORD dwPromptFlags; - DWORD_PTR hwndApp; - LPCWSTR szPrompt; -} PST_PROMPTINFO, *PPST_PROMPTINFO; - [ object, pointer_default(unique) @@ -222,7 +219,7 @@ interface IPStore : IUnknown [in] LPCWSTR szItemName, [in] DWORD *cbData, [in] BYTE** pbData, - [in] PPST_PROMPTIFO pPromptInfo, + [in] PPST_PROMPTINFO pPromptInfo, [in] DWORD dwFlags ); HRESULT WriteItem( @@ -232,7 +229,7 @@ interface IPStore : IUnknown [in] LPCWSTR szItemName, [in] DWORD cbData, [in,size_is(cbData)] BYTE *ppbData, - [in] PPST_PROMPTIFO pPromptInfo, + [in] PPST_PROMPTINFO pPromptInfo, [in] DWORD dwDefaultConfirmationStyle, [in] DWORD dwFlags); @@ -242,7 +239,7 @@ interface IPStore : IUnknown [in] const GUID* pItemSubtype, [in] LPCWSTR szItemName, [in] PST_ACCESSMODE ModeFlags, - [in] PPST_PROMPTIFO pProomptInfo, + [in] PPST_PROMPTINFO pProomptInfo, [in] DWORD dwFlags ); HRESULT CloseItem( diff --git a/include/setupapi.h b/include/setupapi.h index 047b7bd31f6..927de6ba708 100644 --- a/include/setupapi.h +++ b/include/setupapi.h @@ -956,6 +956,19 @@ DECL_WINELIB_SETUPAPI_TYPE_AW(PSP_INF_SIGNER_INFO) #define SPINST_LOGCONFIGS_ARE_OVERRIDES 0x00040000 #define SPINST_REGISTERCALLBACKAWARE 0x00080000 +#define SPSVCINST_TAGTOFRONT 0x00000001 +#define SPSVCINST_ASSOCSERVICE 0x00000002 +#define SPSVCINST_DELETEEVENTLOGENTRY 0x00000004 +#define SPSVCINST_NOCLOBBER_DISPLAYNAME 0x00000008 +#define SPSVCINST_NOCLOBBER_STARTTYPE 0x00000010 +#define SPSVCINST_NOCLOBBER_ERRORCONTROL 0x00000020 +#define SPSVCINST_NOCLOBBER_LOADORDERGROUP 0x00000040 +#define SPSVCINST_NOCLOBBER_DEPENDENCIES 0x00000080 +#define SPSVCINST_NOCLOBBER_DESCRIPTION 0x00000100 +#define SPSVCINST_STOPSERVICE 0x00000200 +#define SPSVCINST_CLOBBER_SECURITY 0x00000400 +#define SPSVCINST_STARTSERVICE 0x00000800 + #define SP_COPY_DELETESOURCE 0x00000001 #define SP_COPY_REPLACEONLY 0x00000002 #define SP_COPY_NEWER 0x00000004 diff --git a/include/shobjidl.idl b/include/shobjidl.idl index 33532681d78..563d9e2d459 100644 --- a/include/shobjidl.idl +++ b/include/shobjidl.idl @@ -716,7 +716,8 @@ cpp_quote("#define IShellLink WINELIB_NAME_AW(IShellLink)") [ object, uuid(000214e8-0000-0000-c000-000000000046), - pointer_default(unique) + pointer_default(unique), + local ] interface IShellExtInit : IUnknown { @@ -869,7 +870,8 @@ cpp_quote("#define CDBOSC_STATECHANGE 0x00000004") [ object, uuid(47d2657a-7b27-11d0-8ca9-00a0c92dbfe8), - pointer_default(unique) + pointer_default(unique), + local ] interface IDockingWindowFrame : IOleWindow { @@ -959,7 +961,8 @@ interface IDropTargetHelper : IUnknown [ object, uuid(000214e4-0000-0000-c000-000000000046), - pointer_default(unique) + pointer_default(unique), + local ] interface IContextMenu : IUnknown { @@ -1152,9 +1155,9 @@ interface IShellExecuteHookW : IUnknown ] interface IShellLinkDataList : IUnknown { - HRESULT AddDataBlock( + [local] HRESULT AddDataBlock( [in] void *pDataBlock); - HRESULT CopyDataBlock( + [local] HRESULT CopyDataBlock( [in] DWORD dwSig, [out] void **ppDataBlock); HRESULT RemoveDataBlock( diff --git a/include/tom.idl b/include/tom.idl index f4dd2f09594..28a71a7cab4 100644 --- a/include/tom.idl +++ b/include/tom.idl @@ -368,7 +368,7 @@ interface ITextFont : IDispatch ] interface ITextPara : IDispatch { - HRESULT GetDuplicate([retval, out]ITextPara *ppPara); + HRESULT GetDuplicate([retval, out]ITextPara **ppPara); HRESULT SetDuplicate([in]ITextPara *pPara); HRESULT CanChange([out]long *pB); HRESULT IsEqual([in]ITextPara *pPara, [retval, out]long *pB); diff --git a/include/urlmon.idl b/include/urlmon.idl index c77971f1fac..9e03543c303 100644 --- a/include/urlmon.idl +++ b/include/urlmon.idl @@ -1325,6 +1325,43 @@ interface ISoftDistExt : IUnknown [in] LPCODEBASEHOLD lpcbh); } +typedef enum _tagINTERNETFEATURELIST +{ + FEATURE_OBJECT_CACHING, + FEATURE_ZONE_ELEVATION, + FEATURE_MIME_HANDLING, + FEATURE_MIME_SNIFFING, + FEATURE_WINDOW_RESTRICTIONS, + FEATURE_WEBOC_POPUPMANAGEMENT, + FEATURE_BEHAVIORS, + FEATURE_DISABLE_MK_PROTOCOL, + FEATURE_LOCALMACHINE_LOCKDOWN, + FEATURE_SECURITYBAND, + FEATURE_RESTRICT_ACTIVEXINSTALL, + FEATURE_VALIDATE_NAVIGATE_URL, + FEATURE_RESTRICT_FILEDOWNLOAD, + FEATURE_ADDON_MANAGEMENT, + FEATURE_PROTOCOL_LOCKDOWN, + FEATURE_HTTP_USERNAME_PASSWORD_DISABLE, + FEATURE_SAFE_BINDTOOBJECT, + FEATURE_UNC_SAVEDFILECHECK, + FEATURE_GET_URL_DOM_FILEPATH_UNENCODED, + FEATURE_TABBED_BROWSING, + FEATURE_SSLUX, + FEATURE_DISABLE_NAVIGATION_SOUNDS, + FEATURE_DISABLE_LEGACY_COMPRESSION, + FEATURE_FORCE_ADDR_AND_STATUS, + FEATURE_XMLHTTP, + FEATURE_DISABLE_TELNET_PROTOCOL, + FEATURE_FEEDS, + FEATURE_BLOCK_INPUT_PROMPTS, + FEATURE_DOMSTORAGE, + FEATURE_XDOMAINREQUEST, + FEATURE_DATAURI, + FEATURE_AJAX_CONNECTIONSERVICES, + FEATURE_ENTRY_COUNT +} INTERNETFEATURELIST; + cpp_quote("DEFINE_GUID(CLSID_InternetSecurityManager, 0x7b8a2d94, 0x0ac9, 0x11d1, 0x89, 0x6c, 0x00, 0xc0, 0x4f, 0xB6, 0xbf, 0xc4);") cpp_quote("DEFINE_GUID(CLSID_InternetZoneManager, 0x7B8A2D95, 0x0AC9, 0x11D1, 0x89, 0x6C, 0x00, 0xC0, 0x4F, 0xB6, 0xBF, 0xC4);") cpp_quote("DEFINE_GUID(IID_IAsyncMoniker, 0x79EAC9D3, 0xBAF9, 0x11CE, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B);") @@ -1391,6 +1428,7 @@ cpp_quote("HRESULT WINAPI CoInternetCompareUrl(LPCWSTR,LPCWSTR,DWORD);") cpp_quote("HRESULT WINAPI CoInternetCreateZoneManager(IServiceProvider*, IInternetZoneManager**, DWORD);") cpp_quote("HRESULT WINAPI CoInternetParseUrl(LPCWSTR,PARSEACTION,DWORD,LPWSTR,DWORD,DWORD*,DWORD);") cpp_quote("HRESULT WINAPI CoInternetQueryInfo(LPCWSTR,QUERYOPTION,DWORD,LPVOID,DWORD,DWORD*,DWORD);") +cpp_quote("HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST,DWORD,BOOL);") cpp_quote("HRESULT WINAPI CreateFormatEnumerator(UINT,FORMATETC*,IEnumFORMATETC**);") cpp_quote("HRESULT WINAPI GetSoftwareUpdateInfo( LPCWSTR szDistUnit, LPSOFTDISTINFO psdi);") cpp_quote("HRESULT WINAPI FaultInIEFeature(HWND,uCLSSPEC*,QUERYCONTEXT*,DWORD);") diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c index e05a962b5e6..c46ff6f72f7 100644 --- a/libs/wine/ldt.c +++ b/libs/wine/ldt.c @@ -52,7 +52,7 @@ struct modify_ldt_s unsigned int read_exec_only : 1; unsigned int limit_in_pages : 1; unsigned int seg_not_present : 1; - unsigned int useable : 1; + unsigned int usable : 1; unsigned int garbage : 25; }; @@ -65,7 +65,7 @@ static inline void fill_modify_ldt_struct( struct modify_ldt_s *ptr, const LDT_E ptr->read_exec_only = !(entry->HighWord.Bits.Type & 2); ptr->limit_in_pages = entry->HighWord.Bits.Granularity; ptr->seg_not_present = !entry->HighWord.Bits.Pres; - ptr->useable = entry->HighWord.Bits.Sys; + ptr->usable = entry->HighWord.Bits.Sys; ptr->garbage = 0; } diff --git a/loader/preloader.c b/loader/preloader.c index 0034e9a948c..0ca33fd275b 100644 --- a/loader/preloader.c +++ b/loader/preloader.c @@ -108,7 +108,9 @@ static struct wine_preload_info preload_info[] = { - { (void *)0x00000000, 0x60000000 }, /* low memory area */ + { (void *)0x00000000, 0x00010000 }, /* low 64k */ + { (void *)0x00010000, 0x00100000 }, /* DOS area */ + { (void *)0x00110000, 0x5fef0000 }, /* low memory area */ { (void *)0x7f000000, 0x02000000 }, /* top-down allocations + shared heap */ { 0, 0 }, /* PE exe range set with WINEPRELOADRESERVE */ { 0, 0 } /* end of list */ @@ -178,7 +180,7 @@ struct unsigned int read_exec_only : 1; unsigned int limit_in_pages : 1; unsigned int seg_not_present : 1; - unsigned int useable : 1; + unsigned int usable : 1; unsigned int garbage : 25; } thread_ldt = { -1, (unsigned long)thread_data, 0xfffff, 1, 0, 0, 1, 0, 1, 0 }; @@ -919,7 +921,7 @@ static void preload_reserve( const char *str ) const char *p; unsigned long result = 0; void *start = NULL, *end = NULL; - int first = 1; + int i, first = 1; for (p = str; *p; p++) { @@ -948,15 +950,22 @@ static void preload_reserve( const char *str ) start = end = NULL; } - /* check for overlap with low memory area */ - if ((char *)end <= (char *)preload_info[0].addr + preload_info[0].size) - start = end = NULL; - else if ((char *)start < (char *)preload_info[0].addr + preload_info[0].size) - start = (char *)preload_info[0].addr + preload_info[0].size; + /* check for overlap with low memory areas */ + for (i = 0; preload_info[i].size; i++) + { + if ((char *)preload_info[i].addr > (char *)0x00110000) break; + if ((char *)end <= (char *)preload_info[i].addr + preload_info[i].size) + { + start = end = NULL; + break; + } + if ((char *)start < (char *)preload_info[i].addr + preload_info[i].size) + start = (char *)preload_info[i].addr + preload_info[i].size; + } - /* entry 2 is for the PE exe */ - preload_info[2].addr = start; - preload_info[2].size = (char *)end - (char *)start; + while (preload_info[i].size) i++; + preload_info[i].addr = start; + preload_info[i].size = (char *)end - (char *)start; return; error: diff --git a/programs/notepad/Ru.rc b/programs/notepad/Ru.rc index 44152a90534..a2184faa38f 100644 --- a/programs/notepad/Ru.rc +++ b/programs/notepad/Ru.rc @@ -28,9 +28,9 @@ MAIN_MENU MENU MENUITEM "&Ñîõðàíèòü\tCtrl+S", CMD_SAVE MENUITEM "Ñîõðàíèòü &êàê...", CMD_SAVE_AS MENUITEM SEPARATOR + MENUITEM "&Ïå÷àòàòü...\tCtrl+P", CMD_PRINT MENUITEM "Ïàðà&ìåòðû ñòðàíèöû...", CMD_PAGE_SETUP MENUITEM "&Íàñòðîéêà ïðèíòåðà...", CMD_PRINTER_SETUP - MENUITEM "&Ïå÷àòàòü...\tCtrl+P", CMD_PRINT MENUITEM SEPARATOR MENUITEM "Â&ûõîä", CMD_EXIT } diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c index 626abeadc12..5dbffb092d0 100644 --- a/programs/oleview/typelib.c +++ b/programs/oleview/typelib.c @@ -545,20 +545,7 @@ static int EnumFuncs(ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, HTREEITEM hParen AddToTLDataStrW(tld, wszCloseBrackets2); memset(wszText, 0, sizeof(wszText)); } - if(SysStringLen(bstrHelpString)) { - if(bFirst) AddToTLDataStrW(tld, wszOpenBrackets1); - else { - AddToTLDataStrW(tld, wszComa); - AddToTLDataStrW(tld, wszSpace); - } - bFirst = FALSE; - AddToTLDataStrW(tld, wszHelpstring); - AddToTLDataStrW(tld, wszOpenBrackets2); - AddToTLDataStrW(tld, wszInvertedComa); - AddToTLDataStrW(tld, bstrHelpString); - AddToTLDataStrW(tld, wszInvertedComa); - AddToTLDataStrW(tld, wszCloseBrackets2); - } + CreateTypeInfo(wszText, wszAfter, pFuncDesc->elemdescFunc.tdesc, pTypeInfo); switch(pFuncDesc->invkind) { @@ -594,6 +581,22 @@ static int EnumFuncs(ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, HTREEITEM hParen break; default:; } + if(SysStringLen(bstrHelpString)) + { + if(bFirst) AddToTLDataStrW(tld, wszOpenBrackets1); + else + { + AddToTLDataStrW(tld, wszComa); + AddToTLDataStrW(tld, wszSpace); + } + bFirst = FALSE; + AddToTLDataStrW(tld, wszHelpstring); + AddToTLDataStrW(tld, wszOpenBrackets2); + AddToTLDataStrW(tld, wszInvertedComa); + AddToTLDataStrW(tld, bstrHelpString); + AddToTLDataStrW(tld, wszInvertedComa); + AddToTLDataStrW(tld, wszCloseBrackets2); + } if(!bFirst) { AddToTLDataStrW(tld, wszCloseBrackets1); @@ -833,7 +836,8 @@ static void EnumCoclassImplTypes(ITypeInfo *pTypeInfo, AddToTLDataStrW(pTLData, wszSpace); } - if(pTypeAttr->typekind == TKIND_INTERFACE) + if(pTypeAttr->typekind == TKIND_INTERFACE || + (pTypeAttr->wTypeFlags & TYPEFLAG_FDUAL)) AddToTLDataStrW(pTLData, wszTKIND_INTERFACE); else if(pTypeAttr->typekind == TKIND_DISPATCH) AddToTLDataStrW(pTLData, wszTKIND_DISPATCH); @@ -1103,11 +1107,11 @@ static void CreateCoclassHeader(ITypeInfo *pTypeInfo, AddToTLDataStrW(pTLData, wszNewLine); AddSpaces(pTLData, TAB_SIZE); AddToTLDataStrW(pTLData, wszHelpstring); - AddToTLDataStrW(pTLData, wszOpenBrackets1); + AddToTLDataStrW(pTLData, wszOpenBrackets2); AddToTLDataStrW(pTLData, wszInvertedComa); AddToTLDataStrW(pTLData, bstrHelpString); AddToTLDataStrW(pTLData, wszInvertedComa); - AddToTLDataStrW(pTLData, wszCloseBrackets1); + AddToTLDataStrW(pTLData, wszCloseBrackets2); } SysFreeString(bstrHelpString); } diff --git a/programs/regedit/No.rc b/programs/regedit/No.rc index 0ee4d36a8c4..ee57f2a60a7 100644 --- a/programs/regedit/No.rc +++ b/programs/regedit/No.rc @@ -201,7 +201,7 @@ CAPTION "Rediger bin FONT 8, "MS Shell Dlg" BEGIN LTEXT "Verdinavn:",IDC_STATIC,5,5,119,8 - EDITTEXT IDC_VALUE_NAME,5,15,200,12, WS_BORDER | WS_TABSTOP | WS_DISABLED + EDITTEXT IDC_VALUE_NAME,5,15,200,12, WS_BORDER | WS_TABSTOP | ES_AUTOHSCROLL | WS_DISABLED LTEXT "Verdidata:",IDC_STATIC,5,30,90,8 CONTROL "",IDC_VALUE_DATA,"HexEdit",WS_TABSTOP,4,40,160,40 DEFPUSHBUTTON "OK",IDOK,140,80,30,11,WS_GROUP diff --git a/programs/start/En.rc b/programs/start/En.rc index 3817a59677e..212046c6b2c 100644 --- a/programs/start/En.rc +++ b/programs/start/En.rc @@ -33,6 +33,7 @@ Options: \n\ /MAX[imized] Start the program maximized. \n\ /R[estored] Start the program normally (neither minimized nor maximized). \n\ /W[ait] Wait for started program to finish, then exit with its exit code. \n\ +/Unix Use a Unix filename and start the file like windows explorer. \n\ /L Show end-user license. \n\ \n\ start.exe version 0.2 Copyright (C) 2003, Dan Kegel \n\ @@ -59,5 +60,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. \n\ See the COPYING.LIB file for license information. \n\ " -STRING_EXECFAIL "Application could not be started, or no application associated with the specified file.\nShellExecuteEx failed" +STRING_EXECFAIL, "Application could not be started, or no application associated with the specified file.\nShellExecuteEx failed" + +STRING_UNIXFAIL "Could not translate the specified Unix filename to a DOS filename." } diff --git a/programs/start/resources.h b/programs/start/resources.h index fb4fff8832c..f5abd31302a 100644 --- a/programs/start/resources.h +++ b/programs/start/resources.h @@ -21,3 +21,4 @@ #define STRING_USAGE 101 #define STRING_LICENSE 102 #define STRING_EXECFAIL 103 +#define STRING_UNIXFAIL 104 diff --git a/programs/start/start.c b/programs/start/start.c index 58748c8ba37..c7a4ba438fc 100644 --- a/programs/start/start.c +++ b/programs/start/start.c @@ -151,13 +151,37 @@ static WCHAR *build_args( int argc, WCHAR **argvW ) return ret; } +static WCHAR *get_parent_dir(WCHAR* path) +{ + WCHAR *last_slash; + WCHAR *result; + int len; + + last_slash = strrchrW( path, '\\' ); + if (last_slash == NULL) + len = 1; + else + len = last_slash - path + 1; + + result = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + CopyMemory(result, path, (len-1)*sizeof(WCHAR)); + result[len-1] = '\0'; + + return result; +} + int wmain (int argc, WCHAR *argv[]) { SHELLEXECUTEINFOW sei; WCHAR *args = NULL; int i; + int unix_mode = 0; + WCHAR *dos_filename = NULL; + WCHAR *parent_directory = NULL; + DWORD binary_type; static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 }; + static const WCHAR unixW[] = { 'u', 'n', 'i', 'x', 0 }; memset(&sei, 0, sizeof(sei)); sei.cbSize = sizeof(sei); @@ -178,6 +202,10 @@ int wmain (int argc, WCHAR *argv[]) if (argv[i][0] != '/') break; + /* Unix paths can start with / so we have to assume anything following /U is not a flag */ + if (unix_mode) + break; + /* Handle all options in this word */ for (ci=0; argv[i][ci]; ) { /* Skip slash */ @@ -198,6 +226,15 @@ int wmain (int argc, WCHAR *argv[]) case 'R': /* sei.nShow = SW_SHOWNORMAL; */ break; + case 'u': + case 'U': + if (strncmpiW(&argv[i][ci], unixW, 4) == 0) + unix_mode = 1; + else { + WINE_ERR("Option '%s' not recognized\n", wine_dbgstr_w( argv[i]+ci-1)); + usage(); + } + break; case 'w': case 'W': sei.fMask |= SEE_MASK_NOCLOSEPROCESS; @@ -220,10 +257,68 @@ int wmain (int argc, WCHAR *argv[]) args = build_args( argc - i, &argv[i] ); sei.lpParameters = args; - if (!ShellExecuteExW(&sei)) + if (unix_mode) { + LPWSTR (*wine_get_dos_file_name_ptr)(LPCSTR); + char* multibyte_unixpath; + int multibyte_unixpath_len; + + wine_get_dos_file_name_ptr = (void*)GetProcAddress(GetModuleHandle("KERNEL32"), "wine_get_dos_file_name"); + + if (!wine_get_dos_file_name_ptr) + fatal_string(STRING_UNIXFAIL); + + multibyte_unixpath_len = WideCharToMultiByte(CP_UNIXCP, 0, sei.lpFile, -1, NULL, 0, NULL, NULL); + multibyte_unixpath = HeapAlloc(GetProcessHeap(), 0, multibyte_unixpath_len); + + WideCharToMultiByte(CP_UNIXCP, 0, sei.lpFile, -1, multibyte_unixpath, multibyte_unixpath_len, NULL, NULL); + + dos_filename = wine_get_dos_file_name_ptr(multibyte_unixpath); + + HeapFree(GetProcessHeap(), 0, multibyte_unixpath); + + if (!dos_filename) + fatal_string(STRING_UNIXFAIL); + + sei.lpFile = dos_filename; + sei.lpDirectory = parent_directory = get_parent_dir(dos_filename); + + if (GetBinaryTypeW(sei.lpFile, &binary_type)) { + WCHAR *commandline; + STARTUPINFOW startup_info; + PROCESS_INFORMATION process_information; + static WCHAR commandlineformat[] = {'"','%','s','"','%','s',0}; + + /* explorer on windows always quotes the filename when running a binary on windows (see bug 5224) so we have to use CreateProcessW in this case */ + + commandline = HeapAlloc(GetProcessHeap(), 0, (strlenW(sei.lpFile)+3+strlenW(sei.lpParameters))*sizeof(WCHAR)); + sprintfW(commandline, commandlineformat, sei.lpFile, sei.lpParameters); + + ZeroMemory(&startup_info, sizeof(startup_info)); + startup_info.cb = sizeof(startup_info); + + if (!CreateProcessW( + NULL, /* lpApplicationName */ + commandline, /* lpCommandLine */ + NULL, /* lpProcessAttributes */ + NULL, /* lpThreadAttributes */ + FALSE, /* bInheritHandles */ + CREATE_NEW_CONSOLE, /* dwCreationFlags */ + NULL, /* lpEnvironment */ + sei.lpDirectory, /* lpCurrentDirectory */ + &startup_info, /* lpStartupInfo */ + &process_information /* lpProcessInformation */ )) + { + fatal_string_error(STRING_EXECFAIL, GetLastError()); + } + sei.hProcess = process_information.hProcess; + } + } + else if (!ShellExecuteExW(&sei)) fatal_string_error(STRING_EXECFAIL, GetLastError()); HeapFree( GetProcessHeap(), 0, args ); + HeapFree( GetProcessHeap(), 0, dos_filename ); + HeapFree( GetProcessHeap(), 0, parent_directory ); if (sei.fMask & SEE_MASK_NOCLOSEPROCESS) { DWORD exitcode; diff --git a/programs/winecfg/Fr.rc b/programs/winecfg/Fr.rc index 3514a42b043..d77d848d57f 100644 --- a/programs/winecfg/Fr.rc +++ b/programs/winecfg/Fr.rc @@ -37,7 +37,7 @@ BEGIN LTEXT PACKAGE_STRING,IDC_STATIC,119,17,120,8 CONTROL IDB_WINE,IDC_STATIC,"Static",SS_BITMAP ,15,17,157,111 LTEXT "http://www.winehq.org/",IDC_STATIC,119,31,106,8 - LTEXT "Cette bibliothèque est un logiciel libre ; vous pouvez la redistribuer et/ou la modifier conformément aux dispositions de la Licence Publique Générale GNU, telle que publiée par la Free Software Foundation ; version 2.1 de la licence, ou encore (à votre choix) toute version ultérieure." + LTEXT "Cette bibliothèque est un logiciel libre ; vous pouvez la redistribuer et/ou la modifier suivant les termes de la Licence Générale Publique Limitée, telle que publiée par la Free Software Foundation ; soit la version 2.1 de la License, soit (à votre gré) toute version ultérieure." IDC_STATIC,119,44,124,72 END @@ -64,6 +64,8 @@ BEGIN CONTROL "Permettre aux applications DirectX d'empêcher la souris de quitter leur fenêtre",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP | BS_MULTILINE,15,14,230,16 + CONTROL "Allow the window manager to &decorate the windows",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,30,230,8 + CONTROL "Permettre au gestionnaire de &fenêtres de contrôler les fenêtres",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,40,230,8 LTEXT "Si les fenêtres sont gérées par votre gestionnaire de fenêtres, elles auront des bordures standard, elles respecteront votre bureau virtuel et apparaîtront dans la liste des fenêtres.\n\nSi les fenêtres ne sont pas gérées, elles seront déconnectées de votre gestionnaire de fenêtres. Ceci signifie qu'elle ne seront pas parfaitement intégrées à votre bureau, mais que l'émulation sera plus précise ce qui permet à certains programmes de mieux fonctionner.", IDC_STATIC,15,45,228,80 @@ -305,5 +307,20 @@ BEGIN IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Texte de la barre de titre active" IDC_SYSPARAMS_INACTIVE_TITLE "Barre de titre inactive" IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Texte de la barre de titre inactive" - IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text" + IDC_SYSPARAMS_MSGBOX_TEXT "Texte des boîtes de messages" + IDC_SYSPARAMS_APPWORKSPACE "Espace de travail de l'application" + IDC_SYSPARAMS_WINDOW_FRAME "Cadre de la fenêtre" + IDC_SYSPARAMS_ACTIVE_BORDER "Bordure active" + IDC_SYSPARAMS_INACTIVE_BORDER "Bordure inactive" + IDC_SYSPARAMS_BUTTON_SHADOW "Ombre des contrôles" + IDC_SYSPARAMS_GRAY_TEXT "Texte gris" + IDC_SYSPARAMS_BUTTON_HILIGHT "Surbrillance des contrôles" + IDC_SYSPARAMS_BUTTON_DARK_SHADOW "Ombre sombre des contrôles" + IDC_SYSPARAMS_BUTTON_LIGHT "Lumière des contrôles" + IDC_SYSPARAMS_BUTTON_ALTERNATE "Fond alternatif des contrôles" + IDC_SYSPARAMS_HOT_TRACKING "Élément actif" + IDC_SYSPARAMS_ACTIVE_TITLE_GRADIENT "Dégradé de la barre de titre active" + IDC_SYSPARAMS_INACTIVE_TITLE_GRADIENT "Dégradé de la barre de titre inactive" + IDC_SYSPARAMS_MENU_HILIGHT "Surbrillance du menu" + IDC_SYSPARAMS_MENUBAR "Barre de menu" END diff --git a/programs/winecfg/Ko.rc b/programs/winecfg/Ko.rc index 3b474188d11..97662eb8df2 100644 --- a/programs/winecfg/Ko.rc +++ b/programs/winecfg/Ko.rc @@ -64,8 +64,10 @@ STYLE WS_CHILD | WS_DISABLED FONT 9, "MS Shell Dlg" BEGIN GROUPBOX " â ¼³Á¤ ",IDC_STATIC,8,4,244,180 + CONTROL "DirectX ÇÁ·Î±×·¥ â¿¡¼­ ¸¶¿ì½º°¡ ¶°³ª¸é Á¤ÁöÇÏ°Ô ÇÔ(&M)",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,8 - CONTROL "DirectX ÇÁ·Î±×·¥µéÀÌ ¸¶¿ì½º Ä¿¼­¸¦ ±×µéÀÇ Ã¢¾È¿¡ Àâ¾ÆµÎ°Ô ÇÔ(&M)",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,14,230,8 + CONTROL "¿ø·¡ â °ü¸®ÀÚ°¡ âÀ» ²Ù¹Ìµµ·Ï ÇÔ(&D)",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,30,230,8 + CONTROL " ¿ø·¡ â °ü¸®ÀÚ°¡ âÀ» Á¦¾îÇϵµ·Ï ÇÔ(&W)",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,40,230,8 LTEXT "WineâµéÀÌ Ã¢°ü¸®ÀÚ¿¡ ÀÇÇؼ­ °ü¸®µÈ´Ù¸é, WineâµéÀº Ç¥ÁØ Ã¢Æ²À» °¡Áú °ÍÀ̸ç, ÀÛ¾÷°ø°£ °ü¸®ÀÚ¿Í Àß ¾î¿ï¸± °ÍÀÔ´Ï´Ù. ±×¸®°í â¸ñ·Ï¿¡µµ ³ªÅ¸³¯ °ÍÀÔ´Ï´Ù.\n\n¸¸¾à¿¡ WineâµéÀÌ Ã¢°ü¸®ÀÚ¿¡ ÀÇÇØ °ü¸®µÇÁö ¾Ê´Â´Ù¸é, WineâµéÀº â°ü¸®ÀÚ¿Í ¿¬°áµÇÁö ¾ÊÀ» °ÍÀÔ´Ï´Ù. ÀÌ°ÍÀº WineâµéÀÌ µ¥½ºÅ©Å¾°ú ¹ÐÁ¢ÇÏ°Ô ÅëÇÕµÇÁö ¾Ê´Â´Ù´Â °ÍÀ» ÀǹÌÇÕ´Ï´Ù. ÇÏÁö¸¸ WineÀÇ À©µµ¿ìÁî Èä³»³»±â°¡ ´õ Á¤¹ÐÇØÁ®¼­ ¸î¸î ÇÁ·Î±×·¥µéÀÌ Á» ´õ Àß µ¿ÀÛÇÒ ¼ö ÀÖµµ·Ï µµ¿ÍÁÝ´Ï´Ù.", IDC_STATIC,15,37,228,80 CONTROL "â°ü¸®ÀÚ°¡ WineâÀ» °ü¸®Çϵµ·Ï ÇÔ(&W)",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,111,230,8 diff --git a/programs/winecfg/No.rc b/programs/winecfg/No.rc index 384a197cd2a..2029336e347 100644 --- a/programs/winecfg/No.rc +++ b/programs/winecfg/No.rc @@ -60,9 +60,11 @@ IDD_GRAPHCFG DIALOG DISCARDABLE 0, 0, 260, 250 STYLE WS_CHILD | WS_DISABLED FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX " Vinduinnstillinger ",IDC_STATIC,8,5,244,180 + GROUPBOX " Vinduinnstillinger ",IDC_STATIC,8,4,244,184 - CONTROL "Tillat DirectX-programmer å hindre musen fra å forlate vinduet",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,19,230,8 + CONTROL "Tillat DirectX-programmer å hindre musen fra å forlate vinduet",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,8 + + CONTROL "Tillat vindusbehandleren å &dekorere vinduer",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,30,230,8 CONTROL "Tillat vindusbehandleren å kontrollere vinduene",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,40,230,8 LTEXT "Hvis vinduer kontrolleres av din standardvindusbehandler, får de vanlige rammer, og respekterer det virtuelle skrivebordet ditt og vises i vinduslisten.\n\nHvis de er ukontrollerte er de koblet fra vindusbehandleren. Dette betyr at de ikke integreres like godt med skrivebordet ditt, men emuleringen blir mer presis sånn at noen programmer virker bedre.", diff --git a/programs/winecfg/Si.rc b/programs/winecfg/Si.rc index f560760419b..59df1e834a7 100644 --- a/programs/winecfg/Si.rc +++ b/programs/winecfg/Si.rc @@ -64,7 +64,9 @@ FONT 8, "MS Shell Dlg" BEGIN GROUPBOX " Nastavitve oken ",IDC_STATIC,8,4,244,184 - CONTROL "Dovoli DirectX programom, da preprečijo &miški zapuščanje njihovega okna",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,19,230,8 + CONTROL "Dovoli DirectX programom, da preprečijo &miški zapuščanje okna",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,8 + + CONTROL "Dovoli upravljalniku oken, da okra&si okna",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,30,230,8 CONTROL "Dovoli upravljalniku &oken, da upravlja z Wine-ovimi okni",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,40,230,8 LTEXT "Če z Wine-ovimi okni upravlja upravljalnik oken, so robovi, obnašanje in ostale nastavitve le-teh enake, kot za ostala okna vašega namizja, kar omogoča boljšo združitev z vašim namizjem.\n\nV nasprotnem primeru okna ne bodo tako tesno povezana z vašim namizjem, kar pa v nekaterih primerih omogoča pravilnejšo emulacijo in izboljša delovanje nekaterih programoh.", diff --git a/programs/wineconsole/wineconsole_Ru.rc b/programs/wineconsole/wineconsole_Ru.rc index 3fc25b481a6..7e1f2ec540d 100644 --- a/programs/wineconsole/wineconsole_Ru.rc +++ b/programs/wineconsole/wineconsole_Ru.rc @@ -128,6 +128,7 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION CAPTION "Ïàðàìåòðû êîíñîëè" FONT 8, "MS Shell Dlg" { + GROUPBOX "", -1, 10, 10, 178, 31, BS_GROUPBOX AUTORADIOBUTTON "Èçìåíèòü òîëüêî òåêóùóþ ñåññèþ", IDC_SAV_SESSION, 14, 15, 170, 10, WS_TABSTOP AUTORADIOBUTTON "Ñîõðàíèòü ýòè íàñòðîéêè äëÿ áóäóùèõ ñåññèé", IDC_SAV_SAVE, 14, 27, 170, 10, WS_TABSTOP diff --git a/programs/winefile/Fr.rc b/programs/winefile/Fr.rc index 2a8207f5f83..c6294b51205 100644 --- a/programs/winefile/Fr.rc +++ b/programs/winefile/Fr.rc @@ -6,7 +6,7 @@ * Copyright 2002 Steven Edwards * Copyright 2002 Alexandre Julliard * Copyright 2003 Sylvain Petreolle - * Copyright 2005-2006 Jonathan Ernst + * Copyright 2005-2008 Jonathan Ernst * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -33,8 +33,8 @@ IDM_WINEFILE MENU FIXED IMPURE MENUITEM "&Ouvrir\tEntrée", ID_ACTIVATE MENUITEM "&Déplacer...\tF7", ID_FILE_MOVE MENUITEM "&Copier...\tF8", ID_FILE_COPY - MENUITEM "P&resse-Papiers...\tF9", 118 - MENUITEM "&Effacer\tDel", ID_FILE_DELETE + MENUITEM "P&resse-papiers...\tF9", 118 + MENUITEM "&Effacer\tSuppr", ID_FILE_DELETE MENUITEM "Re&nommer...", 109 MENUITEM "&Propriétés...\tAlt+Entree", ID_EDIT_PROPERTIES MENUITEM SEPARATOR @@ -62,7 +62,7 @@ IDM_WINEFILE MENU FIXED IMPURE MENUITEM SEPARATOR MENUITEM "&Formater Disque...", ID_FORMAT_DISK #ifdef _WIN95 - MENUITEM "Créer un disque *système...", -1 /*TODO*/ + MENUITEM "Créer un disque &système...", -1 /*TODO*/ #endif MENUITEM SEPARATOR MENUITEM "Connecter un lecteur &réseau",ID_CONNECT_NETWORK_DRIVE @@ -167,7 +167,7 @@ CAPTION "S FONT 8, "MS Shell Dlg" { CONTROL "", 101, "Static", SS_SIMPLE|SS_NOPREFIX, 3, 6, 162, 10 - CONTROL "&Dossier :", -1, "Static", SS_LEFTNOWORDWRAP|WS_GROUP, 3, 18, 60, 10 + CONTROL "&Chemin :", -1, "Static", SS_LEFTNOWORDWRAP|WS_GROUP, 3, 18, 60, 10 EDITTEXT 201, 3, 29, 134, 12, ES_AUTOHSCROLL DEFPUSHBUTTON "OK", 1, 158, 6, 47, 14 PUSHBUTTON "Annuler", 2, 158, 23, 47, 14 @@ -179,7 +179,7 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Par type de fichier" FONT 8, "MS Sans Serif" BEGIN - LTEXT "&Name:",-1,7,8,22,10 + LTEXT "&Nom :",-1,7,8,22,10 EDITTEXT IDC_VIEW_PATTERN,31,7,63,12,ES_AUTOHSCROLL GROUPBOX "Type de fichier",-1,7,23,87,56 CONTROL "&Répertoires",IDC_VIEW_TYPE_DIRECTORIES,"Button", @@ -211,7 +211,7 @@ BEGIN EDITTEXT IDC_STATIC_PROP_LASTCHANGE,71,29,120,9,ES_READONLY | NOT WS_BORDER | WS_TABSTOP LTEXT "Version :",-1,7,40,59,9 EDITTEXT IDC_STATIC_PROP_VERSION,71,40,120,9,ES_READONLY | NOT WS_BORDER | WS_TABSTOP - LTEXT "Cop&yright:",-1,7,51,59,9 + LTEXT "Cop&yright :",-1,7,51,59,9 EDITTEXT IDC_STATIC_PROP_COPYRIGHT,71,51,120,9,ES_READONLY | NOT WS_BORDER | WS_TABSTOP LTEXT "Taille :",-1,7,62,59,9 EDITTEXT IDC_STATIC_PROP_SIZE,71,62,120,9,ES_READONLY | NOT WS_BORDER | WS_TABSTOP diff --git a/programs/winefile/Ko.rc b/programs/winefile/Ko.rc index 6a6f12d1d4c..ba613517b1d 100644 --- a/programs/winefile/Ko.rc +++ b/programs/winefile/Ko.rc @@ -176,7 +176,7 @@ FONT 8, "MS Shell Dlg" IDD_DIALOG_VIEW_TYPE DIALOG DISCARDABLE 15, 13, 161, 97 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ÆÄÀÏ Å¸ÀÔÀ¸·Î" -FONT 8, "MS Shell Dlg" +FONT 8, "MS Sans Serif" BEGIN LTEXT "À̸§(&N):",-1,7,8,22,10 EDITTEXT IDC_VIEW_PATTERN,31,7,63,12,ES_AUTOHSCROLL @@ -190,7 +190,7 @@ BEGIN CONTROL "´Ù¸¥ ÆÄÀÏ(&O)",IDC_VIEW_TYPE_OTHERS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,13,65,70,10 CONTROL "¼û±è/½Ã½ºÅÛ ÆÄÀÏ º¸¿©ÁÖ±â(&S)",IDC_VIEW_TYPE_HIDDEN, - "¹öÆ°",BS_AUTOCHECKBOX | WS_TABSTOP,7,81,106,9 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,81,106,9 DEFPUSHBUTTON "È®ÀÎ",IDOK,104,7,50,14 PUSHBUTTON "Ãë¼Ò",IDCANCEL,104,24,50,14 END @@ -198,11 +198,12 @@ END IDD_DIALOG_PROPERTIES DIALOG DISCARDABLE 0, 0, 248, 215 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "%s ¼Ó¼º" -FONT 8, "MS Shell Dlg" +FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "È®ÀÎ",IDOK,191,7,50,14 PUSHBUTTON "Ãë¼Ò",IDCANCEL,191,29,50,14 LTEXT "ÆÄÀÏ À̸§(&F):",-1,7,7,59,9 + EDITTEXT IDC_STATIC_PROP_FILENAME,71,7,120,9,ES_READONLY | NOT WS_BORDER | WS_TABSTOP LTEXT "¿ÏÀüÇÑ °æ·Î(&P):",-1,7,18,59,9 EDITTEXT IDC_STATIC_PROP_PATH,71,18,120,9, ES_READONLY | NOT WS_BORDER | WS_TABSTOP @@ -241,7 +242,7 @@ STRINGTABLE IDS_DESKTOP "µ¥½ºÅ©Å¾" IDS_SHELL "¼¿" IDS_TITLEFMT "%s - %s" - IDS_NO_IMPL "¹Ì±¸Çö" + IDS_NO_IMPL "¾ÆÁ÷ ±¸Çö¾ÈµÊ" IDS_WINE_FILE "Wine ÆÄÀÏ" } diff --git a/programs/winemine/Ko.rc b/programs/winemine/Ko.rc index bd27674615b..7ec4cb0f97d 100644 --- a/programs/winemine/Ko.rc +++ b/programs/winemine/Ko.rc @@ -53,7 +53,6 @@ DLG_TIMES DIALOG DISCARDABLE 0, 0, 160, 80 STYLE DS_MODALFRAME | DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP CAPTION "°¡Àå ºü¸¥ ½Ã°£" -FONT 8, "MS Shell Dlg" { GROUPBOX "ÃÖ´Ü ½Ã°£", IDIGNORE, 10, 10, 140, 45 LTEXT "Ãʺ¸ÀÚ", IDIGNORE, 20, 20, 40, 8 @@ -72,7 +71,6 @@ DLG_CONGRATS DIALOG DISCARDABLE 0, 0, 160, 60 STYLE DS_MODALFRAME | DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP CAPTION "ÃàÇÏÇÕ´Ï´Ù!" -FONT 8, "MS Shell Dlg" { LTEXT "´ç½ÅÀÇ À̸§À» Àû¾îÁÖ¼¼¿ä", IDIGNORE, 10, 10, 150, 10 EDITTEXT IDC_EDITNAME, 25, 20, 110, 12 @@ -83,7 +81,6 @@ DLG_CUSTOM DIALOG DISCARDABLE 0, 0, 100, 100 STYLE DS_MODALFRAME | DS_3DLOOK | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_POPUP CAPTION "°ÔÀÓ »ç¿ëÀÚ Á¤ÀÇ " -FONT 8, "MS Shell Dlg" { LTEXT "°¡·ÎÁÙ", IDIGNORE, 5, 5, 30, 10 LTEXT "»õ·ÎÁÙ", IDIGNORE, 5, 35, 30, 10 diff --git a/programs/winevdm/winevdm.c b/programs/winevdm/winevdm.c index 140efabb8f3..263f56114e3 100644 --- a/programs/winevdm/winevdm.c +++ b/programs/winevdm/winevdm.c @@ -383,6 +383,7 @@ int main( int argc, char *argv[] ) char *cmdline, *appname, **first_arg; char *p; HMODULE winedos; + MEMORY_BASIC_INFORMATION mem_info; if (!argv[1]) usage(); @@ -405,7 +406,12 @@ int main( int argc, char *argv[] ) if (!(winedos = LoadLibraryA( "winedos.dll" )) || !(wine_load_dos_exe = (void *)GetProcAddress( winedos, "wine_load_dos_exe" ))) { - WINE_MESSAGE( "winevdm: unable to exec '%s': 16-bit support missing\n", argv[1] ); + WINE_MESSAGE( "winevdm: unable to exec '%s': DOS support unavailable\n", appname ); + ExitProcess(1); + } + if (!VirtualQuery( NULL, &mem_info, sizeof(mem_info) ) || mem_info.State == MEM_FREE) + { + WINE_MESSAGE( "winevdm: unable to exec '%s': DOS memory range unavailable\n", appname ); ExitProcess(1); } diff --git a/programs/winhelp/Fr.rc b/programs/winhelp/Fr.rc index 73185071395..200b1de8a8e 100644 --- a/programs/winhelp/Fr.rc +++ b/programs/winhelp/Fr.rc @@ -3,6 +3,7 @@ * * Copyright 1996 Ulrich Schmid * Copyright 2002 Sylvain Petreolle + * Copyright 2008 Jonathan Ernst * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,7 +29,7 @@ MAIN_MENU MENU POPUP "&Fichier" { MENUITEM "&Ouvrir", MNID_FILE_OPEN MENUITEM SEPARATOR - MENUITEM "Im&primer", MNID_FILE_PRINT + MENUITEM "&Imprimer", MNID_FILE_PRINT MENUITEM "&Configuration de l'imprimante...", MNID_FILE_SETUP MENUITEM SEPARATOR MENUITEM "&Quitter", MNID_FILE_EXIT @@ -52,8 +53,18 @@ MAIN_MENU MENU } } +IDD_INDEX DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Index" +{ + LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_BORDER + PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12 + PUSHBUTTON "&Annuler", IDCANCEL, 120, 170, 50, 12 +} + /* Strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE DISCARDABLE LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT { STID_WINE_HELP, "Aide de WINE" STID_WHERROR, "ERREUR" @@ -68,5 +79,5 @@ STID_HISTORY, "&Historique" STID_TOPICS, "&Sujets" STID_ALL_FILES, "Tous fichiers (*.*)" STID_HELP_FILES_HLP, "Fichiers d'aide (*.hlp)" -STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?" +STID_FILE_NOT_FOUND_s "Impossible de trouver « %s ». Souhaitez-vous rechercher ce fichier vous-même ?" } diff --git a/programs/winhelp/No.rc b/programs/winhelp/No.rc index f016efb5792..9f607250030 100644 --- a/programs/winhelp/No.rc +++ b/programs/winhelp/No.rc @@ -1,7 +1,7 @@ /* * Help Viewer * - * Copyright 2005 Alexander N. Sørnes + * Copyright 2005-2008 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 @@ -44,11 +44,21 @@ MAIN_MENU MENU LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL MENUITEM SEPARATOR MENUITEM "&Informasjon . . .", MNID_HELP_ABOUT #ifdef WINELIB - MENUITEM "&om WINE", MNID_HELP_WINE + MENUITEM "&Om WINE", MNID_HELP_WINE #endif } } +IDD_INDEX DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Innhold" +{ + LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_BORDER + PUSHBUTTON "&OK", IDOK, 40, 170, 50, 12 + PUSHBUTTON "&Avbryt", IDCANCEL, 120, 170, 50, 12 +} + /* Strings */ STRINGTABLE DISCARDABLE LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL { diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 8181469875d..bdb00924984 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -158,11 +158,11 @@ HLPFILE_PAGE *HLPFILE_PageByOffset(HLPFILE* hlpfile, LONG offset) static int comp_PageByHash(void *p, const void *key, int leaf, void** next) { - ULONG_PTR lKey = (LONG_PTR)key; - ULONG_PTR lTest = GET_UINT(p, 0); + LONG lKey = (LONG_PTR)key; + LONG lTest = (INT)GET_UINT(p, 0); *next = (char *)p+(leaf?8:6); - WINE_TRACE("Comparing '%lu' with '%lu'\n", lKey, lTest); + WINE_TRACE("Comparing '%d' with '%d'\n", lKey, lTest); if (lTest < lKey) return -1; if (lTest > lKey) return 1; return 0; @@ -184,7 +184,7 @@ HLPFILE_PAGE *HLPFILE_PageByHash(HLPFILE* hlpfile, LONG lHash) if (hlpfile->version <= 16) return HLPFILE_PageByNumber(hlpfile, lHash); - ptr = HLPFILE_BPTreeSearch(hlpfile->Context, ULongToPtr(lHash), comp_PageByHash); + ptr = HLPFILE_BPTreeSearch(hlpfile->Context, LongToPtr(lHash), comp_PageByHash); if (!ptr) { WINE_ERR("Page of hash %x not found in file %s\n", lHash, hlpfile->lpszPath); diff --git a/programs/wordpad/print.c b/programs/wordpad/print.c index aa9ac71225c..c0cd182d17e 100644 --- a/programs/wordpad/print.c +++ b/programs/wordpad/print.c @@ -500,7 +500,7 @@ static void add_ruler_units(HDC hdcRuler, RECT* drawRect, BOOL NewMetrics, long DeleteObject(hBitmap); } - hdc = CreateCompatibleDC(hdc); + hdc = CreateCompatibleDC(0); CmPixels = twips_to_pixels(TWIPS_PER_CM, GetDeviceCaps(hdc, LOGPIXELSX)); QuarterCmPixels = (int)((float)CmPixels / 4.0); diff --git a/server/registry.c b/server/registry.c index 50848924601..d2c0b23dcf8 100644 --- a/server/registry.c +++ b/server/registry.c @@ -112,7 +112,7 @@ static void set_periodic_save_timer(void); struct save_branch_info { struct key *key; - char *path; + const char *path; }; #define MAX_SAVE_BRANCH_INFO 3 @@ -1396,11 +1396,9 @@ static void load_init_registry_from_file( const char *filename, struct key *key assert( save_branch_count < MAX_SAVE_BRANCH_INFO ); - if ((save_branch_info[save_branch_count].path = strdup( filename ))) - { - save_branch_info[save_branch_count++].key = (struct key *)grab_object( key ); - make_object_static( &key->obj ); - } + save_branch_info[save_branch_count].path = filename; + save_branch_info[save_branch_count++].key = (struct key *)grab_object( key ); + make_object_static( &key->obj ); } static WCHAR *format_user_registry_path( const SID *sid, struct unicode_str *path ) @@ -1438,27 +1436,24 @@ void init_registry(void) WCHAR *current_user_path; struct unicode_str current_user_str; - const char *config = wine_get_config_dir(); - char *p, *filename; struct key *key; int dummy; + /* switch to the config dir */ + + if (fchdir( config_dir_fd ) == -1) fatal_perror( "chdir to config dir" ); + /* create the root key */ root_key = alloc_key( &root_name, time(NULL) ); assert( root_key ); make_object_static( &root_key->obj ); - if (!(filename = malloc( strlen(config) + 16 ))) fatal_error( "out of memory\n" ); - strcpy( filename, config ); - p = filename + strlen(filename); - /* load system.reg into Registry\Machine */ if (!(key = create_key( root_key, &HKLM_name, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create Machine registry key\n" ); - strcpy( p, "/system.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "system.reg", key ); release_object( key ); /* load userdef.reg into Registry\User\.Default */ @@ -1466,8 +1461,7 @@ void init_registry(void) if (!(key = create_key( root_key, &HKU_name, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create User\\.Default registry key\n" ); - strcpy( p, "/userdef.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "userdef.reg", key ); release_object( key ); /* load user.reg into HKEY_CURRENT_USER */ @@ -1478,14 +1472,14 @@ void init_registry(void) !(key = create_key( root_key, ¤t_user_str, NULL, 0, time(NULL), &dummy ))) fatal_error( "could not create HKEY_CURRENT_USER registry key\n" ); free( current_user_path ); - strcpy( p, "/user.reg" ); - load_init_registry_from_file( filename, key ); + load_init_registry_from_file( "user.reg", key ); release_object( key ); - free( filename ); - /* start the periodic save timer */ set_periodic_save_timer(); + + /* go back to the server dir */ + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); } /* save a registry branch to a file */ @@ -1532,8 +1526,8 @@ static void save_registry( struct key *key, obj_handle_t handle ) static int save_branch( struct key *key, const char *path ) { struct stat st; - char *p, *real, *tmp = NULL; - int fd, count = 0, ret = 0, by_symlink; + char *p, *tmp = NULL; + int fd, count = 0, ret = 0; FILE *f; if (!(key->flags & KEY_DIRTY)) @@ -1542,25 +1536,13 @@ static int save_branch( struct key *key, const char *path ) return 1; } - /* get the real path */ - - by_symlink = (!lstat(path, &st) && S_ISLNK (st.st_mode)); - if (!(real = malloc( PATH_MAX ))) return 0; - if (!realpath( path, real )) - { - free( real ); - real = NULL; - } - else path = real; - /* test the file type */ if ((fd = open( path, O_WRONLY )) != -1) { /* if file is not a regular file or has multiple links or is accessed * via symbolic links, write directly into it; otherwise use a temp file */ - if (by_symlink || - (!fstat( fd, &st ) && (!S_ISREG(st.st_mode) || st.st_nlink > 1))) + if (!lstat( path, &st ) && (!S_ISREG(st.st_mode) || st.st_nlink > 1)) { ftruncate( fd, 0 ); goto save; @@ -1610,7 +1592,6 @@ static int save_branch( struct key *key, const char *path ) done: free( tmp ); - free( real ); if (ret) make_clean( key ); return ret; } @@ -1620,9 +1601,11 @@ static void periodic_save( void *arg ) { int i; + if (fchdir( config_dir_fd ) == -1) return; save_timeout_user = NULL; for (i = 0; i < save_branch_count; i++) save_branch( save_branch_info[i].key, save_branch_info[i].path ); + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); set_periodic_save_timer(); } @@ -1638,6 +1621,7 @@ void flush_registry(void) { int i; + if (fchdir( config_dir_fd ) == -1) return; for (i = 0; i < save_branch_count; i++) { if (!save_branch( save_branch_info[i].key, save_branch_info[i].path )) @@ -1647,6 +1631,7 @@ void flush_registry(void) perror( " " ); } } + if (fchdir( server_dir_fd ) == -1) fatal_perror( "chdir to server dir" ); } diff --git a/server/request.c b/server/request.c index 9a2c7b1eda4..8726e1c6671 100644 --- a/server/request.c +++ b/server/request.c @@ -120,6 +120,8 @@ static const struct fd_ops master_socket_fd_ops = struct thread *current = NULL; /* thread handling the current request */ unsigned int global_error = 0; /* global error code for when no thread is current */ timeout_t server_start_time = 0; /* server startup time */ +int server_dir_fd = -1; /* file descriptor for the server dir */ +int config_dir_fd = -1; /* file descriptor for the config dir */ static struct master_socket *master_socket; /* the master socket object */ static struct timeout_user *master_timeout; @@ -553,7 +555,8 @@ static void create_server_dir( const char *dir ) create_dir( server_dir, &st ); if (chdir( server_dir ) == -1) fatal_perror( "chdir %s", server_dir ); - if (stat( ".", &st2 ) == -1) fatal_perror( "stat %s", server_dir ); + if ((server_dir_fd = open( ".", O_RDONLY )) == -1) fatal_perror( "open %s", server_dir ); + if (fstat( server_dir_fd, &st2 ) == -1) fatal_perror( "stat %s", server_dir ); if (st.st_dev != st2.st_dev || st.st_ino != st2.st_ino) fatal_error( "chdir did not end up in %s\n", server_dir ); @@ -733,6 +736,7 @@ static void acquire_lock(void) void open_master_socket(void) { const char *server_dir = wine_get_server_dir(); + const char *config_dir = wine_get_config_dir(); int fd, pid, status, sync_pipe[2]; char dummy; @@ -740,7 +744,10 @@ void open_master_socket(void) assert( sizeof(union generic_request) == sizeof(struct request_max_size) ); assert( sizeof(union generic_reply) == sizeof(struct request_max_size) ); - if (!server_dir) fatal_error( "directory %s cannot be accessed\n", wine_get_config_dir() ); + if (!server_dir) fatal_error( "directory %s cannot be accessed\n", config_dir ); + if (chdir( config_dir ) == -1) fatal_perror( "chdir to %s", config_dir ); + if ((config_dir_fd = open( ".", O_RDONLY )) == -1) fatal_perror( "open %s", config_dir ); + create_server_dir( server_dir ); if (!foreground) diff --git a/server/request.h b/server/request.h index 283ad97aea7..496c5ff5707 100644 --- a/server/request.h +++ b/server/request.h @@ -61,6 +61,7 @@ extern void close_master_socket( timeout_t timeout ); extern void shutdown_master_socket(void); extern int wait_for_lock(void); extern int kill_lock_owner( int sig ); +extern int server_dir_fd, config_dir_fd; extern void trace_request(void); extern void trace_reply( enum request req, const union generic_reply *reply ); diff --git a/server/winstation.c b/server/winstation.c index 720bb1240b4..817fe7785b4 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -37,6 +37,7 @@ #include "process.h" #include "user.h" #include "file.h" +#include "security.h" #include "wine/unicode.h" @@ -636,16 +637,15 @@ DECL_HANDLER(set_user_object_info) /* enumerate window stations */ DECL_HANDLER(enum_winstation) { - unsigned int index = req->index; - obj_handle_t handle; - struct object *obj; + unsigned int index = 0; + struct winstation *winsta; - while ((handle = enumerate_handles( current->process, &winstation_ops, &index ))) + LIST_FOR_EACH_ENTRY( winsta, &winstation_list, struct winstation, entry ) { - if (!(obj = get_handle_obj( current->process, handle, WINSTA_ENUMERATE, &winstation_ops ))) - continue; - set_reply_data_obj_name( obj ); - release_object( obj ); + unsigned int access = WINSTA_ENUMERATE; + if (req->index > index++) continue; + if (!check_object_access( &winsta->obj, &access )) continue; + set_reply_data_obj_name( &winsta->obj ); clear_error(); reply->next = index; return; @@ -659,28 +659,23 @@ DECL_HANDLER(enum_desktop) { struct winstation *winstation; struct desktop *desktop; - unsigned int index = req->index; - obj_handle_t handle; + unsigned int index = 0; if (!(winstation = (struct winstation *)get_handle_obj( current->process, req->winstation, WINSTA_ENUMDESKTOPS, &winstation_ops ))) return; - while ((handle = enumerate_handles( current->process, &desktop_ops, &index ))) + LIST_FOR_EACH_ENTRY( desktop, &winstation->desktops, struct desktop, entry ) { - if (!(desktop = get_desktop_obj( current->process, handle, DESKTOP_ENUMERATE ))) - continue; - - if (desktop->winstation == winstation) - { - set_reply_data_obj_name( &desktop->obj ); - release_object( desktop ); - release_object( winstation ); - clear_error(); - reply->next = index; - return; - } - release_object( desktop ); + unsigned int access = DESKTOP_ENUMERATE; + if (req->index > index++) continue; + if (!desktop->obj.name) continue; + if (!check_object_access( &desktop->obj, &access )) continue; + set_reply_data_obj_name( &desktop->obj ); + release_object( winstation ); + clear_error(); + reply->next = index; + return; } release_object( winstation ); diff --git a/tools/Makefile.in b/tools/Makefile.in index d771c51d37f..c7a3ebfb90e 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -14,6 +14,7 @@ PROGRAMS = \ makedep$(EXEEXT) \ relpath$(EXEEXT) \ sfnt2fnt$(EXEEXT) \ + wine.inf \ wineprefixcreate MANPAGES = \ @@ -70,13 +71,16 @@ relpath$(EXEEXT): relpath.o sfnt2fnt$(EXEEXT): sfnt2fnt.o relpath$(EXEEXT) $(CC) $(CFLAGS) -o $@ sfnt2fnt.o $(LIBWINE) $(LIBPORT) $(LDFLAGS) $(FREETYPELIBS) $(LDRPATH_LOCAL) +wine.inf: wine.inf.in + LC_ALL=C sed -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $(SRCDIR)/wine.inf.in >$@ || ($(RM) $@ && false) + wineprefixcreate: wineprefixcreate.in relpath$(EXEEXT) sed -e "s,@bintodlldir\@,`$(RELPATH) $(bindir) $(dlldir)`,g" -e "s,@bintodatadir\@,`$(RELPATH) $(bindir) $(datadir)/wine`,g" $(SRCDIR)/wineprefixcreate.in >$@ || ($(RM) $@ && false) chmod +x wineprefixcreate -install install-lib:: wineprefixcreate $(INSTALLDIRS) +install install-lib:: wine.inf wineprefixcreate $(INSTALLDIRS) $(INSTALL_SCRIPT) wineprefixcreate $(DESTDIR)$(bindir)/wineprefixcreate - $(INSTALL_DATA) $(SRCDIR)/wine.inf $(DESTDIR)$(datadir)/wine/wine.inf + $(INSTALL_DATA) wine.inf $(DESTDIR)$(datadir)/wine/wine.inf $(INSTALL_DATA) $(SRCDIR)/wine.desktop $(DESTDIR)$(datadir)/applications/wine.desktop $(INSTALL_DATA) wineprefixcreate.man $(DESTDIR)$(mandir)/man$(prog_manext)/wineprefixcreate.$(prog_manext) -$(UPDATE_DESKTOP_DATABASE) diff --git a/tools/widl/client.c b/tools/widl/client.c index 7e1e70b6a2f..eb1ade2bb7e 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -186,6 +186,16 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset) indent--; fprintf(client, "\n"); + if (is_attr(def->attrs, ATTR_IDEMPOTENT) || is_attr(def->attrs, ATTR_BROADCAST)) + { + print_client("_RpcMessage.RpcFlags = ( RPC_NCA_FLAGS_DEFAULT "); + if (is_attr(def->attrs, ATTR_IDEMPOTENT)) + fprintf(client, "| RPC_NCA_FLAGS_IDEMPOTENT "); + if (is_attr(def->attrs, ATTR_BROADCAST)) + fprintf(client, "| RPC_NCA_FLAGS_BROADCAST "); + fprintf(client, ");\n\n"); + } + if (implicit_handle) { print_client("_Handle = %s;\n", implicit_handle); diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 46418a33049..45471bb7ff4 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -67,6 +67,8 @@ unsigned char pointer_default = RPC_FC_UP; static int is_object_interface = FALSE; +/* are we inside a library block? */ +static int is_inside_library = FALSE; typedef struct list typelist_t; struct typenode { @@ -129,7 +131,17 @@ static int compute_method_indexes(type_t *iface); static char *gen_name(void); static void process_typedefs(var_list_t *names); static void check_arg(var_t *arg); +static void check_functions(const type_t *iface); static void check_all_user_types(ifref_list_t *ifaces); +static const attr_list_t *check_iface_attrs(const char *name, const attr_list_t *attrs); +static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs); +static attr_list_t *check_typedef_attrs(attr_list_t *attrs); +static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs); +static const attr_list_t *check_library_attrs(const char *name, const attr_list_t *attrs); +static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs); +static const attr_list_t *check_module_attrs(const char *name, const attr_list_t *attrs); +static const attr_list_t *check_coclass_attrs(const char *name, const attr_list_t *attrs); +const char *get_attr_display_name(enum attr_type type); #define tsENUM 1 #define tsSTRUCT 2 @@ -378,13 +390,15 @@ importlib: tIMPORTLIB '(' aSTRING ')' libraryhdr: tLIBRARY aIDENTIFIER { $$ = $2; } ; -library_start: attributes libraryhdr '{' { if (!parse_only) start_typelib($2, $1); +library_start: attributes libraryhdr '{' { check_library_attrs($2, $1); + if (!parse_only) start_typelib($2, $1); if (!parse_only && do_header) write_library($2, $1); if (!parse_only && do_idfile) write_libid($2, $1); + is_inside_library = TRUE; } ; librarydef: library_start imp_statements '}' - semicolon_opt { if (!parse_only) end_typelib(); } + semicolon_opt { if (!parse_only) end_typelib(); is_inside_library = FALSE; } ; m_args: { $$ = NULL; } @@ -447,6 +461,7 @@ attribute: { $$ = NULL; } | tASYNC { $$ = make_attr(ATTR_ASYNC); } | tAUTOHANDLE { $$ = make_attr(ATTR_AUTO_HANDLE); } | tBINDABLE { $$ = make_attr(ATTR_BINDABLE); } + | tBROADCAST { $$ = make_attr(ATTR_BROADCAST); } | tCALLAS '(' ident ')' { $$ = make_attrp(ATTR_CALLAS, $3); } | tCASE '(' expr_list_const ')' { $$ = make_attrp(ATTR_CASE, $3); } | tCONTEXTHANDLE { $$ = make_attrv(ATTR_CONTEXTHANDLE, 0); } @@ -653,7 +668,7 @@ field: s_field ';' { $$ = $1; } ; s_field: m_attributes type pident array { $$ = $3->var; - $$->attrs = $1; + $$->attrs = check_field_attrs($$->name, $1); set_type($$, $2, $3, $4, FALSE); free($3); } @@ -662,13 +677,10 @@ s_field: m_attributes type pident array { $$ = $3->var; funcdef: m_attributes type pident { var_t *v = $3->var; var_list_t *args = $3->args; - v->attrs = $1; + v->attrs = check_function_attrs(v->name, $1); set_type(v, $2, $3, NULL, FALSE); free($3); $$ = make_func(v, args); - if (is_attr(v->attrs, ATTR_IN)) { - error_loc("inapplicable attribute [in] for function '%s'\n",$$->def->name); - } } ; @@ -736,7 +748,7 @@ coclass: tCOCLASS aIDENTIFIER { $$ = make_class($2); } ; coclasshdr: attributes coclass { $$ = $2; - $$->attrs = $1; + $$->attrs = check_coclass_attrs($2->name, $1); if (!parse_only && do_header) write_coclass($$); if (!parse_only && do_idfile) @@ -768,7 +780,7 @@ dispinterfacehdr: attributes dispinterface { attr_t *attrs; $$ = $2; if ($$->defined) error_loc("multiple definition error\n"); attrs = make_attr(ATTR_DISPINTERFACE); - $$->attrs = append_attr( $1, attrs ); + $$->attrs = append_attr( check_dispiface_attrs($2->name, $1), attrs ); $$->ref = find_type("IDispatch", 0); if (!$$->ref) error_loc("IDispatch is undefined\n"); $$->defined = TRUE; @@ -816,7 +828,7 @@ interfacehdr: attributes interface { $$.interface = $2; pointer_default = get_attrv($1, ATTR_POINTERDEFAULT); is_object_interface = is_object($1); if ($2->defined) error_loc("multiple definition error\n"); - $2->attrs = $1; + $2->attrs = check_iface_attrs($2->name, $1); $2->defined = TRUE; if (!parse_only && do_header) write_forward($2); } @@ -826,6 +838,7 @@ interfacedef: interfacehdr inherit '{' int_statements '}' semicolon_opt { $$ = $1.interface; $$->ref = $2; $$->funcs = $4; + check_functions($$); compute_method_indexes($$); if (!parse_only && do_header) write_interface($$); if (!parse_only && local_stubs) write_locals(local_stubs, $$, TRUE); @@ -859,7 +872,7 @@ module: tMODULE aIDENTIFIER { $$ = make_type(0, NULL); $$->name = $2; $$->ki ; modulehdr: attributes module { $$ = $2; - $$->attrs = $1; + $$->attrs = check_module_attrs($2->name, $1); } ; @@ -929,7 +942,7 @@ type: tVOID { $$ = duptype(find_type("void", 0), 1); } | tSAFEARRAY '(' type ')' { $$ = make_safearray($3); } ; -typedef: tTYPEDEF m_attributes type pident_list { reg_typedefs($3, $4, $2); +typedef: tTYPEDEF m_attributes type pident_list { reg_typedefs($3, $4, check_typedef_attrs($2)); process_typedefs($4); } ; @@ -1025,12 +1038,21 @@ static str_list_t *append_str(str_list_t *list, char *str) static attr_list_t *append_attr(attr_list_t *list, attr_t *attr) { + attr_t *attr_existing; if (!attr) return list; if (!list) { list = xmalloc( sizeof(*list) ); list_init( list ); } + LIST_FOR_EACH_ENTRY(attr_existing, list, attr_t, entry) + if (attr_existing->type == attr->type) + { + parser_warning("duplicate attribute %s\n", get_attr_display_name(attr->type)); + /* use the last attribute, like MIDL does */ + list_remove(&attr_existing->entry); + break; + } list_add_tail( list, &attr->entry ); return list; } @@ -1168,7 +1190,7 @@ static expr_t *make_expr1(enum expr_type type, expr_t *expr) { expr_t *e; if (type == EXPR_ADDRESSOF && expr->type != EXPR_IDENTIFIER) - error("address-of operator applied to invalid expression\n"); + error_loc("address-of operator applied to invalid expression\n"); e = xmalloc(sizeof(expr_t)); e->type = type; e->ref = expr; @@ -1372,7 +1394,7 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ } } else if (!arr && ptr_attr) - error("%s: pointer attribute applied to non-pointer type\n", v->name); + error_loc("%s: pointer attribute applied to non-pointer type\n", v->name); } if (pident && pident->is_func) { @@ -1394,7 +1416,7 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ if (arr) LIST_FOR_EACH_ENTRY_REV(dim, arr, expr_t, entry) { if (sizeless) - error("%s: only the first array dimension can be unspecified\n", v->name); + error_loc("%s: only the first array dimension can be unspecified\n", v->name); if (dim->is_const) { @@ -1402,10 +1424,10 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ size_t size = type_memsize(v->type, &align); if (dim->cval <= 0) - error("%s: array dimension must be positive\n", v->name); + error_loc("%s: array dimension must be positive\n", v->name); if (0xffffffffuL / size < (unsigned long) dim->cval) - error("%s: total array size is too large\n", v->name); + error_loc("%s: total array size is too large\n", v->name); else if (0xffffuL < size * dim->cval) v->type = make_type(RPC_FC_LGFARRAY, v->type); else @@ -1431,10 +1453,10 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ atype = *ptype = duptype(*ptype, 0); if (atype->type == RPC_FC_SMFARRAY || atype->type == RPC_FC_LGFARRAY) - error("%s: cannot specify size_is for a fixed sized array\n", v->name); + error_loc("%s: cannot specify size_is for a fixed sized array\n", v->name); if (atype->type != RPC_FC_CARRAY && !is_ptr(atype)) - error("%s: size_is attribute applied to illegal type\n", v->name); + error_loc("%s: size_is attribute applied to illegal type\n", v->name); atype->type = RPC_FC_CARRAY; atype->size_is = dim; @@ -1442,7 +1464,7 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ ptype = &(*ptype)->ref; if (*ptype == NULL) - error("%s: too many expressions in size_is attribute\n", v->name); + error_loc("%s: too many expressions in size_is attribute\n", v->name); } ptype = &v->type; @@ -1460,14 +1482,14 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ else if (atype->type == RPC_FC_CARRAY) atype->type = RPC_FC_CVARRAY; else - error("%s: length_is attribute applied to illegal type\n", v->name); + error_loc("%s: length_is attribute applied to illegal type\n", v->name); atype->length_is = dim; } ptype = &(*ptype)->ref; if (*ptype == NULL) - error("%s: too many expressions in length_is attribute\n", v->name); + error_loc("%s: too many expressions in length_is attribute\n", v->name); } if (has_varconf && !last_array(v->type)) @@ -1543,6 +1565,9 @@ static var_t *make_var(char *name) v->type = NULL; v->attrs = NULL; v->eval = NULL; + v->loc_info.input_name = input_name ? input_name : "stdin"; + v->loc_info.line_number = line_number; + v->loc_info.near_text = parser_text; return v; } @@ -2114,12 +2139,287 @@ static void process_typedefs(pident_list_t *pidents) } } +struct allowed_attr +{ + unsigned int dce_compatible : 1; + unsigned int acf : 1; + unsigned int on_interface : 1; + unsigned int on_function : 1; + unsigned int on_arg : 1; + unsigned int on_type : 1; + unsigned int on_field : 1; + unsigned int on_library : 1; + unsigned int on_dispinterface : 1; + unsigned int on_module : 1; + unsigned int on_coclass : 1; + const char *display_name; +}; + +struct allowed_attr allowed_attr[] = +{ + /* attr { D ACF I Fn ARG T Fi L DI M C } */ + /* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "aggregatable" }, + /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" }, + /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, "async" }, + /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" }, + /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "bindable" }, + /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "broadcast" }, + /* ATTR_CALLAS */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "call_as" }, + /* ATTR_CALLCONV */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, + /* ATTR_CASE */ { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "case" }, + /* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "context_handle" }, + /* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" }, + /* ATTR_DEFAULT */ { 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, "default" }, + /* ATTR_DEFAULTCOLLELEM */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "defaultcollelem" }, + /* ATTR_DEFAULTVALUE_EXPR */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "defaultvalue" }, + /* ATTR_DEFAULTVALUE_STRING */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "defaultvalue" }, + /* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "defaultvtable" }, + /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, + /* ATTR_DISPLAYBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "displaybind" }, + /* ATTR_DLLNAME */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "dllname" }, + /* ATTR_DUAL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "dual" }, + /* ATTR_ENDPOINT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" }, + /* ATTR_ENTRY_ORDINAL */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "entry" }, + /* ATTR_ENTRY_STRING */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "entry" }, + /* ATTR_EXPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" }, + /* ATTR_HANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "handle" }, + /* ATTR_HELPCONTEXT */ { 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, "helpcontext" }, + /* ATTR_HELPFILE */ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpfile" }, + /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, "helpstring" }, + /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, "helpstringcontext" }, + /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpstringdll" }, + /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, "hidden" }, + /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, "id" }, + /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "idempotent" }, + /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, "iid_is" }, + /* ATTR_IMMEDIATEBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "immediatebind" }, + /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" }, + /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "in" }, + /* ATTR_INPUTSYNC */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, + /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, "length_is" }, + /* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "local" }, + /* ATTR_NONBROWSABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" }, + /* ATTR_NONCREATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "noncreatable" }, + /* ATTR_NONEXTENSIBLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "nonextensible" }, + /* ATTR_OBJECT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "object" }, + /* ATTR_ODL */ { 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, "odl" }, + /* ATTR_OLEAUTOMATION */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "oleautomation" }, + /* ATTR_OPTIONAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "optional" }, + /* ATTR_OUT */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "out" }, + /* ATTR_POINTERDEFAULT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "pointer_default" }, + /* ATTR_POINTERTYPE */ { 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, "ref, unique or ptr" }, + /* ATTR_PROPGET */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "propget" }, + /* ATTR_PROPPUT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "propput" }, + /* ATTR_PROPPUTREF */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "propputref" }, + /* ATTR_PUBLIC */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "public" }, + /* ATTR_RANGE */ { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, "range" }, + /* ATTR_READONLY */ { 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, "readonly" }, + /* ATTR_REQUESTEDIT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "requestedit" }, + /* ATTR_RESTRICTED */ { 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, "restricted" }, + /* ATTR_RETVAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "retval" }, + /* ATTR_SIZEIS */ { 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, "size_is" }, + /* ATTR_SOURCE */ { 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, "source" }, + /* ATTR_STRICTCONTEXTHANDLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "strict_context_handle" }, + /* ATTR_STRING */ { 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, "string" }, + /* ATTR_SWITCHIS */ { 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, "switch_is" }, + /* ATTR_SWITCHTYPE */ { 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, "switch_type" }, + /* ATTR_TRANSMITAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "transmit_as" }, + /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, "uuid" }, + /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "v1_enum" }, + /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "vararg" }, + /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, "version" }, + /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, "wire_marshal" }, +}; + +const char *get_attr_display_name(enum attr_type type) +{ + return allowed_attr[type].display_name; +} + +static const attr_list_t *check_iface_attrs(const char *name, const attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return attrs; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_interface) + error_loc("inapplicable attribute %s for interface %s\n", + allowed_attr[attr->type].display_name, name); + } + return attrs; +} + +static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return attrs; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_function) + error_loc("inapplicable attribute %s for function %s\n", + allowed_attr[attr->type].display_name, name); + } + return attrs; +} + static void check_arg(var_t *arg) { - type_t *t = arg->type; + const type_t *t = arg->type; + const attr_t *attr; if (t->type == 0 && ! is_var_ptr(arg)) error_loc("argument '%s' has void type\n", arg->name); + + if (arg->attrs) + { + LIST_FOR_EACH_ENTRY(attr, arg->attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_arg) + error_loc("inapplicable attribute %s for argument %s\n", + allowed_attr[attr->type].display_name, arg->name); + } + } +} + +static attr_list_t *check_typedef_attrs(attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return attrs; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_type) + error_loc("inapplicable attribute %s for typedef\n", + allowed_attr[attr->type].display_name); + } + return attrs; +} + +static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return attrs; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_field) + error_loc("inapplicable attribute %s for field %s\n", + allowed_attr[attr->type].display_name, name); + } + return attrs; +} + +static const attr_list_t *check_library_attrs(const char *name, const attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return attrs; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_library) + error_loc("inapplicable attribute %s for library %s\n", + allowed_attr[attr->type].display_name, name); + } + return attrs; +} + +static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return attrs; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_dispinterface) + error_loc("inapplicable attribute %s for dispinterface %s\n", + allowed_attr[attr->type].display_name, name); + } + return attrs; +} + +static const attr_list_t *check_module_attrs(const char *name, const attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return attrs; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_module) + error_loc("inapplicable attribute %s for module %s\n", + allowed_attr[attr->type].display_name, name); + } + return attrs; +} + +static const attr_list_t *check_coclass_attrs(const char *name, const attr_list_t *attrs) +{ + const attr_t *attr; + if (!attrs) return attrs; + LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) + { + if (!allowed_attr[attr->type].on_coclass) + error_loc("inapplicable attribute %s for coclass %s\n", + allowed_attr[attr->type].display_name, name); + } + return attrs; +} + +/* checks that arguments for a function make sense for marshalling and unmarshalling */ +static void check_remoting_args(const func_t *func) +{ + const char *funcname = func->def->name; + const var_t *arg; + + if (func->args) LIST_FOR_EACH_ENTRY( arg, func->args, const var_t, entry ) + { + int ptr_level = 0; + const type_t *type = arg->type; + int is_wire_marshal = 0; + int is_context_handle = 0; + + /* get pointer level and fundamental type for the argument */ + for (;;) + { + if (!is_wire_marshal && is_attr(type->attrs, ATTR_WIREMARSHAL)) + is_wire_marshal = 1; + if (!is_context_handle && is_attr(type->attrs, ATTR_CONTEXTHANDLE)) + is_context_handle = 1; + if (type->kind == TKIND_ALIAS) + type = type->orig; + else if (is_ptr(type)) + { + ptr_level++; + type = type->ref; + } + else + break; + } + + /* check that [out] parameters have enough pointer levels */ + if (is_attr(arg->attrs, ATTR_OUT)) + { + if (!is_array(type)) + { + if (!ptr_level) + error_loc_info(&arg->loc_info, "out parameter \'%s\' of function \'%s\' is not a pointer\n", arg->name, funcname); + if (type->type == RPC_FC_IP && ptr_level == 1) + error_loc_info(&arg->loc_info, "out interface pointer \'%s\' of function \'%s\' is not a double pointer\n", arg->name, funcname); + } + } + + if (type->type == 0 && !is_attr(arg->attrs, ATTR_IIDIS) && !is_wire_marshal && !is_context_handle) + error_loc_info(&arg->loc_info, "parameter \'%s\' of function \'%s\' cannot derive from void *\n", arg->name, funcname); + else if (type->type == RPC_FC_FUNCTION) + error_loc_info(&arg->loc_info, "parameter \'%s\' of function \'%s\' cannot be a function pointer\n", arg->name, funcname); + } +} + +static void check_functions(const type_t *iface) +{ + if (!is_inside_library && !is_attr(iface->attrs, ATTR_LOCAL)) + { + const func_t *func; + if (iface->funcs) LIST_FOR_EACH_ENTRY( func, iface->funcs, const func_t, entry ) + { + if (!is_attr(func->def->attrs, ATTR_LOCAL)) + check_remoting_args(func); + } + } } static void check_all_user_types(ifref_list_t *ifrefs) diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c index 100ae89e55b..ac2815cc3f2 100644 --- a/tools/widl/typelib.c +++ b/tools/widl/typelib.c @@ -241,7 +241,7 @@ unsigned short get_type_vt(type_t *t) return 0; } -void start_typelib(char *name, attr_list_t *attrs) +void start_typelib(char *name, const attr_list_t *attrs) { in_typelib++; if (!do_typelib) return; diff --git a/tools/widl/typelib.h b/tools/widl/typelib.h index b17387dfc39..9dce14ae072 100644 --- a/tools/widl/typelib.h +++ b/tools/widl/typelib.h @@ -22,7 +22,7 @@ #define __WIDL_TYPELIB_H extern int in_typelib; -extern void start_typelib(char *name, attr_list_t *attrs); +extern void start_typelib(char *name, const attr_list_t *attrs); extern void end_typelib(void); extern void add_typelib_entry(type_t *t); extern void add_importlib(const char *name); diff --git a/tools/widl/utils.c b/tools/widl/utils.c index ed950f6095d..9c4452fa6af 100644 --- a/tools/widl/utils.c +++ b/tools/widl/utils.c @@ -33,6 +33,8 @@ #include "utils.h" #include "parser.h" +#define CURRENT_LOCATION { input_name ? input_name : "stdin", line_number, parser_text } + static const int want_near_indication = 0; static void make_print(char *str) @@ -45,17 +47,17 @@ static void make_print(char *str) } } -static void generic_msg(const char *s, const char *t, const char *n, va_list ap) +static void generic_msg(const loc_info_t *loc_info, const char *s, const char *t, va_list ap) { - fprintf(stderr, "%s:%d: %s: ", input_name ? input_name : "stdin", line_number, t); + fprintf(stderr, "%s:%d: %s: ", loc_info->input_name, loc_info->line_number, t); vfprintf(stderr, s, ap); if (want_near_indication) { char *cpy; - if(n) + if(loc_info->near_text) { - cpy = xstrdup(n); + cpy = xstrdup(loc_info->near_text); make_print(cpy); fprintf(stderr, " near '%s'", cpy); free(cpy); @@ -67,9 +69,10 @@ static void generic_msg(const char *s, const char *t, const char *n, va_list ap) /* yyerror: yacc assumes this is not newline terminated. */ int parser_error(const char *s, ...) { + loc_info_t cur_location = CURRENT_LOCATION; va_list ap; va_start(ap, s); - generic_msg(s, "Error", parser_text, ap); + generic_msg(&cur_location, s, "Error", ap); fprintf(stderr, "\n"); va_end(ap); exit(1); @@ -78,18 +81,29 @@ int parser_error(const char *s, ...) void error_loc(const char *s, ...) { + loc_info_t cur_loc = CURRENT_LOCATION; + va_list ap; + va_start(ap, s); + generic_msg(&cur_loc, s, "Error", ap); + va_end(ap); + exit(1); +} + +void error_loc_info(const loc_info_t *loc_info, const char *s, ...) +{ va_list ap; va_start(ap, s); - generic_msg(s, "Error", parser_text, ap); + generic_msg(loc_info, s, "Error", ap); va_end(ap); exit(1); } int parser_warning(const char *s, ...) { + loc_info_t cur_loc = CURRENT_LOCATION; va_list ap; va_start(ap, s); - generic_msg(s, "Warning", parser_text, ap); + generic_msg(&cur_loc, s, "Warning", ap); va_end(ap); return 0; } @@ -113,6 +127,14 @@ void warning(const char *s, ...) va_end(ap); } +void warning_loc_info(const loc_info_t *loc_info, const char *s, ...) +{ + va_list ap; + va_start(ap, s); + generic_msg(loc_info, s, "Warning", ap); + va_end(ap); +} + void chat(const char *s, ...) { if(debuglevel & DEBUGLEVEL_CHAT) diff --git a/tools/widl/utils.h b/tools/widl/utils.h index 7d6ce5c5f30..73adf54ad80 100644 --- a/tools/widl/utils.h +++ b/tools/widl/utils.h @@ -37,7 +37,9 @@ int parser_error(const char *s, ...) __attribute__((format (printf, 1, 2))); int parser_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); void error_loc(const char *s, ...) __attribute__((format (printf, 1, 2))); void error(const char *s, ...) __attribute__((format (printf, 1, 2))); +void error_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3))); void warning(const char *s, ...) __attribute__((format (printf, 1, 2))); +void warning_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3))); void chat(const char *s, ...) __attribute__((format (printf, 1, 2))); char *dup_basename(const char *name, const char *ext); diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 259049e1a4c..89d593a8358 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -36,6 +36,7 @@ typedef GUID UUID; #define RPC_FC_FUNCTION 0xfe +typedef struct _loc_info_t loc_info_t; typedef struct _attr_t attr_t; typedef struct _expr_t expr_t; typedef struct _type_t type_t; @@ -69,6 +70,7 @@ enum attr_type ATTR_ASYNC, ATTR_AUTO_HANDLE, ATTR_BINDABLE, + ATTR_BROADCAST, ATTR_CALLAS, ATTR_CALLCONV, /* calling convention pseudo-attribute */ ATTR_CASE, @@ -175,6 +177,13 @@ enum type_kind TKIND_MAX }; +struct _loc_info_t +{ + const char *input_name; + int line_number; + const char *near_text; +}; + struct str_list_entry_t { char *str; @@ -239,6 +248,8 @@ struct _var_t { attr_list_t *attrs; expr_t *eval; + struct _loc_info_t loc_info; + /* parser-internal */ struct list entry; }; @@ -307,7 +318,7 @@ struct _importlib_t { struct _typelib_t { char *name; char *filename; - attr_list_t *attrs; + const attr_list_t *attrs; struct list entries; struct list importlibs; }; diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 06ac5b20737..56bff46bf28 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -1319,10 +1319,14 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int expr_t *expr = attr->u.pval; switch(attr->type) { case ATTR_BINDABLE: - funcflags |= 0x4; /* FUNCFLAG_BINDABLE */ + funcflags |= 0x4; /* FUNCFLAG_FBINDABLE */ + break; + /* FIXME: FUNCFLAG_FDEFAULTBIND */ + case ATTR_DEFAULTCOLLELEM: + funcflags |= 0x100; /* FUNCFLAG_FDEFAULTCOLLELEM */ break; case ATTR_DISPLAYBIND: - funcflags |= 0x10; /* FUNCFLAG_DISPLAYBIND */ + funcflags |= 0x10; /* FUNCFLAG_FDISPLAYBIND */ break; case ATTR_ENTRY_ORDINAL: extra_attr = max(extra_attr, 3); @@ -1351,8 +1355,11 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int case ATTR_ID: id = expr->cval; break; + case ATTR_IMMEDIATEBIND: + funcflags |= 0x1000; /* FUNCFLAG_FIMMEDIATEBIND */ + break; case ATTR_NONBROWSABLE: - funcflags |= 0x400; /* FUNCFLAG_NONBROWSABLE */ + funcflags |= 0x400; /* FUNCFLAG_FNONBROWSABLE */ break; case ATTR_OUT: break; @@ -1365,9 +1372,18 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int case ATTR_PROPPUTREF: invokekind = 0x8; /* INVOKE_PROPERTYPUTREF */ break; + /* FIXME: FUNCFLAG_FREPLACEABLE */ + case ATTR_REQUESTEDIT: + funcflags |= 0x8; /* FUNCFLAG_FREQUESTEDIT */ + break; case ATTR_RESTRICTED: funcflags |= 0x1; /* FUNCFLAG_FRESTRICTED */ break; + case ATTR_SOURCE: + funcflags |= 0x2; /* FUNCFLAG_FSOURCE */ + break; + /* FIXME: FUNCFLAG_FUIDEFAULT */ + /* FIXME: FUNCFLAG_FUSESGETLASTERROR */ case ATTR_VARARG: if (num_optional || num_defaults) warning("add_func_desc: ignoring vararg in function with optional or defaultvalue params\n"); @@ -1375,7 +1391,6 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int num_optional = -1; break; default: - warning("add_func_desc: ignoring attr %d\n", attr->type); break; } } @@ -1597,23 +1612,44 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var) if (var->attrs) LIST_FOR_EACH_ENTRY( attr, var->attrs, const attr_t, entry ) { expr_t *expr = attr->u.pval; switch(attr->type) { + case ATTR_BINDABLE: + varflags |= 0x04; /* VARFLAG_FBINDABLE */ + break; + /* FIXME: VARFLAG_FDEFAULTBIND */ + case ATTR_DEFAULTCOLLELEM: + varflags |= 0x100; /* VARFLAG_FDEFAULTCOLLELEM */ + break; + case ATTR_DISPLAYBIND: + varflags |= 0x10; /* VARFLAG_FDISPLAYBIND */ + break; case ATTR_HIDDEN: varflags |= 0x40; /* VARFLAG_FHIDDEN */ break; case ATTR_ID: id = expr->cval; break; + case ATTR_IMMEDIATEBIND: + varflags |= 0x1000; /* VARFLAG_FIMMEDIATEBIND */ + break; + case ATTR_NONBROWSABLE: + varflags |= 0x400; /* VARFLAG_FNONBROWSABLE */ + break; case ATTR_READONLY: varflags |= 0x01; /* VARFLAG_FREADONLY */ break; + /* FIXME: VARFLAG_FREPLACEABLE */ + break; + case ATTR_REQUESTEDIT: + varflags |= 0x08; /* VARFLAG_FREQUESTEDIT */ + break; case ATTR_RESTRICTED: varflags |= 0x80; /* VARFLAG_FRESTRICTED */ break; case ATTR_SOURCE: varflags |= 0x02; /* VARFLAG_FSOURCE */ break; + /* FIXME: VARFLAG_FUIDEFAULT */ default: - warning("AddVarDesc: unhandled attr type %d\n", attr->type); break; } } @@ -1801,9 +1837,6 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_ typeinfo->flags |= 0x20; /* TYPEFLAG_FCONTROL */ break; - case ATTR_DISPINTERFACE: - break; - case ATTR_DLLNAME: { int offset = ctl2_alloc_string(typelib, attr->u.pval); @@ -1840,8 +1873,7 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_ typeinfo->flags |= 0x10; /* TYPEFLAG_FHIDDEN */ break; - case ATTR_LOCAL: - break; + /* FIXME: TYPEFLAG_FLICENSED */ case ATTR_NONCREATABLE: typeinfo->flags &= ~0x2; /* TYPEFLAG_FCANCREATE */ @@ -1851,18 +1883,15 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_ typeinfo->flags |= 0x80; /* TYPEFLAG_FNONEXTENSIBLE */ break; - case ATTR_OBJECT: - break; - - case ATTR_ODL: - break; - case ATTR_OLEAUTOMATION: typeinfo->flags |= 0x100; /* TYPEFLAG_FOLEAUTOMATION */ break; - case ATTR_PUBLIC: - break; + /* FIXME: TYPEFLAG_FPREDCLID */ + + /* FIXME: TYPEFLAG_FPROXY */ + + /* FIXME: TYPEFLAG_FREPLACEABLE */ case ATTR_RESTRICTED: typeinfo->flags |= 0x200; /* TYPEFLAG_FRESTRICTED */ @@ -1885,7 +1914,6 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_ break; default: - warning("create_msft_typeinfo: ignoring attr %d\n", attr->type); break; } } @@ -2104,6 +2132,9 @@ static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls) case ATTR_DEFAULT: ref->flags |= 0x1; /* IMPLTYPEFLAG_FDEFAULT */ break; + case ATTR_DEFAULTVTABLE: + ref->flags |= 0x8; /* IMPLTYPEFLAG_FDEFAULTVTABLE */ + break; case ATTR_RESTRICTED: ref->flags |= 0x4; /* IMPLTYPEFLAG_FRESTRICTED */ break; diff --git a/tools/wine.desktop b/tools/wine.desktop index a499530adfd..2be9b53ad0e 100644 --- a/tools/wine.desktop +++ b/tools/wine.desktop @@ -7,6 +7,6 @@ Name[nl]=Wine Windows-emulator Name[sv]=Windows-emulatorn Wine Name[ru]=Wine Эмулятор Windows Name[fr]=Émulateur Windows Wine -Exec=wine %f +Exec=wine start /unix %f MimeType=application/x-ms-dos-executable;application/x-msdos-program;application/x-msdownload;application/exe;application/x-exe;application/dos-exe;vms/exe;application/x-winexe;application/msdos-windows;application/x-zip-compressed;application/x-executable; NoDisplay=true diff --git a/tools/wine.inf b/tools/wine.inf.in similarity index 99% rename from tools/wine.inf rename to tools/wine.inf.in index f3cda7bcfc7..7f022845b61 100644 --- a/tools/wine.inf +++ b/tools/wine.inf.in @@ -1,4 +1,5 @@ ;; .INF script for the basic Wine configuration +;; Version: @PACKAGE_STRING@ ;; ;; This should be run through setupapi: ;; rundll32 setupapi.dll,InstallHinfSection DefaultInstall 128 wine.inf @@ -74,6 +75,14 @@ AddReg=\ Timezones,\ VersionInfo +[DefaultInstall.Services] +AddService=MountMgr,0x800,MountMgrService +AddService=Spooler,0,SpoolerService + +[DefaultInstall.NT.Services] +AddService=MountMgr,0x800,MountMgrService +AddService=Spooler,0,SpoolerService + [Strings] MciExtStr="Software\Microsoft\Windows NT\CurrentVersion\MCI Extensions" Mci32Str="Software\Microsoft\Windows NT\CurrentVersion\MCI32" @@ -83,7 +92,6 @@ CurrentVersion="Software\Microsoft\Windows\CurrentVersion" CurrentVersionNT="Software\Microsoft\Windows NT\CurrentVersion" FontSubStr="Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes" Control="System\CurrentControlSet\Control" -Services="System\CurrentControlSet\Services" [Classes] HKCR,.avi,"Content Type",2,"video/avi" @@ -2207,6 +2215,11 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,wintrust.dll,1 [FakeDllsSection] +; create some directories first +10,inf, +10,system, +10,temp, +11,spool\drivers\color, 10,,explorer.exe 10,,hh.exe 10,,notepad.exe @@ -2657,22 +2670,25 @@ HKLM,%CurrentVersionNT%\Time Zones\Yakutsk Standard Time,"Dlt",,"Yakutsk Dayligh HKLM,%CurrentVersionNT%\Time Zones\Yakutsk Standard Time,"Std",,"Yakutsk Standard Time" HKLM,%CurrentVersionNT%\Time Zones\Yakutsk Standard Time,"TZI",1,e4,fd,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,03,00,00,00,00,00,00,00,00,00,03,00,00,00,05,00,02,00,00,00,00,00,00,00 +[MountMgrService] +Description="Device mounting service" +DisplayName="Mount Manager" +ServiceBinary="%12%\mountmgr.sys" +ServiceType=1 +StartType=2 +ErrorControl=1 + +[SpoolerService] +Description="Loads files to memory for later printing" +DisplayName="Print Spooler" +ServiceBinary="%11\spoolsv.exe" +ServiceType=1 +StartType=4 +ErrorControl=1 +LoadOrderGroup="SpoolerGroup" + [Services] -HKLM,"%Services%\Spooler","Description",,"Loads files to memory for later printing." -HKLM,"%Services%\Spooler","DisplayName",,"Print Spooler" -HKLM,"%Services%\Spooler","ErrorControl",0x10001,1 -HKLM,"%Services%\Spooler","Group",,"SpoolerGroup" -HKLM,"%Services%\Spooler","ImagePath",,"spoolsv.exe" -HKLM,"%Services%\Spooler","ObjectName",,"LocalSystem" -HKLM,"%Services%\Spooler","Start",0x10001,4 -HKLM,"%Services%\Spooler","Type",0x10001,0x110 -HKLM,"%Services%\MountMgr","Description",,"Device mounting service." -HKLM,"%Services%\MountMgr","DisplayName",,"Mount Manager" -HKLM,"%Services%\MountMgr","ErrorControl",0x10001,1 -HKLM,"%Services%\MountMgr","ImagePath",,"mountmgr.sys" -HKLM,"%Services%\MountMgr","Start",0x10001,2 -HKLM,"%Services%\MountMgr","Type",0x10001,1 -HKLM,"%Services%\VxD\MSTCP",,,"" +HKLM,"System\CurrentControlSet\Services\VxD\MSTCP",,,"" [VersionInfo] HKLM,%CurrentVersionNT%,"CurrentVersion",2,"5.1" diff --git a/tools/winedump/emf.c b/tools/winedump/emf.c index f5375d03df3..f539ea6fe4f 100644 --- a/tools/winedump/emf.c +++ b/tools/winedump/emf.c @@ -36,6 +36,28 @@ #include "winbase.h" #include "wingdi.h" +static const char *debugstr_wn(const WCHAR *wstr, int n) +{ + static char buf[80]; + char *p; + int i; + + if (!wstr) return "(null)"; + + i = 0; + p = buf; + *p++ = '\"'; + while (i < n && i < sizeof(buf) - 2 && wstr[i]) + { + if (wstr[i] < 127) *p++ = wstr[i]; + else *p++ = '.'; + i++; + } + *p++ = '\"'; + *p = 0; + return buf; +} + static unsigned int read_int(const unsigned char *buffer) { return buffer[0] @@ -62,32 +84,162 @@ static int dump_emfrecord(void) switch(type) { EMRCASE(EMR_HEADER); + EMRCASE(EMR_POLYBEZIER); EMRCASE(EMR_POLYGON); EMRCASE(EMR_POLYLINE); + EMRCASE(EMR_POLYBEZIERTO); + EMRCASE(EMR_POLYLINETO); + EMRCASE(EMR_POLYPOLYLINE); + EMRCASE(EMR_POLYPOLYGON); EMRCASE(EMR_SETWINDOWEXTEX); EMRCASE(EMR_SETWINDOWORGEX); EMRCASE(EMR_SETVIEWPORTEXTEX); + EMRCASE(EMR_SETVIEWPORTORGEX); + EMRCASE(EMR_SETBRUSHORGEX); EMRCASE(EMR_EOF); + EMRCASE(EMR_SETPIXELV); + EMRCASE(EMR_SETMAPPERFLAGS); EMRCASE(EMR_SETMAPMODE); + EMRCASE(EMR_SETBKMODE); EMRCASE(EMR_SETPOLYFILLMODE); EMRCASE(EMR_SETROP2); + EMRCASE(EMR_SETSTRETCHBLTMODE); + EMRCASE(EMR_SETTEXTALIGN); + EMRCASE(EMR_SETCOLORADJUSTMENT); + EMRCASE(EMR_SETTEXTCOLOR); + EMRCASE(EMR_SETBKCOLOR); + EMRCASE(EMR_OFFSETCLIPRGN); + EMRCASE(EMR_MOVETOEX); + EMRCASE(EMR_SETMETARGN); + EMRCASE(EMR_EXCLUDECLIPRECT); + EMRCASE(EMR_INTERSECTCLIPRECT); + EMRCASE(EMR_SCALEVIEWPORTEXTEX); EMRCASE(EMR_SCALEWINDOWEXTEX); EMRCASE(EMR_SAVEDC); + EMRCASE(EMR_RESTOREDC); + EMRCASE(EMR_SETWORLDTRANSFORM); + EMRCASE(EMR_MODIFYWORLDTRANSFORM); EMRCASE(EMR_SELECTOBJECT); EMRCASE(EMR_CREATEPEN); EMRCASE(EMR_CREATEBRUSHINDIRECT); EMRCASE(EMR_DELETEOBJECT); + EMRCASE(EMR_ANGLEARC); + EMRCASE(EMR_ELLIPSE); EMRCASE(EMR_RECTANGLE); + EMRCASE(EMR_ROUNDRECT); + EMRCASE(EMR_ARC); + EMRCASE(EMR_CHORD); + EMRCASE(EMR_PIE); EMRCASE(EMR_SELECTPALETTE); + EMRCASE(EMR_CREATEPALETTE); + EMRCASE(EMR_SETPALETTEENTRIES); + EMRCASE(EMR_RESIZEPALETTE); + EMRCASE(EMR_REALIZEPALETTE); + EMRCASE(EMR_EXTFLOODFILL); + EMRCASE(EMR_LINETO); + EMRCASE(EMR_ARCTO); + EMRCASE(EMR_POLYDRAW); + EMRCASE(EMR_SETARCDIRECTION); + EMRCASE(EMR_SETMITERLIMIT); + EMRCASE(EMR_BEGINPATH); + EMRCASE(EMR_ENDPATH); + EMRCASE(EMR_CLOSEFIGURE); + EMRCASE(EMR_FILLPATH); + EMRCASE(EMR_STROKEANDFILLPATH); + EMRCASE(EMR_STROKEPATH); + EMRCASE(EMR_FLATTENPATH); + EMRCASE(EMR_WIDENPATH); + EMRCASE(EMR_SELECTCLIPPATH); + EMRCASE(EMR_ABORTPATH); EMRCASE(EMR_GDICOMMENT); + EMRCASE(EMR_FILLRGN); + EMRCASE(EMR_FRAMERGN); + EMRCASE(EMR_INVERTRGN); + EMRCASE(EMR_PAINTRGN); EMRCASE(EMR_EXTSELECTCLIPRGN); - EMRCASE(EMR_EXTCREATEFONTINDIRECTW); - EMRCASE(EMR_EXTTEXTOUTW); + EMRCASE(EMR_BITBLT); + EMRCASE(EMR_STRETCHBLT); + EMRCASE(EMR_MASKBLT); + EMRCASE(EMR_PLGBLT); + EMRCASE(EMR_SETDIBITSTODEVICE); + EMRCASE(EMR_STRETCHDIBITS); + + case EMR_EXTCREATEFONTINDIRECTW: + { + const EMREXTCREATEFONTINDIRECTW *pf = (const EMREXTCREATEFONTINDIRECTW *)PRD(offset, 4); + const LOGFONTW *plf = &pf->elfw.elfLogFont; + + printf("%-20s %08x\n", "EMR_EXTCREATEFONTINDIRECTW", length); + printf("(%d %d %d %d %x out %d clip %x quality %d charset %d) %s %s %s %s\n", + plf->lfHeight, plf->lfWidth, + plf->lfEscapement, plf->lfOrientation, + plf->lfPitchAndFamily, + plf->lfOutPrecision, plf->lfClipPrecision, + plf->lfQuality, plf->lfCharSet, + debugstr_wn(plf->lfFaceName, LF_FACESIZE), + plf->lfWeight > 400 ? "Bold" : "", + plf->lfItalic ? "Italic" : "", + plf->lfUnderline ? "Underline" : ""); + break; + } + + EMRCASE(EMR_EXTTEXTOUTA); + + case EMR_EXTTEXTOUTW: + { + const EMREXTTEXTOUTW *etoW = (const EMREXTTEXTOUTW *)PRD(offset, 4); + + printf("%-20s %08x\n", "EMR_EXTTEXTOUTW", length); + printf("pt (%d,%d) rect (%d,%d - %d,%d) flags %#x, %s\n", + etoW->emrtext.ptlReference.x, etoW->emrtext.ptlReference.y, + etoW->emrtext.rcl.left, etoW->emrtext.rcl.top, + etoW->emrtext.rcl.right, etoW->emrtext.rcl.bottom, + etoW->emrtext.fOptions, + debugstr_wn((LPCWSTR)((const BYTE *)etoW + etoW->emrtext.offString), etoW->emrtext.nChars)); + break; + } + + EMRCASE(EMR_POLYBEZIER16); EMRCASE(EMR_POLYGON16); EMRCASE(EMR_POLYLINE16); + EMRCASE(EMR_POLYBEZIERTO16); + EMRCASE(EMR_POLYLINETO16); + EMRCASE(EMR_POLYPOLYLINE16); + EMRCASE(EMR_POLYPOLYGON16); + EMRCASE(EMR_POLYDRAW16); + EMRCASE(EMR_CREATEMONOBRUSH); + EMRCASE(EMR_CREATEDIBPATTERNBRUSHPT); + EMRCASE(EMR_EXTCREATEPEN); + EMRCASE(EMR_POLYTEXTOUTA); + EMRCASE(EMR_POLYTEXTOUTW); + EMRCASE(EMR_SETICMMODE); + EMRCASE(EMR_CREATECOLORSPACE); + EMRCASE(EMR_SETCOLORSPACE); + EMRCASE(EMR_DELETECOLORSPACE); + EMRCASE(EMR_GLSRECORD); + EMRCASE(EMR_GLSBOUNDEDRECORD); + EMRCASE(EMR_PIXELFORMAT); + EMRCASE(EMR_DRAWESCAPE); + EMRCASE(EMR_EXTESCAPE); + EMRCASE(EMR_STARTDOC); + EMRCASE(EMR_SMALLTEXTOUT); + EMRCASE(EMR_FORCEUFIMAPPING); + EMRCASE(EMR_NAMEDESCAPE); + EMRCASE(EMR_COLORCORRECTPALETTE); + EMRCASE(EMR_SETICMPROFILEA); + EMRCASE(EMR_SETICMPROFILEW); + EMRCASE(EMR_ALPHABLEND); + EMRCASE(EMR_SETLAYOUT); + EMRCASE(EMR_TRANSPARENTBLT); + EMRCASE(EMR_RESERVED_117); + EMRCASE(EMR_GRADIENTFILL); + EMRCASE(EMR_SETLINKEDUFI); + EMRCASE(EMR_SETTEXTJUSTIFICATION); + EMRCASE(EMR_COLORMATCHTOTARGETW); + EMRCASE(EMR_CREATECOLORSPACEW); default: - printf("%08x %08x\n",type,length); + printf("%u %08x\n", type, length); break; } diff --git a/tools/wineprefixcreate.in b/tools/wineprefixcreate.in index d91a3f69951..7eed5467e6e 100644 --- a/tools/wineprefixcreate.in +++ b/tools/wineprefixcreate.in @@ -79,21 +79,7 @@ then LD_LIBRARY_PATH="$topdir/libs/wine" fi export LD_LIBRARY_PATH - - # find the source directory - link=`readlink "$WINELOADER"` - if [ -z "$link" ] - then - topsrcdir="$topdir" - else - link=`dirname "$link"` - case "$link" in - /*) topsrcdir=`cd "$link/.." && pwd` ;; - *) topsrcdir=`cd "$topdir/$link/.." && pwd` ;; - esac - fi - dlldir="$topdir/programs" - datadir="$topsrcdir/tools" + datadir="$topdir/tools" fi while [ $# -gt 0 ] @@ -153,15 +139,7 @@ CROOT="$WINEPREFIX/dosdevices/c:" for i in \ "$CROOT/windows" \ - "$CROOT/windows/command" \ - "$CROOT/windows/fonts" \ - "$CROOT/windows/inf" \ - "$CROOT/windows/system" \ - "$CROOT/windows/system32" \ - "$CROOT/windows/system32/spool" \ - "$CROOT/windows/system32/spool/drivers" \ - "$CROOT/windows/system32/spool/drivers/color" \ - "$CROOT/windows/temp" + "$CROOT/windows/inf" do [ -d "$i" ] || mkdir "$i" done -- 2.11.4.GIT