diff -Nru wine1.7-1.7.15/ANNOUNCE wine1.7-1.7.16/ANNOUNCE --- wine1.7-1.7.15/ANNOUNCE 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/ANNOUNCE 2014-04-04 19:13:44.000000000 +0000 @@ -1,15 +1,15 @@ -The Wine development release 1.7.15 is now available. +The Wine development release 1.7.16 is now available. What's new in this release (see below for details): - - New Task Scheduler service. - - Many regression test fixes. - - Support for exception unwinding in VBScript. + - More regression test fixes. + - String arrays better supported in the IDL compiler. + - Initial stubs for DirectX Video Acceleration. - Various bug fixes. The source is available from the following locations: - http://prdownloads.sourceforge.net/wine/wine-1.7.15.tar.bz2 - http://mirrors.ibiblio.org/wine/source/1.7/wine-1.7.15.tar.bz2 + http://prdownloads.sourceforge.net/wine/wine-1.7.16.tar.bz2 + http://mirrors.ibiblio.org/wine/source/1.7/wine-1.7.16.tar.bz2 Binary packages for various distributions will be available from: @@ -25,355 +25,349 @@ ---------------------------------------------------------------- -Bugs fixed in 1.7.15 (total 53): +Bugs fixed in 1.7.16 (total 50): - 5928 Timeless Time and Expense 3.0: bad fields in calendar/time entries - 8697 Visual Pinball : graphics is very messy - 13638 dogfood: xampp won't work properly - 20387 Seagate Crystal Reports 6 installer crashes due to incorrect ordinal numbering of 'odbccp32.dll' exports - 20623 Multiple VB6 apps complain with "Run-time error '445'" (Swiftkit, VMXBuider 0.8)(IFileSystem3::CreateTextFile method implementation needed) - 23448 F1 2000 and F1 Championship Season 2000 crash at startup - 23570 Cannot play songs using Songbird 1.4.3 and 1.7.3 - 23930 Drakensang Dark Eye crash on start (needs D3DXCreateBox) - 26235 Pioneer DJs 1.6 hangs on startup (SetupDiEnumDeviceInterfaces needs to retain DeviceInterfaceData->cbSize upon reset) - 26339 MSXML, HTTPS GET don't work - 27060 Multiple applications need Network Configuration Component (netcfgx.dll) (iNodeSetup, CommView, Shan Xun 802.1x client) - 27307 Program Error - Program crashes on open - 27612 'Moorhuhn - Juwel der Finsternis' crashes on startup - 27831 Tic Tac Toe Game (vbscript) cannot be played (colon used for placing multiple statements on the same line in select case statements) - 27892 Iexplore blank page or binary - 28987 Some video files fail to play in Windows Media Player 9/10 (using native wmvcore/wmp dlls) - 29528 Google SketchUp 8 crashes on exit - 29679 Quicken 2012 aborts at startup. - 29785 Band-in-a-Box 2012 crashes on startup - 30043 Infinite loop in mshtml navigate - 30809 ConEmu: Fails to start cmd.exe - 31377 Symantec VIP Access no longer installs (needs WinMGMTS object stub) - 31423 AmiBroker fails on startup - 31437 Multiple applications and games need wmvcore.dll.WMCreateProfileManager (Tinker, Luxology Modo, aTube Catcher, iMesh 7.x) - 31724 SolidWorks Explorer 2012 fails to install, reporting 'Could not get typeinfo of hreftype 384 for VT_USERDEFINED, hr = 0x80004005' - 31968 Multiple applications need ITextStream get_AtEndOfStream method implementation (wPrime 2.09, SolidWorks Explorer 2014) - 31970 Microstation 8i installer doesn't work (needs VBScript GetObject implementation) - 32109 CorelDRAW 12 fails to install - 32161 IAudioClient should support IMarshal - 33191 installer of AliWangwang: some text can't be displayed normally - 34154 iTunes 7 does not install - 34536 3DMark06 crashes with native d3dx9_36.dll - 34717 Games GUI (Roller Coaster Tycoon 2) does not load anymore - 34815 iexplore hotmail.com needs IHTMLFrameBase::get_onload - 35110 LabChart Reader 8 installer ends prematurely (VBScript parser fails to recognize class variables declared with 'Dim' within class statement) - 35390 Samsung Magician v4.0 fails to install (SWbemLocator.ConnectServer method dispargs are optional) - 35445 CPCE v4.1 (Coral Point Count with Excel extensions, VB6 app) fails on startup (needs scrrun IFolder::get_Path) - 35530 fjords is very slow because of GetLocaleInfoW checking registry - 35575 gdi32:font Windows 8.1 failures (johab) - 35596 Multiple applications and games crash due to GetNumaHighestNodeNumber stub (64-bit ApexDC++, CrossFire-Downloader, Moorhuhn) - 35644 Spin Tires crashes with arb shaders - 35645 Sid Meier's Ace Patrol (Steam) crashes on unimplemented function msvcp110.dll._Xtime_get_ticks - 35705 Stability issues in certain games with recent Wine (maybe Nvidia driver related) - 35753 CURA 14.01 installed correctly but crashes when started - 35762 Tic Tac Toe Game (vbscript) cannot be played (parenthesis syntax for specifying arrays as function arguments) - 35769 Target attributes is ignored when submitting form - 35778 Samsung Magician v4.0 fails to install (widl emits incorrect var type for IDispatch* defaultvalue) - 35794 iTunes 7 installer aborts early (failure to find builtin 'RegExp' class) - 35799 Mortal Online (MMORPG) client 1.75.00.07 crashes on login (missing Win32_LogicalDisk WMI class 'VolumeSerialNumber' property) - 35803 Chessmaster Grandmaster Polish Edition installer crashes - 35806 Multiple VB6 apps complain with "Run-time error '445'" (Swiftkit)(ITextStream::WriteLine method implementation needed) - 35816 iTunes 7 installer aborts early ('Err' object 'Clear' and 'Number' methods are stubs) - 35819 "A Very Long Rope to the Top of the Sky" fails to start. + 11114 World in Conflict complains with "No appropriate 3D graphics card detected" (b3DAccelerationExists and b3DAccelerationEnabled dxdiagn properties missing) + 12388 Commandos 3: read_from_framebuffer_texture error (glCopyTexSubImage2D) + 15133 Application blocks waiting for a critical section during startup. This problem does not occur in Windows. + 17440 Anarchy Online: Fog bug introduced between v. 1.1.11 and 1.1.13 + 19269 Distant impostors does not work in Lord of the Rings Online + 20466 Multiple broken apps and games with incorrect TLS usage crash on startup (TLS slot index allocation must start at non-zero indexes (Brothers in Arms: Hell's Highway, ProShow Gold 5/6) + 21576 Touch screen loses calibration when in full screen mode - specifically AtomixMP3.exe + 21956 Empire Earth 1.00 and 1.04 crash with unhanded page fault + 22016 R.U.S.E. Public Beta in-game rendering is washed out + 23601 Windows Movie Maker 2.6 reports 'A new collections file cannot be created' (needs 'Microsoft' folder in CSIDL_LOCAL_APPDATA) + 24702 Pro Evolution Soccer 2010 DEMO: shows black screen with stars and never load + 25727 Dead Space resolution issues + 25780 MS Works 9.0 can't find license terms + 25914 Dead Space 2 exits with error + 27625 Panzer General 3D Demo: second scenario fails to load + 27797 No sound in FMOD games (Gratuitous Space Battles demo, Armored Brigade) + 27900 Miranda IM v0.9.25 group chats are broken + 28571 Saving file in Rockwell Arena Simulator causes crash. + 29003 T4C: Crashes during or after patching phase + 29875 MS Works 9.0 can't install (infinite waiting for estimating time) + 29968 Final Fantasy XI crashes when unfocused in windowed mode + 30079 Broken Sword - The Sleeping Dragon: Graphics corruption + 31079 Fatal error during Stronghold Crusader Demo installation + 31433 Foxit Reader 5.3.1.0606 crashes on startup + 32245 Multiple applications crash on startup due to unimplemented function shell32.dll.SHExtractIconsW + 32835 Batman: Arkham Asylum (non-Steam) Demo fails on startup (IWbemClassObject::GetNames with qualifier unsupported) + 33603 Metro: Last Light crash after several minutes + 33732 Broken non-PCM audio playback in Microsoft Sound Recorder + 34352 Multiple applications need 'Network Configuration Component Object', CLSID '{5b035261-40f9-11d1-aaec-00805fc1270e}' (CommView, iNodeSetup 3.60) + 34668 Age of Empires Trial version only gives a black screen + 35064 Daemon Tools Lite crashes after opening + 35112 L.A. Noire 1.3 (Steam version) fails to start, claiming "DX94: Graphics card capabilities are below the minimum specifications." (wined3d clamps device caps MaxVertexIndex to 0xFFFFF) + 35359 Kompas-3D v14 installer fails + 35474 'Das Fussball Studio' (VB6 based german soccer league db app) reports Run-time error '445' (needs IFile::OpenAsTextStream) + 35550 Horizon (Steam) needs msvcp100.dll.?_Random_device@tr1@std@@YAIXZ + 35555 Drakan Demo doesn't show the name of the display driver (the problem is in GetDeviceIdentifier when it is _not_ passed the DDGDI_GETHOSTIDENTIFIER flag) + 35678 Defiance patcher crashes on start (gdiplus/GdipDrawImagePointsRect) + 35786 Incorrect behaviour in printf with 0 value on "%#x" + 35802 OneNote 2013 installer needs KERNEL32.dll.SetWaitableTimerEx + 35809 Avoid deletion of precious (empty) folders such as '%USERPROFILE%\\Application Data' during MSI product upgrades/uninstalls + 35818 mscms/profile tests fail on Fedora + 35825 Mortal Online (MMORPG) client 1.75.00.07 displays garbled buttons/images with builtin gdiplus + 35827 Corel PaintShop Pro X6 v16.2 installer crashes on startup ('text/jscript' type not recognized when converting to script GUID) + 35833 iTunes 7 installer aborts early (automation methods HRESULT incorrectly translated to VBScript runtime Err.number) + 35838 MS Works 9.0 word processor crashes on startup (process heaps need to be 64K aligned) + 35840 'Das Fussball Studio' (VB6 based german soccer league db app) reports Run-time error '445' (needs ITextStream ReadAll method implementation) + 35867 Multiple applications need support for INetCfgLock, CLSID '{c0e8ae93-306e-11d1-aacf-00805fc1270e}' (CommView, iNodeSetup 3.60) + 35888 Stahlschlüssel 2007 no CD in drive warning + 35891 sdb2xml and native setupapi override crash on unimplemented function apphelp.dll.SdbInitDatabase + 35908 Regedit has wrong letter view in title bar with a desktop mode ---------------------------------------------------------------- -Changes since 1.7.14: +Changes since 1.7.15: -Akihiro Sagawa (4): - gdi32: Improve the font enumeration order for complex script locales. - version/tests: Add more VerQueryValueA tests. - version: Don't convert binary version resource to ANSI texts. - gdi32/tests: GetGlyphOutlineA is broken for johab charset on windows. - -Alexandre Julliard (8): - makedep: Add a helper function for concatenating paths. - makedep: Pass the source directory as root for building documentation. - c2man: Remove a possible path from the spec file name. - configure: Always run makedep on the top-level makefile. - user32/tests: Mark a failing test as todo. - user32: Set the queue mask only after flushing the window surfaces. - server: Restore the masks from the previous get_message when a wait is satisfied. - user32/tests: Make a few more messages optional. - -Alistair Leslie-Hughes (6): - ntoskrnl.exe: Add stub MmLockPagableSectionByHandle. - ntoskrnl.exe: Add stub MmUnlockPagableImageSection. - ntoskrnl.exe: Add stub KeInsertQueue. - include: Add netcfgx.idl. - netcfgx: Implement DllCanUnloadNow, DllGetClassObject, DllRegisterServer, DllUnregisterServer. - netcfgx: Register interfaces. +Alexandre Julliard (10): + ntdll: Heap handles should be 64K-aligned. + kernel32/tests: Move allocation tests into heap.c. + kernel32: Don't allocate FLS index 0. + makedep: Add dependency for ttf font files when necessary. + makedep: Add phony install targets for fonts also for the ttf case. + makedep: Load some variables from the top-level makefile. + makedep: Allow the top-level makefile to set default values for make variables. + makedep: Add helper functions to get and set variables in string arrays. + make_xftmpl: Always output data in little-endian format. + make_xftmpl: Get rid of the parser structure. + +Alistair Leslie-Hughes (4): + netcfgx: Add INetCfg interface support. + include: Add interface INetCfgLock. + netcfgx: Add INetCfgLock support. + dbghelp: Improve dwarf support. + +Andrew Eikum (1): + winmm/tests: Accept MMSYSERR_ALLOCATED for more tests. Andrey Gusev (1): po: Update Ukrainian translation. -André Hentschel (1): - gdi32/tests: GetCharABCWidthsA is broken for johab charset on windows. - -Aric Stewart (2): - imm32: Add IME_CMODE_FULLSHAPE to conversion mode. - imm32: Set context conversion and sentence status. - -Austin English (2): - setupapi: Make sure DeviceInterfaceData->cbSize is initialized in SetupDiEnumDeviceInterfaces. - kernel32: Improve GetNumaHighestNodeNumber stub. - -David Quintana (2): - comctl32: Fix horizontal separators in vertical toolbars. - shlwapi: SHInvokeCommand last parameter is a command ID, or 0 to use the default. +André Hentschel (2): + setupapi: Add support for more architectures when building fake dlls. + setupapi: Don't confuse ARM with ARM64. + +Aurimas Fišeras (2): + po: Update Lithuanian translation. + po: Update Lithuanian translation. + +Austin English (5): + ws2_32: Skip some tests on broken ISPs. + winhttp: Skip tests on broken ISPs. + shell32: Fix a typo. + wine.inf: Add %AppData%\Microsoft and %LocalAppData%\Microsoft folders:. + apphelp: Add a stub for SdbInitDatabase. Dmitry Timoshkov (13): - schedsvc: Add Task Scheduler service. - schedsvc: Implement SchRpcHighestVersion. - schedsvc: Implement SchRpcCreateFolder. - schedsvc: Implement SchRpcDelete. - schedsvc: Implement SchRpcRegisterTask. - schedsvc: Implement SchRpcRetrieveTask. - taskschd: Implement ITaskService::get_HighestVersion. - schedsvc: Mark service as auto-start once a task is registered. - schedsvc: Replace external trace statements by internal versions. - widl: Move is_ptr() and is_array() to header.h and make them inline. - widl: Unify indentation of comments. - widl: Move is_void(), is_declptr() and is_conformant_array() to header.h and make them inline. - ntdll/tests: Always wait until the operation completes if returned status is STATUS_PENDING. - -Eriks Dobelis (1): - wintab32: Fix pkSerialNumber typo. - -Frédéric Delanoy (9): - cmd/tests: Correctly determine script path for root directories. - cmd/tests: Don't use "@pwd@\" when expecting a full path. - krnl386.exe16: Use BOOL type where appropriate. - comctl32: Use BOOL type where appropriate. - gdiplus: Use BOOL type where appropriate. - user32/tests: Use BOOL type where appropriate. - riched20: Use BOOL type where appropriate. - urlmon/tests: Use BOOL type where appropriate. - qcap: Use BOOL type where appropriate. - -Hans Leidekker (4): - shlwapi/tests: Fix test failures on Windows 8. - wbemprox: Implement Win32_LogicalDisk.VolumeSerialNumber. - mscms/tests: Fix test failures on Wine when color profiles are present. - wbemprox/tests: Don't use infinite timeouts. - -Henri Verbeet (40): - user32: Fix TEXT_WordBreak() when no characters fit. - gdi32/tests: Fix test_window_dc_clipping() when the virtual screen origin is not (0, 0). - gdi32/tests: Fix test_device_caps() on multihead setups. - ddraw/tests: Skip the overlay tests in test_block_formats_creation() if overlays are not supported. - wined3d: Handle shader_arb_free_context_data() during context creation. - wined3d: Only use a single allocation for each struct private_data. - d3d9/tests: Move some stateblock tests to device.c. - d3d8/tests: Move some stateblock tests to device.c. - d3d9/tests: Don't share the D3D object either in visual.c tests that have their own device. - d3d9/tests: Give add_dirty_rect_test() its own device. - d3d9/tests: Use a separate device for volume_dxt5_test(). - d3d9/tests: Use a separate device for volume_srgb_test(). - d3d9/tests: Use a separate device for fog_special_test(). - d3d9/tests: Use a separate device for zenable_test(). - d3d9/tests: Use a separate device for multisample_get_rtdata_test(). - d3d9/tests: Use a separate device for update_surface_test(). - d3d9/tests: Use a separate device for srgbwrite_format_test(). - d3d9/tests: Use a separate device for depth_bounds_test(). - d3d9/tests: Use a separate device for fp_special_test(). - d3d9/tests: Use a separate device for shadow_test(). - d3d9/tests: Use a separate device for intz_test(). - d3d9/tests: Use a separate device for depth_blit_test(). - d3d9/tests: Use a separate device for depth_buffer2_test(). - d3d9/tests: Use a separate device for depth_buffer_test(). - d3d9/tests: Use a separate device for dp3_alpha_test(). - d3d9/tests: Use a separate device for alphareplicate_test(). - d3d9/tests: Use a separate device for texop_range_test(). - d3d9/tests: Use a separate device for texop_test(). - d3d9/tests: Use a separate device for multiple_rendertargets_test(). - d3d9/tests: Use a separate device for vpos_register_test(). - d3d9/tests: Use a separate device for vface_register_test(). - d3d9/tests: Use a separate device for pretransformed_varying_test(). - d3d9/tests: Use a separate device for nested_loop_test(). - d3d9/tests: Use a separate device for unbound_sampler_test(). - d3d9/tests: Use a separate device for dp2add_ps_test(). - d3d9/tests: Use a separate device for cnd_test(). - d3d9/tests: Use a separate device for constant_clamp_ps_test(). - d3d9/tests: Use a separate device for volume_v16u16_test(). - d3d9/tests: Use a separate device for x8l8v8u8_test(). - d3d9/tests: Use a separate device for texkill_test(). - -Jacek Caban (28): - vbscipt: Use VariantCopyInd in exec_script. - vbscript: Use VariantCopyInd in invoke_variant_prop. - vbscipt: Allow ':' to be a separator in select case statement. - vbscript: Added support for VARIANT references to interp_newenum. - wmsdkidl.idl: Added some missing declarations. - rpcndr.h: Don't redefine EXTERN_GUID if it's already defined. - wmvcore: Added WMCreateProfileManager implementation. - mshtml: Removed test failing on Windows 8.1. - mshtml: Bind events not sent to default view to body element instead of directly to target. - mshtml: Added IHTMLFrameBase2::onload property implementation. - mshtml: Adder _parent target support to navigate_anchor. - crypt32/tests: Improved test failure message. - mshtml: Moved htmldoc5.c content into htmldoc3.c. - mshtml: Merge htmldoc3.c into htmldoc.c. - mshtml: Added IHTMLDocument7 stub implementation. - mshtml: Skip tests depending on iframe onload event on IEs older than IE9. - mshtml: Added support for target attribute in submit function implementation. - vbscript: Allow empty brackets in argument declarations. - mshtml: Fixed tests on old IEs and improved results on IE11. - urlmon: Fixed sec_mgr.c tests failing on some recent Windows. - vbscript: Allow creating RegExp object by new expression. - jscript: Represent NULL VT_UNKNOWN VARIANT as NULL VT_DISPATCH. - oleaut32: Fixed vartest.c tests on Windows 8.1. - vbscript: Moved Error object implementation to global.c. - vbscript: Added support for exception unwinding. - vbscript: Added Err.Number implementation. - vbscript: Added Err.Clear implementation. - vbscript: Added error handling tests. + include: Fix a typo in _MSC_VER. + schedsvc: Skip the UTF-8 byte order mark when returing XML to the client. + widl: Pass type attributes from write_array_tfs to write_pointer_description. + widl: Pass type attributes from write_array_tfs to write_array_element_type. + widl: Avoid generating negative offsets for conformant arrays of strings. + widl: Don't call write_embedded_types if an array element is a string. + widl: Add support for an array of strings to write_string_tfs. + rpcrt4/tests: Add a couple of tests for marshalling an array of strings. + widl: Correct the condition when to use new code path which avoids writing negative offsets in the pointer description. + schrpc.idl: Add missing [string] attribute to an array of strings being returned by SchRpcEnumFolders/SchRpcEnumTasks. + schedsvc: Implement SchRpcEnumFolders. + schedsvc: Implement SchRpcEnumTasks. + schedsvc: Add some tests for scheduler RPC API. + +Erich Hoover (1): + ws2_32: Ask the server to process unsupported WSAIoctl operations. + +Eriks Dobelis (2): + wintab: Fix incorrectly classifying cursor as stylus instead of eraser. + wintab: Initialize lcOutExtX and Y values. + +François Gouget (3): + wbemprox/tests: Make test_GetNames() static. + netcfgx/tests: Make create_configuration() static. + user32/tests: Fix compilation on systems that don't support nameless unions. + +Gerald Pfeifer (1): + readme: Raise the minimum version of FreeBSD to 8.0. + +Hans Leidekker (13): + wbemprox: Add support for WBEM_FLAG_NONSYSTEM_ONLY and WBEM_FLAG_SYSTEM_ONLY in IWbemClassObject::GetNames. + user32/tests: Add more tests for PrivateExtractIcons. + shell32: Forward ShExtractIconsW to user32.PrivateExtractIconsW. + riched20: Don't return DLGC_HASSETSEL from WM_GETDLGCODE if the control style includes ES_SAVESEL. + fonts: Add Hungarian localization of Tahoma font names. + wldap32/tests: Skip tests if the connection times out. + shell32/tests: Remove todo handling from DDE tests. + shell32/tests: Mark some test results as broken. + wbemprox: Add a stub implementation of Win32_PhysicalMemory. + wbemprox: Implement more properties of Win32_OperatingSystem. + wbemprox: Implement more properties of Win32_DiskDrive. + wbemprox: Implement Win32_CDROMDrive.MediaType. + wbemprox: Implement Win32_VideoController.Availability. + +Henri Verbeet (25): + d3d9/tests: Use a separate device for texdepth_test(). + d3d9/tests: Use a separate device for texbem_test(). + d3d9/tests: Use a separate device for fog_with_shader_test(). + d3d9/tests: Use a separate device for stream_test(). + d3d9/tests: Use a separate device for test_vshader_float16(). + d3d9/tests: Handle the Windows 8 testbot results in zenable_test(). + d3d9/tests: Handle the Windows 8 testbot results in fp_special_test(). + d3d9/tests: Handle the Windows 8 testbot results in cnd_test(). + d3d9/tests: Use an easier to debug texture in generate_bumpmap_textures(). + d3d9/tests: Handle the Windows 8 testbot results in test_vshader_input(). + d3d9/tests: Use a separate device for test_vshader_input(). + d3d9/tests: Use a separate device for clip_planes_test(). + d3d9/tests: Use a separate device for sgn_test(). + d3d9/tests: Use a separate device for sincos_test(). + d3d9/tests: Use a separate device for loop_index_test(). + d3d9/tests: Use a separate device for test_mova(). + d3d9/tests: Use a separate device for test_compare_instructions(). + d3d9/tests: Use a separate device for test_constant_clamp_vs(). + d3d9/tests: Use a separate device for viewport_test(). + d3d9/tests: Use a separate device for alphatest_test(). + d3d9/tests: Use a separate device for zwriteenable_test(). + d3d9/tests: Use a separate device for yuv_layout_test(). + d3d9/tests: Use a separate device for yuv_color_test(). + d3d9/tests: Use a separate device for np2_stretch_rect_test(). + d3d9/tests: Use a separate device for tssargtemp_test(). + +Hermès Bélusca-Maïto (2): + usp10: Avoid non-standard array initialization. + winemac.drv: Fix a typo in _MSC_VER. + +Hugh McMaster (3): + regsvr32: Replace printf calls with WriteConsole function. + regsvr32: Move silent check to the output_write function. + regsvr32: Fix filename in version definition. + +Huw D. M. Davies (2): + riched20: Add a helper to return the default line height and use that in EM_LINESCROLL. + riched20: Keep track of fractions of WHEEL_DELTA when scrolling. + +Jacek Caban (14): + mshtml: Added IHTMLStyle::listStyleType property implementation. + vbscript: Fixed a leak. + wininet: Merge GetLastError() test into other request tests. + wininet: Fixed tests on some old Windows versions. + vbscript: Store required stack offset before doing jump. + dxgi.idl: Added IDXGIDevice1 declaration. + dxgi1_2.idl: Added new file. + vbscript: Map some known error codes to vbscript errors. + vbscript: Return only code part of HRESULT for vbscript errors as Err.number. + vbscript/tests: Added more error tests. + ntdll: Reserve TLS slot 0 for broken apps that compare index to 0 instead of TLS_OUT_OF_INDEXES. + kernel32: Skip reserved TLS tests on WinXP SP1. + docobj.idl: Added some new OLECMDID values. + ieframe: Fixed some tests on IE11. Jactry Zeng (2): - include: Fix a typo in ITextServices method named TxGetCurTarget. - riched20/tests: Fix a SysAllocString leak. + riched20: Return E_INVALIDARG for empty ppSel in ITextDocument::GetSelection. + riched20: Fix a typo in CreateIRichEditOle. -Ken Thomases (6): - winex11: Don't leak client window and colormap when pixel format is changed. - winemac: Make the window's contentView its firstResponder again after changing its style. - winemac: Fix wglSwapBuffers() to operate on the HDC, not the current GL context. - winemac: Make the swap interval a property of the window, not the context. - winex11: Don't reset OpenGL swap interval of window on SetParent(). - winex11: Remove unused "parent" parameter from create_gl_drawable(). - -Marcus Meissner (5): - crypt32: Fixed copy and paste error in engine creation (Coverity). - msxml3: Mirror the NULL checking logic (Coverity). - msi: Fixed missing free in an error path (Coverity). - hhctrl.ocx: Free the correct buffer (Coverity). - wtsapi32: Remove useless info free (Coverity). - -Matteo Bruni (10): - d3dx9: Fix a WARN. - d3dx9/tests: Skip some volume tests if loading the texture fails. - d3dx9/tests: Skip a test if DXTn texture formats are not supported. - d3dx9/tests: Mark a test todo_wine when DXTn textures aren't supported by the GL driver. - d3dx9: Correctly handle empty parameter data. - d3dx9: Create shaders and strings. - d3dx9: Store pointers to referenced parameters for "usage 1" resources. - d3dx9: Parse "usage 2" effect resources. - d3dx9: Split out set_matrix_transpose from set_matrix. - d3dx9: Copy the entire matrix at once if there is no need of type conversions. - -Michael Stefaniuc (11): - dmcompos: COM cleanup for the IDirectMusicChordMap iface. - dmcompos: Remove the extraneous IUnknown from DirectMusicChordMap. - dmloader: None of the COM classes support aggregation. - dmloader/tests: Centralize the skip(). - dmloader: Add COM tests for DirectMusicLoader. - dmloader: Pass the object to the IDirectMusicContainer_Release helper. - dmloader: Don't crash on container destruction if it was never loaded. - dmloader/tests: Add COM tests for DirectMusicContainer. - dswave: DirectSoundWave doesn't support COM aggregation. - dswave/tests: Add COM tests for DirectSoundWave. - dmloader/tests: Skip the tests if we don't have IDirectMusicLoader8. - -Nikolay Sivov (32): - msxml3: Remove dynamic properties support. - msxml3/tests: Fixed some test failures. - scrrun: Fix Next() for file collection. - scrrun: Fix Skip() for file collection. - scrrun/tests: Use a writable location for folder creation test. - scrrun: Implement Skip() for drive collection. - scrrun: Implement Count() property for drive collection. - scrrun: Remove unneeded forward interface definitions from idl. - widl: Fix duplicate typeinfo being written to typelib for enums. - scrrun: Initialize find handle for file collection. - wbemdisp: Specify default value for method arguments. - scrrun: Implement Path() property for Folder. - msi: Update feature selection bitmaps. - msxml3: Respect stylesheet output mode when dumping resulting document. - msxml3: Fix some test failures on Win8.1. - scrrun: Implement CreateTextFile(). - winedump: Improve typelib header dumping. - winedump: Output parameters and default values type for methods. - widl: Fix default value types. - msi: 'optional' only applies to VARIANT and VARIANT* types. - scrrun: Implement WriteLine/Write for ITextStream. - stdole2: Fix usage of 'optional' with 'defaultvalue'. - idl: Remove 'optional' for 'defaultvalue' non-VARIANT arguments. - scrrun: Implemented AtEndOfStream() property. - user32: Added AddClipboardFormatListener/RemoveClipboardFormatListener stubs. - kernel32: Added WerUnregisterMemoryBlock() stub. - scrrun/tests: Update idl file in tests. - wshom.ocx/tests: Update idl file in tests. - msi: MsiInstaller coclass is not included in a typelib. - msi: Update MsiServerMessage registration version to match module version. - user32: Added ChangeWindowMessageFilterEx() stub. - xmllite: Implement CreateXmlWriterOutputWithEncodingName(). +Javier Cantero (3): + user32: Fix side effect in SubtractRect(). + user32/tests: Add SubtractRect() test. + user32/tests: New test cases for SubtractRect(). + +Julian Rüger (1): + po: Update German translation. + +Kai Tietz (1): + corerror.h: Merge with mingw-w64's extensions. + +Ken Thomases (10): + winemac: Don't recreate the GL view when the pixel format is set again. + winemac: Improve handling of swap interval with respect to pbuffers, clamping to 0. + wined3d: Don't leak the HDC of an invalid context in context_update_window(). + wined3d: Simplify the error path of context_update_window(). + wined3d: Don't call GetPixelFormat() to set a flag that's already set. + wined3d: When restoring pixel format in context_release(), mark the context as needing to be set on the next context_acquire(). + wined3d: Track if a context's hdc is private so we never need to restore its pixel format. + wined3d: Track if a context's private hdc has had its pixel format set, so we don't need to check it. + winex11: Maintain the swap interval when the drawable is recreated. + winex11: Remove set-but-never-read hwnd and fbconfig_id fields of struct x11drv_escape_set_drawable. + +Lauri Kenttä (1): + po: Update Finnish translation. + +Marcus Meissner (1): + wbemprox: Fixed leaks in fill_datafile (Coverity). + +Markus Weiland (1): + dxdiagn: Added properties for hardware acceleration capabilities. + +Michael Müller (6): + dxva2: Added stub dll. + include: Add dxva2api.idl. + include: Add physicalmonitorenumerationapi.h. + include: Add lowlevelmonitorconfigurationapi.h. + include: Add highlevelmonitorconfigurationapi.h. + dxva2: Add implementation for stub functions. + +Michael Stefaniuc (2): + shell32: Simplify the creation of an IEnumIDList. + shell32: COM cleanup for IEnumIDList. + +Nikolay Sivov (30): + kernel32: Added SetWaitableTimerEx(). + scrrun: Implement OpenAsTextStream(). + oleaut32/tests: Remove early returns on test failure that never happen. + oleaut32/tests: Move string allocation after function pointer check (Coverity). + comctl32/tests: Fix uninitialized variable case (Coverity). + ole32: Fix some leaks on early returns (Coverity). + ole32: Fix leaks on error paths (Coverity). + scrrun: Close find handle on error (Coverity). + scrrun: Fix a find handle leak (Coverity). + winhttp: Move allocation after input validation to fix leaks (Coverity). + comctl32: Fix a leak on error path (Coverity). + gdiplus: Fix image attributes leak (Coverity). + msi: Fix a record leak on error paths (Coverity). + msi: Fix a leak of allocated string buffer on error path (Coverity). + msi: Fix a record leak on error path (Coverity). + msi: Fix a record leak on failure removing a column (Coverity). + scrrun: Added IsReady property for a drive. + scrrun: Implement TotalSize property for a drive. + scrrun: Implement AvailableSpace property for a drive. + scrrun: Implement DriveLetter property for a drive. + qcap/tests: Check method return values (Coverity). + msxml3/tests: Check return values (Coverity). + regsvr32: Fix some usage message issues. + kernel32: Added QueryUnbiasedInterruptTime(). + po: Update Russian translation. + msxml3: Handle NULL child in appendChild(). + scrrun: Implement ReadAll(). + scrrun: Implement Read(). + scrrun: Implement FreeSpace() for a drive. + fonts: Added glyphs for U+0404/U+0454 Ukrainian Ye for Tahoma Bold. Piotr Caban (7): - ole32: Update reference counter of returned moniker in CreateGenericComposite. - msvcrt: Improve tolower_l implementation. - msvcrt: Improve tolower tests. - msvcrt: Improve toupper_l implementation. - msvcrt: Fix p__p___mb_cur_max tests. - msvcrt: Don't add 0x prefix while printing 0 with printf. - msvcp110: Add _Xtime_get_ticks implementation. - -Qian Hong (2): - user32/tests: Skip more winstation tests when no enough privileges. - netapi32: Add stub for NetScheduleJobDel. - -Rico Schüller (1): - d3dx9/tests: Check if D3DFMT_X1R5G5B5 is supported. - -Sebastian Lackner (3): - shell32: Register user administrative tools shell folder. - ntdll: Fix possible race-condition in iocp poller code. - ntdll: Use condition variable for RtlQueueWorkItem implementation. - -Stefan Dösinger (21): - wined3d: Don't modify existing data if set_private_data fails. - d3d9/tests: Show that a failing SetPrivateData call does not clear the old contents. - d3d8/tests: Show that a failing SetPrivateData call does not clear the old contents. - ddraw/tests: Show that a failing SetPrivateData call does not clear the old contents. - wined3d: Correctly handle the size parameter in get_private_data. - d3d9/tests: Use a custom GUID for the private data tests. - d3d9/tests: Test GetPrivateData size behavior. - d3d8/tests: Use a custom GUID for the private data tests. - d3d8/tests: Test GetPrivateData size behavior. - wined3d: Decouple private data from the resource structure. - wined3d: Free old data after addrefing the new one. - ddraw: Use the new private store api. - ddraw/tests: Test GetPrivateData size behavior. - ddraw/tests: Add mipmap private data tests. - ddraw/tests: Use a custom GUID for the private data tests. - wined3d: Remove the version parameter. - d3d8: Introduce a resource structure. - d3d8: Use the private store api for buffers. - d3d8: Use the private store api for volumes. - d3d8: Use the private store api for textures. - d3d8: Use the private store api for surfaces. + user32/tests: Workaround SetForegroundWindow failure due to foreground lock timeout. + msvcp90: Add _Random_device implementation. + msvcrt: Remove setlocale test with empty locale string. + qcap/tests: Fix AviMux test failures on Win2k. + user32: Change SetFocus behavior on windows with parent and no WS_CHILD flag. + user32: Change SetForegroundWindow behavior on windows with parent and no WS_CHILD flag. + user32: Make it possible to activate a window with parent and no WS_CHILD flag in WS_NCLBUTTONDOWN function. + +Robert Naumann (1): + mgmtapi: Fix a typo in the export of SnmpMgrRequest. + +Sebastian Lackner (1): + kernel32: Silence SetWaitableTimerEx fixme message. + +Shuai Meng (1): + oleaut32: Fixed bounds of VarIntFromFloat. + +Stefan Dösinger (15): + d3d9: Introduce a resource structure. + d3d9: Use the private store api for buffers. + d3d9: Use the private store api for textures. + d3d9: Use the private store api for surfaces. + wined3d: Remove resource private data methods. + wined3d: Select the component by editing the swizzle. + wined3d: Handle LOG and LOGP in shader_hw_scalar_op. + wined3d: Handle RCP in shader_hw_scalar_op. + wined3d: Translate LOGP to LG2 in the ARB shader backend. + wined3d: Translate shader model 2.0+ EXPP to EX2. + wined3d: Raise MaxPrimitiveCount and MaxVertexIndex. + d3dx9_36/tests: Initialize some test values. + d3dxof: Make the get_primitive_string parameter a DWORD. + d3dxof: Include wine/port.h in parsing.c. + include: The NumUAVs parameter of OMGetRenderTargetsAndUnorderedAccessViews is an input parameter. Stefan Leichter (1): - odbccp32: Add ordinals to spec file. + wtsapi32: Extend the parameter check of WTSEnumerateProcessesW. + +Thomas Faber (15): + dplayx: Fix broken pointer arithmetic. + gameux/tests: Avoid a variable-length array. + gdi32: Avoid variable-length arrays. + msxml3: Avoid a variable-length array. + shell32: Avoid a variable-length array. + ws2_32: Avoid a variable-length array. + oleview: Avoid variable-length arrays. + configure: Enable -Wvla if available. + comctl32: Make Str* functions private. + setupapi: Fix buffer overflow in SetupGetFileCompressionInfoW. + advapi32: Fix stack corruption in CredIsMarshaledCredentialW. + advapi32: Remove unnecessary buffer copy in CredMarshalCredentialW. + advapi32/tests: Use a loop for CredUnmarshalCredential test cases. + advapi32: Set output type earlier in CredUnmarshalCredential. + advapi32: Fix uneven length handling in CredUnmarshalCredential. + +Vijay Kiran Kamuju (1): + mshtml: Add text/jscript as valid mime type for javascript files. + +Vincent Povirk (4): + gdiplus: Limit image output to the bounds of the Graphics object. + gdiplus: Remove a useless comparison. + gdiplus: Copy palettes with bitmaps. + msi: Fix infinite loop. -Vincent Povirk (7): - user32/tests: Add a test for empty popup menus. - user32/tests: Put some menu items in the test_menu_trackagain menu. - user32/tests: Add message tests for TrackPopupMenu. - user32: Create popup menu windows before WM_ENTERMENULOOP. - gdiplus: Account for negative height/width in GdipDrawImagePointsRect. - gdiplus: Fix an overzealous optimization. - tapi32: Stub lineOpenW. - -Zhenbo Li (5): - mshtml: Added IHTMLTableRow::align property implementation. - mshtml: Added IHTMLTableRow::vAlign property implementation. - mshtml: Added IHTMLTableRow::rowIndex property implementation. - mshtml: Added IHTMLTableRow::sectionRowIndex property implementation. - mshtml: Added IHTMLTable::align property implementation. +Zhenbo Li (1): + mshtml: Added IHTMLTableRow::bgColor property implementation. -- Alexandre Julliard diff -Nru wine1.7-1.7.15/AUTHORS wine1.7-1.7.16/AUTHORS --- wine1.7-1.7.15/AUTHORS 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/AUTHORS 2014-04-04 19:13:44.000000000 +0000 @@ -516,6 +516,7 @@ Hongbo Ni Howard Abrams Howell Tam +Hugh McMaster Huw D. M. Davies Hwang YunSong (황윤성) Iain Arnell @@ -585,6 +586,7 @@ Jason McMullan Jason Phillips Jau-Horng Chen +Javier Cantero Jay Yang Jean-Bruno Luginbühl Jean-Claude Batista @@ -1163,6 +1165,7 @@ Robert Lunnon Robert McDonald Robert Millan +Robert Naumann Robert North Roberto Augusto Pungartnik Robert O'Callahan @@ -1238,6 +1241,7 @@ Shaun Morris Sheri Steeves Shi Quan He +Shuai Meng Shunichi Fuji Simen Zamecnik Simeon Pilgrim diff -Nru wine1.7-1.7.15/configure wine1.7-1.7.16/configure --- wine1.7-1.7.15/configure 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/configure 2014-04-04 19:13:44.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Wine 1.7.15. +# Generated by GNU Autoconf 2.69 for Wine 1.7.16. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='Wine' PACKAGE_TARNAME='wine' -PACKAGE_VERSION='1.7.15' -PACKAGE_STRING='Wine 1.7.15' +PACKAGE_VERSION='1.7.16' +PACKAGE_STRING='Wine 1.7.16' PACKAGE_BUGREPORT='wine-devel@winehq.org' PACKAGE_URL='http://www.winehq.org' @@ -1024,6 +1024,7 @@ enable_dwrite enable_dxdiagn enable_dxgi +enable_dxva2 enable_explorerframe enable_ext_ms_win_gdi_devcaps_l1_1_0 enable_faultrep @@ -1970,7 +1971,7 @@ # 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 1.7.15 to adapt to many kinds of systems. +\`configure' configures Wine 1.7.16 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2039,7 +2040,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Wine 1.7.15:";; + short | recursive ) echo "Configuration of Wine 1.7.16:";; esac cat <<\_ACEOF @@ -2234,7 +2235,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Wine configure 1.7.15 +Wine configure 1.7.16 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2752,7 +2753,7 @@ 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 1.7.15, which was +It was created by Wine $as_me 1.7.16, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -13694,6 +13695,31 @@ if test "x$ac_cv_cflags__Wunused_but_set_parameter" = xyes; then : EXTRACFLAGS="$EXTRACFLAGS -Wunused-but-set-parameter" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wvla" >&5 +$as_echo_n "checking whether the compiler supports -Wvla... " >&6; } +if ${ac_cv_cflags__Wvla+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_wine_try_cflags_saved=$CFLAGS +CFLAGS="$CFLAGS -Wvla" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int main(int argc, char **argv) { return 0; } +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_cflags__Wvla=yes +else + ac_cv_cflags__Wvla=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +CFLAGS=$ac_wine_try_cflags_saved +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wvla" >&5 +$as_echo "$ac_cv_cflags__Wvla" >&6; } +if test "x$ac_cv_cflags__Wvla" = xyes; then : + EXTRACFLAGS="$EXTRACFLAGS -Wvla" +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wwrite-strings" >&5 $as_echo_n "checking whether the compiler supports -Wwrite-strings... " >&6; } if ${ac_cv_cflags__Wwrite_strings+:} false; then : @@ -16851,6 +16877,7 @@ wine_fn_config_dll dxgi enable_dxgi implib wine_fn_config_test dlls/dxgi/tests dxgi_test wine_fn_config_lib dxguid +wine_fn_config_dll dxva2 enable_dxva2 wine_fn_config_dll explorerframe enable_explorerframe clean wine_fn_config_test dlls/explorerframe/tests explorerframe_test wine_fn_config_dll ext-ms-win-gdi-devcaps-l1-1-0 enable_ext_ms_win_gdi_devcaps_l1_1_0 @@ -17024,6 +17051,7 @@ wine_fn_config_dll netapi32 enable_netapi32 implib wine_fn_config_test dlls/netapi32/tests netapi32_test wine_fn_config_dll netcfgx enable_netcfgx clean +wine_fn_config_test dlls/netcfgx/tests netcfgx_test wine_fn_config_dll newdev enable_newdev implib wine_fn_config_dll normaliz enable_normaliz implib wine_fn_config_dll npmshtml enable_npmshtml @@ -17109,6 +17137,7 @@ wine_fn_config_dll schannel enable_schannel wine_fn_config_test dlls/schannel/tests schannel_test wine_fn_config_dll schedsvc enable_schedsvc clean +wine_fn_config_test dlls/schedsvc/tests schedsvc_test clean wine_fn_config_dll scrrun enable_scrrun clean wine_fn_config_test dlls/scrrun/tests scrrun_test clean wine_fn_config_dll scsiport.sys enable_scsiport_sys @@ -17328,7 +17357,7 @@ wine_fn_config_program regedit enable_regedit install,installbin,manpage,po wine_fn_config_test programs/regedit/tests regedit.exe_test wine_fn_config_program regsvcs enable_regsvcs install -wine_fn_config_program regsvr32 enable_regsvr32 install,installbin,manpage +wine_fn_config_program regsvr32 enable_regsvr32 install,installbin,manpage,po wine_fn_config_program rpcss enable_rpcss clean,install wine_fn_config_program rundll.exe16 enable_win16 install wine_fn_config_program rundll32 enable_rundll32 install @@ -18048,7 +18077,7 @@ # 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 1.7.15, which was +This file was extended by Wine $as_me 1.7.16, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18119,7 +18148,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Wine config.status 1.7.15 +Wine config.status 1.7.16 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru wine1.7-1.7.15/configure.ac wine1.7-1.7.16/configure.ac --- wine1.7-1.7.15/configure.ac 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/configure.ac 2014-04-04 19:13:44.000000000 +0000 @@ -1780,6 +1780,7 @@ WINE_TRY_CFLAGS([-Wstrict-prototypes]) WINE_TRY_CFLAGS([-Wtype-limits]) WINE_TRY_CFLAGS([-Wunused-but-set-parameter]) + WINE_TRY_CFLAGS([-Wvla]) WINE_TRY_CFLAGS([-Wwrite-strings]) dnl Check for noisy string.h @@ -2855,6 +2856,7 @@ WINE_CONFIG_DLL(dxgi,,[implib]) WINE_CONFIG_TEST(dlls/dxgi/tests) WINE_CONFIG_LIB(dxguid) +WINE_CONFIG_DLL(dxva2) WINE_CONFIG_DLL(explorerframe,,[clean]) WINE_CONFIG_TEST(dlls/explorerframe/tests) WINE_CONFIG_DLL(ext-ms-win-gdi-devcaps-l1-1-0) @@ -3028,6 +3030,7 @@ WINE_CONFIG_DLL(netapi32,,[implib]) WINE_CONFIG_TEST(dlls/netapi32/tests) WINE_CONFIG_DLL(netcfgx,,[clean]) +WINE_CONFIG_TEST(dlls/netcfgx/tests) WINE_CONFIG_DLL(newdev,,[implib]) WINE_CONFIG_DLL(normaliz,,[implib]) WINE_CONFIG_DLL(npmshtml) @@ -3113,6 +3116,7 @@ WINE_CONFIG_DLL(schannel) WINE_CONFIG_TEST(dlls/schannel/tests) WINE_CONFIG_DLL(schedsvc,,[clean]) +WINE_CONFIG_TEST(dlls/schedsvc/tests,[clean]) WINE_CONFIG_DLL(scrrun,,[clean]) WINE_CONFIG_TEST(dlls/scrrun/tests,[clean]) WINE_CONFIG_DLL(scsiport.sys) @@ -3332,7 +3336,7 @@ WINE_CONFIG_PROGRAM(regedit,,[install,installbin,manpage,po]) WINE_CONFIG_TEST(programs/regedit/tests) WINE_CONFIG_PROGRAM(regsvcs,,[install]) -WINE_CONFIG_PROGRAM(regsvr32,,[install,installbin,manpage]) +WINE_CONFIG_PROGRAM(regsvr32,,[install,installbin,manpage,po]) WINE_CONFIG_PROGRAM(rpcss,,[clean,install]) WINE_CONFIG_PROGRAM(rundll.exe16,enable_win16,[install]) WINE_CONFIG_PROGRAM(rundll32,,[install]) diff -Nru wine1.7-1.7.15/debian/changelog wine1.7-1.7.16/debian/changelog --- wine1.7-1.7.15/debian/changelog 2014-03-26 08:49:53.000000000 +0000 +++ wine1.7-1.7.16/debian/changelog 2014-04-11 18:14:58.000000000 +0000 @@ -1,3 +1,13 @@ +wine1.7 (1:1.7.16-0ubuntu1) precise; urgency=low + + * New upstream release + - More regression test fixes. + - String arrays better supported in the IDL compiler. + - Initial stubs for DirectX Video Acceleration. + - Various bug fixes. + + -- Maarten Lankhorst Fri, 11 Apr 2014 20:14:57 +0200 + wine1.7 (1:1.7.15-0ubuntu1) precise; urgency=low * New upstream release diff -Nru wine1.7-1.7.15/dlls/advapi32/cred.c wine1.7-1.7.16/dlls/advapi32/cred.c --- wine1.7-1.7.15/dlls/advapi32/cred.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/advapi32/cred.c 2014-04-04 19:13:44.000000000 +0000 @@ -1952,18 +1952,13 @@ { case CertCredential: { - char hash[CERT_HASH_LENGTH + 2]; - - memcpy( hash, cert->rgbHashOfCert, sizeof(cert->rgbHashOfCert) ); - memset( hash + sizeof(cert->rgbHashOfCert), 0, sizeof(hash) - sizeof(cert->rgbHashOfCert) ); - - size = sizeof(hash) * 4 / 3; + size = (sizeof(cert->rgbHashOfCert) + 2) * 4 / 3; if (!(p = HeapAlloc( GetProcessHeap(), 0, (size + 4) * sizeof(WCHAR) ))) return FALSE; p[0] = '@'; p[1] = '@'; p[2] = 'A' + type; - len = cred_encode( (const char *)hash, sizeof(hash), p + 3 ); - p[len] = 0; + len = cred_encode( (const char *)cert->rgbHashOfCert, sizeof(cert->rgbHashOfCert), p + 3 ); + p[len + 3] = 0; break; } case UsernameTargetCredential: @@ -2049,7 +2044,6 @@ buf[i + 0] = (c1 << 6) | c0; buf[i + 1] = (c2 << 4) | (c1 >> 2); - buf[i + 2] = c2 >> 4; } else if (len == 2) { @@ -2057,16 +2051,10 @@ if ((c1 = char_decode( p[1] )) > 63) return FALSE; buf[i + 0] = (c1 << 6) | c0; - buf[i + 1] = c1 >> 2; - buf[i + 2] = 0; } else if (len == 1) { - if ((c0 = char_decode( p[0] )) > 63) return FALSE; - - buf[i + 0] = c0; - buf[i + 1] = 0; - buf[i + 2] = 0; + return FALSE; } return TRUE; } @@ -2080,17 +2068,19 @@ TRACE("%s, %p, %p\n", debugstr_w(cred), type, out); - if (!cred || cred[0] != '@' || cred[1] != '@' || !cred[2] || !cred[3]) + if (!cred || cred[0] != '@' || cred[1] != '@' || + char_decode( cred[2] ) > 63) { SetLastError( ERROR_INVALID_PARAMETER ); return FALSE; } len = strlenW( cred + 3 ); - switch (cred[2] - 'A') + *type = char_decode( cred[2] ); + switch (*type) { case CertCredential: { - char hash[CERT_HASH_LENGTH + 2]; + char hash[CERT_HASH_LENGTH]; CERT_CREDENTIAL_INFO *cert; if (len != 27 || !cred_decode( cred + 3, len, hash )) @@ -2101,17 +2091,16 @@ if (!(cert = HeapAlloc( GetProcessHeap(), 0, sizeof(*cert) ))) return FALSE; memcpy( cert->rgbHashOfCert, hash, sizeof(cert->rgbHashOfCert) ); cert->cbSize = sizeof(*cert); - *type = CertCredential; *out = cert; break; } case UsernameTargetCredential: { USERNAME_TARGET_CREDENTIAL_INFO *target; - ULONGLONG size = 0; + DWORD size; if (len < 9 || !cred_decode( cred + 3, 6, (char *)&size ) || - !size || size % sizeof(WCHAR) || size > INT_MAX) + size % sizeof(WCHAR) || len - 6 != (size * 4 + 2) / 3) { SetLastError( ERROR_INVALID_PARAMETER ); return FALSE; @@ -2125,7 +2114,6 @@ } target->UserName = (WCHAR *)(target + 1); target->UserName[size / sizeof(WCHAR)] = 0; - *type = UsernameTargetCredential; *out = target; break; } @@ -2133,7 +2121,8 @@ FIXME("BinaryBlobCredential not implemented\n"); return FALSE; default: - WARN("unhandled type %u\n", cred[2] - 'A'); + WARN("unhandled type %u\n", *type); + SetLastError( ERROR_INVALID_PARAMETER ); return FALSE; } return TRUE; @@ -2157,7 +2146,7 @@ if (name && name[0] == '@' && name[1] == '@' && name[2] > 'A' && name[3]) { - char hash[CERT_HASH_LENGTH + 2]; + char hash[CERT_HASH_LENGTH]; int len = strlenW(name + 3 ); DWORD size; diff -Nru wine1.7-1.7.15/dlls/advapi32/tests/cred.c wine1.7-1.7.16/dlls/advapi32/tests/cred.c --- wine1.7-1.7.15/dlls/advapi32/tests/cred.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/advapi32/tests/cred.c 2014-04-04 19:13:44.000000000 +0000 @@ -563,14 +563,65 @@ static void test_CredUnmarshalCredentialA(void) { + static const UCHAR cert_empty[CERT_HASH_LENGTH] = {0}; + static const UCHAR cert_wine[CERT_HASH_LENGTH] = {'W','i','n','e',0}; static const WCHAR tW[] = {'t',0}; + static const WCHAR teW[] = {'t','e',0}; + static const WCHAR tesW[] = {'t','e','s',0}; static const WCHAR testW[] = {'t','e','s','t',0}; + void *p; CERT_CREDENTIAL_INFO *cert; + const UCHAR *hash; USERNAME_TARGET_CREDENTIAL_INFO *username; CRED_MARSHAL_TYPE type; - unsigned int i; + unsigned int i, j; DWORD error; BOOL ret; + const struct { + const char *cred; + CRED_MARSHAL_TYPE type; + const void *unmarshaled; + } tests[] = { + { "", 0, NULL }, + { "@", 0, NULL }, + { "@@", 0, NULL }, + { "@@@", 0, NULL }, + { "@@A", 0, NULL }, + { "@@E", 4, NULL }, + { "@@Z", 25, NULL }, + { "@@a", 26, NULL }, + { "@@0", 52, NULL }, + { "@@#", 62, NULL }, + { "@@-", 63, NULL }, + { "@@B", CertCredential, NULL }, + { "@@BA", CertCredential, NULL }, + { "@@BAAAAAAAAAAAAAAAAAAAAAAAAAA", CertCredential, NULL }, + { "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAAA", CertCredential, NULL }, + { "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA", CertCredential, cert_empty }, + { "@@BXlmblBAAAAAAAAAAAAAAAAAAAAA", CertCredential, cert_wine }, + { "@@C", UsernameTargetCredential, NULL }, + { "@@CA", UsernameTargetCredential, NULL }, + { "@@CAAAAAA", UsernameTargetCredential, NULL }, + { "@@CAAAAAA0B", UsernameTargetCredential, NULL }, + { "@@CAAAAAA0BA", UsernameTargetCredential, NULL }, + { "@@CCAAAAA0BA", UsernameTargetCredential, tW }, + { "@@CEAAAAA0BA", UsernameTargetCredential, NULL }, + { "@@CEAAAAA0BAd", UsernameTargetCredential, NULL }, + { "@@CEAAAAA0BAdA", UsernameTargetCredential, NULL }, + { "@@CEAAAAA0BQZAA", UsernameTargetCredential, teW }, + { "@@CEAAAAA0BQZAQ", UsernameTargetCredential, teW }, + { "@@CEAAAAA0BQZAg", UsernameTargetCredential, teW }, + { "@@CEAAAAA0BQZAw", UsernameTargetCredential, teW }, + { "@@CEAAAAA0BQZAAA", UsernameTargetCredential, NULL }, + { "@@CGAAAAA0BQZAMH", UsernameTargetCredential, NULL }, + { "@@CGAAAAA0BQZAMHA", UsernameTargetCredential, tesW }, + { "@@CGAAAAA0BQZAMHAA", UsernameTargetCredential, NULL }, + { "@@CCAAAAA0BAA", UsernameTargetCredential, NULL }, + { "@@CBAAAAA0BAA", UsernameTargetCredential, NULL }, + { "@@CAgAAAA0BAA", UsernameTargetCredential, NULL }, + { "@@CIAAAAA0BQZAMHA0BA", UsernameTargetCredential, testW }, + { "@@CA-----0BQZAMHA0BA", UsernameTargetCredential, NULL }, + }; SetLastError( 0xdeadbeef ); ret = pCredUnmarshalCredentialA( NULL, NULL, NULL ); @@ -593,14 +644,6 @@ ok( !ret, "unexpected success\n" ); ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); - type = 0; - cert = NULL; - SetLastError( 0xdeadbeef ); - ret = pCredUnmarshalCredentialA( "", &type, (void **)&cert ); - error = GetLastError(); - ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); - if (0) { /* crash */ SetLastError( 0xdeadbeef ); ret = pCredUnmarshalCredentialA( "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA", &type, NULL ); @@ -615,69 +658,46 @@ ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); } - type = 0; - cert = NULL; - ret = pCredUnmarshalCredentialA( "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA", &type, (void **)&cert ); - ok( ret, "unexpected failure %u\n", GetLastError() ); - ok( type == CertCredential, "got %u\n", type ); - ok( cert != NULL, "cert is NULL\n" ); - ok( cert->cbSize == sizeof(*cert), "wrong size %u\n", cert->cbSize ); - for (i = 0; i < sizeof(cert->rgbHashOfCert); i++) ok( !cert->rgbHashOfCert[i], "wrong data\n" ); - pCredFree( cert ); - - type = 0; - cert = NULL; - ret = pCredUnmarshalCredentialA( "@@BXlmblBAAAAAAAAAAAAAAAAAAAAA", &type, (void **)&cert ); - ok( ret, "unexpected failure %u\n", GetLastError() ); - ok( type == CertCredential, "got %u\n", type ); - ok( cert != NULL, "cert is NULL\n" ); - ok( cert->cbSize == sizeof(*cert), "wrong size %u\n", cert->cbSize ); - ok( cert->rgbHashOfCert[0] == 'W', "wrong data)\n" ); - ok( cert->rgbHashOfCert[1] == 'i', "wrong data\n" ); - ok( cert->rgbHashOfCert[2] == 'n', "wrong data\n" ); - ok( cert->rgbHashOfCert[3] == 'e', "wrong data\n" ); - for (i = 4; i < sizeof(cert->rgbHashOfCert); i++) ok( !cert->rgbHashOfCert[i], "wrong data\n" ); - pCredFree( cert ); - - SetLastError( 0xdeadbeef ); - ret = pCredUnmarshalCredentialA( "@@CAAAAAA", &type, (void **)&username ); - error = GetLastError(); - ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); - - SetLastError( 0xdeadbeef ); - ret = pCredUnmarshalCredentialA( "@@CAAAAAA0BA", &type, (void **)&username ); - error = GetLastError(); - ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); - - type = 0; - username = NULL; - ret = pCredUnmarshalCredentialA( "@@CCAAAAA0BA", &type, (void **)&username ); - ok( ret, "unexpected failure %u\n", GetLastError() ); - ok( type == UsernameTargetCredential, "got %u\n", type ); - ok( username != NULL, "username is NULL\n" ); - ok( username->UserName != NULL, "UserName is NULL\n" ); - ok( !lstrcmpW( username->UserName, tW ), "got %s\n", wine_dbgstr_w(username->UserName) ); - pCredFree( username ); - - type = 0; - username = NULL; - ret = pCredUnmarshalCredentialA( "@@CIAAAAA0BQZAMHA0BA", &type, (void **)&username ); - ok( ret, "unexpected failure %u\n", GetLastError() ); - ok( type == UsernameTargetCredential, "got %u\n", type ); - ok( username != NULL, "username is NULL\n" ); - ok( username->UserName != NULL, "UserName is NULL\n" ); - ok( !lstrcmpW( username->UserName, testW ), "got %s\n", wine_dbgstr_w(username->UserName) ); - pCredFree( username ); + for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) + { + SetLastError(0xdeadbeef); + type = 0; + p = NULL; + ret = pCredUnmarshalCredentialA(tests[i].cred, &type, &p); + error = GetLastError(); + if (tests[i].unmarshaled) + { + ok(ret, "[%u] unexpected failure %u\n", i, error); + ok(type == tests[i].type, "[%u] got %u\n", i, type); + ok(p != NULL, "[%u] returned pointer is NULL\n", i); + if (tests[i].type == CertCredential) + { + cert = p; + hash = tests[i].unmarshaled; + ok(cert->cbSize == sizeof(*cert), + "[%u] wrong size %u\n", i, cert->cbSize); + for (j = 0; j < sizeof(cert->rgbHashOfCert); j++) + ok(cert->rgbHashOfCert[j] == hash[j], "[%u] wrong data\n", i); + } + else if (tests[i].type == UsernameTargetCredential) + { + username = p; + ok(username->UserName != NULL, "[%u] UserName is NULL\n", i); + ok(!lstrcmpW(username->UserName, tests[i].unmarshaled), + "[%u] got %s\n", i, wine_dbgstr_w(username->UserName)); + } + } + else + { + ok(!ret, "[%u] unexpected success\n", i); + ok(error == ERROR_INVALID_PARAMETER, "[%u] got %u\n", i, error); + ok(type == tests[i].type, "[%u] got %u\n", i, type); + ok(p == NULL, "[%u] returned pointer is not NULL\n", i); + } - type = 0; - username = NULL; - SetLastError( 0xdeadbeef ); - ret = pCredUnmarshalCredentialA( "@@CA-----0BQZAMHA0BA", &type, (void **)&username ); - error = GetLastError(); - ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + if (ret) + pCredFree(p); + } } static void test_CredIsMarshaledCredentialA(void) diff -Nru wine1.7-1.7.15/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec wine1.7-1.7.16/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec --- wine1.7-1.7.15/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/api-ms-win-core-synch-l1-2-0/api-ms-win-core-synch-l1-2-0.spec 2014-04-04 19:13:44.000000000 +0000 @@ -39,7 +39,7 @@ @ stdcall SetCriticalSectionSpinCount(ptr long) kernel32.SetCriticalSectionSpinCount @ stdcall SetEvent(long) kernel32.SetEvent @ stdcall SetWaitableTimer(long ptr long ptr ptr long) kernel32.SetWaitableTimer -@ stub SetWaitableTimerEx +@ stdcall SetWaitableTimerEx(long ptr long ptr ptr ptr long) kernel32.SetWaitableTimerEx @ stdcall SignalObjectAndWait(long long long long) kernel32.SignalObjectAndWait @ stdcall Sleep(long) kernel32.Sleep @ stdcall SleepConditionVariableCS(ptr ptr long) kernel32.SleepConditionVariableCS diff -Nru wine1.7-1.7.15/dlls/apphelp/apphelp.c wine1.7-1.7.16/dlls/apphelp/apphelp.c --- wine1.7-1.7.15/dlls/apphelp/apphelp.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/apphelp/apphelp.c 2014-04-04 19:13:44.000000000 +0000 @@ -33,6 +33,7 @@ /* FIXME: don't know where to place that typedef */ typedef HANDLE PDB; +typedef HANDLE HSDB; BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { @@ -81,3 +82,11 @@ SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return TRUE; } + + +HSDB WINAPI SdbInitDatabase(DWORD flags, LPCWSTR path) +{ + FIXME("stub: %08x %s\n", flags, debugstr_w(path)); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return NULL; +} diff -Nru wine1.7-1.7.15/dlls/apphelp/apphelp.spec wine1.7-1.7.16/dlls/apphelp/apphelp.spec --- wine1.7-1.7.15/dlls/apphelp/apphelp.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/apphelp/apphelp.spec 2014-04-04 19:13:44.000000000 +0000 @@ -83,7 +83,7 @@ @ stub SdbGrabMatchingInfoEx @ stub SdbGUIDFromString @ stub SdbGUIDToString -@ stub SdbInitDatabase +@ stdcall SdbInitDatabase(long wstr) @ stub SdbInitDatabaseEx @ stub SdbIsNullGUID @ stub SdbIsStandardDatabase diff -Nru wine1.7-1.7.15/dlls/comctl32/comctl32.spec wine1.7-1.7.16/dlls/comctl32/comctl32.spec --- wine1.7-1.7.15/dlls/comctl32/comctl32.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/comctl32/comctl32.spec 2014-04-04 19:13:44.000000000 +0000 @@ -62,32 +62,32 @@ 341 stdcall -noname SendNotify(long long long ptr) 342 stdcall -noname SendNotifyEx(long long long ptr long) 345 stdcall -ordinal TaskDialogIndirect(ptr ptr ptr ptr) -350 stdcall -noname StrChrA(str str) -351 stdcall -noname StrRChrA(str str long) -352 stdcall -noname StrCmpNA(str str long) -353 stdcall -noname StrCmpNIA(str str long) -354 stdcall -noname StrStrA(str str) -355 stdcall -noname StrStrIA(str str) -356 stdcall -noname StrCSpnA(str str) -357 stdcall -noname StrToIntA(str) -358 stdcall -noname StrChrW(wstr long) -359 stdcall -noname StrRChrW(wstr wstr long) -360 stdcall -noname StrCmpNW(wstr wstr long) -361 stdcall -noname StrCmpNIW(wstr wstr long) -362 stdcall -noname StrStrW(wstr wstr) -363 stdcall -noname StrStrIW(wstr wstr) -364 stdcall -noname StrCSpnW(wstr wstr) -365 stdcall -noname StrToIntW(wstr) -366 stdcall -noname StrChrIA(str long) -367 stdcall -noname StrChrIW(wstr long) -368 stdcall -noname StrRChrIA(str str long) -369 stdcall -noname StrRChrIW(wstr wstr long) -372 stdcall -noname StrRStrIA(str str str) -373 stdcall -noname StrRStrIW(wstr wstr wstr) -374 stdcall -noname StrCSpnIA(str str) -375 stdcall -noname StrCSpnIW(wstr wstr) -376 stdcall -noname IntlStrEqWorkerA(long str str long) -377 stdcall -noname IntlStrEqWorkerW(long wstr wstr long) +350 stdcall -noname -private StrChrA(str str) +351 stdcall -noname -private StrRChrA(str str long) +352 stdcall -noname -private StrCmpNA(str str long) +353 stdcall -noname -private StrCmpNIA(str str long) +354 stdcall -noname -private StrStrA(str str) +355 stdcall -noname -private StrStrIA(str str) +356 stdcall -noname -private StrCSpnA(str str) +357 stdcall -noname -private StrToIntA(str) +358 stdcall -noname -private StrChrW(wstr long) +359 stdcall -noname -private StrRChrW(wstr wstr long) +360 stdcall -noname -private StrCmpNW(wstr wstr long) +361 stdcall -noname -private StrCmpNIW(wstr wstr long) +362 stdcall -noname -private StrStrW(wstr wstr) +363 stdcall -noname -private StrStrIW(wstr wstr) +364 stdcall -noname -private StrCSpnW(wstr wstr) +365 stdcall -noname -private StrToIntW(wstr) +366 stdcall -noname -private StrChrIA(str long) +367 stdcall -noname -private StrChrIW(wstr long) +368 stdcall -noname -private StrRChrIA(str str long) +369 stdcall -noname -private StrRChrIW(wstr wstr long) +372 stdcall -noname -private StrRStrIA(str str str) +373 stdcall -noname -private StrRStrIW(wstr wstr wstr) +374 stdcall -noname -private StrCSpnIA(str str) +375 stdcall -noname -private StrCSpnIW(wstr wstr) +376 stdcall -noname -private IntlStrEqWorkerA(long str str long) +377 stdcall -noname -private IntlStrEqWorkerW(long wstr wstr long) 382 stdcall -noname SmoothScrollWindow(ptr) 383 stub -noname DoReaderMode 384 stdcall -noname SetPathWordBreakProc(ptr long) diff -Nru wine1.7-1.7.15/dlls/comctl32/dpa.c wine1.7-1.7.16/dlls/comctl32/dpa.c --- wine1.7-1.7.15/dlls/comctl32/dpa.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/comctl32/dpa.c 2014-04-04 19:13:44.000000000 +0000 @@ -129,8 +129,10 @@ if (!hDpa) return E_OUTOFMEMORY; - if (!DPA_Grow (hDpa, streamData.dwItems)) + if (!DPA_Grow (hDpa, streamData.dwItems)) { + DPA_Destroy (hDpa); return E_OUTOFMEMORY; + } /* load data from the stream into the dpa */ ptr = hDpa->ptrs; diff -Nru wine1.7-1.7.15/dlls/comctl32/tests/header.c wine1.7-1.7.16/dlls/comctl32/tests/header.c --- wine1.7-1.7.15/dlls/comctl32/tests/header.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/comctl32/tests/header.c 2014-04-04 19:13:44.000000000 +0000 @@ -442,6 +442,7 @@ if (defwndproc_counter) msg.flags |= defwinproc; msg.wParam = wParam; msg.lParam = lParam; + msg.id = 0; add_message(sequences, PARENT_SEQ_INDEX, &msg); } diff -Nru wine1.7-1.7.15/dlls/d3d9/buffer.c wine1.7-1.7.16/dlls/d3d9/buffer.c --- wine1.7-1.7.15/dlls/d3d9/buffer.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3d9/buffer.c 2014-04-04 19:13:44.000000000 +0000 @@ -50,7 +50,7 @@ static ULONG WINAPI d3d9_vertexbuffer_AddRef(IDirect3DVertexBuffer9 *iface) { struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface); - ULONG refcount = InterlockedIncrement(&buffer->refcount); + ULONG refcount = InterlockedIncrement(&buffer->resource.refcount); TRACE("%p increasing refcount to %u.\n", iface, refcount); @@ -68,7 +68,7 @@ static ULONG WINAPI d3d9_vertexbuffer_Release(IDirect3DVertexBuffer9 *iface) { struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface); - ULONG refcount = InterlockedDecrement(&buffer->refcount); + ULONG refcount = InterlockedDecrement(&buffer->resource.refcount); TRACE("%p decreasing refcount to %u.\n", iface, refcount); @@ -105,52 +105,28 @@ REFGUID guid, const void *data, DWORD data_size, DWORD flags) { struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(guid), data, data_size, flags); - wined3d_mutex_lock(); - resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); - hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_set_private_data(&buffer->resource, guid, data, data_size, flags); } static HRESULT WINAPI d3d9_vertexbuffer_GetPrivateData(IDirect3DVertexBuffer9 *iface, REFGUID guid, void *data, DWORD *data_size) { struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(guid), data, data_size); - wined3d_mutex_lock(); - resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); - hr = wined3d_resource_get_private_data(resource, guid, data, data_size); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_get_private_data(&buffer->resource, guid, data, data_size); } static HRESULT WINAPI d3d9_vertexbuffer_FreePrivateData(IDirect3DVertexBuffer9 *iface, REFGUID guid) { struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - wined3d_mutex_lock(); - resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); - hr = wined3d_resource_free_private_data(resource, guid); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_free_private_data(&buffer->resource, guid); } static DWORD WINAPI d3d9_vertexbuffer_SetPriority(IDirect3DVertexBuffer9 *iface, DWORD priority) @@ -275,7 +251,9 @@ static void STDMETHODCALLTYPE d3d9_vertexbuffer_wined3d_object_destroyed(void *parent) { - HeapFree(GetProcessHeap(), 0, parent); + struct d3d9_vertexbuffer *buffer = parent; + d3d9_resource_cleanup(&buffer->resource); + HeapFree(GetProcessHeap(), 0, buffer); } static const struct wined3d_parent_ops d3d9_vertexbuffer_wined3d_parent_ops = @@ -289,8 +267,8 @@ HRESULT hr; buffer->IDirect3DVertexBuffer9_iface.lpVtbl = &d3d9_vertexbuffer_vtbl; - buffer->refcount = 1; buffer->fvf = fvf; + d3d9_resource_init(&buffer->resource); wined3d_mutex_lock(); hr = wined3d_buffer_create_vb(device->wined3d_device, size, usage & WINED3DUSAGE_MASK, @@ -344,7 +322,7 @@ static ULONG WINAPI d3d9_indexbuffer_AddRef(IDirect3DIndexBuffer9 *iface) { struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface); - ULONG refcount = InterlockedIncrement(&buffer->refcount); + ULONG refcount = InterlockedIncrement(&buffer->resource.refcount); TRACE("%p increasing refcount to %u.\n", iface, refcount); @@ -362,7 +340,7 @@ static ULONG WINAPI d3d9_indexbuffer_Release(IDirect3DIndexBuffer9 *iface) { struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface); - ULONG refcount = InterlockedDecrement(&buffer->refcount); + ULONG refcount = InterlockedDecrement(&buffer->resource.refcount); TRACE("%p decreasing refcount to %u.\n", iface, refcount); @@ -399,52 +377,28 @@ REFGUID guid, const void *data, DWORD data_size, DWORD flags) { struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(guid), data, data_size, flags); - wined3d_mutex_lock(); - resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); - hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_set_private_data(&buffer->resource, guid, data, data_size, flags); } static HRESULT WINAPI d3d9_indexbuffer_GetPrivateData(IDirect3DIndexBuffer9 *iface, REFGUID guid, void *data, DWORD *data_size) { struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(guid), data, data_size); - wined3d_mutex_lock(); - resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); - hr = wined3d_resource_get_private_data(resource, guid, data, data_size); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_get_private_data(&buffer->resource, guid, data, data_size); } static HRESULT WINAPI d3d9_indexbuffer_FreePrivateData(IDirect3DIndexBuffer9 *iface, REFGUID guid) { struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - wined3d_mutex_lock(); - resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); - hr = wined3d_resource_free_private_data(resource, guid); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_free_private_data(&buffer->resource, guid); } static DWORD WINAPI d3d9_indexbuffer_SetPriority(IDirect3DIndexBuffer9 *iface, DWORD priority) @@ -567,7 +521,9 @@ static void STDMETHODCALLTYPE d3d9_indexbuffer_wined3d_object_destroyed(void *parent) { - HeapFree(GetProcessHeap(), 0, parent); + struct d3d9_indexbuffer *buffer = parent; + d3d9_resource_cleanup(&buffer->resource); + HeapFree(GetProcessHeap(), 0, buffer); } static const struct wined3d_parent_ops d3d9_indexbuffer_wined3d_parent_ops = @@ -581,8 +537,8 @@ HRESULT hr; buffer->IDirect3DIndexBuffer9_iface.lpVtbl = &d3d9_indexbuffer_vtbl; - buffer->refcount = 1; buffer->format = wined3dformat_from_d3dformat(format); + d3d9_resource_init(&buffer->resource); wined3d_mutex_lock(); hr = wined3d_buffer_create_ib(device->wined3d_device, size, usage & WINED3DUSAGE_MASK, diff -Nru wine1.7-1.7.15/dlls/d3d9/d3d9_main.c wine1.7-1.7.16/dlls/d3d9/d3d9_main.c --- wine1.7-1.7.15/dlls/d3d9/d3d9_main.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3d9/d3d9_main.c 2014-04-04 19:13:44.000000000 +0000 @@ -162,3 +162,81 @@ { FIXME("color 0x%08x, name %s stub!\n", color, debugstr_w(name)); } + +void d3d9_resource_cleanup(struct d3d9_resource *resource) +{ + wined3d_private_store_cleanup(&resource->private_store); +} + +HRESULT d3d9_resource_free_private_data(struct d3d9_resource *resource, const GUID *guid) +{ + struct wined3d_private_data *entry; + + wined3d_mutex_lock(); + entry = wined3d_private_store_get_private_data(&resource->private_store, guid); + if (!entry) + { + wined3d_mutex_unlock(); + return D3DERR_NOTFOUND; + } + + wined3d_private_store_free_private_data(&resource->private_store, entry); + wined3d_mutex_unlock(); + + return D3D_OK; +} + +HRESULT d3d9_resource_get_private_data(struct d3d9_resource *resource, const GUID *guid, + void *data, DWORD *data_size) +{ + const struct wined3d_private_data *stored_data; + DWORD size_in; + HRESULT hr; + + wined3d_mutex_lock(); + stored_data = wined3d_private_store_get_private_data(&resource->private_store, guid); + if (!stored_data) + { + hr = D3DERR_NOTFOUND; + goto done; + } + + size_in = *data_size; + *data_size = stored_data->size; + if (!data) + { + hr = D3D_OK; + goto done; + } + if (size_in < stored_data->size) + { + hr = D3DERR_MOREDATA; + goto done; + } + + if (stored_data->flags & WINED3DSPD_IUNKNOWN) + IUnknown_AddRef(stored_data->content.object); + memcpy(data, stored_data->content.data, stored_data->size); + hr = D3D_OK; + +done: + wined3d_mutex_unlock(); + return hr; +} + +void d3d9_resource_init(struct d3d9_resource *resource) +{ + resource->refcount = 1; + wined3d_private_store_init(&resource->private_store); +} + +HRESULT d3d9_resource_set_private_data(struct d3d9_resource *resource, const GUID *guid, + const void *data, DWORD data_size, DWORD flags) +{ + HRESULT hr; + + wined3d_mutex_lock(); + hr = wined3d_private_store_set_private_data(&resource->private_store, guid, data, data_size, flags); + wined3d_mutex_unlock(); + return hr; +} diff -Nru wine1.7-1.7.15/dlls/d3d9/d3d9_private.h wine1.7-1.7.16/dlls/d3d9/d3d9_private.h --- wine1.7-1.7.15/dlls/d3d9/d3d9_private.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3d9/d3d9_private.h 2014-04-04 19:13:44.000000000 +0000 @@ -166,10 +166,24 @@ UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, D3DDISPLAYMODEEX *mode) DECLSPEC_HIDDEN; +struct d3d9_resource +{ + LONG refcount; + struct wined3d_private_store private_store; +}; + +void d3d9_resource_cleanup(struct d3d9_resource *resource) DECLSPEC_HIDDEN; +HRESULT d3d9_resource_free_private_data(struct d3d9_resource *resource, const GUID *guid) DECLSPEC_HIDDEN; +HRESULT d3d9_resource_get_private_data(struct d3d9_resource *resource, const GUID *guid, + void *data, DWORD *data_size) DECLSPEC_HIDDEN; +void d3d9_resource_init(struct d3d9_resource *resource) DECLSPEC_HIDDEN; +HRESULT d3d9_resource_set_private_data(struct d3d9_resource *resource, const GUID *guid, + const void *data, DWORD data_size, DWORD flags) DECLSPEC_HIDDEN; + struct d3d9_volume { IDirect3DVolume9 IDirect3DVolume9_iface; - LONG refcount; + struct d3d9_resource resource; struct wined3d_volume *wined3d_volume; IUnknown *container; IUnknown *forwardReference; @@ -192,7 +206,7 @@ struct d3d9_surface { IDirect3DSurface9 IDirect3DSurface9_iface; - LONG refcount; + struct d3d9_resource resource; struct wined3d_surface *wined3d_surface; IDirect3DDevice9Ex *parent_device; IUnknown *container; @@ -207,7 +221,7 @@ struct d3d9_vertexbuffer { IDirect3DVertexBuffer9 IDirect3DVertexBuffer9_iface; - LONG refcount; + struct d3d9_resource resource; struct wined3d_buffer *wined3d_buffer; IDirect3DDevice9Ex *parent_device; DWORD fvf; @@ -220,7 +234,7 @@ struct d3d9_indexbuffer { IDirect3DIndexBuffer9 IDirect3DIndexBuffer9_iface; - LONG refcount; + struct d3d9_resource resource; struct wined3d_buffer *wined3d_buffer; IDirect3DDevice9Ex *parent_device; enum wined3d_format_id format; @@ -233,7 +247,7 @@ struct d3d9_texture { IDirect3DBaseTexture9 IDirect3DBaseTexture9_iface; - LONG refcount; + struct d3d9_resource resource; struct wined3d_texture *wined3d_texture; IDirect3DDevice9Ex *parent_device; }; diff -Nru wine1.7-1.7.15/dlls/d3d9/device.c wine1.7-1.7.16/dlls/d3d9/device.c --- wine1.7-1.7.15/dlls/d3d9/device.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3d9/device.c 2014-04-04 19:13:44.000000000 +0000 @@ -581,7 +581,7 @@ } surface = wined3d_resource_get_parent(resource); - if (surface->refcount) + if (surface->resource.refcount) { WARN("Surface %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.\n", surface, resource); return D3DERR_INVALIDCALL; diff -Nru wine1.7-1.7.15/dlls/d3d9/surface.c wine1.7-1.7.16/dlls/d3d9/surface.c --- wine1.7-1.7.15/dlls/d3d9/surface.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3d9/surface.c 2014-04-04 19:13:44.000000000 +0000 @@ -61,7 +61,7 @@ return IUnknown_AddRef(surface->forwardReference); } - refcount = InterlockedIncrement(&surface->refcount); + refcount = InterlockedIncrement(&surface->resource.refcount); TRACE("%p increasing refcount to %u.\n", iface, refcount); if (refcount == 1) @@ -89,7 +89,7 @@ return IUnknown_Release(surface->forwardReference); } - refcount = InterlockedDecrement(&surface->refcount); + refcount = InterlockedDecrement(&surface->resource.refcount); TRACE("%p decreasing refcount to %u.\n", iface, refcount); if (!refcount) @@ -143,52 +143,28 @@ const void *data, DWORD data_size, DWORD flags) { struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(guid), data, data_size, flags); - wined3d_mutex_lock(); - resource = wined3d_surface_get_resource(surface->wined3d_surface); - hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_set_private_data(&surface->resource, guid, data, data_size, flags); } static HRESULT WINAPI d3d9_surface_GetPrivateData(IDirect3DSurface9 *iface, REFGUID guid, void *data, DWORD *data_size) { struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(guid), data, data_size); - wined3d_mutex_lock(); - resource = wined3d_surface_get_resource(surface->wined3d_surface); - hr = wined3d_resource_get_private_data(resource, guid, data, data_size); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_get_private_data(&surface->resource, guid, data, data_size); } static HRESULT WINAPI d3d9_surface_FreePrivateData(IDirect3DSurface9 *iface, REFGUID guid) { struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - wined3d_mutex_lock(); - resource = wined3d_surface_get_resource(surface->wined3d_surface); - hr = wined3d_resource_free_private_data(resource, guid); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_free_private_data(&surface->resource, guid); } static DWORD WINAPI d3d9_surface_SetPriority(IDirect3DSurface9 *iface, DWORD priority) @@ -385,7 +361,9 @@ static void STDMETHODCALLTYPE surface_wined3d_object_destroyed(void *parent) { - HeapFree(GetProcessHeap(), 0, parent); + struct d3d9_surface *surface = parent; + d3d9_resource_cleanup(&surface->resource); + HeapFree(GetProcessHeap(), 0, surface); } static const struct wined3d_parent_ops d3d9_surface_wined3d_parent_ops = @@ -399,7 +377,7 @@ struct wined3d_resource_desc desc; surface->IDirect3DSurface9_iface.lpVtbl = &d3d9_surface_vtbl; - surface->refcount = 1; + d3d9_resource_init(&surface->resource); wined3d_resource_get_desc(wined3d_surface_get_resource(wined3d_surface), &desc); switch (d3dformat_from_wined3dformat(desc.format)) diff -Nru wine1.7-1.7.15/dlls/d3d9/tests/visual.c wine1.7-1.7.16/dlls/d3d9/tests/visual.c --- wine1.7-1.7.15/dlls/d3d9/tests/visual.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3d9/tests/visual.c 2014-04-04 19:13:44.000000000 +0000 @@ -787,11 +787,6 @@ } } -typedef struct { - float in[4]; - DWORD out; -} test_data_t; - /* * c7 mova ARGB mov ARGB * -2.4 -2 0x00ffff00 -3 0x00ff0000 @@ -801,9 +796,21 @@ * 1.6 2 0x00ff00ff 1 0x000000ff * 2.4 2 0x00ff00ff 2 0x00ff00ff */ -static void test_mova(IDirect3DDevice9 *device) +static void test_mova(void) { - static const DWORD mova_test[] = { + IDirect3DVertexDeclaration9 *vertex_declaration; + IDirect3DVertexShader9 *mova_shader; + IDirect3DVertexShader9 *mov_shader; + IDirect3DDevice9 *device; + unsigned int i, j; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + + static const DWORD mova_test[] = + { 0xfffe0200, /* vs_2_0 */ 0x0200001f, 0x80000000, 0x900f0000, /* dcl_position v0 */ 0x05000051, 0xa00f0000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, /* def c0, 1.0, 0.0, 0.0, 1.0 */ @@ -818,7 +825,8 @@ 0x02000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */ 0x0000ffff /* END */ }; - static const DWORD mov_test[] = { + static const DWORD mov_test[] = + { 0xfffe0101, /* vs_1_1 */ 0x0000001f, 0x80000000, 0x900f0000, /* dcl_position v0 */ 0x00000051, 0xa00f0000, 0x3f800000, 0x00000000, 0x00000000, 0x3f800000, /* def c0, 1.0, 0.0, 0.0, 1.0 */ @@ -833,8 +841,13 @@ 0x00000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */ 0x0000ffff /* END */ }; - - static const test_data_t test_data[2][6] = { + static const struct + { + float in[4]; + DWORD out; + } + test_data[2][6] = + { { {{-2.4f, 0.0f, 0.0f, 0.0f}, 0x00ff0000}, {{-1.6f, 0.0f, 0.0f, 0.0f}, 0x00ffff00}, @@ -852,24 +865,37 @@ {{ 2.4f, 0.0f, 0.0f, 0.0f}, 0x00ff00ff} } }; - - static const float quad[][3] = { + static const struct vec3 quad[] = + { {-1.0f, -1.0f, 0.0f}, {-1.0f, 1.0f, 0.0f}, { 1.0f, -1.0f, 0.0f}, { 1.0f, 1.0f, 0.0f}, }; - - static const D3DVERTEXELEMENT9 decl_elements[] = { + static const D3DVERTEXELEMENT9 decl_elements[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, D3DDECL_END() }; - IDirect3DVertexDeclaration9 *vertex_declaration = NULL; - IDirect3DVertexShader9 *mova_shader = NULL; - IDirect3DVertexShader9 *mov_shader = NULL; - HRESULT hr; - UINT i, j; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } hr = IDirect3DDevice9_CreateVertexShader(device, mova_test, &mova_shader); ok(SUCCEEDED(hr), "CreateVertexShader failed (%08x)\n", hr); @@ -882,9 +908,9 @@ hr = IDirect3DDevice9_SetVertexShader(device, mov_shader); ok(SUCCEEDED(hr), "SetVertexShader failed (%08x)\n", hr); - for(j = 0; j < 2; ++j) + for (j = 0; j < sizeof(test_data) / sizeof(*test_data); ++j) { - for (i = 0; i < (sizeof(test_data[0]) / sizeof(test_data_t)); ++i) + for (i = 0; i < sizeof(*test_data) / sizeof(**test_data); ++i) { DWORD color; @@ -894,7 +920,7 @@ hr = IDirect3DDevice9_BeginScene(device); ok(SUCCEEDED(hr), "BeginScene failed (%08x)\n", hr); - hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, &quad[0], 3 * sizeof(float)); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (%08x)\n", hr); hr = IDirect3DDevice9_EndScene(device); @@ -914,12 +940,14 @@ ok(SUCCEEDED(hr), "SetVertexShader failed (%08x)\n", hr); } - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(SUCCEEDED(hr), "SetVertexShader failed (%08x)\n", hr); - IDirect3DVertexDeclaration9_Release(vertex_declaration); IDirect3DVertexShader9_Release(mova_shader); IDirect3DVertexShader9_Release(mov_shader); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } struct sVertex { @@ -1746,17 +1774,25 @@ * linear table fog with non foggy vertex shader * vertex fog with foggy vertex shader, non-linear * fog with shader, non-linear fog with foggy shader, - * linear table fog with foggy shader - */ -static void fog_with_shader_test(IDirect3DDevice9 *device) + * linear table fog with foggy shader */ +static void fog_with_shader_test(void) { - HRESULT hr; + IDirect3DVertexShader9 *vertex_shader[4] = {NULL, NULL, NULL, NULL}; + IDirect3DPixelShader9 *pixel_shader[3] = {NULL, NULL, NULL}; + IDirect3DVertexDeclaration9 *vertex_declaration = NULL; + IDirect3DDevice9 *device; + unsigned int i, j; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; DWORD color; - union { + HWND window; + HRESULT hr; + union + { float f; DWORD i; } start, end; - unsigned int i, j; /* basic vertex shader without fog computation ("non foggy") */ static const DWORD vertex_shader_code1[] = @@ -1808,32 +1844,31 @@ 0x02000001, 0x800f0800, 0x90e40000, /* mov oC0, v0 */ 0x0000ffff }; - - static struct vertex quad[] = { + static struct vertex quad[] = + { {-1.0f, -1.0f, 0.0f, 0xffff0000 }, {-1.0f, 1.0f, 0.0f, 0xffff0000 }, { 1.0f, -1.0f, 0.0f, 0xffff0000 }, { 1.0f, 1.0f, 0.0f, 0xffff0000 }, }; - - static const D3DVERTEXELEMENT9 decl_elements[] = { + static const D3DVERTEXELEMENT9 decl_elements[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, D3DDECL_END() }; - - IDirect3DVertexDeclaration9 *vertex_declaration = NULL; - IDirect3DVertexShader9 *vertex_shader[4] = {NULL, NULL, NULL, NULL}; - IDirect3DPixelShader9 *pixel_shader[3] = {NULL, NULL, NULL}; - - /* This reference data was collected on a nVidia GeForce 7600GS driver version 84.19 DirectX version 9.0c on Windows XP */ - static const struct test_data_t { + /* This reference data was collected on a nVidia GeForce 7600GS driver + * version 84.19 DirectX version 9.0c on Windows XP. */ + static const struct test_data_t + { int vshader; int pshader; D3DFOGMODE vfog; D3DFOGMODE tfog; unsigned int color[11]; - } test_data[] = { + } + test_data[] = + { /* only pixel shader: */ {0, 1, D3DFOG_NONE, D3DFOG_LINEAR, {0x00ff0000, 0x00ff0000, 0x00df2000, 0x00bf4000, 0x009f6000, 0x007f8000, @@ -2010,10 +2045,43 @@ {0x00ff0000, 0x00ff0000, 0x00df2000, 0x00bf4000, 0x009f6000, 0x007f8000, 0x005fa000, 0x0040bf00, 0x0020df00, 0x0000ff00, 0x0000ff00}}, }; + static const D3DMATRIX identity = + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0) || caps.PixelShaderVersion < D3DPS_VERSION(2, 0)) + { + skip("No shader model 2 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } - /* NOTE: changing these values will not affect the tests with foggy vertex shader, as the values are hardcoded in the shader*/ - start.f=0.1f; - end.f=0.9f; + /* NOTE: Changing these values will not affect the tests with foggy vertex + * shader, as the values are hardcoded in the shader. */ + start.f = 0.1f; + end.f = 0.9f; + + /* Some of the tests seem to depend on the projection matrix explicitly + * being set to an identity matrix, even though that's the default. + * (AMD Radeon HD 6310, Windows 7) */ + hr = IDirect3DDevice9_SetTransform(device, D3DTS_PROJECTION, &identity); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, vertex_shader_code1, &vertex_shader[1]); ok(SUCCEEDED(hr), "CreateVertexShader failed (%08x)\n", hr); @@ -2068,7 +2136,7 @@ quad[2].z = 0.001f + (float)j / 10.02f; quad[3].z = 0.001f + (float)j / 10.02f; - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff00ff, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed (%08x)\n", hr); hr = IDirect3DDevice9_BeginScene(device); @@ -2090,22 +2158,17 @@ } } - /* reset states */ - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(SUCCEEDED(hr), "SetVertexShader failed (%08x)\n", hr); - hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(SUCCEEDED(hr), "SetPixelShader failed (%08x)\n", hr); - hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL); - ok(SUCCEEDED(hr), "SetVertexDeclaration failed (%08x)\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_FOGENABLE, FALSE); - ok(hr == D3D_OK, "Turning off fog calculations failed (%08x)\n", hr); - IDirect3DVertexShader9_Release(vertex_shader[1]); IDirect3DVertexShader9_Release(vertex_shader[2]); IDirect3DVertexShader9_Release(vertex_shader[3]); IDirect3DPixelShader9_Release(pixel_shader[1]); IDirect3DPixelShader9_Release(pixel_shader[2]); IDirect3DVertexDeclaration9_Release(vertex_declaration); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void generate_bumpmap_textures(IDirect3DDevice9 *device) { @@ -2130,10 +2193,7 @@ DWORD *ptr = (DWORD *)(((BYTE *)locked_rect.pBits) + (y * locked_rect.Pitch)); for (x = 0; x < 128; ++x) { - if(y>62 && y<66 && x>62 && x<66) - *ptr++ = 0xffffffff; - else - *ptr++ = 0xff000000; + *ptr++ = D3DCOLOR_ARGB(0xff, x * 2, y * 2, 0); } } else @@ -2179,23 +2239,36 @@ } } -/* test the behavior of the texbem instruction - * with normal 2D and projective 2D textures - */ -static void texbem_test(IDirect3DDevice9 *device) +/* Test the behavior of the texbem instruction with normal 2D and projective + * 2D textures. */ +static void texbem_test(void) { - HRESULT hr; + IDirect3DVertexDeclaration9 *vertex_declaration = NULL; + /* Use asymmetric matrix to test loading. */ + float bumpenvmat[4] = {0.0f, 0.5f, -0.5f, 0.0f}; + IDirect3DPixelShader9 *pixel_shader = NULL; + IDirect3DTexture9 *texture1, *texture2; + IDirect3DTexture9 *texture = NULL; + D3DLOCKED_RECT locked_rect; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; DWORD color; + HWND window; + HRESULT hr; int i; - static const DWORD pixel_shader_code[] = { + static const DWORD pixel_shader_code[] = + { 0xffff0101, /* ps_1_1*/ 0x00000042, 0xb00f0000, /* tex t0*/ 0x00000043, 0xb00f0001, 0xb0e40000, /* texbem t1, t0*/ 0x00000001, 0x800f0000, 0xb0e40001, /* mov r0, t1*/ 0x0000ffff }; - static const DWORD double_texbem_code[] = { + static const DWORD double_texbem_code[] = + { 0xffff0103, /* ps_1_3 */ 0x00000042, 0xb00f0000, /* tex t0 */ 0x00000043, 0xb00f0001, 0xb0e40000, /* texbem t1, t0 */ @@ -2204,40 +2277,61 @@ 0x00000002, 0x800f0000, 0xb0e40001, 0xb0e40003, /* add r0, t1, t3 */ 0x0000ffff /* end */ }; - - - static const float quad[][7] = { - {-128.0f/640.0f, -128.0f/480.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f}, - {-128.0f/640.0f, 128.0f/480.0f, 0.1f, 0.0f, 1.0f, 0.0f, 1.0f}, - { 128.0f/640.0f, -128.0f/480.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f}, - { 128.0f/640.0f, 128.0f/480.0f, 0.1f, 1.0f, 1.0f, 1.0f, 1.0f}, - }; - static const float quad_proj[][9] = { - {-128.0f/640.0f, -128.0f/480.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 128.0f}, - {-128.0f/640.0f, 128.0f/480.0f, 0.1f, 0.0f, 1.0f, 0.0f, 128.0f, 0.0f, 128.0f}, - { 128.0f/640.0f, -128.0f/480.0f, 0.1f, 1.0f, 0.0f, 128.0f, 0.0f, 0.0f, 128.0f}, - { 128.0f/640.0f, 128.0f/480.0f, 0.1f, 1.0f, 1.0f, 128.0f, 128.0f, 0.0f, 128.0f}, + static const float quad[][7] = + { + {-1.0f, -1.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f}, + {-1.0f, 1.0f, 0.1f, 0.0f, 1.0f, 0.0f, 1.0f}, + { 1.0f, -1.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f}, + { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 1.0f}, + }; + static const float quad_proj[][9] = + { + {-1.0f, -1.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 128.0f}, + {-1.0f, 1.0f, 0.1f, 0.0f, 1.0f, 0.0f, 128.0f, 0.0f, 128.0f}, + { 1.0f, -1.0f, 0.1f, 1.0f, 0.0f, 128.0f, 0.0f, 0.0f, 128.0f}, + { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 128.0f, 128.0f, 0.0f, 128.0f}, + }; + static const float double_quad[] = + { + -1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.5f, 0.5f, + -1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.5f, 0.5f, + 1.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.5f, 0.5f, + 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.5f, 0.5f, + }; + static const D3DVERTEXELEMENT9 decl_elements[][4] = + { + { + {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + {0, 12, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, + {0, 20, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, + D3DDECL_END() + }, + { + {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, + {0, 12, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, + {0, 20, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, + D3DDECL_END() + }, }; - static const D3DVERTEXELEMENT9 decl_elements[][4] = { { - {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, - {0, 12, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, - {0, 20, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, - D3DDECL_END() - },{ - {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, - {0, 12, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, - {0, 20, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, - D3DDECL_END() - } }; - - /* use asymmetric matrix to test loading */ - float bumpenvmat[4] = {0.0,0.5,-0.5,0.0}; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } - IDirect3DVertexDeclaration9 *vertex_declaration = NULL; - IDirect3DPixelShader9 *pixel_shader = NULL; - IDirect3DTexture9 *texture = NULL, *texture1, *texture2; - D3DLOCKED_RECT locked_rect; + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.PixelShaderVersion < D3DPS_VERSION(1, 1)) + { + skip("No ps_1_1 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } generate_bumpmap_textures(device); @@ -2250,11 +2344,11 @@ hr = IDirect3DDevice9_SetVertexShader(device, NULL); ok(SUCCEEDED(hr), "SetVertexShader failed (%08x)\n", hr); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, 0.0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed (%08x)\n", hr); - for(i=0; i<2; i++) { + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); + ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed (%08x)\n", hr); + if(i) { hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_COUNT4|D3DTTFF_PROJECTED); @@ -2283,14 +2377,20 @@ hr = IDirect3DDevice9_EndScene(device); ok(SUCCEEDED(hr), "EndScene failed (0x%08x)\n", hr); - color = getPixelColor(device, 320-32, 240); - ok(color_match(color, 0x00ffffff, 4), "texbem failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - color = getPixelColor(device, 320+32, 240); - ok(color_match(color, 0x00ffffff, 4), "texbem failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - color = getPixelColor(device, 320, 240-32); - ok(color_match(color, 0x00ffffff, 4), "texbem failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - color = getPixelColor(device, 320, 240+32); - ok(color_match(color, 0x00ffffff, 4), "texbem failed: Got color 0x%08x, expected 0x00ffffff.\n", color); + /* The Window 8 testbot (WARP) seems to use the transposed + * D3DTSS_BUMPENVMAT matrix. */ + color = getPixelColor(device, 160, 240); + ok(color_match(color, 0x007e8000, 4) || broken(color_match(color, 0x00007e00, 4)), + "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 480, 240); + ok(color_match(color, 0x007e8000, 4) || broken(color_match(color, 0x00fe7e00, 4)), + "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 320, 120); + ok(color_match(color, 0x007e8000, 4) || broken(color_match(color, 0x0080fe00, 4)), + "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 320, 360); + ok(color_match(color, 0x007e8000, 4) || broken(color_match(color, 0x00800000, 4)), + "Got unexpected color 0x%08x.\n", color); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); @@ -2427,33 +2527,16 @@ ok(SUCCEEDED(hr), "IDirect3DDevice9_SetSamplerState returned %#x.\n", hr); hr = IDirect3DDevice9_BeginScene(device); - ok(SUCCEEDED(hr), "BeginScene failed (0x%08x)\n", hr); - if(SUCCEEDED(hr)) { - static const float double_quad[] = { - -1.0, -1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, - 1.0, -1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, - -1.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, - 1.0, 1.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, - }; - - hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, double_quad, sizeof(float) * 11); - ok(SUCCEEDED(hr), "DrawPrimitiveUP failed (0x%08x)\n", hr); - hr = IDirect3DDevice9_EndScene(device); - ok(SUCCEEDED(hr), "EndScene failed (0x%08x)\n", hr); - } + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, double_quad, sizeof(float) * 11); + ok(SUCCEEDED(hr), "Failed to draw primitive, hr %#x.\n", hr); + hr = IDirect3DDevice9_EndScene(device); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + /* The Window 8 testbot (WARP) seems to use the transposed + * D3DTSS_BUMPENVMAT matrix. */ color = getPixelColor(device, 320, 240); - ok(color == 0x00ffff00, "double texbem failed: Got color 0x%08x, expected 0x00ffff00.\n", color); - - hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); - hr = IDirect3DDevice9_SetTexture(device, 1, NULL); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); - hr = IDirect3DDevice9_SetTexture(device, 2, NULL); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); - hr = IDirect3DDevice9_SetTexture(device, 3, NULL); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTexture failed (0x%08x)\n", hr); - hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(SUCCEEDED(hr), "Direct3DDevice9_SetPixelShader failed (0x%08x)\n", hr); + ok(color_match(color, 0x00ffff00, 1) || broken(color_match(color, 0x0000ffff, 1)), + "Got unexpected color 0x%08x.\n", color); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); @@ -2462,6 +2545,11 @@ IDirect3DTexture9_Release(texture); IDirect3DTexture9_Release(texture1); IDirect3DTexture9_Release(texture2); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void z_range_test(IDirect3DDevice9 *device) @@ -4679,17 +4767,24 @@ IDirect3DVertexDeclaration9_Release(decl4); } -static void texdepth_test(IDirect3DDevice9 *device) +static void texdepth_test(void) { IDirect3DPixelShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + DWORD color; + HWND window; HRESULT hr; - const float texdepth_test_data1[] = { 0.25, 2.0, 0.0, 0.0}; - const float texdepth_test_data2[] = { 0.25, 0.5, 0.0, 0.0}; - const float texdepth_test_data3[] = {-1.00, 0.1, 0.0, 0.0}; - const float texdepth_test_data4[] = {-0.25, -0.5, 0.0, 0.0}; - const float texdepth_test_data5[] = { 1.00, -0.1, 0.0, 0.0}; - const float texdepth_test_data6[] = { 1.00, 0.5, 0.0, 0.0}; - const float texdepth_test_data7[] = { 0.50, 0.0, 0.0, 0.0}; + + static const float texdepth_test_data1[] = { 0.25f, 2.0f, 0.0f, 0.0f}; + static const float texdepth_test_data2[] = { 0.25f, 0.5f, 0.0f, 0.0f}; + static const float texdepth_test_data3[] = {-1.00f, 0.1f, 0.0f, 0.0f}; + static const float texdepth_test_data4[] = {-0.25f, -0.5f, 0.0f, 0.0f}; + static const float texdepth_test_data5[] = { 1.00f, -0.1f, 0.0f, 0.0f}; + static const float texdepth_test_data6[] = { 1.00f, 0.5f, 0.0f, 0.0f}; + static const float texdepth_test_data7[] = { 0.50f, 0.0f, 0.0f, 0.0f}; static const DWORD shader_code[] = { 0xffff0104, /* ps_1_4 */ @@ -4700,19 +4795,40 @@ 0x00000001, 0x800f0000, 0xa0e40001, /* mov r0, c1 */ 0x0000ffff /* end */ }; - DWORD color; - float vertex[] = { - -1.0, -1.0, 0.0, - 1.0, -1.0, 1.0, - -1.0, 1.0, 0.0, - 1.0, 1.0, 1.0 + static const float vertex[] = + { + -1.0f, -1.0f, 0.0f, + -1.0f, 1.0f, 0.0f, + 1.0f, -1.0f, 1.0f, + 1.0f, 1.0f, 1.0f, }; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.PixelShaderVersion < D3DPS_VERSION(1, 1)) + { + skip("No ps_1_1 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } + hr = IDirect3DDevice9_CreatePixelShader(device, shader_code, &shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffff00, 0.0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_TRUE); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, TRUE); @@ -4897,15 +5013,12 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); - /* Cleanup */ - hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed (%08x)\n", hr); IDirect3DPixelShader9_Release(shader); - - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, TRUE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void texkill_test(void) @@ -5331,12 +5444,18 @@ ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); } -static void test_constant_clamp_vs(IDirect3DDevice9 *device) +static void test_constant_clamp_vs(void) { IDirect3DVertexShader9 *shader_11, *shader_11_2, *shader_20, *shader_20_2; IDirect3DVertexDeclaration9 *decl; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + D3DCAPS9 caps; + HWND window; HRESULT hr; - DWORD color; + static const DWORD shader_code_11[] = { 0xfffe0101, /* vs_1_1 */ @@ -5377,38 +5496,62 @@ 0x02000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */ 0x0000ffff /* end */ }; - static const D3DVERTEXELEMENT9 decl_elements[] = { + static const D3DVERTEXELEMENT9 decl_elements[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, D3DDECL_END() }; - float quad1[] = { - -1.0, -1.0, 0.1, - 0.0, -1.0, 0.1, - -1.0, 0.0, 0.1, - 0.0, 0.0, 0.1 + static const float quad1[] = + { + -1.0f, -1.0f, 0.1f, + -1.0f, 0.0f, 0.1f, + 0.0f, -1.0f, 0.1f, + 0.0f, 0.0f, 0.1f, }; - float quad2[] = { - 0.0, -1.0, 0.1, - 1.0, -1.0, 0.1, - 0.0, 0.0, 0.1, - 1.0, 0.0, 0.1 + static const float quad2[] = + { + 0.0f, -1.0f, 0.1f, + 0.0f, 0.0f, 0.1f, + 1.0f, -1.0f, 0.1f, + 1.0f, 0.0f, 0.1f, }; - float quad3[] = { - 0.0, 0.0, 0.1, - 1.0, 0.0, 0.1, - 0.0, 1.0, 0.1, - 1.0, 1.0, 0.1 + static const float quad3[] = + { + 0.0f, 0.0f, 0.1f, + 0.0f, 1.0f, 0.1f, + 1.0f, 0.0f, 0.1f, + 1.0f, 1.0f, 0.1f, }; - float quad4[] = { - -1.0, 0.0, 0.1, - 0.0, 0.0, 0.1, - -1.0, 1.0, 0.1, - 0.0, 1.0, 0.1 + static const float quad4[] = + { + -1.0f, 0.0f, 0.1f, + -1.0f, 1.0f, 0.1f, + 0.0f, 0.0f, 0.1f, + 0.0f, 1.0f, 0.1f, }; - float test_data_c1[4] = { 1.25, -0.50, -1.50, 1.0}; - float test_data_c2[4] = { -0.50, 1.25, 2.00, 1.0}; + static const float test_data_c1[4] = { 1.25f, -0.50f, -1.50f, 1.0f}; + static const float test_data_c2[4] = {-0.50f, 1.25f, 2.00f, 1.0f}; - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ffff, 0.0, 0); + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(1, 1)) + { + skip("No vs_1_1 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff00ffff, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_code_11, &shader_11); @@ -5461,11 +5604,6 @@ ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); - hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration returned %08x\n", hr); - color = getPixelColor(device, 160, 360); ok(color_match(color, D3DCOLOR_ARGB(0x00, 0xbf, 0xbf, 0x80), 1), "quad 1 has color %08x, expected 0x00bfbf80\n", color); @@ -5490,6 +5628,11 @@ if(shader_20) IDirect3DVertexShader9_Release(shader_20); IDirect3DVertexShader9_Release(shader_11_2); IDirect3DVertexShader9_Release(shader_11); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void constant_clamp_ps_test(void) @@ -6234,7 +6377,9 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); - /* Retest with the coissue flag on the alpha instruction instead. This works "as expected". */ + /* Retest with the coissue flag on the alpha instruction instead. This + * works "as expected". The Windows 8 testbot (WARP) seems to handle this + * the same as coissue on .rgb. */ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ffff, 0.0, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); @@ -6278,13 +6423,13 @@ /* 1.1 shader */ color = getPixelColor(device, 238, 358); - ok(color_match(color, 0x00ffffff, 1), + ok(color_match(color, 0x00ffffff, 1) || broken(color_match(color, 0x00000000, 1)), "pixel 238, 358 has color %08x, expected 0x00ffffff\n", color); color = getPixelColor(device, 242, 358); ok(color_match(color, 0x00000000, 1), "pixel 242, 358 has color %08x, expected 0x00000000\n", color); color = getPixelColor(device, 238, 362); - ok(color_match(color, 0x00ffffff, 1), + ok(color_match(color, 0x00ffffff, 1) || broken(color_match(color, 0x00000000, 1)), "pixel 238, 362 has color %08x, expected 0x00ffffff\n", color); color = getPixelColor(device, 242, 362); ok(color_match(color, 0x00000000, 1), @@ -6292,13 +6437,13 @@ /* 1.2 shader */ color = getPixelColor(device, 558, 358); - ok(color_match(color, 0x00ffffff, 1), + ok(color_match(color, 0x00ffffff, 1) || broken(color_match(color, 0x00000000, 1)), "pixel 558, 358 has color %08x, expected 0x00ffffff\n", color); color = getPixelColor(device, 562, 358); ok(color_match(color, 0x00000000, 1), "pixel 562, 358 has color %08x, expected 0x00000000\n", color); color = getPixelColor(device, 558, 362); - ok(color_match(color, 0x00ffffff, 1), + ok(color_match(color, 0x00ffffff, 1) || broken(color_match(color, 0x00000000, 1)), "pixel 558, 362 has color %08x, expected 0x00ffffff\n", color); color = getPixelColor(device, 562, 362); ok(color_match(color, 0x00000000, 1), @@ -6306,13 +6451,13 @@ /* 1.3 shader */ color = getPixelColor(device, 558, 118); - ok(color_match(color, 0x00ffffff, 1), + ok(color_match(color, 0x00ffffff, 1) || broken(color_match(color, 0x00000000, 1)), "pixel 558, 118 has color %08x, expected 0x00ffffff\n", color); color = getPixelColor(device, 562, 118); ok(color_match(color, 0x00000000, 1), "pixel 562, 118 has color %08x, expected 0x00000000\n", color); color = getPixelColor(device, 558, 122); - ok(color_match(color, 0x00ffffff, 1), + ok(color_match(color, 0x00ffffff, 1) || broken(color_match(color, 0x00000000, 1)), "pixel 558, 122 has color %08x, expected 0x00ffffff\n", color); color = getPixelColor(device, 562, 122); ok(color_match(color, 0x00000000, 1), @@ -6713,8 +6858,20 @@ DestroyWindow(window); } -static void test_compare_instructions(IDirect3DDevice9 *device) +static void test_compare_instructions(void) { + IDirect3DVertexShader9 *shader_slt_scalar; + IDirect3DVertexShader9 *shader_sge_scalar; + IDirect3DVertexShader9 *shader_slt_vec; + IDirect3DVertexShader9 *shader_sge_vec; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + static const DWORD shader_sge_vec_code[] = { 0xfffe0101, /* vs_1_1 */ @@ -6755,39 +6912,57 @@ 0x0000000c, 0xd0040000, 0x80aa0000, 0xa0550001, /* slt oD0.b, r0.b, c1.g */ 0x0000ffff /* end */ }; - IDirect3DVertexShader9 *shader_sge_vec; - IDirect3DVertexShader9 *shader_slt_vec; - IDirect3DVertexShader9 *shader_sge_scalar; - IDirect3DVertexShader9 *shader_slt_scalar; - HRESULT hr, color; - float quad1[] = { - -1.0, -1.0, 0.1, - 0.0, -1.0, 0.1, - -1.0, 0.0, 0.1, - 0.0, 0.0, 0.1 + static const float quad1[] = + { + -1.0f, -1.0f, 0.1f, + -1.0f, 0.0f, 0.1f, + 0.0f, -1.0f, 0.1f, + 0.0f, 0.0f, 0.1f, }; - float quad2[] = { - 0.0, -1.0, 0.1, - 1.0, -1.0, 0.1, - 0.0, 0.0, 0.1, - 1.0, 0.0, 0.1 + static const float quad2[] = + { + 0.0f, -1.0f, 0.1f, + 0.0f, 0.0f, 0.1f, + 1.0f, -1.0f, 0.1f, + 1.0f, 0.0f, 0.1f, }; - float quad3[] = { - -1.0, 0.0, 0.1, - 0.0, 0.0, 0.1, - -1.0, 1.0, 0.1, - 0.0, 1.0, 0.1 + static const float quad3[] = + { + -1.0f, 0.0f, 0.1f, + -1.0f, 1.0f, 0.1f, + 0.0f, 0.0f, 0.1f, + 0.0f, 1.0f, 0.1f, }; - float quad4[] = { - 0.0, 0.0, 0.1, - 1.0, 0.0, 0.1, - 0.0, 1.0, 0.1, - 1.0, 1.0, 0.1 + static const float quad4[] = + { + 0.0f, 0.0f, 0.1f, + 0.0f, 1.0f, 0.1f, + 1.0f, 0.0f, 0.1f, + 1.0f, 1.0f, 0.1f, }; - const float const0[4] = {0.8, 0.2, 0.2, 0.2}; - const float const1[4] = {0.2, 0.8, 0.2, 0.2}; + static const float const0[4] = {0.8f, 0.2f, 0.2f, 0.2f}; + static const float const1[4] = {0.2f, 0.8f, 0.2f, 0.2f}; - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(1, 1)) + { + skip("No vs_1_1 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0f, 0); ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear returned %#x.\n", hr); hr = IDirect3DDevice9_CreateVertexShader(device, shader_sge_vec_code, &shader_sge_vec); @@ -6836,9 +7011,6 @@ ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %08x\n", hr); } - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); - color = getPixelColor(device, 160, 360); ok(color == 0x00ff00ff, "Compare test: Quad 1(sge vec) returned color 0x%08x, expected 0x00ff00ff\n", color); color = getPixelColor(device, 480, 360); @@ -6855,10 +7027,30 @@ IDirect3DVertexShader9_Release(shader_slt_vec); IDirect3DVertexShader9_Release(shader_sge_scalar); IDirect3DVertexShader9_Release(shader_slt_scalar); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } -static void test_vshader_input(IDirect3DDevice9 *device) +static void test_vshader_input(void) { + IDirect3DVertexDeclaration9 *decl_twotexcrd, *decl_onetexcrd, *decl_twotex_wrongidx, *decl_twotexcrd_rightorder; + IDirect3DVertexDeclaration9 *decl_texcoord_color, *decl_color_color, *decl_color_ubyte, *decl_color_float; + IDirect3DVertexShader9 *swapped_shader, *texcoord_color_shader, *color_color_shader; + D3DADAPTER_IDENTIFIER9 identifier; + IDirect3DPixelShader9 *ps; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + unsigned int i; + D3DCAPS9 caps; + DWORD color; + HWND window; + HRESULT hr; + BOOL warp; + static const DWORD swapped_shader_code_3[] = { 0xfffe0300, /* vs_3_0 */ @@ -6959,107 +7151,152 @@ 0x02000001, 0x800f0800, 0x90e40000, /* mov oC0, v0 */ 0x0000ffff /* end */ }; - IDirect3DVertexShader9 *swapped_shader, *texcoord_color_shader, *color_color_shader; - IDirect3DPixelShader9 *ps; - HRESULT hr; - DWORD color; - float quad1[] = { - -1.0, -1.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.5, 0.0, - 0.0, -1.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.5, 0.0, - -1.0, 0.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.5, 0.0, - 0.0, 0.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.5, 0.0, - }; - float quad2[] = { - 0.0, -1.0, 0.1, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 1.0, -1.0, 0.1, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.1, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 1.0, 0.0, 0.1, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - }; - float quad3[] = { - -1.0, 0.0, 0.1, -1.0, 0.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, - 0.0, 0.0, 0.1, -1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, - -1.0, 1.0, 0.1, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 1.0, 0.0, - 0.0, 1.0, 0.1, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, - }; - float quad4[] = { - 0.0, 0.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.5, 0.0, - 1.0, 0.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.5, 0.0, - 0.0, 1.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.5, 0.0, - 1.0, 1.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.5, 0.0, + static const float quad1[] = + { + -1.0f, -1.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.5f, 0.0f, + -1.0f, 0.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.5f, 0.0f, + 0.0f, -1.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.5f, 0.0f, + 0.0f, 0.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.5f, 0.0f, + }; + static const float quad2[] = + { + 0.0f, -1.0f, 0.1f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.1f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 1.0f, -1.0f, 0.1f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 1.0f, 0.0f, 0.1f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + }; + static const float quad3[] = + { + -1.0f, 0.0f, 0.1f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f, + -1.0f, 1.0f, 0.1f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.1f, -1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.1f, -1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, }; - static const D3DVERTEXELEMENT9 decl_elements_twotexcrd[] = { + static const float quad4[] = + { + 0.0f, 0.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.5f, 0.0f, + 0.0f, 1.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.5f, 0.0f, + 1.0f, 0.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.5f, 0.0f, + 1.0f, 1.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.5f, 0.0f, + }; + static const float quad1_modified[] = + { + -1.0f, -1.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, + -1.0f, 0.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, + 0.0f, -1.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f, -1.0f, -1.0f, -1.0f, 0.0f, + }; + static const float quad2_modified[] = + { + 0.0f, -1.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 1.0f, -1.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 1.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + }; + static const struct vertex quad1_color[] = + { + {-1.0f, -1.0f, 0.1f, 0x00ff8040}, + {-1.0f, 0.0f, 0.1f, 0x00ff8040}, + { 0.0f, -1.0f, 0.1f, 0x00ff8040}, + { 0.0f, 0.0f, 0.1f, 0x00ff8040}, + }; + static const struct vertex quad2_color[] = + { + { 0.0f, -1.0f, 0.1f, 0x00ff8040}, + { 0.0f, 0.0f, 0.1f, 0x00ff8040}, + { 1.0f, -1.0f, 0.1f, 0x00ff8040}, + { 1.0f, 0.0f, 0.1f, 0x00ff8040}, + }; + static const struct vertex quad3_color[] = + { + {-1.0f, 0.0f, 0.1f, 0x00ff8040}, + {-1.0f, 1.0f, 0.1f, 0x00ff8040}, + { 0.0f, 0.0f, 0.1f, 0x00ff8040}, + { 0.0f, 1.0f, 0.1f, 0x00ff8040}, + }; + static const float quad4_color[] = + { + 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.1f, 1.0f, 1.0f, 0.0f, 0.0f, + 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 0.0f, 1.0f, + 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 0.0f, 1.0f, + }; + static const D3DVERTEXELEMENT9 decl_elements_twotexcrd[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, {0, 28, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, D3DDECL_END() }; - static const D3DVERTEXELEMENT9 decl_elements_twotexcrd_rightorder[] = { + static const D3DVERTEXELEMENT9 decl_elements_twotexcrd_rightorder[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, {0, 28, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END() }; - static const D3DVERTEXELEMENT9 decl_elements_onetexcrd[] = { + static const D3DVERTEXELEMENT9 decl_elements_onetexcrd[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END() }; - static const D3DVERTEXELEMENT9 decl_elements_twotexcrd_wrongidx[] = { + static const D3DVERTEXELEMENT9 decl_elements_twotexcrd_wrongidx[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1}, {0, 28, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 2}, D3DDECL_END() }; - static const D3DVERTEXELEMENT9 decl_elements_texcoord_color[] = { + static const D3DVERTEXELEMENT9 decl_elements_texcoord_color[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END() }; - static const D3DVERTEXELEMENT9 decl_elements_color_color[] = { + static const D3DVERTEXELEMENT9 decl_elements_color_color[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, D3DDECL_END() }; - static const D3DVERTEXELEMENT9 decl_elements_color_ubyte[] = { + static const D3DVERTEXELEMENT9 decl_elements_color_ubyte[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, D3DDECL_END() }; - static const D3DVERTEXELEMENT9 decl_elements_color_float[] = { + static const D3DVERTEXELEMENT9 decl_elements_color_float[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, D3DDECL_END() }; - IDirect3DVertexDeclaration9 *decl_twotexcrd, *decl_onetexcrd, *decl_twotex_wrongidx, *decl_twotexcrd_rightorder; - IDirect3DVertexDeclaration9 *decl_texcoord_color, *decl_color_color, *decl_color_ubyte, *decl_color_float; - unsigned int i; - float normalize[4] = {1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0}; - float no_normalize[4] = {1.0, 1.0, 1.0, 1.0}; + static const float normalize[4] = {1.0f / 256.0f, 1.0f / 256.0f, 1.0f / 256.0f, 1.0f / 256.0f}; + static const float no_normalize[4] = {1.0f, 1.0f, 1.0f, 1.0f}; - struct vertex quad1_color[] = { - {-1.0, -1.0, 0.1, 0x00ff8040}, - { 0.0, -1.0, 0.1, 0x00ff8040}, - {-1.0, 0.0, 0.1, 0x00ff8040}, - { 0.0, 0.0, 0.1, 0x00ff8040} - }; - struct vertex quad2_color[] = { - { 0.0, -1.0, 0.1, 0x00ff8040}, - { 1.0, -1.0, 0.1, 0x00ff8040}, - { 0.0, 0.0, 0.1, 0x00ff8040}, - { 1.0, 0.0, 0.1, 0x00ff8040} - }; - struct vertex quad3_color[] = { - {-1.0, 0.0, 0.1, 0x00ff8040}, - { 0.0, 0.0, 0.1, 0x00ff8040}, - {-1.0, 1.0, 0.1, 0x00ff8040}, - { 0.0, 1.0, 0.1, 0x00ff8040} - }; - float quad4_color[] = { - 0.0, 0.0, 0.1, 1.0, 1.0, 0.0, 0.0, - 1.0, 0.0, 0.1, 1.0, 1.0, 0.0, 1.0, - 0.0, 1.0, 0.1, 1.0, 1.0, 0.0, 0.0, - 1.0, 1.0, 0.1, 1.0, 1.0, 0.0, 1.0, - }; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)) + { + skip("No vs_3_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } + + hr = IDirect3D9_GetAdapterIdentifier(d3d, D3DADAPTER_DEFAULT, 0, &identifier); + ok(SUCCEEDED(hr), "Failed to get adapter identifier, hr %#x.\n", hr); + warp = !strcmp(identifier.Description, "Microsoft Basic Render Driver"); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements_twotexcrd, &decl_twotexcrd); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexDeclaration returned %08x\n", hr); @@ -7082,8 +7319,9 @@ hr = IDirect3DDevice9_CreatePixelShader(device, ps3_code, &ps); ok(hr == D3D_OK, "IDirect3DDevice9_CreatePixelShader returned %08x\n", hr); - for(i = 1; i <= 3; i++) { - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0); + for (i = 1; i <= 3; ++i) + { + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff0000, 1.0f, 0); ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear returned %#x.\n", hr); if(i == 3) { hr = IDirect3DDevice9_CreateVertexShader(device, swapped_shader_code_3, &swapped_shader); @@ -7145,8 +7383,10 @@ /* The last value of the read but undefined stream is used, it is 0x00. The defined input is vec4(1, 0, 0, 0) */ color = getPixelColor(device, 480, 360); - ok(color == 0x00ffff00 || color ==0x00ff0000, - "Input test: Quad 2(1crd) returned color 0x%08x, expected 0x00ffff00\n", color); + /* On the Windows 8 testbot (WARP) the draw succeeds, but uses + * mostly random data as input. */ + ok(color == 0x00ffff00 || color == 0x00ff0000 || broken(warp), + "Got unexpected color 0x%08x for quad 2 (1crd).\n", color); color = getPixelColor(device, 160, 120); /* Same as above, accept both the last used value and 0.0 for the undefined streams */ ok(color_match(color, D3DCOLOR_ARGB(0x00, 0xff, 0x00, 0x80), 1) || color == D3DCOLOR_ARGB(0x00, 0xff, 0x00, 0x00), @@ -7159,8 +7399,11 @@ ok(color_match(color, D3DCOLOR_ARGB(0x00, 0xff, 0xff, 0x80), 1), "Input test: Quad 1(2crd) returned color 0x%08x, expected 0x00ffff80\n", color); color = getPixelColor(device, 480, 360); - /* Accept the clear color as well in this case, since SW VP returns an error */ - ok(color == 0x00ffff00 || color == 0x00ff0000, "Input test: Quad 2(1crd) returned color 0x%08x, expected 0x00ffff00\n", color); + /* Accept the clear color as well in this case, since SW VP + * returns an error. On the Windows 8 testbot (WARP) the draw + * succeeds, but uses mostly random data as input. */ + ok(color == 0x00ffff00 || color == 0x00ff0000 || broken(warp), + "Got unexpected color 0x%08x for quad 2 (1crd).\n", color); color = getPixelColor(device, 160, 120); ok(color_match(color, D3DCOLOR_ARGB(0x00, 0xff, 0x00, 0x80), 1) || color == D3DCOLOR_ARGB(0x00, 0xff, 0x00, 0x00), "Input test: Quad 3(2crd-wrongidx) returned color 0x%08x, expected 0x00ff0080\n", color); @@ -7181,19 +7424,6 @@ ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %08x\n", hr); if(SUCCEEDED(hr)) { - float quad1_modified[] = { - -1.0, -1.0, 0.1, 1.0, 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, - 0.0, -1.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, -1.0, 0.0, 0.0, - -1.0, 0.0, 0.1, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, -1.0, 0.0, - 0.0, 0.0, 0.1, 1.0, 0.0, 1.0, 0.0, -1.0, -1.0, -1.0, 0.0, - }; - float quad2_modified[] = { - 0.0, -1.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 1.0, -1.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 1.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - }; - hr = IDirect3DDevice9_SetVertexShader(device, swapped_shader); ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader returned %08x\n", hr); @@ -7227,8 +7457,9 @@ * * A test app for this behavior is Half Life 2 Episode 2 in dxlevel 95, and related games(Portal, TF2). */ - ok(color == 0x000000ff || color == 0x00808080 || color == 0x00000000, - "Input test: Quad 2(different colors) returned color 0x%08x, expected 0x000000ff, 0x00808080 or 0x00000000\n", color); + ok(color == 0x000000ff || color == 0x00808080 || color == 0x00000000 + || broken(color_match(color, D3DCOLOR_ARGB(0x00, 0x0b, 0x75, 0x80), 1)), + "Got unexpected color 0x%08x for quad 2 (different colors).\n", color); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); @@ -7240,8 +7471,9 @@ IDirect3DVertexShader9_Release(swapped_shader); } - for(i = 1; i <= 3; i++) { - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff0000ff, 0.0, 0); + for (i = 1; i <= 3; ++i) + { + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear returned %#x.\n", hr); if(i == 3) { hr = IDirect3DDevice9_CreateVertexShader(device, texcoord_color_shader_code_3, &texcoord_color_shader); @@ -7333,6 +7565,11 @@ IDirect3DVertexDeclaration9_Release(decl_color_float); IDirect3DPixelShader9_Release(ps); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void srgbtexture_test(IDirect3DDevice9 *device) @@ -8238,24 +8475,26 @@ if(dcl_positiont) IDirect3DVertexDeclaration9_Release(dcl_positiont); } -struct vertex_float16color { - float x, y, z; - DWORD c1, c2; -}; - -static void test_vshader_float16(IDirect3DDevice9 *device) +static void test_vshader_float16(void) { - HRESULT hr; + IDirect3DVertexDeclaration9 *vdecl = NULL; + IDirect3DVertexBuffer9 *buffer = NULL; + IDirect3DVertexShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; DWORD color; + HWND window; void *data; - static const D3DVERTEXELEMENT9 decl_elements[] = { + HRESULT hr; + + static const D3DVERTEXELEMENT9 decl_elements[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_FLOAT16_4,D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0}, D3DDECL_END() }; - IDirect3DVertexDeclaration9 *vdecl = NULL; - IDirect3DVertexBuffer9 *buffer = NULL; - IDirect3DVertexShader9 *shader; static const DWORD shader_code[] = { 0xfffe0101, /* vs_1_1 */ @@ -8265,7 +8504,13 @@ 0x00000001, 0xd00f0000, 0x90e40001, /* mov oD0, v1 */ 0x0000ffff, }; - struct vertex_float16color quad[] = { + static const struct vertex_float16color + { + float x, y, z; + DWORD c1, c2; + } + quad[] = + { { -1.0, -1.0, 0.1, 0x3c000000, 0x00000000 }, /* green */ { -1.0, 0.0, 0.1, 0x3c000000, 0x00000000 }, { 0.0, -1.0, 0.1, 0x3c000000, 0x00000000 }, @@ -8287,7 +8532,26 @@ { 0.0, 1.0, 0.1, 0x00000000, 0x3c000000 }, }; - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff102030, 0.0, 0); + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)) + { + skip("No vs_3_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff102030, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed, hr=%08x\n", hr); hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &vdecl); @@ -8372,16 +8636,14 @@ "Input 0x00000000, 0x00003c00 returned color %08x, expected 0x000000ff\n", color); IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed, hr=%08x\n", hr); - hr = IDirect3DDevice9_SetVertexDeclaration(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexDeclaration failed, hr=%08x\n", hr); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetVertexShader failed hr=%08x\n", hr); - IDirect3DVertexDeclaration9_Release(vdecl); IDirect3DVertexShader9_Release(shader); IDirect3DVertexBuffer9_Release(buffer); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void conditional_np2_repeat_test(IDirect3DDevice9 *device) @@ -8677,11 +8939,12 @@ IDirect3DTexture9 *tex1, *tex2; D3DLOCKED_RECT locked_rect; - static const float quad[][7] = { - {-128.0f/640.0f, -128.0f/480.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f}, - {-128.0f/640.0f, 128.0f/480.0f, 0.1f, 0.0f, 1.0f, 0.0f, 1.0f}, - { 128.0f/640.0f, -128.0f/480.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f}, - { 128.0f/640.0f, 128.0f/480.0f, 0.1f, 1.0f, 1.0f, 1.0f, 1.0f}, + static const float quad[][7] = + { + {-1.0f, -1.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f}, + {-1.0f, 1.0f, 0.1f, 0.0f, 1.0f, 0.0f, 1.0f}, + { 1.0f, -1.0f, 0.1f, 1.0f, 0.0f, 1.0f, 0.0f}, + { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 1.0f}, }; static const D3DVERTEXELEMENT9 decl_elements[] = { @@ -8774,28 +9037,22 @@ hr = IDirect3DDevice9_EndScene(device); ok(SUCCEEDED(hr), "EndScene failed (0x%08x)\n", hr); - /* on MacOS(10.5.4, radeon X1600), the white dots are have color 0x00fbfbfb rather than 0x00ffffff. This is - * kinda strange since no calculations are done on the sampled colors, only on the texture coordinates. - * But since testing the color match is not the purpose of the test don't be too picky - */ - color = getPixelColor(device, 320-32, 240); - ok(color_match(color, 0x00ffffff, 4), "bumpmap failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - color = getPixelColor(device, 320+32, 240); - ok(color_match(color, 0x00ffffff, 4), "bumpmap failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - color = getPixelColor(device, 320, 240-32); - ok(color_match(color, 0x00ffffff, 4), "bumpmap failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - color = getPixelColor(device, 320, 240+32); - ok(color_match(color, 0x00ffffff, 4), "bumpmap failed: Got color 0x%08x, expected 0x00ffffff.\n", color); - color = getPixelColor(device, 320, 240); - ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color 0x%08x, expected 0x00000000.\n", color); - color = getPixelColor(device, 320+32, 240+32); - ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color 0x%08x, expected 0x00000000.\n", color); - color = getPixelColor(device, 320-32, 240+32); - ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color 0x%08x, expected 0x00000000.\n", color); - color = getPixelColor(device, 320+32, 240-32); - ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color 0x%08x, expected 0x00000000.\n", color); - color = getPixelColor(device, 320-32, 240-32); - ok(color_match(color, 0x00000000, 4), "bumpmap failed: Got color 0x%08x, expected 0x00000000.\n", color); + color = getPixelColor(device, 240, 60); + ok(color_match(color, 0x005ea000, 4), "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 400, 60); + ok(color_match(color, 0x009ea000, 4), "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 80, 180); + ok(color_match(color, 0x005ea000, 4), "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 560, 180); + ok(color_match(color, 0x009ea000, 4), "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 80, 300); + ok(color_match(color, 0x005e6000, 4), "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 560, 300); + ok(color_match(color, 0x009e6000, 4), "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 240, 420); + ok(color_match(color, 0x005e6000, 4), "Got unexpected color 0x%08x.\n", color); + color = getPixelColor(device, 400, 420); + ok(color_match(color, 0x009e6000, 4), "Got unexpected color 0x%08x.\n", color); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); @@ -10061,27 +10318,44 @@ } } -static void tssargtemp_test(IDirect3DDevice9 *device) +static void tssargtemp_test(void) { + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + D3DCAPS9 caps; + HWND window; HRESULT hr; - DWORD color; - static const struct vertex quad[] = { - {-1.0, -1.0, 0.1, 0x00ff0000}, - { 1.0, -1.0, 0.1, 0x00ff0000}, - {-1.0, 1.0, 0.1, 0x00ff0000}, - { 1.0, 1.0, 0.1, 0x00ff0000} + + static const struct vertex quad[] = + { + {-1.0f, -1.0f, 0.1f, 0x00ff0000}, + {-1.0f, 1.0f, 0.1f, 0x00ff0000}, + { 1.0f, -1.0f, 0.1f, 0x00ff0000}, + { 1.0f, 1.0f, 0.1f, 0x00ff0000}, }; - D3DCAPS9 caps; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } memset(&caps, 0, sizeof(caps)); hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); ok(hr == D3D_OK, "IDirect3DDevice9_GetDeviceCaps failed with %08x\n", hr); if(!(caps.PrimitiveMiscCaps & D3DPMISCCAPS_TSSARGTEMP)) { skip("D3DPMISCCAPS_TSSARGTEMP not supported\n"); - return; + IDirect3DDevice9_Release(device); + goto done; } - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff000000, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); @@ -10108,6 +10382,8 @@ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0x0000ff00); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed, hr = %08x\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr = %08x\n", hr); @@ -10123,74 +10399,71 @@ ok(color == 0x00ffff00, "TSSARGTEMP test returned color 0x%08x, expected 0x00ffff00\n", color); IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - /* Set stage 1 back to default */ - hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_RESULTARG, D3DTA_CURRENT); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); - hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); - hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); - hr = IDirect3DDevice9_SetTextureStageState(device, 2, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); - hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "SetTextureStageState failed, hr = %08x\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } -struct testdata -{ - DWORD idxVertex; /* number of instances in the first stream */ - DWORD idxColor; /* number of instances in the second stream */ - DWORD idxInstance; /* should be 1 ?? */ - DWORD color1; /* color 1 instance */ - DWORD color2; /* color 2 instance */ - DWORD color3; /* color 3 instance */ - DWORD color4; /* color 4 instance */ - WORD strVertex; /* specify which stream to use 0-2*/ - WORD strColor; - WORD strInstance; -}; - -static const struct testdata testcases[]= -{ - {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 0 */ - {3, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ffffff, 0, 1, 2}, /* 1 */ - {2, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ffffff, 0x00ffffff, 0, 1, 2}, /* 2 */ - {1, 4, 1, 0x00ff0000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0, 1, 2}, /* 3 */ - {4, 3, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 4 */ - {4, 2, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 5 */ - {4, 1, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 6 */ - {4, 0, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 7 */ - {3, 3, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ffffff, 0, 1, 2}, /* 8 */ - {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 1, 0, 2}, /* 9 */ - {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 2, 1}, /* 10 */ - {4, 4, 1, 0x00ff0000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 2, 3, 1}, /* 11 */ - {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 2, 0, 1}, /* 12 */ - {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 1, 2, 3}, /* 13 */ -/* - This draws one instance on some machines, no instance on others - {0, 4, 1, 0x00ff0000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0, 1, 2}, -*/ -/* - This case is handled in a stand alone test, SetStreamSourceFreq(0,(D3DSTREAMSOURCE_INSTANCEDATA | 1)) has to return D3DERR_INVALIDCALL! - {4, 4, 1, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 2, 1, 0, D3DERR_INVALIDCALL}, -*/ -}; - /* Drawing Indexed Geometry with instances*/ -static void stream_test(IDirect3DDevice9 *device) +static void stream_test(void) { - IDirect3DVertexBuffer9 *vb = NULL; - IDirect3DVertexBuffer9 *vb2 = NULL; - IDirect3DVertexBuffer9 *vb3 = NULL; - IDirect3DIndexBuffer9 *ib = NULL; IDirect3DVertexDeclaration9 *pDecl = NULL; IDirect3DVertexShader9 *shader = NULL; + IDirect3DVertexBuffer9 *vb3 = NULL; + IDirect3DVertexBuffer9 *vb2 = NULL; + IDirect3DVertexBuffer9 *vb = NULL; + IDirect3DIndexBuffer9 *ib = NULL; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + DWORD color; + HWND window; + unsigned i; HRESULT hr; BYTE *data; - DWORD color; DWORD ind; - unsigned i; + static const struct testdata + { + DWORD idxVertex; /* number of instances in the first stream */ + DWORD idxColor; /* number of instances in the second stream */ + DWORD idxInstance; /* should be 1 ?? */ + DWORD color1; /* color 1 instance */ + DWORD color2; /* color 2 instance */ + DWORD color3; /* color 3 instance */ + DWORD color4; /* color 4 instance */ + WORD strVertex; /* specify which stream to use 0-2*/ + WORD strColor; + WORD strInstance; + } + testcases[]= + { + {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 0 */ + {3, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ffffff, 0, 1, 2}, /* 1 */ + {2, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ffffff, 0x00ffffff, 0, 1, 2}, /* 2 */ + {1, 4, 1, 0x00ff0000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0, 1, 2}, /* 3 */ + {4, 3, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 4 */ + {4, 2, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 5 */ + {4, 1, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 6 */ + {4, 0, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 1, 2}, /* 7 */ + {3, 3, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ffffff, 0, 1, 2}, /* 8 */ + {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 1, 0, 2}, /* 9 */ + {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0, 2, 1}, /* 10 */ + {4, 4, 1, 0x00ff0000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 2, 3, 1}, /* 11 */ + {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 2, 0, 1}, /* 12 */ + {4, 4, 1, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 1, 2, 3}, /* 13 */ +#if 0 + /* This draws one instance on some machines, no instance on others. */ + {0, 4, 1, 0x00ff0000, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0, 1, 2}, /* 14 */ + /* This case is handled in a stand alone test, + * SetStreamSourceFreq(0, (D3DSTREAMSOURCE_INSTANCEDATA | 1)) has to + * return D3DERR_INVALIDCALL. */ + {4, 4, 1, 0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff, 2, 1, 0}, /* 15 */ +#endif + }; static const DWORD shader_code[] = { 0xfffe0101, /* vs_1_1 */ @@ -10202,34 +10475,29 @@ 0x00000001, 0xd00f0000, 0x90e40001, /* mov oD0, v1 */ 0x0000ffff }; - - const float quad[][3] = + static const float quad[][3] = { {-0.5f, -0.5f, 1.1f}, /*0 */ {-0.5f, 0.5f, 1.1f}, /*1 */ { 0.5f, -0.5f, 1.1f}, /*2 */ { 0.5f, 0.5f, 1.1f}, /*3 */ }; - - const float vertcolor[][4] = + static const float vertcolor[][4] = { {1.0f, 0.0f, 0.0f, 1.0f}, /*0 */ {1.0f, 0.0f, 0.0f, 1.0f}, /*1 */ {1.0f, 0.0f, 0.0f, 1.0f}, /*2 */ {1.0f, 0.0f, 0.0f, 1.0f}, /*3 */ }; - /* 4 position for 4 instances */ - const float instancepos[][3] = + static const float instancepos[][3] = { {-0.6f,-0.6f, 0.0f}, { 0.6f,-0.6f, 0.0f}, { 0.6f, 0.6f, 0.0f}, {-0.6f, 0.6f, 0.0f}, }; - - short indices[] = {0, 1, 2, 1, 2, 3}; - + static const short indices[] = {0, 1, 2, 2, 1, 3}; D3DVERTEXELEMENT9 decl[] = { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, @@ -10238,6 +10506,25 @@ D3DDECL_END() }; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(3, 0)) + { + skip("No vs_3_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } + /* set the default value because it isn't done in wine? */ hr = IDirect3DDevice9_SetStreamSourceFreq(device, 1, 1); ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSourceFreq failed with %08x\n", hr); @@ -10277,7 +10564,8 @@ ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); if(!vb) { skip("Failed to create a vertex buffer\n"); - return; + IDirect3DDevice9_Release(device); + goto done; } hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(vertcolor), 0, 0, D3DPOOL_MANAGED, &vb2, NULL); ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); @@ -10347,7 +10635,7 @@ hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl, &pDecl); ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateVertexDeclaration failed hr=%08x (case %i)\n", hr, i); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x (case %i)\n", hr, i); hr = IDirect3DDevice9_BeginScene(device); @@ -10408,33 +10696,52 @@ ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x (case %i)\n", hr, i); } - hr = IDirect3DDevice9_SetIndices(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetIndices failed with %08x\n", hr); - out: if(vb) IDirect3DVertexBuffer9_Release(vb); if(vb2)IDirect3DVertexBuffer9_Release(vb2); if(vb3)IDirect3DVertexBuffer9_Release(vb3); if(ib)IDirect3DIndexBuffer9_Release(ib); if(shader)IDirect3DVertexShader9_Release(shader); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } -static void np2_stretch_rect_test(IDirect3DDevice9 *device) { +static void np2_stretch_rect_test(void) +{ IDirect3DSurface9 *src = NULL, *dst = NULL, *backbuffer = NULL; IDirect3DTexture9 *dsttex = NULL; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + HWND window; HRESULT hr; - DWORD color; - D3DRECT r1 = {0, 0, 50, 50 }; - D3DRECT r2 = {50, 0, 100, 50 }; - D3DRECT r3 = {50, 50, 100, 100}; - D3DRECT r4 = {0, 50, 50, 100}; - const float quad[] = { - -1.0, -1.0, 0.1, 0.0, 0.0, - 1.0, -1.0, 0.1, 1.0, 0.0, - -1.0, 1.0, 0.1, 0.0, 1.0, - 1.0, 1.0, 0.1, 1.0, 1.0, + + static const D3DRECT r1 = {0, 0, 50, 50 }; + static const D3DRECT r2 = {50, 0, 100, 50 }; + static const D3DRECT r3 = {50, 50, 100, 100}; + static const D3DRECT r4 = {0, 50, 50, 100}; + static const float quad[] = + { + -1.0f, -1.0f, 0.1f, 0.0f, 0.0f, + -1.0f, 1.0f, 0.1f, 0.0f, 1.0f, + 1.0f, -1.0f, 0.1f, 1.0f, 0.0f, + 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, }; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); ok(hr == D3D_OK, "IDirect3DDevice9_GetBackBuffer failed with %08x\n", hr); @@ -10451,7 +10758,7 @@ hr = IDirect3DTexture9_GetSurfaceLevel(dsttex, 0, &dst); ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ffff, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff00ffff, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with %08x\n", hr); /* Clear the StretchRect destination for debugging */ @@ -10511,15 +10818,15 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); - hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); - hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_DISABLE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); - cleanup: if(src) IDirect3DSurface9_Release(src); if(backbuffer) IDirect3DSurface9_Release(backbuffer); if(dsttex) IDirect3DTexture9_Release(dsttex); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void texop_test(void) @@ -10671,7 +10978,7 @@ DestroyWindow(window); } -static void yuv_color_test(IDirect3DDevice9 *device) +static void yuv_color_test(void) { HRESULT hr; IDirect3DSurface9 *surface, *target; @@ -10680,7 +10987,10 @@ IDirect3D9 *d3d; D3DCOLOR color; D3DFORMAT skip_once = D3DFMT_UNKNOWN; + IDirect3DDevice9 *device; D3DSURFACE_DESC desc; + ULONG refcount; + HWND window; static const struct { @@ -10730,8 +11040,16 @@ {0x1c6b1cff, D3DFMT_YUY2, "D3DFMT_YUY2", 0x006dff45, 0x0000d500}, }; - hr = IDirect3DDevice9_GetDirect3D(device, &d3d); - ok(SUCCEEDED(hr), "Failed to get d3d9 interface, hr %#x.\n", hr); + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + hr = IDirect3DDevice9_GetRenderTarget(device, 0, &target); ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); hr = IDirect3DSurface9_GetDesc(target, &desc); @@ -10803,10 +11121,14 @@ } IDirect3DSurface9_Release(target); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: IDirect3D9_Release(d3d); + DestroyWindow(window); } -static void yuv_layout_test(IDirect3DDevice9 *device) +static void yuv_layout_test(void) { HRESULT hr; IDirect3DSurface9 *surface, *target; @@ -10819,8 +11141,11 @@ DWORD ref_color; BYTE *buf, *chroma_buf, *u_buf, *v_buf; UINT width = 20, height = 16; + IDirect3DDevice9 *device; + ULONG refcount; D3DCAPS9 caps; D3DSURFACE_DESC desc; + HWND window; static const struct { @@ -10852,17 +11177,26 @@ { MAKEFOURCC('N','V','1','2'), "D3DFMT_NV12", }, }; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); ok(SUCCEEDED(hr), "GetDeviceCaps failed, hr %#x.\n", hr); if (caps.TextureCaps & D3DPTEXTURECAPS_POW2 && !(caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL)) { skip("No NP2 texture support, skipping YUV texture layout test.\n"); - return; + IDirect3DDevice9_Release(device); + goto done; } - hr = IDirect3DDevice9_GetDirect3D(device, &d3d); - ok(hr == D3D_OK, "IDirect3DDevice9_GetDirect3D failed, hr = %#x.\n", hr); hr = IDirect3DDevice9_GetRenderTarget(device, 0, &target); ok(hr == D3D_OK, "IDirect3DDevice9_GetRenderTarget failed, hr = %#x.\n", hr); hr = IDirect3DSurface9_GetDesc(target, &desc); @@ -10977,7 +11311,11 @@ } IDirect3DSurface9_Release(target); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: IDirect3D9_Release(d3d); + DestroyWindow(window); } static void texop_range_test(void) @@ -11272,22 +11610,40 @@ DestroyWindow(window); } -static void zwriteenable_test(IDirect3DDevice9 *device) { +static void zwriteenable_test(void) +{ + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + HWND window; HRESULT hr; - DWORD color; - struct vertex quad1[] = { - { -1.0, -1.0, 0.1, 0x00ff0000}, - { -1.0, 1.0, 0.1, 0x00ff0000}, - { 1.0, -1.0, 0.1, 0x00ff0000}, - { 1.0, 1.0, 0.1, 0x00ff0000}, - }; - struct vertex quad2[] = { - { -1.0, -1.0, 0.9, 0x0000ff00}, - { -1.0, 1.0, 0.9, 0x0000ff00}, - { 1.0, -1.0, 0.9, 0x0000ff00}, - { 1.0, 1.0, 0.9, 0x0000ff00}, + + static const struct vertex quad1[] = + { + {-1.0f, -1.0f, 0.1f, 0x00ff0000}, + {-1.0f, 1.0f, 0.1f, 0x00ff0000}, + { 1.0f, -1.0f, 0.1f, 0x00ff0000}, + { 1.0f, 1.0f, 0.1f, 0x00ff0000}, + }; + static const struct vertex quad2[] = + { + {-1.0f, -1.0f, 0.9f, 0x0000ff00}, + {-1.0f, 1.0f, 0.9f, 0x0000ff00}, + { 1.0f, -1.0f, 0.9f, 0x0000ff00}, + { 1.0f, 1.0f, 0.9f, 0x0000ff00}, }; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x000000ff, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with 0x%08x\n", hr); @@ -11299,6 +11655,8 @@ ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_LESSEQUAL); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with 0x%08x\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); hr = IDirect3DDevice9_BeginScene(device); ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed with 0x%08x\n", hr); @@ -11327,39 +11685,67 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "IDirect3DDevice9_Present failed with 0x%08x\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with 0x%08x\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } -static void alphatest_test(IDirect3DDevice9 *device) { -#define ALPHATEST_PASSED 0x0000ff00 -#define ALPHATEST_FAILED 0x00ff0000 - struct { - D3DCMPFUNC func; - DWORD color_less; - DWORD color_equal; - DWORD color_greater; - } testdata[] = { - { D3DCMP_NEVER, ALPHATEST_FAILED, ALPHATEST_FAILED, ALPHATEST_FAILED }, - { D3DCMP_LESS, ALPHATEST_PASSED, ALPHATEST_FAILED, ALPHATEST_FAILED }, - { D3DCMP_EQUAL, ALPHATEST_FAILED, ALPHATEST_PASSED, ALPHATEST_FAILED }, - { D3DCMP_LESSEQUAL, ALPHATEST_PASSED, ALPHATEST_PASSED, ALPHATEST_FAILED }, - { D3DCMP_GREATER, ALPHATEST_FAILED, ALPHATEST_FAILED, ALPHATEST_PASSED }, - { D3DCMP_NOTEQUAL, ALPHATEST_PASSED, ALPHATEST_FAILED, ALPHATEST_PASSED }, - { D3DCMP_GREATEREQUAL, ALPHATEST_FAILED, ALPHATEST_PASSED, ALPHATEST_PASSED }, - { D3DCMP_ALWAYS, ALPHATEST_PASSED, ALPHATEST_PASSED, ALPHATEST_PASSED }, +static void alphatest_test(void) +{ +#define ALPHATEST_PASSED 0x0000ff00 +#define ALPHATEST_FAILED 0x00ff0000 + IDirect3DDevice9 *device; + unsigned int i, j; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + + static const struct + { + D3DCMPFUNC func; + D3DCOLOR color_less; + D3DCOLOR color_equal; + D3DCOLOR color_greater; + } + testdata[] = + { + {D3DCMP_NEVER, ALPHATEST_FAILED, ALPHATEST_FAILED, ALPHATEST_FAILED}, + {D3DCMP_LESS, ALPHATEST_PASSED, ALPHATEST_FAILED, ALPHATEST_FAILED}, + {D3DCMP_EQUAL, ALPHATEST_FAILED, ALPHATEST_PASSED, ALPHATEST_FAILED}, + {D3DCMP_LESSEQUAL, ALPHATEST_PASSED, ALPHATEST_PASSED, ALPHATEST_FAILED}, + {D3DCMP_GREATER, ALPHATEST_FAILED, ALPHATEST_FAILED, ALPHATEST_PASSED}, + {D3DCMP_NOTEQUAL, ALPHATEST_PASSED, ALPHATEST_FAILED, ALPHATEST_PASSED}, + {D3DCMP_GREATEREQUAL, ALPHATEST_FAILED, ALPHATEST_PASSED, ALPHATEST_PASSED}, + {D3DCMP_ALWAYS, ALPHATEST_PASSED, ALPHATEST_PASSED, ALPHATEST_PASSED}, }; - unsigned int i, j; - HRESULT hr; - DWORD color; - struct vertex quad[] = { - { -1.0, -1.0, 0.1, ALPHATEST_PASSED | 0x80000000 }, - { 1.0, -1.0, 0.1, ALPHATEST_PASSED | 0x80000000 }, - { -1.0, 1.0, 0.1, ALPHATEST_PASSED | 0x80000000 }, - { 1.0, 1.0, 0.1, ALPHATEST_PASSED | 0x80000000 }, + static const struct vertex quad[] = + { + {-1.0f, -1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000}, + {-1.0f, 1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000}, + { 1.0f, -1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000}, + { 1.0f, 1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000}, }; - D3DCAPS9 caps; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); + ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ALPHATESTENABLE, TRUE); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with 0x%08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); @@ -11455,14 +11841,25 @@ } } - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ALPHATESTENABLE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState failed with 0x%08x\n", hr); - hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetPixelShader failed with 0x%08x\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } -static void sincos_test(IDirect3DDevice9 *device) +static void sincos_test(void) { + IDirect3DVertexShader9 *sin_shader, *cos_shader; + IDirect3DDevice9 *device; + struct vec3 data[1280]; + IDirect3D9 *d3d; + unsigned int i; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + static const DWORD sin_shader_code[] = { 0xfffe0200, /* vs_2_0 */ @@ -11487,14 +11884,27 @@ 0x02000001, 0xd00f0000, 0xa0a90002, /* mov oD0, c2.yzzz */ 0x0000ffff /* end */ }; - IDirect3DVertexShader9 *sin_shader, *cos_shader; - HRESULT hr; - struct { - float x, y, z; - } data[1280]; - unsigned int i; - float sincosc1[4] = {D3DSINCOSCONST1}; - float sincosc2[4] = {D3DSINCOSCONST2}; + static const float sincosc1[4] = {D3DSINCOSCONST1}; + static const float sincosc2[4] = {D3DSINCOSCONST2}; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00000000, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed with 0x%08x\n", hr); @@ -11536,13 +11946,27 @@ ok(SUCCEEDED(hr), "IDirect3DDevice9_Present returned %#x.\n", hr); /* TODO: Find a way to properly validate the lines. Precicion issues make this a kinda nasty task */ - IDirect3DDevice9_SetVertexShader(device, NULL); IDirect3DVertexShader9_Release(sin_shader); IDirect3DVertexShader9_Release(cos_shader); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } -static void loop_index_test(IDirect3DDevice9 *device) +static void loop_index_test(void) { + IDirect3DVertexShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + float values[4]; + ULONG refcount; + D3DCAPS9 caps; + DWORD color; + HWND window; + HRESULT hr; + static const DWORD shader_code[] = { 0xfffe0200, /* vs_2_0 */ @@ -11555,19 +11979,35 @@ 0x02000001, 0xd00f0000, 0x80e40000, /* mov oD0, r0 */ 0x0000ffff /* END */ }; - IDirect3DVertexShader9 *shader; - HRESULT hr; - DWORD color; - const float quad[] = { - -1.0, -1.0, 0.1, - 1.0, -1.0, 0.1, - -1.0, 1.0, 0.1, - 1.0, 1.0, 0.1 + static const float quad[] = + { + -1.0f, -1.0f, 0.1f, + -1.0f, 1.0f, 0.1f, + 1.0f, -1.0f, 0.1f, + 1.0f, 1.0f, 0.1f, }; - const float zero[4] = {0, 0, 0, 0}; - const float one[4] = {1, 1, 1, 1}; - int i0[4] = {2, 10, -3, 0}; - float values[4]; + static const float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f}; + static const float one[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + static const int i0[4] = {2, 10, -3, 0}; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } hr = IDirect3DDevice9_CreateVertexShader(device, shader_code, &shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader failed with %08x\n", hr); @@ -11575,7 +12015,7 @@ ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ff0000, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00ff0000, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_SetVertexShaderConstantF(device, 0, zero, 1); @@ -11637,13 +12077,25 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr); IDirect3DVertexShader9_Release(shader); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } -static void sgn_test(IDirect3DDevice9 *device) +static void sgn_test(void) { + IDirect3DVertexShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + DWORD color; + HWND window; + HRESULT hr; + static const DWORD shader_code[] = { 0xfffe0200, /* vs_2_0 */ @@ -11655,23 +12107,40 @@ 0x03000002, 0xd00f0000, 0x80e40000, 0xa0e40001, /* add oD0, r0, c1 */ 0x0000ffff /* end */ }; - IDirect3DVertexShader9 *shader; - HRESULT hr; - DWORD color; - const float quad[] = { - -1.0, -1.0, 0.1, - 1.0, -1.0, 0.1, - -1.0, 1.0, 0.1, - 1.0, 1.0, 0.1 + static const float quad[] = + { + -1.0f, -1.0f, 0.1f, + -1.0f, 1.0f, 0.1f, + 1.0f, -1.0f, 0.1f, + 1.0f, 1.0f, 0.1f, }; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } + hr = IDirect3DDevice9_CreateVertexShader(device, shader_code, &shader); ok(hr == D3D_OK, "IDirect3DDevice9_CreateVertexShader failed with %08x\n", hr); hr = IDirect3DDevice9_SetVertexShader(device, shader); ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr); hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ff0000, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00ff0000, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); @@ -11689,29 +12158,44 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed with %08x\n", hr); IDirect3DVertexShader9_Release(shader); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } -static void viewport_test(IDirect3DDevice9 *device) { - HRESULT hr; - DWORD color; - D3DVIEWPORT9 vp, old_vp; +static void viewport_test(void) +{ + IDirect3DDevice9 *device; BOOL draw_failed = TRUE; - const float quad[] = + D3DVIEWPORT9 vp; + IDirect3D9 *d3d; + ULONG refcount; + DWORD color; + HWND window; + HRESULT hr; + + static const float quad[] = { - -0.5, -0.5, 0.1, - 0.5, -0.5, 0.1, - -0.5, 0.5, 0.1, - 0.5, 0.5, 0.1 + -0.5f, -0.5f, 0.1f, + -0.5f, 0.5f, 0.1f, + 0.5f, -0.5f, 0.1f, + 0.5f, 0.5f, 0.1f, }; - memset(&old_vp, 0, sizeof(old_vp)); - hr = IDirect3DDevice9_GetViewport(device, &old_vp); - ok(hr == D3D_OK, "IDirect3DDevice9_GetViewport failed with %08x\n", hr); + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ff0000, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00ff0000, 1.0f, 0); ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned %08x\n", hr); /* Test a viewport with Width and Height bigger than the surface dimensions @@ -11739,6 +12223,9 @@ hr = IDirect3DDevice9_SetViewport(device, &vp); ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %08x\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF returned %08x\n", hr); hr = IDirect3DDevice9_BeginScene(device); @@ -11776,8 +12263,11 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); - hr = IDirect3DDevice9_SetViewport(device, &old_vp); - ok(hr == D3D_OK, "IDirect3DDevice9_SetViewport failed with %08x\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } /* This test tests depth clamping / clipping behaviour: @@ -13027,18 +13517,18 @@ static void clip_planes(IDirect3DDevice9 *device, const char *test_name) { - const struct vertex quad1[] = + static const struct vertex quad1[] = { {-1.0f, -1.0f, 0.0f, 0xfff9e814}, - { 1.0f, -1.0f, 0.0f, 0xfff9e814}, {-1.0f, 1.0f, 0.0f, 0xfff9e814}, + { 1.0f, -1.0f, 0.0f, 0xfff9e814}, { 1.0f, 1.0f, 0.0f, 0xfff9e814}, }; - const struct vertex quad2[] = + static const struct vertex quad2[] = { {-1.0f, -1.0f, 0.0f, 0xff002b7f}, - { 1.0f, -1.0f, 0.0f, 0xff002b7f}, {-1.0f, 1.0f, 0.0f, 0xff002b7f}, + { 1.0f, -1.0f, 0.0f, 0xff002b7f}, { 1.0f, 1.0f, 0.0f, 0xff002b7f}, }; D3DCOLOR color; @@ -13077,10 +13567,19 @@ ok(color_match(color, 0x00f9e814, 1), "%s test: color 0x%08x.\n", test_name, color); } -static void clip_planes_test(IDirect3DDevice9 *device) +static void clip_planes_test(void) { - const float plane0[4] = {0.0f, 1.0f, 0.0f, 0.5f / 480.0f}; /* a quarter-pixel offset */ + IDirect3DSurface9 *offscreen_surface, *original_rt; + IDirect3DTexture9 *offscreen = NULL; + IDirect3DVertexShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + static const float plane0[4] = {0.0f, 1.0f, 0.0f, 0.5f / 480.0f}; /* a quarter-pixel offset */ static const DWORD shader_code[] = { 0xfffe0200, /* vs_2_0 */ @@ -13090,11 +13589,25 @@ 0x02000001, 0xd00f0000, 0x90e40001, /* mov oD0, v1 */ 0x0000ffff /* end */ }; - IDirect3DVertexShader9 *shader; - IDirect3DTexture9 *offscreen = NULL; - IDirect3DSurface9 *offscreen_surface, *original_rt; - HRESULT hr; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (caps.VertexShaderVersion < D3DVS_VERSION(2, 0)) + { + skip("No vs_2_0 support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } hr = IDirect3DDevice9_GetRenderTarget(device, 0, &original_rt); ok(SUCCEEDED(hr), "GetRenderTarget failed, hr %#x.\n", hr); @@ -13147,15 +13660,15 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); - IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPLANEENABLE, 0); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetVertexShader failed, hr=%08x\n", hr); IDirect3DVertexShader9_Release(shader); - hr = IDirect3DDevice9_SetRenderTarget(device, 0, original_rt); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderTarget failed, hr=%08x\n", hr); IDirect3DSurface9_Release(original_rt); IDirect3DSurface9_Release(offscreen_surface); IDirect3DTexture9_Release(offscreen); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void fp_special_test(void) @@ -13213,6 +13726,7 @@ D3DCOLOR r600; D3DCOLOR nv40; D3DCOLOR nv50; + D3DCOLOR warp; } vs_body[] = { @@ -13227,18 +13741,19 @@ * written to the blue component. * * There are considerable differences between graphics cards in how - * these are handled, but pow and nrm never generate INF or NAN. */ - {"log", vs_log, sizeof(vs_log), 0x00000000, 0x00000000, 0x00ff0000, 0x00ff7f00}, - {"pow", vs_pow, sizeof(vs_pow), 0x000000ff, 0x000000ff, 0x0000ff00, 0x000000ff}, - {"nrm", vs_nrm, sizeof(vs_nrm), 0x00ff0000, 0x00ff0000, 0x0000ff00, 0x00ff0000}, - {"rcp1", vs_rcp1, sizeof(vs_rcp1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00}, - {"rcp2", vs_rcp2, sizeof(vs_rcp2), 0x000000ff, 0x00000000, 0x00ff0000, 0x00ff7f00}, - {"rsq1", vs_rsq1, sizeof(vs_rsq1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00}, - {"rsq2", vs_rsq2, sizeof(vs_rsq2), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00}, - {"lit", vs_lit, sizeof(vs_lit), 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000}, - {"def1", vs_def1, sizeof(vs_def1), 0x000000ff, 0x00007f00, 0x0000ff00, 0x00007f00}, - {"def2", vs_def2, sizeof(vs_def2), 0x00ff0000, 0x00ff7f00, 0x00ff0000, 0x00ff7f00}, - {"def3", vs_def3, sizeof(vs_def3), 0x00ff00ff, 0x00ff7f00, 0x00ff00ff, 0x00ff7f00}, + * these are handled, but pow and nrm never generate INF or NAN on + * real hardware. */ + {"log", vs_log, sizeof(vs_log), 0x00000000, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000}, + {"pow", vs_pow, sizeof(vs_pow), 0x000000ff, 0x000000ff, 0x0000ff00, 0x000000ff, 0x00008000}, + {"nrm", vs_nrm, sizeof(vs_nrm), 0x00ff0000, 0x00ff0000, 0x0000ff00, 0x00ff0000, 0x00008000}, + {"rcp1", vs_rcp1, sizeof(vs_rcp1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000}, + {"rcp2", vs_rcp2, sizeof(vs_rcp2), 0x000000ff, 0x00000000, 0x00ff0000, 0x00ff7f00, 0x00ff8000}, + {"rsq1", vs_rsq1, sizeof(vs_rsq1), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000}, + {"rsq2", vs_rsq2, sizeof(vs_rsq2), 0x000000ff, 0x000000ff, 0x00ff00ff, 0x00ff7f00, 0x00ff8000}, + {"lit", vs_lit, sizeof(vs_lit), 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000}, + {"def1", vs_def1, sizeof(vs_def1), 0x000000ff, 0x00007f00, 0x0000ff00, 0x00007f00, 0x00008000}, + {"def2", vs_def2, sizeof(vs_def2), 0x00ff0000, 0x00ff7f00, 0x00ff0000, 0x00ff7f00, 0x00ff8000}, + {"def3", vs_def3, sizeof(vs_def3), 0x00ff00ff, 0x00ff7f00, 0x00ff00ff, 0x00ff7f00, 0x00ff8000}, }; static const DWORD ps_code[] = @@ -13360,7 +13875,8 @@ ok(color_match(color, vs_body[i].r500, 1) || color_match(color, vs_body[i].r600, 1) || color_match(color, vs_body[i].nv40, 1) - || color_match(color, vs_body[i].nv50, 1), + || color_match(color, vs_body[i].nv50, 1) + || broken(color_match(color, vs_body[i].warp, 1)), "Expected color 0x%08x, 0x%08x, 0x%08x or 0x%08x for instruction \"%s\", got 0x%08x.\n", vs_body[i].r500, vs_body[i].r600, vs_body[i].nv40, vs_body[i].nv50, vs_body[i].name, color); @@ -14929,6 +15445,15 @@ 0x00ff0000, 0x00606060, 0x009f609f, 0x00ff0000, 0x00ff0000, 0x00602060, 0x009f209f, 0x00ff0000, }; + /* The Windows 8 testbot (WARP) appears to not clip z for regular + * vertices either. */ + static const D3DCOLOR expected_broken[] = + { + 0x0020df20, 0x0060df60, 0x009fdf9f, 0x00dfdfdf, + 0x00209f20, 0x00609f60, 0x009f9f9f, 0x00df9fdf, + 0x00206020, 0x00606060, 0x009f609f, 0x00df60df, + 0x00202020, 0x00602060, 0x009f209f, 0x00df20df, + }; IDirect3DVertexShader9 *vs; IDirect3DPixelShader9 *ps; @@ -14960,7 +15485,8 @@ x = 80 * ((2 * j) + 1); y = 60 * ((2 * i) + 1); color = getPixelColor(device, x, y); - ok(color_match(color, expected[i * 4 + j], 1), + ok(color_match(color, expected[i * 4 + j], 1) + || broken(color_match(color, expected_broken[i * 4 + j], 1)), "Expected color 0x%08x at %u, %u, got 0x%08x.\n", expected[i * 4 + j], x, y, color); } } @@ -14968,10 +15494,6 @@ hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Failed to present backbuffer, hr %#x.\n", hr); - hr = IDirect3DDevice9_SetPixelShader(device, NULL); - ok(SUCCEEDED(hr), "Failed to set pixel shader, hr %#x.\n", hr); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(SUCCEEDED(hr), "Failed to set vertex shader, hr %#x.\n", hr); IDirect3DPixelShader9_Release(ps); IDirect3DVertexShader9_Release(vs); } @@ -16002,54 +16524,30 @@ conditional_np2_repeat_test(device_ptr); fixed_function_bumpmap_test(device_ptr); pointsize_test(device_ptr); - tssargtemp_test(device_ptr); - np2_stretch_rect_test(device_ptr); - yuv_color_test(device_ptr); - yuv_layout_test(device_ptr); - zwriteenable_test(device_ptr); - alphatest_test(device_ptr); - viewport_test(device_ptr); - - if (caps.VertexShaderVersion >= D3DVS_VERSION(1, 1)) - { - test_constant_clamp_vs(device_ptr); - test_compare_instructions(device_ptr); - } - else skip("No vs_1_1 support\n"); - - if (caps.VertexShaderVersion >= D3DVS_VERSION(2, 0)) - { - test_mova(device_ptr); - loop_index_test(device_ptr); - sincos_test(device_ptr); - sgn_test(device_ptr); - clip_planes_test(device_ptr); - if (caps.VertexShaderVersion >= D3DVS_VERSION(3, 0)) { - test_vshader_input(device_ptr); - test_vshader_float16(device_ptr); - stream_test(device_ptr); - } else { - skip("No vs_3_0 support\n"); - } - } - else skip("No vs_2_0 support\n"); - - if (caps.VertexShaderVersion >= D3DVS_VERSION(2, 0) && caps.PixelShaderVersion >= D3DPS_VERSION(2, 0)) - { - fog_with_shader_test(device_ptr); - } - else skip("No vs_2_0 and ps_2_0 support\n"); - - if (caps.PixelShaderVersion >= D3DPS_VERSION(1, 1)) - { - texbem_test(device_ptr); - texdepth_test(device_ptr); - } - else skip("No ps_1_1 support\n"); cleanup_device(device_ptr); device_ptr = NULL; + tssargtemp_test(); + np2_stretch_rect_test(); + yuv_color_test(); + yuv_layout_test(); + zwriteenable_test(); + alphatest_test(); + viewport_test(); + test_constant_clamp_vs(); + test_compare_instructions(); + test_mova(); + loop_index_test(); + sincos_test(); + sgn_test(); + clip_planes_test(); + test_vshader_input(); + test_vshader_float16(); + stream_test(); + fog_with_shader_test(); + texbem_test(); + texdepth_test(); texkill_test(); x8l8v8u8_test(); volume_v16u16_test(); diff -Nru wine1.7-1.7.15/dlls/d3d9/texture.c wine1.7-1.7.16/dlls/d3d9/texture.c --- wine1.7-1.7.15/dlls/d3d9/texture.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3d9/texture.c 2014-04-04 19:13:44.000000000 +0000 @@ -61,7 +61,7 @@ static ULONG WINAPI d3d9_texture_2d_AddRef(IDirect3DTexture9 *iface) { struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface); - ULONG ref = InterlockedIncrement(&texture->refcount); + ULONG ref = InterlockedIncrement(&texture->resource.refcount); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -79,7 +79,7 @@ static ULONG WINAPI d3d9_texture_2d_Release(IDirect3DTexture9 *iface) { struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface); - ULONG ref = InterlockedDecrement(&texture->refcount); + ULONG ref = InterlockedDecrement(&texture->resource.refcount); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -115,52 +115,28 @@ REFGUID guid, const void *data, DWORD data_size, DWORD flags) { struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(guid), data, data_size, flags); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_set_private_data(&texture->resource, guid, data, data_size, flags); } static HRESULT WINAPI d3d9_texture_2d_GetPrivateData(IDirect3DTexture9 *iface, REFGUID guid, void *data, DWORD *data_size) { struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(guid), data, data_size); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_get_private_data(resource, guid, data, data_size); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_get_private_data(&texture->resource, guid, data, data_size); } static HRESULT WINAPI d3d9_texture_2d_FreePrivateData(IDirect3DTexture9 *iface, REFGUID guid) { struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_free_private_data(resource, guid); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_free_private_data(&texture->resource, guid); } static DWORD WINAPI d3d9_texture_2d_SetPriority(IDirect3DTexture9 *iface, DWORD priority) @@ -472,7 +448,7 @@ static ULONG WINAPI d3d9_texture_cube_AddRef(IDirect3DCubeTexture9 *iface) { struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface); - ULONG ref = InterlockedIncrement(&texture->refcount); + ULONG ref = InterlockedIncrement(&texture->resource.refcount); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -490,7 +466,7 @@ static ULONG WINAPI d3d9_texture_cube_Release(IDirect3DCubeTexture9 *iface) { struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface); - ULONG ref = InterlockedDecrement(&texture->refcount); + ULONG ref = InterlockedDecrement(&texture->resource.refcount); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -528,52 +504,28 @@ REFGUID guid, const void *data, DWORD data_size, DWORD flags) { struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(guid), data, data_size, flags); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_set_private_data(&texture->resource, guid, data, data_size, flags); } static HRESULT WINAPI d3d9_texture_cube_GetPrivateData(IDirect3DCubeTexture9 *iface, REFGUID guid, void *data, DWORD *data_size) { struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(guid), data, data_size); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_get_private_data(resource, guid, data, data_size); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_get_private_data(&texture->resource, guid, data, data_size); } static HRESULT WINAPI d3d9_texture_cube_FreePrivateData(IDirect3DCubeTexture9 *iface, REFGUID guid) { struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_free_private_data(resource, guid); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_free_private_data(&texture->resource, guid); } static DWORD WINAPI d3d9_texture_cube_SetPriority(IDirect3DCubeTexture9 *iface, DWORD priority) @@ -911,7 +863,7 @@ static ULONG WINAPI d3d9_texture_3d_AddRef(IDirect3DVolumeTexture9 *iface) { struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface); - ULONG ref = InterlockedIncrement(&texture->refcount); + ULONG ref = InterlockedIncrement(&texture->resource.refcount); TRACE("%p increasing refcount to %u.\n", iface, ref); @@ -929,7 +881,7 @@ static ULONG WINAPI d3d9_texture_3d_Release(IDirect3DVolumeTexture9 *iface) { struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface); - ULONG ref = InterlockedDecrement(&texture->refcount); + ULONG ref = InterlockedDecrement(&texture->resource.refcount); TRACE("%p decreasing refcount to %u.\n", iface, ref); @@ -965,52 +917,28 @@ REFGUID guid, const void *data, DWORD data_size, DWORD flags) { struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(guid), data, data_size, flags); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_set_private_data(&texture->resource, guid, data, data_size, flags); } static HRESULT WINAPI d3d9_texture_3d_GetPrivateData(IDirect3DVolumeTexture9 *iface, REFGUID guid, void *data, DWORD *data_size) { struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(guid), data, data_size); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_get_private_data(resource, guid, data, data_size); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_get_private_data(&texture->resource, guid, data, data_size); } static HRESULT WINAPI d3d9_texture_3d_FreePrivateData(IDirect3DVolumeTexture9 *iface, REFGUID guid) { struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - wined3d_mutex_lock(); - resource = wined3d_texture_get_resource(texture->wined3d_texture); - hr = wined3d_resource_free_private_data(resource, guid); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_free_private_data(&texture->resource, guid); } static DWORD WINAPI d3d9_texture_3d_SetPriority(IDirect3DVolumeTexture9 *iface, DWORD priority) @@ -1298,7 +1226,9 @@ static void STDMETHODCALLTYPE d3d9_texture_wined3d_object_destroyed(void *parent) { - HeapFree(GetProcessHeap(), 0, parent); + struct d3d9_texture *texture = parent; + d3d9_resource_cleanup(&texture->resource); + HeapFree(GetProcessHeap(), 0, texture); } static const struct wined3d_parent_ops d3d9_texture_wined3d_parent_ops = @@ -1314,7 +1244,7 @@ HRESULT hr; texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_2d_vtbl; - texture->refcount = 1; + d3d9_resource_init(&texture->resource); desc.resource_type = WINED3D_RTYPE_TEXTURE; desc.format = wined3dformat_from_d3dformat(format); @@ -1355,7 +1285,7 @@ HRESULT hr; texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_cube_vtbl; - texture->refcount = 1; + d3d9_resource_init(&texture->resource); desc.resource_type = WINED3D_RTYPE_CUBE_TEXTURE; desc.format = wined3dformat_from_d3dformat(format); @@ -1395,7 +1325,7 @@ HRESULT hr; texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_3d_vtbl; - texture->refcount = 1; + d3d9_resource_init(&texture->resource); desc.resource_type = WINED3D_RTYPE_VOLUME_TEXTURE; desc.format = wined3dformat_from_d3dformat(format); diff -Nru wine1.7-1.7.15/dlls/d3d9/volume.c wine1.7-1.7.16/dlls/d3d9/volume.c --- wine1.7-1.7.15/dlls/d3d9/volume.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3d9/volume.c 2014-04-04 19:13:44.000000000 +0000 @@ -60,7 +60,7 @@ return IUnknown_AddRef(volume->forwardReference); } - refcount = InterlockedIncrement(&volume->refcount); + refcount = InterlockedIncrement(&volume->resource.refcount); TRACE("%p increasing refcount to %u.\n", iface, refcount); if (refcount == 1) @@ -86,7 +86,7 @@ return IUnknown_Release(volume->forwardReference); } - refcount = InterlockedDecrement(&volume->refcount); + refcount = InterlockedDecrement(&volume->resource.refcount); TRACE("%p decreasing refcount to %u.\n", iface, refcount); if (!refcount) @@ -123,52 +123,28 @@ const void *data, DWORD data_size, DWORD flags) { struct d3d9_volume *volume = impl_from_IDirect3DVolume9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n", iface, debugstr_guid(guid), data, data_size, flags); - wined3d_mutex_lock(); - resource = wined3d_volume_get_resource(volume->wined3d_volume); - hr = wined3d_resource_set_private_data(resource, guid, data, data_size, flags); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_set_private_data(&volume->resource, guid, data, data_size, flags); } static HRESULT WINAPI d3d9_volume_GetPrivateData(IDirect3DVolume9 *iface, REFGUID guid, void *data, DWORD *data_size) { struct d3d9_volume *volume = impl_from_IDirect3DVolume9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s, data %p, data_size %p.\n", iface, debugstr_guid(guid), data, data_size); - wined3d_mutex_lock(); - resource = wined3d_volume_get_resource(volume->wined3d_volume); - hr = wined3d_resource_get_private_data(resource, guid, data, data_size); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_get_private_data(&volume->resource, guid, data, data_size); } static HRESULT WINAPI d3d9_volume_FreePrivateData(IDirect3DVolume9 *iface, REFGUID guid) { struct d3d9_volume *volume = impl_from_IDirect3DVolume9(iface); - struct wined3d_resource *resource; - HRESULT hr; - TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - wined3d_mutex_lock(); - resource = wined3d_volume_get_resource(volume->wined3d_volume); - hr = wined3d_resource_free_private_data(resource, guid); - wined3d_mutex_unlock(); - - return hr; + return d3d9_resource_free_private_data(&volume->resource, guid); } static HRESULT WINAPI d3d9_volume_GetContainer(IDirect3DVolume9 *iface, REFIID riid, void **container) @@ -266,7 +242,9 @@ static void STDMETHODCALLTYPE volume_wined3d_object_destroyed(void *parent) { - HeapFree(GetProcessHeap(), 0, parent); + struct d3d9_volume *volume = parent; + d3d9_resource_cleanup(&volume->resource); + HeapFree(GetProcessHeap(), 0, volume); } static const struct wined3d_parent_ops d3d9_volume_wined3d_parent_ops = @@ -278,7 +256,7 @@ const struct wined3d_parent_ops **parent_ops) { volume->IDirect3DVolume9_iface.lpVtbl = &d3d9_volume_vtbl; - volume->refcount = 1; + d3d9_resource_init(&volume->resource); wined3d_volume_incref(wined3d_volume); volume->wined3d_volume = wined3d_volume; diff -Nru wine1.7-1.7.15/dlls/d3dx9_36/tests/effect.c wine1.7-1.7.16/dlls/d3dx9_36/tests/effect.c --- wine1.7-1.7.15/dlls/d3dx9_36/tests/effect.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3dx9_36/tests/effect.c 2014-04-04 19:13:44.000000000 +0000 @@ -1683,9 +1683,9 @@ UINT res_value_offset = res[k].value_offset; D3DXHANDLE parameter; D3DXPARAMETER_DESC pdesc; - BOOL bvalue; - INT ivalue; - FLOAT fvalue; + BOOL bvalue = TRUE; + INT ivalue = 42; + FLOAT fvalue = 2.71828f; DWORD input_value[EFFECT_PARAMETER_VALUE_ARRAY_SIZE]; DWORD expected_value[EFFECT_PARAMETER_VALUE_ARRAY_SIZE]; UINT l, n, m, element; diff -Nru wine1.7-1.7.15/dlls/d3dxof/parsing.c wine1.7-1.7.16/dlls/d3dxof/parsing.c --- wine1.7-1.7.15/dlls/d3dxof/parsing.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/d3dxof/parsing.c 2014-04-04 19:13:44.000000000 +0000 @@ -19,6 +19,7 @@ */ #include "config.h" +#include "wine/port.h" #include "wine/debug.h" #define COBJMACROS @@ -90,7 +91,7 @@ (char)(fourcc >> 16), (char)(fourcc >> 24)); } -static const char* get_primitive_string(WORD token) +static const char* get_primitive_string(DWORD token) { switch(token) { diff -Nru wine1.7-1.7.15/dlls/dbghelp/dwarf.c wine1.7-1.7.16/dlls/dbghelp/dwarf.c --- wine1.7-1.7.15/dlls/dbghelp/dwarf.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/dbghelp/dwarf.c 2014-04-04 19:13:44.000000000 +0000 @@ -1440,6 +1440,9 @@ switch (child->abbrev->tag) { + case DW_TAG_array_type: + dwarf2_parse_array_type(ctx, di); + break; case DW_TAG_member: /* FIXME: should I follow the sibling stuff ?? */ dwarf2_parse_udt_member(ctx, child, (struct symt_udt*)di->symt); @@ -1710,7 +1713,10 @@ static void dwarf2_parse_subprogram_block(dwarf2_subprogram_t* subpgm, struct symt_block* parent_block, - dwarf2_debug_info_t* di); + dwarf2_debug_info_t* di); + +static struct symt* dwarf2_parse_subroutine_type(dwarf2_parse_context_t* ctx, + dwarf2_debug_info_t* di); static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm, struct symt_block* parent_block, @@ -1801,6 +1807,12 @@ case DW_TAG_variable: dwarf2_parse_variable(subpgm, block, child); break; + case DW_TAG_pointer_type: + dwarf2_parse_pointer_type(subpgm->ctx, di); + break; + case DW_TAG_subroutine_type: + dwarf2_parse_subroutine_type(subpgm->ctx, di); + break; case DW_TAG_lexical_block: dwarf2_parse_subprogram_block(subpgm, block, child); break; @@ -1930,6 +1942,9 @@ case DW_TAG_inlined_subroutine: dwarf2_parse_inlined_subroutine(&subpgm, NULL, child); break; + case DW_TAG_pointer_type: + dwarf2_parse_pointer_type(subpgm.ctx, di); + break; case DW_TAG_subprogram: /* FIXME: likely a declaration (to be checked) * skip it for now diff -Nru wine1.7-1.7.15/dlls/dplayx/dplayx_global.c wine1.7-1.7.16/dlls/dplayx/dplayx_global.c --- wine1.7-1.7.15/dlls/dplayx/dplayx_global.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/dplayx/dplayx_global.c 2014-04-04 19:13:44.000000000 +0000 @@ -84,8 +84,9 @@ typedef struct { BOOL used; - DWORD data[dwBlockSize-sizeof(DWORD)]; + BYTE data[dwBlockSize - sizeof(BOOL)]; } DPLAYX_MEM_SLICE; +C_ASSERT(sizeof(DPLAYX_MEM_SLICE) == dwBlockSize); static DPLAYX_MEM_SLICE* lpMemArea; @@ -100,7 +101,7 @@ return; } - lpAddrStart = (char*)addr - sizeof(DWORD); /* Find block header */ + lpAddrStart = CONTAINING_RECORD(addr, DPLAYX_MEM_SLICE, data); /* Find block header */ dwBlockUsed = ((BYTE*)lpAddrStart - (BYTE*)lpMemArea)/dwBlockSize; lpMemArea[ dwBlockUsed ].used = FALSE; @@ -111,10 +112,10 @@ LPVOID lpvArea = NULL; UINT uBlockUsed; - if( size > (dwBlockSize - sizeof(DWORD)) ) + if( size > (dwBlockSize - sizeof(BOOL)) ) { FIXME( "Size exceeded. Request of 0x%08x\n", size ); - size = dwBlockSize - sizeof(DWORD); + size = dwBlockSize - sizeof(BOOL); } /* Find blank area */ diff -Nru wine1.7-1.7.15/dlls/dxdiagn/provider.c wine1.7-1.7.16/dlls/dxdiagn/provider.c --- wine1.7-1.7.15/dlls/dxdiagn/provider.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/dxdiagn/provider.c 2014-04-04 19:13:44.000000000 +0000 @@ -915,10 +915,15 @@ static const WCHAR id_fmtW[] = {'0','x','%','0','4','x',0}; static const WCHAR subsysid_fmtW[] = {'0','x','%','0','8','x',0}; static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0}; + static const WCHAR b3DAccelerationExists[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','x','i','s','t','s',0}; + static const WCHAR b3DAccelerationEnabled[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0}; + static const WCHAR bDDAccelerationEnabled[] = {'b','D','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0}; D3DADAPTER_IDENTIFIER9 adapter_info; D3DDISPLAYMODE adapter_mode; + D3DCAPS9 device_caps; DWORD available_mem = 0; + BOOL hardware_accel; snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), adapterid_fmtW, index); display_adapter = allocate_information_node(buffer); @@ -1043,6 +1048,21 @@ hr = add_bstr_property(display_adapter, szDisplayMemoryEnglish, buffer); if (FAILED(hr)) goto cleanup; + + hr = IDirect3D9_GetDeviceCaps(pDirect3D9, index, D3DDEVTYPE_HAL, &device_caps); + hardware_accel = SUCCEEDED(hr); + + hr = add_bool_property(display_adapter, b3DAccelerationEnabled, hardware_accel); + if (FAILED(hr)) + goto cleanup; + + hr = add_bool_property(display_adapter, b3DAccelerationExists, hardware_accel); + if (FAILED(hr)) + goto cleanup; + + hr = add_bool_property(display_adapter, bDDAccelerationEnabled, hardware_accel); + if (FAILED(hr)) + goto cleanup; } hr = S_OK; diff -Nru wine1.7-1.7.15/dlls/dxdiagn/tests/container.c wine1.7-1.7.16/dlls/dxdiagn/tests/container.c --- wine1.7-1.7.15/dlls/dxdiagn/tests/container.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/dxdiagn/tests/container.c 2014-04-04 19:13:44.000000000 +0000 @@ -938,6 +938,9 @@ static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I','d',0}; static const WCHAR dwRefreshRate[] = {'d','w','R','e','f','r','e','s','h','R','a','t','e',0}; static const WCHAR szManufacturer[] = {'s','z','M','a','n','u','f','a','c','t','u','r','e','r',0}; + static const WCHAR b3DAccelerationExists[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','x','i','s','t','s',0}; + static const WCHAR b3DAccelerationEnabled[] = {'b','3','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0}; + static const WCHAR bDDAccelerationEnabled[] = {'b','D','D','A','c','c','e','l','e','r','a','t','i','o','n','E','n','a','b','l','e','d',0}; static const struct property_test property_tests[] = { @@ -959,6 +962,9 @@ {szRevisionId, VT_BSTR}, {dwRefreshRate, VT_UI4}, {szManufacturer, VT_BSTR}, + {b3DAccelerationExists, VT_BOOL}, + {b3DAccelerationEnabled, VT_BOOL}, + {bDDAccelerationEnabled, VT_BOOL}, }; IDxDiagContainer *display_cont = NULL; diff -Nru wine1.7-1.7.15/dlls/dxva2/dxva2.spec wine1.7-1.7.16/dlls/dxva2/dxva2.spec --- wine1.7-1.7.15/dlls/dxva2/dxva2.spec 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/dxva2/dxva2.spec 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,37 @@ +@ stdcall CapabilitiesRequestAndCapabilitiesReply(ptr ptr long) +@ stdcall DXVA2CreateDirect3DDeviceManager9(ptr ptr) +@ stdcall DXVA2CreateVideoService(ptr ptr ptr) +@ stdcall DegaussMonitor(ptr) +@ stdcall DestroyPhysicalMonitor(ptr) +@ stdcall DestroyPhysicalMonitors(long ptr) +@ stdcall GetCapabilitiesStringLength(ptr ptr) +@ stdcall GetMonitorBrightness(ptr ptr ptr ptr) +@ stdcall GetMonitorCapabilities(ptr ptr ptr) +@ stdcall GetMonitorColorTemperature(ptr ptr) +@ stdcall GetMonitorContrast(ptr ptr ptr ptr) +@ stdcall GetMonitorDisplayAreaPosition(ptr long ptr ptr ptr) +@ stdcall GetMonitorDisplayAreaSize(ptr long ptr ptr ptr) +@ stdcall GetMonitorRedGreenOrBlueDrive(ptr long ptr ptr ptr) +@ stdcall GetMonitorRedGreenOrBlueGain(ptr long ptr ptr ptr) +@ stdcall GetMonitorTechnologyType(ptr ptr) +@ stdcall GetNumberOfPhysicalMonitorsFromHMONITOR(ptr ptr) +@ stdcall GetNumberOfPhysicalMonitorsFromIDirect3DDevice9(ptr ptr) +@ stdcall GetPhysicalMonitorsFromHMONITOR(ptr long ptr) +@ stdcall GetPhysicalMonitorsFromIDirect3DDevice9(ptr long ptr) +@ stdcall GetTimingReport(ptr ptr) +@ stdcall GetVCPFeatureAndVCPFeatureReply(ptr long ptr ptr ptr) +@ stdcall OPMGetVideoOutputsFromHMONITOR(ptr long ptr ptr) +@ stdcall OPMGetVideoOutputsFromIDirect3DDevice9Object(ptr long ptr ptr) +@ stdcall RestoreMonitorFactoryColorDefaults(ptr) +@ stdcall RestoreMonitorFactoryDefaults(ptr) +@ stdcall SaveCurrentMonitorSettings(ptr) +@ stdcall SaveCurrentSettings(ptr) +@ stdcall SetMonitorBrightness(ptr long) +@ stdcall SetMonitorColorTemperature(ptr long) +@ stdcall SetMonitorContrast(ptr long) +@ stdcall SetMonitorDisplayAreaPosition(ptr long long) +@ stdcall SetMonitorDisplayAreaSize(ptr long long) +@ stdcall SetMonitorRedGreenOrBlueDrive(ptr long long) +@ stdcall SetMonitorRedGreenOrBlueGain(ptr long long) +@ stdcall SetVCPFeature(ptr long long) +@ stub UABGetCertificate diff -Nru wine1.7-1.7.15/dlls/dxva2/main.c wine1.7-1.7.16/dlls/dxva2/main.c --- wine1.7-1.7.15/dlls/dxva2/main.c 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/dxva2/main.c 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,336 @@ +/* + * Copyright 2014 Michael Müller for Pipelight + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include "windef.h" +#include "winbase.h" +#include "d3d9.h" +#include "dxva2api.h" +#include "physicalmonitorenumerationapi.h" +#include "lowlevelmonitorconfigurationapi.h" +#include "highlevelmonitorconfigurationapi.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dxva2); + +BOOL WINAPI CapabilitiesRequestAndCapabilitiesReply( HMONITOR monitor, LPSTR buffer, DWORD length ) +{ + FIXME("(%p, %p, %d): stub\n", monitor, buffer, length); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9( UINT *resetToken, IDirect3DDeviceManager9 **dxvManager ) +{ + FIXME("(%p, %p): stub\n", resetToken, dxvManager); + + return E_NOTIMPL; +} + +HRESULT WINAPI DXVA2CreateVideoService( IDirect3DDevice9 *device, REFIID riid, void **ppv ) +{ + FIXME("(%p, %s, %p): stub\n", device, debugstr_guid(riid), ppv); + + return E_NOTIMPL; +} + +BOOL WINAPI DegaussMonitor( HMONITOR monitor ) +{ + FIXME("(%p): stub\n", monitor); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI DestroyPhysicalMonitor( HMONITOR monitor ) +{ + FIXME("(%p): stub\n", monitor); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI DestroyPhysicalMonitors( DWORD arraySize, LPPHYSICAL_MONITOR array ) +{ + FIXME("(0x%x, %p): stub\n", arraySize, array); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetCapabilitiesStringLength( HMONITOR monitor, LPDWORD length ) +{ + FIXME("(%p, %p): stub\n", monitor, length); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetMonitorBrightness( HMONITOR monitor, LPDWORD minimum, LPDWORD current, LPDWORD maximum ) +{ + FIXME("(%p, %p, %p, %p): stub\n", monitor, minimum, current, maximum); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetMonitorCapabilities( HMONITOR monitor, LPDWORD capabilities, LPDWORD temperatures ) +{ + FIXME("(%p, %p, %p): stub\n", monitor, capabilities, temperatures); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + + +BOOL WINAPI GetMonitorColorTemperature( HMONITOR monitor, LPMC_COLOR_TEMPERATURE temperature ) +{ + FIXME("(%p, %p): stub\n", monitor, temperature); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetMonitorContrast( HMONITOR monitor, LPDWORD minimum, LPDWORD current, LPDWORD maximum ) +{ + FIXME("(%p, %p, %p, %p): stub\n", monitor, minimum, current, maximum); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetMonitorDisplayAreaPosition( HMONITOR monitor, MC_POSITION_TYPE type, LPDWORD minimum, + LPDWORD current, LPDWORD maximum ) +{ + FIXME("(%p, 0x%x, %p, %p, %p): stub\n", monitor, type, minimum, current, maximum); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetMonitorDisplayAreaSize( HMONITOR monitor, MC_SIZE_TYPE type, LPDWORD minimum, + LPDWORD current, LPDWORD maximum ) +{ + FIXME("(%p, 0x%x, %p, %p, %p): stub\n", monitor, type, minimum, current, maximum); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetMonitorRedGreenOrBlueDrive( HMONITOR monitor, MC_DRIVE_TYPE type, LPDWORD minimum, + LPDWORD current, LPDWORD maximum ) +{ + FIXME("(%p, 0x%x, %p, %p, %p): stub\n", monitor, type, minimum, current, maximum); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetMonitorRedGreenOrBlueGain( HMONITOR monitor, MC_GAIN_TYPE type, LPDWORD minimum, + LPDWORD current, LPDWORD maximum ) +{ + FIXME("(%p, 0x%x, %p, %p, %p): stub\n", monitor, type, minimum, current, maximum); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetMonitorTechnologyType( HMONITOR monitor, LPMC_DISPLAY_TECHNOLOGY_TYPE type ) +{ + FIXME("(%p, %p): stub\n", monitor, type); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetNumberOfPhysicalMonitorsFromHMONITOR( HMONITOR monitor, LPDWORD number ) +{ + FIXME("(%p, %p): stub\n", monitor, number); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +HRESULT WINAPI GetNumberOfPhysicalMonitorsFromIDirect3DDevice9( IDirect3DDevice9 *device, LPDWORD number ) +{ + FIXME("(%p, %p): stub\n", device, number); + + return E_NOTIMPL; +} + +BOOL WINAPI GetPhysicalMonitorsFromHMONITOR( HMONITOR monitor, DWORD arraySize, LPPHYSICAL_MONITOR array ) +{ + FIXME("(%p, 0x%x, %p): stub\n", monitor, arraySize, array); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +HRESULT WINAPI GetPhysicalMonitorsFromIDirect3DDevice9( IDirect3DDevice9 *device, DWORD arraySize, LPPHYSICAL_MONITOR array ) +{ + FIXME("(%p, 0x%x, %p): stub\n", device, arraySize, array); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetTimingReport( HMONITOR monitor, LPMC_TIMING_REPORT timingReport ) +{ + FIXME("(%p, %p): stub\n", monitor, timingReport); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI GetVCPFeatureAndVCPFeatureReply( HMONITOR monitor, BYTE vcpCode, LPMC_VCP_CODE_TYPE pvct, + LPDWORD current, LPDWORD maximum ) +{ + FIXME("(%p, 0x%02x, %p, %p, %p): stub\n", monitor, vcpCode, pvct, current, maximum); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +HRESULT WINAPI OPMGetVideoOutputsFromHMONITOR( HMONITOR monitor, /* OPM_VIDEO_OUTPUT_SEMANTICS */ int vos, + ULONG *numVideoOutputs, /* IOPMVideoOutput */ void ***videoOutputs ) +{ + FIXME("(%p, 0x%x, %p, %p): stub\n", monitor, vos, numVideoOutputs, videoOutputs); + + return E_NOTIMPL; +} + +HRESULT WINAPI OPMGetVideoOutputsFromIDirect3DDevice9Object( IDirect3DDevice9 *device, /* OPM_VIDEO_OUTPUT_SEMANTICS */ int vos, + ULONG *numVideoOutputs, /* IOPMVideoOutput */ void ***videoOutputs ) +{ + FIXME("(%p, 0x%x, %p, %p): stub\n", device, vos, numVideoOutputs, videoOutputs); + + return E_NOTIMPL; +} + +BOOL WINAPI RestoreMonitorFactoryColorDefaults( HMONITOR monitor ) +{ + FIXME("(%p): stub\n", monitor); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI RestoreMonitorFactoryDefaults( HMONITOR monitor ) +{ + FIXME("(%p): stub\n", monitor); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SaveCurrentMonitorSettings( HMONITOR monitor ) +{ + FIXME("(%p): stub\n", monitor); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SaveCurrentSettings( HMONITOR monitor ) +{ + FIXME("(%p): stub\n", monitor); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SetMonitorBrightness( HMONITOR monitor, DWORD brightness ) +{ + FIXME("(%p, 0x%x): stub\n", monitor, brightness); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SetMonitorColorTemperature( HMONITOR monitor, MC_COLOR_TEMPERATURE temperature ) +{ + FIXME("(%p, 0x%x): stub\n", monitor, temperature); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SetMonitorContrast( HMONITOR monitor, DWORD contrast ) +{ + FIXME("(%p, 0x%x): stub\n", monitor, contrast); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SetMonitorDisplayAreaPosition( HMONITOR monitor, MC_POSITION_TYPE type, DWORD position ) +{ + FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, position); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SetMonitorDisplayAreaSize( HMONITOR monitor, MC_SIZE_TYPE type, DWORD size ) +{ + FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, size); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SetMonitorRedGreenOrBlueDrive( HMONITOR monitor, MC_DRIVE_TYPE type, DWORD drive ) +{ + FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, drive); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SetMonitorRedGreenOrBlueGain( HMONITOR monitor, MC_GAIN_TYPE type, DWORD gain ) +{ + FIXME("(%p, 0x%x, 0x%x): stub\n", monitor, type, gain); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI SetVCPFeature( HMONITOR monitor, BYTE vcpCode, DWORD value ) +{ + FIXME("(%p, 0x%02x, 0x%x): stub\n", monitor, vcpCode, value); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + break; + } + + return TRUE; +} diff -Nru wine1.7-1.7.15/dlls/dxva2/Makefile.in wine1.7-1.7.16/dlls/dxva2/Makefile.in --- wine1.7-1.7.15/dlls/dxva2/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/dxva2/Makefile.in 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,4 @@ +MODULE = dxva2.dll + +C_SRCS = \ + main.c diff -Nru wine1.7-1.7.15/dlls/gameux/tests/gamestatistics.c wine1.7-1.7.16/dlls/gameux/tests/gamestatistics.c --- wine1.7-1.7.15/dlls/gameux/tests/gamestatistics.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/gameux/tests/gamestatistics.c 2014-04-04 19:13:44.000000000 +0000 @@ -130,15 +130,13 @@ 'l','o','r','e','r','\\','G','a','m','e','S','t','a','t','i','s', 't','i','c','s','\\',0}; static const WCHAR sDotGamestats[] = {'.','g','a','m','e','s','t','a','t','s',0}; - static const DWORD dwGuidLength = 49; - HRESULT hr; - WCHAR sGuid[dwGuidLength], sPath[MAX_PATH] = {0}; + WCHAR sGuid[49], sPath[MAX_PATH]; hr = pSHGetFolderPathW(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, sPath); if(SUCCEEDED(hr)) - hr = (StringFromGUID2(guidApplicationId, sGuid, dwGuidLength)!=0 ? S_OK : E_FAIL); + hr = (StringFromGUID2(guidApplicationId, sGuid, sizeof(sGuid) / sizeof(sGuid[0])) != 0 ? S_OK : E_FAIL); if(SUCCEEDED(hr)) { diff -Nru wine1.7-1.7.15/dlls/gdi32/bidi.c wine1.7-1.7.16/dlls/gdi32/bidi.c --- wine1.7-1.7.15/dlls/gdi32/bidi.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/gdi32/bidi.c 2014-04-04 19:13:44.000000000 +0000 @@ -596,10 +596,25 @@ if (lpGlyphs && doGlyphs) { - BYTE runOrder[maxItems]; - int visOrder[maxItems]; + BYTE *runOrder; + int *visOrder; SCRIPT_ITEM *curItem; + runOrder = HeapAlloc(GetProcessHeap(), 0, maxItems * sizeof(*runOrder)); + visOrder = HeapAlloc(GetProcessHeap(), 0, maxItems * sizeof(*visOrder)); + if (!runOrder || !visOrder) + { + WARN("Out of memory\n"); + HeapFree(GetProcessHeap(), 0, runOrder); + HeapFree(GetProcessHeap(), 0, visOrder); + HeapFree(GetProcessHeap(), 0, chartype); + HeapFree(GetProcessHeap(), 0, levels); + HeapFree(GetProcessHeap(), 0, pItems); + HeapFree(GetProcessHeap(), 0, psva); + HeapFree(GetProcessHeap(), 0, pwLogClust); + return FALSE; + } + for (j = 0; j < nItems; j++) runOrder[j] = pItems[j].a.s.uBidiLevel; @@ -621,6 +636,8 @@ if (!run_glyphs) { WARN("Out of memory\n"); + HeapFree(GetProcessHeap(), 0, runOrder); + HeapFree(GetProcessHeap(), 0, visOrder); HeapFree(GetProcessHeap(), 0, chartype); HeapFree(GetProcessHeap(), 0, levels); HeapFree(GetProcessHeap(), 0, pItems); @@ -655,6 +672,8 @@ glyph_i += cOutGlyphs; } } + HeapFree(GetProcessHeap(), 0, runOrder); + HeapFree(GetProcessHeap(), 0, visOrder); } done += i; diff -Nru wine1.7-1.7.15/dlls/gdiplus/brush.c wine1.7-1.7.16/dlls/gdiplus/brush.c --- wine1.7-1.7.15/dlls/gdiplus/brush.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/gdiplus/brush.c 2014-04-04 19:13:44.000000000 +0000 @@ -745,8 +745,6 @@ /****************************************************************************** * GdipCreateTextureIA [GDIPLUS.@] - * - * FIXME: imageattr ignored */ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, GDIPCONST GpImageAttributes *imageattr, REAL x, REAL y, REAL width, @@ -844,6 +842,7 @@ imageattr->wrap = wrapmode; stat = GdipCreateTextureIA(image, imageattr, x, y, width, height, texture); + GdipDisposeImageAttributes(imageattr); } return stat; diff -Nru wine1.7-1.7.15/dlls/gdiplus/graphics.c wine1.7-1.7.16/dlls/gdiplus/graphics.c --- wine1.7-1.7.15/dlls/gdiplus/graphics.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/gdiplus/graphics.c 2014-04-04 19:13:44.000000000 +0000 @@ -2858,6 +2858,7 @@ if (use_software) { RECT dst_area; + GpRectF graphics_bounds; GpRect src_area; int i, x, y, src_stride, dst_stride; GpMatrix dst_to_src; @@ -2883,8 +2884,18 @@ if (dst_area.bottom < pti[i].y) dst_area.bottom = pti[i].y; } + stat = get_graphics_bounds(graphics, &graphics_bounds); + if (stat != Ok) return stat; + + if (graphics_bounds.X > dst_area.left) dst_area.left = floorf(graphics_bounds.X); + if (graphics_bounds.Y > dst_area.top) dst_area.top = floorf(graphics_bounds.Y); + if (graphics_bounds.X + graphics_bounds.Width < dst_area.right) dst_area.right = ceilf(graphics_bounds.X + graphics_bounds.Width); + if (graphics_bounds.Y + graphics_bounds.Height < dst_area.bottom) dst_area.bottom = ceilf(graphics_bounds.Y + graphics_bounds.Height); + TRACE("dst_area: %s\n", wine_dbgstr_rect(&dst_area)); + if (IsRectEmpty(&dst_area)) return Ok; + m11 = (ptf[1].X - ptf[0].X) / srcwidth; m21 = (ptf[2].X - ptf[0].X) / srcheight; mdx = ptf[0].X - m11 * srcx - m21 * srcy; @@ -2930,8 +2941,7 @@ if (stat != Ok) { - if (src_data != dst_data) - GdipFree(src_data); + GdipFree(src_data); GdipFree(dst_data); return stat; } diff -Nru wine1.7-1.7.15/dlls/gdiplus/image.c wine1.7-1.7.16/dlls/gdiplus/image.c --- wine1.7-1.7.15/dlls/gdiplus/image.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/gdiplus/image.c 2014-04-04 19:13:44.000000000 +0000 @@ -1252,6 +1252,28 @@ srcBitmap->stride, srcBitmap->bits + srcBitmap->stride * area.Y + PIXELFORMATBPP(srcBitmap->format) * area.X / 8, srcBitmap->format, srcBitmap->image.palette); + + if (stat == Ok && srcBitmap->image.palette) + { + ColorPalette *src_palette, *dst_palette; + + src_palette = srcBitmap->image.palette; + + dst_palette = GdipAlloc(sizeof(UINT) * 2 + sizeof(ARGB) * src_palette->Count); + + if (dst_palette) + { + dst_palette->Flags = src_palette->Flags; + dst_palette->Count = src_palette->Count; + memcpy(dst_palette->Entries, src_palette->Entries, sizeof(ARGB) * src_palette->Count); + + GdipFree((*dstBitmap)->image.palette); + (*dstBitmap)->image.palette = dst_palette; + } + else + stat = OutOfMemory; + } + if (stat != Ok) GdipDisposeImage((GpImage*)*dstBitmap); } diff -Nru wine1.7-1.7.15/dlls/ieframe/tests/webbrowser.c wine1.7-1.7.16/dlls/ieframe/tests/webbrowser.c --- wine1.7-1.7.15/dlls/ieframe/tests/webbrowser.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ieframe/tests/webbrowser.c 2014-04-04 19:13:44.000000000 +0000 @@ -419,10 +419,12 @@ CHECK_EXPECT(Exec_IDM_STOP); return OLECMDERR_E_NOTSUPPORTED; case OLECMDID_UPDATETRAVELENTRY_DATARECOVERY: + case OLECMDID_PAGEAVAILABLE: /* TODO (IE11) */ + return E_NOTIMPL; case 6058: /* TODO */ return E_NOTIMPL; default: - ok(0, "unexpected nsCmdID %d\n", nCmdID); + ok(0, "unexpected nCmdID %d\n", nCmdID); } }else if(IsEqualGUID(&CGID_Explorer, pguidCmdGroup)) { switch(nCmdID) { @@ -437,6 +439,7 @@ case 101: /* TODO (IE8) */ case 109: /* TODO (IE9) */ case 113: /* TODO (IE10) */ + case 119: /* IE11 */ return E_FAIL; default: ok(0, "unexpected nCmdID %d\n", nCmdID); @@ -444,11 +447,14 @@ }else if(IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) { switch(nCmdID) { case 105: /* TODO */ + case 133: /* IE11 */ case 134: /* TODO (IE10) */ + case 135: /* IE11 */ case 136: /* TODO (IE10) */ case 138: /* TODO */ case 140: /* TODO (Win7) */ case 144: /* TODO */ + case 178: /* IE11 */ return E_FAIL; default: ok(0, "unexpected nCmdID %d\n", nCmdID); diff -Nru wine1.7-1.7.15/dlls/kernel32/fiber.c wine1.7-1.7.16/dlls/kernel32/fiber.c --- wine1.7-1.7.15/dlls/kernel32/fiber.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/kernel32/fiber.c 2014-04-04 19:13:44.000000000 +0000 @@ -230,7 +230,7 @@ } else { - index = RtlFindClearBitsAndSet( peb->FlsBitmap, 1, 0 ); + index = RtlFindClearBitsAndSet( peb->FlsBitmap, 1, 1 ); if (index != ~0U) { if (!NtCurrentTeb()->FlsSlots && @@ -279,7 +279,7 @@ */ PVOID WINAPI FlsGetValue( DWORD index ) { - if (index >= 8 * sizeof(NtCurrentTeb()->Peb->FlsBitmapBits) || !NtCurrentTeb()->FlsSlots) + if (!index || index >= 8 * sizeof(NtCurrentTeb()->Peb->FlsBitmapBits) || !NtCurrentTeb()->FlsSlots) { SetLastError( ERROR_INVALID_PARAMETER ); return NULL; @@ -293,7 +293,7 @@ */ BOOL WINAPI FlsSetValue( DWORD index, PVOID data ) { - if (index >= 8 * sizeof(NtCurrentTeb()->Peb->FlsBitmapBits)) + if (!index || index >= 8 * sizeof(NtCurrentTeb()->Peb->FlsBitmapBits)) { SetLastError( ERROR_INVALID_PARAMETER ); return FALSE; diff -Nru wine1.7-1.7.15/dlls/kernel32/kernel32.spec wine1.7-1.7.16/dlls/kernel32/kernel32.spec --- wine1.7-1.7.15/dlls/kernel32/kernel32.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/kernel32/kernel32.spec 2014-04-04 19:13:44.000000000 +0000 @@ -940,6 +940,7 @@ @ stub QueryOldestEventLogRecord @ stdcall QueryPerformanceCounter(ptr) @ stdcall QueryPerformanceFrequency(ptr) +@ stdcall QueryUnbiasedInterruptTime(ptr) @ stub QueryWin31IniFilesMappedToRegistry @ stdcall QueueUserAPC(ptr long long) @ stdcall QueueUserWorkItem(ptr ptr long) @@ -1191,6 +1192,7 @@ @ stub SetVolumeMountPointA @ stub SetVolumeMountPointW @ stdcall SetWaitableTimer(long ptr long ptr ptr long) +@ stdcall SetWaitableTimerEx(long ptr long ptr ptr ptr long) @ stdcall SetupComm(long long long) @ stub ShowConsoleCursor @ stdcall SignalObjectAndWait(long long long long) diff -Nru wine1.7-1.7.15/dlls/kernel32/process.c wine1.7-1.7.16/dlls/kernel32/process.c --- wine1.7-1.7.15/dlls/kernel32/process.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/kernel32/process.c 2014-04-04 19:13:44.000000000 +0000 @@ -2768,7 +2768,7 @@ PEB * const peb = NtCurrentTeb()->Peb; RtlAcquirePebLock(); - index = RtlFindClearBitsAndSet( peb->TlsBitmap, 1, 0 ); + index = RtlFindClearBitsAndSet( peb->TlsBitmap, 1, 1 ); if (index != ~0U) NtCurrentTeb()->TlsSlots[index] = 0; /* clear the value */ else { diff -Nru wine1.7-1.7.15/dlls/kernel32/sync.c wine1.7-1.7.16/dlls/kernel32/sync.c --- wine1.7-1.7.15/dlls/kernel32/sync.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/kernel32/sync.c 2014-04-04 19:13:44.000000000 +0000 @@ -1177,6 +1177,20 @@ return TRUE; } +/*********************************************************************** + * SetWaitableTimerEx (KERNEL32.@) + */ +BOOL WINAPI SetWaitableTimerEx( HANDLE handle, const LARGE_INTEGER *when, LONG period, + PTIMERAPCROUTINE callback, LPVOID arg, REASON_CONTEXT *context, ULONG tolerabledelay ) +{ + static int once; + if (!once++) + { + FIXME("(%p, %p, %d, %p, %p, %p, %d) semi-stub\n", + handle, when, period, callback, arg, context, tolerabledelay); + } + return SetWaitableTimer(handle, when, period, callback, arg, FALSE); +} /*********************************************************************** * CancelWaitableTimer (KERNEL32.@) diff -Nru wine1.7-1.7.15/dlls/kernel32/tests/alloc.c wine1.7-1.7.16/dlls/kernel32/tests/alloc.c --- wine1.7-1.7.15/dlls/kernel32/tests/alloc.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/kernel32/tests/alloc.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,403 +0,0 @@ -/* - * Unit test suite for memory allocation functions. - * - * Copyright 2002 Geoffrey Hausheer - * - * 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 "wine/test.h" -#include "windef.h" -#include "winbase.h" -#include "winerror.h" - - - /* The following functions don't have tests, because either I don't know how - to test them, or they are WinNT only, or require multiple threads. - Since the last two issues shouldn't really stop the tests from being - written, assume for now that it is all due to the first case - HeapCompact - HeapLock - HeapQueryInformation - HeapSetInformation - HeapUnlock - HeapValidate - HeapWalk -*/ -/* In addition, these features aren't being tested - HEAP_NO_SERIALIZE - HEAP_GENERATE_EXCEPTIONS - STATUS_ACCESS_VIOLATION (error code from HeapAlloc) -*/ - -static void test_Heap(void) -{ - SYSTEM_INFO sysInfo; - ULONG memchunk; - HANDLE heap; - LPVOID mem1,mem1a,mem3; - UCHAR *mem2,*mem2a; - UINT i; - BOOL error; - DWORD dwSize; - -/* Retrieve the page size for this system */ - sysInfo.dwPageSize=0; - GetSystemInfo(&sysInfo); - ok(sysInfo.dwPageSize>0,"GetSystemInfo should return a valid page size\n"); - -/* Create a Heap with a minimum and maximum size */ -/* Note that Windows and Wine seem to behave a bit differently with respect - to memory allocation. In Windows, you can't access all the memory - specified in the heap (due to overhead), so choosing a reasonable maximum - size for the heap was done mostly by trial-and-error on Win2k. It may need - more tweaking for otherWindows variants. -*/ - memchunk=10*sysInfo.dwPageSize; - heap=HeapCreate(0,2*memchunk,5*memchunk); - -/* Check that HeapCreate allocated the right amount of ram */ - mem1=HeapAlloc(heap,0,5*memchunk+1); - ok(mem1==NULL,"HeapCreate allocated more Ram than it should have\n"); - HeapFree(heap,0,mem1); - -/* Check that a normal alloc works */ - mem1=HeapAlloc(heap,0,memchunk); - ok(mem1!=NULL,"HeapAlloc failed\n"); - if(mem1) { - ok(HeapSize(heap,0,mem1)>=memchunk, "HeapAlloc should return a big enough memory block\n"); - } - -/* Check that a 'zeroing' alloc works */ - mem2=HeapAlloc(heap,HEAP_ZERO_MEMORY,memchunk); - ok(mem2!=NULL,"HeapAlloc failed\n"); - if(mem2) { - ok(HeapSize(heap,0,mem2)>=memchunk,"HeapAlloc should return a big enough memory block\n"); - error=FALSE; - for(i=0;i=memchunk+5*sysInfo.dwPageSize,"HeapReAlloc failed\n"); - error=FALSE; - for(i=0;i<5*sysInfo.dwPageSize;i++) { - if(mem2a[memchunk+i]!=0) { - error=TRUE; - } - } - ok(!error,"HeapReAlloc should have zeroed out its allocated memory\n"); - } - -/* Check that HeapRealloc honours HEAP_REALLOC_IN_PLACE_ONLY */ - error=FALSE; - mem1a=HeapReAlloc(heap,HEAP_REALLOC_IN_PLACE_ONLY,mem1,memchunk+sysInfo.dwPageSize); - if(mem1a!=NULL) { - if(mem1a!=mem1) { - error=TRUE; - } - } - ok(mem1a==NULL || !error,"HeapReAlloc didn't honour HEAP_REALLOC_IN_PLACE_ONLY\n"); - -/* Check that HeapFree works correctly */ - if(mem1a) { - ok(HeapFree(heap,0,mem1a),"HeapFree failed\n"); - } else { - ok(HeapFree(heap,0,mem1),"HeapFree failed\n"); - } - if(mem2a) { - ok(HeapFree(heap,0,mem2a),"HeapFree failed\n"); - } else { - ok(HeapFree(heap,0,mem2),"HeapFree failed\n"); - } - - /* 0-length buffer */ - mem1 = HeapAlloc(heap, 0, 0); - ok(mem1 != NULL, "Reserved memory\n"); - - dwSize = HeapSize(heap, 0, mem1); - /* should work with 0-length buffer */ - ok(dwSize < 0xFFFFFFFF, "The size of the 0-length buffer\n"); - ok(HeapFree(heap, 0, mem1), "Freed the 0-length buffer\n"); - -/* Check that HeapDestry works */ - ok(HeapDestroy(heap),"HeapDestroy failed\n"); -} - -/* The following functions don't have tests, because either I don't know how - to test them, or they are WinNT only, or require multiple threads. - Since the last two issues shouldn't really stop the tests from being - written, assume for now that it is all due to the first case - GlobalFlags - GlobalMemoryStatus - GlobalMemoryStatusEx -*/ -/* In addition, these features aren't being tested - GMEM_DISCARDABLE - GMEM_NOCOMPACT -*/ -static void test_Global(void) -{ - ULONG memchunk; - HGLOBAL mem1,mem2,mem2a,mem2b; - UCHAR *mem2ptr; - UINT i; - BOOL error; - memchunk=100000; - - SetLastError(NO_ERROR); -/* Check that a normal alloc works */ - mem1=GlobalAlloc(0,memchunk); - ok(mem1!=NULL,"GlobalAlloc failed\n"); - if(mem1) { - ok(GlobalSize(mem1)>=memchunk, "GlobalAlloc should return a big enough memory block\n"); - } - -/* Check that a 'zeroing' alloc works */ - mem2=GlobalAlloc(GMEM_ZEROINIT,memchunk); - ok(mem2!=NULL,"GlobalAlloc failed: error=%d\n",GetLastError()); - if(mem2) { - ok(GlobalSize(mem2)>=memchunk,"GlobalAlloc should return a big enough memory block\n"); - mem2ptr=GlobalLock(mem2); - ok(mem2ptr==mem2,"GlobalLock should have returned the same memory as was allocated\n"); - if(mem2ptr) { - error=FALSE; - for(i=0;i=2*memchunk,"GlobalReAlloc failed\n"); - mem2ptr=GlobalLock(mem2a); - ok(mem2ptr!=NULL,"GlobalLock Failed\n"); - if(mem2ptr) { - error=FALSE; - for(i=0;i=memchunk, "LocalAlloc should return a big enough memory block\n"); - } - -/* Check that a 'zeroing' and lock alloc works */ - mem2=LocalAlloc(LMEM_ZEROINIT|LMEM_MOVEABLE,memchunk); - ok(mem2!=NULL,"LocalAlloc failed: error=%d\n",GetLastError()); - if(mem2) { - ok(LocalSize(mem2)>=memchunk,"LocalAlloc should return a big enough memory block\n"); - mem2ptr=LocalLock(mem2); - ok(mem2ptr!=NULL,"LocalLock: error=%d\n",GetLastError()); - if(mem2ptr) { - error=FALSE; - for(i=0;i=2*memchunk,"LocalReAlloc failed\n"); - mem2ptr=LocalLock(mem2a); - ok(mem2ptr!=NULL,"LocalLock Failed\n"); - if(mem2ptr) { - error=FALSE; - for(i=0;i0,"GetSystemInfo should return a valid page size\n"); - -/* Choose a reasonable allocation size */ - memchunk=10*sysInfo.dwPageSize; - -/* Check that a normal alloc works */ - mem1=VirtualAlloc(NULL,memchunk,MEM_COMMIT,PAGE_READWRITE); - ok(mem1!=NULL,"VirtualAlloc failed\n"); - if(mem1) { -/* check that memory is initialized to 0 */ - error=FALSE; - for(i=0;i0,"GetSystemInfo should return a valid page size\n"); + + /* Create a Heap with a minimum and maximum size */ + /* Note that Windows and Wine seem to behave a bit differently with respect + to memory allocation. In Windows, you can't access all the memory + specified in the heap (due to overhead), so choosing a reasonable maximum + size for the heap was done mostly by trial-and-error on Win2k. It may need + more tweaking for otherWindows variants. + */ + memchunk=10*sysInfo.dwPageSize; + heap=HeapCreate(0,2*memchunk,5*memchunk); + ok( !((ULONG_PTR)heap & 0xffff), "heap %p not 64K aligned\n", heap ); + + /* Check that HeapCreate allocated the right amount of ram */ + mem1=HeapAlloc(heap,0,5*memchunk+1); + ok(mem1==NULL,"HeapCreate allocated more Ram than it should have\n"); + HeapFree(heap,0,mem1); + + /* Check that a normal alloc works */ + mem1=HeapAlloc(heap,0,memchunk); + ok(mem1!=NULL,"HeapAlloc failed\n"); + if(mem1) { + ok(HeapSize(heap,0,mem1)>=memchunk, "HeapAlloc should return a big enough memory block\n"); + } + + /* Check that a 'zeroing' alloc works */ + mem2=HeapAlloc(heap,HEAP_ZERO_MEMORY,memchunk); + ok(mem2!=NULL,"HeapAlloc failed\n"); + if(mem2) { + ok(HeapSize(heap,0,mem2)>=memchunk,"HeapAlloc should return a big enough memory block\n"); + error=FALSE; + for(i=0;i=memchunk+5*sysInfo.dwPageSize,"HeapReAlloc failed\n"); + error=FALSE; + for(i=0;i<5*sysInfo.dwPageSize;i++) { + if(mem2a[memchunk+i]!=0) { + error=TRUE; + } + } + ok(!error,"HeapReAlloc should have zeroed out its allocated memory\n"); + } + + /* Check that HeapRealloc honours HEAP_REALLOC_IN_PLACE_ONLY */ + error=FALSE; + mem1a=HeapReAlloc(heap,HEAP_REALLOC_IN_PLACE_ONLY,mem1,memchunk+sysInfo.dwPageSize); + if(mem1a!=NULL) { + if(mem1a!=mem1) { + error=TRUE; + } + } + ok(mem1a==NULL || !error,"HeapReAlloc didn't honour HEAP_REALLOC_IN_PLACE_ONLY\n"); + + /* Check that HeapFree works correctly */ + if(mem1a) { + ok(HeapFree(heap,0,mem1a),"HeapFree failed\n"); + } else { + ok(HeapFree(heap,0,mem1),"HeapFree failed\n"); + } + if(mem2a) { + ok(HeapFree(heap,0,mem2a),"HeapFree failed\n"); + } else { + ok(HeapFree(heap,0,mem2),"HeapFree failed\n"); + } + + /* 0-length buffer */ + mem1 = HeapAlloc(heap, 0, 0); + ok(mem1 != NULL, "Reserved memory\n"); + + dwSize = HeapSize(heap, 0, mem1); + /* should work with 0-length buffer */ + ok(dwSize < 0xFFFFFFFF, "The size of the 0-length buffer\n"); + ok(HeapFree(heap, 0, mem1), "Freed the 0-length buffer\n"); + + /* Check that HeapDestroy works */ + ok(HeapDestroy(heap),"HeapDestroy failed\n"); +} + + +static void test_GlobalAlloc(void) +{ + ULONG memchunk; + HGLOBAL mem1,mem2,mem2a,mem2b; + UCHAR *mem2ptr; + UINT i; + BOOL error; + memchunk=100000; + + SetLastError(NO_ERROR); + /* Check that a normal alloc works */ + mem1=GlobalAlloc(0,memchunk); + ok(mem1!=NULL,"GlobalAlloc failed\n"); + if(mem1) { + ok(GlobalSize(mem1)>=memchunk, "GlobalAlloc should return a big enough memory block\n"); + } + + /* Check that a 'zeroing' alloc works */ + mem2=GlobalAlloc(GMEM_ZEROINIT,memchunk); + ok(mem2!=NULL,"GlobalAlloc failed: error=%d\n",GetLastError()); + if(mem2) { + ok(GlobalSize(mem2)>=memchunk,"GlobalAlloc should return a big enough memory block\n"); + mem2ptr=GlobalLock(mem2); + ok(mem2ptr==mem2,"GlobalLock should have returned the same memory as was allocated\n"); + if(mem2ptr) { + error=FALSE; + for(i=0;i=2*memchunk,"GlobalReAlloc failed\n"); + mem2ptr=GlobalLock(mem2a); + ok(mem2ptr!=NULL,"GlobalLock Failed\n"); + if(mem2ptr) { + error=FALSE; + for(i=0;i=memchunk, "LocalAlloc should return a big enough memory block\n"); + } + + /* Check that a 'zeroing' and lock alloc works */ + mem2=LocalAlloc(LMEM_ZEROINIT|LMEM_MOVEABLE,memchunk); + ok(mem2!=NULL,"LocalAlloc failed: error=%d\n",GetLastError()); + if(mem2) { + ok(LocalSize(mem2)>=memchunk,"LocalAlloc should return a big enough memory block\n"); + mem2ptr=LocalLock(mem2); + ok(mem2ptr!=NULL,"LocalLock: error=%d\n",GetLastError()); + if(mem2ptr) { + error=FALSE; + for(i=0;i=2*memchunk,"LocalReAlloc failed\n"); + mem2ptr=LocalLock(mem2a); + ok(mem2ptr!=NULL,"LocalLock Failed\n"); + if(mem2ptr) { + error=FALSE; + for(i=0;i(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + return set_style_attr(This, STYLEID_LISTSTYLETYPE, v, 0); } static HRESULT WINAPI HTMLStyle_get_listStyleType(IHTMLStyle *iface, BSTR *p) { HTMLStyle *This = impl_from_IHTMLStyle(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + return get_style_attr(This, STYLEID_LISTSTYLETYPE, p); } static HRESULT WINAPI HTMLStyle_put_listStylePosition(IHTMLStyle *iface, BSTR v) diff -Nru wine1.7-1.7.15/dlls/mshtml/htmlstyle.h wine1.7-1.7.16/dlls/mshtml/htmlstyle.h --- wine1.7-1.7.15/dlls/mshtml/htmlstyle.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/mshtml/htmlstyle.h 2014-04-04 19:13:44.000000000 +0000 @@ -78,6 +78,7 @@ STYLEID_LEFT, STYLEID_LETTER_SPACING, STYLEID_LINE_HEIGHT, + STYLEID_LISTSTYLETYPE, STYLEID_MARGIN, STYLEID_MARGIN_BOTTOM, STYLEID_MARGIN_LEFT, diff -Nru wine1.7-1.7.15/dlls/mshtml/htmltablerow.c wine1.7-1.7.16/dlls/mshtml/htmltablerow.c --- wine1.7-1.7.15/dlls/mshtml/htmltablerow.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/mshtml/htmltablerow.c 2014-04-04 19:13:44.000000000 +0000 @@ -170,15 +170,48 @@ static HRESULT WINAPI HTMLTableRow_put_bgColor(IHTMLTableRow *iface, VARIANT v) { HTMLTableRow *This = impl_from_IHTMLTableRow(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + nsAString val; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + nsAString_InitDepend(&val, V_BSTR(&v)); + variant_to_nscolor(&v, &val); + nsres = nsIDOMHTMLTableRowElement_SetBgColor(This->nsrow, &val); + nsAString_Finish(&val); + + if (NS_FAILED(nsres)){ + ERR("Set BgColor(%s) failed!\n", debugstr_variant(&v)); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLTableRow_get_bgColor(IHTMLTableRow *iface, VARIANT *p) { HTMLTableRow *This = impl_from_IHTMLTableRow(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString strColor; + nsresult nsres; + HRESULT hres; + const PRUnichar *color; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&strColor, NULL); + nsres = nsIDOMHTMLTableRowElement_GetBgColor(This->nsrow, &strColor); + nsAString_Finish(&strColor); + + if(NS_SUCCEEDED(nsres)) { + nsAString_GetData(&strColor, &color); + V_VT(p) = VT_BSTR; + hres = nscolor_to_str(color, &V_BSTR(p)); + }else { + ERR("SetBgColor failed: %08x\n", nsres); + hres = E_FAIL; + } + + return hres; } static HRESULT WINAPI HTMLTableRow_put_borderColor(IHTMLTableRow *iface, VARIANT v) diff -Nru wine1.7-1.7.15/dlls/mshtml/mshtml_private.h wine1.7-1.7.16/dlls/mshtml/mshtml_private.h --- wine1.7-1.7.15/dlls/mshtml/mshtml_private.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/mshtml/mshtml_private.h 2014-04-04 19:13:44.000000000 +0000 @@ -862,6 +862,10 @@ HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLDOMNode**) DECLSPEC_HIDDEN; +BOOL variant_to_nscolor(const VARIANT *v, nsAString *nsstr) DECLSPEC_HIDDEN; +HRESULT nscolor_to_str(LPCWSTR color, BSTR *ret) DECLSPEC_HIDDEN; + + struct HTMLAttributeCollection { DispatchEx dispex; IHTMLAttributeCollection IHTMLAttributeCollection_iface; diff -Nru wine1.7-1.7.15/dlls/mshtml/script.c wine1.7-1.7.16/dlls/mshtml/script.c --- wine1.7-1.7.15/dlls/mshtml/script.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/mshtml/script.c 2014-04-04 19:13:44.000000000 +0000 @@ -816,11 +816,13 @@ { const WCHAR text_javascriptW[] = {'t','e','x','t','/','j','a','v','a','s','c','r','i','p','t',0}; + const WCHAR text_jscriptW[] = + {'t','e','x','t','/','j','s','c','r','i','p','t',0}; const WCHAR text_vbscriptW[] = {'t','e','x','t','/','v','b','s','c','r','i','p','t',0}; /* FIXME: Handle more types */ - if(!strcmpiW(type, text_javascriptW)) { + if(!strcmpiW(type, text_javascriptW) || !strcmpiW(type, text_jscriptW)) { *guid = CLSID_JScript; }else if(!strcmpiW(type, text_vbscriptW)) { *guid = CLSID_VBScript; diff -Nru wine1.7-1.7.15/dlls/mshtml/tests/dom.c wine1.7-1.7.16/dlls/mshtml/tests/dom.c --- wine1.7-1.7.15/dlls/mshtml/tests/dom.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/mshtml/tests/dom.c 2014-04-04 19:13:44.000000000 +0000 @@ -5578,6 +5578,7 @@ HRESULT hres; BSTR bstr; LONG lval; + VARIANT vbg, vDefaultbg; static const elem_type_t cell_types[] = {ET_TD,ET_TD}; @@ -5628,6 +5629,40 @@ ok(hres == S_OK, "get_sectionRowIndex failed: %08x\n", hres); ok(lval == 1, "get_sectionRowIndex returned %d\n", lval); + hres = IHTMLTableRow_get_bgColor(row, &vDefaultbg); + ok(hres == S_OK, "get_bgColor failed: %08x\n", hres); + ok(V_VT(&vDefaultbg) == VT_BSTR, "bstr != NULL\n"); + ok(!V_BSTR(&vDefaultbg), "V_BSTR(bgColor) = %s\n", wine_dbgstr_w(V_BSTR(&vDefaultbg))); + + V_VT(&vbg) = VT_BSTR; + V_BSTR(&vbg) = a2bstr("red"); + hres = IHTMLTableRow_put_bgColor(row, vbg); + ok(hres == S_OK, "put_bgColor failed: %08x\n", hres); + VariantClear(&vbg); + + hres = IHTMLTableRow_get_bgColor(row, &vbg); + ok(hres == S_OK, "get_bgColor failed: %08x\n", hres); + ok(V_VT(&vDefaultbg) == VT_BSTR, "V_VT(&vDefaultbg) != VT_BSTR\n"); + ok(!strcmp_wa(V_BSTR(&vbg), "#ff0000"), "Unexpected bgcolor %s\n", wine_dbgstr_w(V_BSTR(&vbg))); + VariantClear(&vbg); + + V_VT(&vbg) = VT_I4; + V_I4(&vbg) = 0xff0000; + hres = IHTMLTableRow_put_bgColor(row, vbg); + ok(hres == S_OK, "put_bgColor failed: %08x\n", hres); + VariantClear(&vbg); + + hres = IHTMLTableRow_get_bgColor(row, &vbg); + ok(hres == S_OK, "get_bgColor failed: %08x\n", hres); + ok(V_VT(&vDefaultbg) == VT_BSTR, "V_VT(&vDefaultbg) != VT_BSTR\n"); + ok(!strcmp_wa(V_BSTR(&vbg), "#ff0000"), "Unexpected bgcolor %s\n", wine_dbgstr_w(V_BSTR(&vbg))); + VariantClear(&vbg); + + /* Restore Originial */ + hres = IHTMLTableRow_put_bgColor(row, vDefaultbg); + ok(hres == S_OK, "put_bgColor failed: %08x\n", hres); + VariantClear(&vDefaultbg); + IHTMLTableRow_Release(row); } diff -Nru wine1.7-1.7.15/dlls/mshtml/tests/style.c wine1.7-1.7.16/dlls/mshtml/tests/style.c --- wine1.7-1.7.15/dlls/mshtml/tests/style.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/mshtml/tests/style.c 2014-04-04 19:13:44.000000000 +0000 @@ -2092,6 +2092,22 @@ ok(!strcmp_wa(str, "nowrap"), "whiteSpace = %s\n", wine_dbgstr_w(str)); SysFreeString(str); + /* listStyleType */ + hres = IHTMLStyle_get_listStyleType(style, &str); + ok(hres == S_OK, "get_listStyleType failed: %08x\n", hres); + ok(!str, "listStyleType = %s\n", wine_dbgstr_w(str)); + + str = a2bstr("square"); + hres = IHTMLStyle_put_listStyleType(style, str); + ok(hres == S_OK, "put_listStyleType failed: %08x\n", hres); + SysFreeString(str); + + str = NULL; + hres = IHTMLStyle_get_listStyleType(style, &str); + ok(hres == S_OK, "get_listStyleType failed: %08x\n", hres); + ok(!strcmp_wa(str, "square"), "listStyleType = %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + hres = IHTMLStyle_QueryInterface(style, &IID_IHTMLStyle2, (void**)&style2); ok(hres == S_OK, "Could not get IHTMLStyle2 iface: %08x\n", hres); if(SUCCEEDED(hres)) { diff -Nru wine1.7-1.7.15/dlls/msi/classes.c wine1.7-1.7.16/dlls/msi/classes.c --- wine1.7-1.7.15/dlls/msi/classes.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msi/classes.c 2014-04-04 19:13:44.000000000 +0000 @@ -1054,7 +1054,7 @@ { if (progid->Parent) progid = progid->Parent; if (progid->Class) return progid->Class; - if (!progid->Parent) break; + if (!progid->Parent || progid->Parent == progid) break; } return NULL; } diff -Nru wine1.7-1.7.15/dlls/msi/custom.c wine1.7-1.7.16/dlls/msi/custom.c --- wine1.7-1.7.15/dlls/msi/custom.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msi/custom.c 2014-04-04 19:13:44.000000000 +0000 @@ -1003,7 +1003,7 @@ 'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', '`','B','i' ,'n','a','r','y','`',' ','W','H','E','R','E',' ', '`','N','a','m','e','`',' ','=',' ','\'','%','s','\'',0}; - MSIRECORD *row = 0; + MSIRECORD *row = NULL; msi_custom_action_info *info; CHAR *buffer = NULL; WCHAR *bufferw = NULL; @@ -1017,10 +1017,14 @@ return ERROR_FUNCTION_FAILED; r = MSI_RecordReadStream(row, 2, NULL, &sz); - if (r != ERROR_SUCCESS) return r; + if (r != ERROR_SUCCESS) goto done; buffer = msi_alloc( sz + 1 ); - if (!buffer) return ERROR_FUNCTION_FAILED; + if (!buffer) + { + r = ERROR_FUNCTION_FAILED; + goto done; + } r = MSI_RecordReadStream(row, 2, buffer, &sz); if (r != ERROR_SUCCESS) @@ -1040,6 +1044,7 @@ done: msi_free(bufferw); msi_free(buffer); + msiobj_release(&row->hdr); return r; } diff -Nru wine1.7-1.7.15/dlls/msi/format.c wine1.7-1.7.16/dlls/msi/format.c --- wine1.7-1.7.15/dlls/msi/format.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msi/format.c 2014-04-04 19:13:44.000000000 +0000 @@ -370,7 +370,11 @@ { max_len = len; buf = msi_realloc(buf, (max_len + 1) * sizeof(WCHAR)); - if (!buf) return NULL; + if (!buf) + { + msi_free(rc); + return NULL; + } } if (str) diff -Nru wine1.7-1.7.15/dlls/msi/table.c wine1.7-1.7.16/dlls/msi/table.c --- wine1.7-1.7.15/dlls/msi/table.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msi/table.c 2014-04-04 19:13:44.000000000 +0000 @@ -1970,7 +1970,10 @@ r = TABLE_CreateView(tv->db, szColumns, &columns); if (r != ERROR_SUCCESS) + { + msiobj_release(&rec->hdr); return r; + } r = msi_table_find_row((MSITABLEVIEW *)columns, rec, &row, NULL); if (r != ERROR_SUCCESS) @@ -2092,7 +2095,10 @@ r = TABLE_CreateView(tv->db, szTables, &tables); if (r != ERROR_SUCCESS) + { + msiobj_release(&rec->hdr); return r; + } r = msi_table_find_row((MSITABLEVIEW *)tables, rec, &row, NULL); if (r != ERROR_SUCCESS) diff -Nru wine1.7-1.7.15/dlls/msvcp100/msvcp100.spec wine1.7-1.7.16/dlls/msvcp100/msvcp100.spec --- wine1.7-1.7.15/dlls/msvcp100/msvcp100.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msvcp100/msvcp100.spec 2014-04-04 19:13:44.000000000 +0000 @@ -1214,7 +1214,7 @@ @ cdecl -arch=win64 ?_Putgrouped@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PEBD_K_W@Z(ptr ptr ptr str long long) num_put_wchar__Putgrouped @ stub -arch=win32 ?_Raise_handler@std@@3P6AXABVexception@stdext@@@ZA @ stub -arch=win64 ?_Raise_handler@std@@3P6AXAEBVexception@stdext@@@ZEA -@ stub ?_Random_device@tr1@std@@YAIXZ +@ cdecl ?_Random_device@tr1@std@@YAIXZ() _Random_device @ cdecl -arch=win32 ?_Rep@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@DI@Z(ptr ptr long ptr long long) num_put_char__Rep @ cdecl -arch=win64 ?_Rep@?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@DU?$char_traits@D@std@@@2@V32@D_K@Z(ptr ptr ptr long long) num_put_char__Rep @ cdecl -arch=win32 ?_Rep@?$num_put@GV?$ostreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@ABA?AV?$ostreambuf_iterator@GU?$char_traits@G@std@@@2@V32@GI@Z(ptr ptr long ptr long long) num_put_wchar__Rep diff -Nru wine1.7-1.7.15/dlls/msvcp110/msvcp110.spec wine1.7-1.7.16/dlls/msvcp110/msvcp110.spec --- wine1.7-1.7.15/dlls/msvcp110/msvcp110.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msvcp110/msvcp110.spec 2014-04-04 19:13:44.000000000 +0000 @@ -1710,7 +1710,7 @@ @ cdecl -arch=win64 ?_Put@?$num_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@PEB_W_K@Z(ptr ptr ptr wstr long) num_put_wchar__Put @ stub -arch=win32 ?_Raise_handler@std@@3P6AXABVexception@stdext@@@ZA @ stub -arch=win64 ?_Raise_handler@std@@3P6AXAEBVexception@stdext@@@ZEA -@ stub ?_Random_device@std@@YAIXZ +@ cdecl ?_Random_device@std@@YAIXZ() _Random_device @ stub -arch=win32 ?_Read_dir@sys@tr2@std@@YAPADPADPAXAAW4file_type@123@@Z @ stub -arch=win64 ?_Read_dir@sys@tr2@std@@YAPEADPEADPEAXAEAW4file_type@123@@Z @ stub -arch=win32 ?_Read_dir@sys@tr2@std@@YAPA_WPA_WPAXAAW4file_type@123@@Z diff -Nru wine1.7-1.7.15/dlls/msvcp90/misc.c wine1.7-1.7.16/dlls/msvcp90/misc.c --- wine1.7-1.7.15/dlls/msvcp90/misc.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msvcp90/misc.c 2014-04-04 19:13:44.000000000 +0000 @@ -360,3 +360,17 @@ GetSystemTimeAsFileTime(&ft); return ((LONGLONG)ft.dwHighDateTime<<32) + ft.dwLowDateTime - TICKS_1601_TO_1970; } + +#if _MSVCP_VER >= 90 +unsigned int __cdecl _Random_device(void) +{ + unsigned int ret; + + TRACE("\n"); + + /* TODO: throw correct exception in case of failure */ + if(rand_s(&ret)) + throw_exception(EXCEPTION, "random number generator failed\n"); + return ret; +} +#endif diff -Nru wine1.7-1.7.15/dlls/msvcp90/msvcp90.spec wine1.7-1.7.16/dlls/msvcp90/msvcp90.spec --- wine1.7-1.7.15/dlls/msvcp90/msvcp90.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msvcp90/msvcp90.spec 2014-04-04 19:13:44.000000000 +0000 @@ -3062,7 +3062,7 @@ @ stub -arch=win64 ?_Putmfld@?$money_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@AEBA?AV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@_NAEAVios_base@2@_W1V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@2@@Z @ stub -arch=win32 ?_Raise_handler@std@@3P6AXABVexception@stdext@@@ZA @ stub -arch=win64 ?_Raise_handler@std@@3P6AXAEBVexception@stdext@@@ZEA -@ stub ?_Random_device@tr1@std@@YAIXZ +@ cdecl ?_Random_device@tr1@std@@YAIXZ() _Random_device @ thiscall -arch=win32 ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV12@PADIH@Z(ptr ptr long long) basic_istream_char__Read_s @ cdecl -arch=win64 ?_Read_s@?$basic_istream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@PEAD_K_J@Z(ptr ptr long long) basic_istream_char__Read_s @ thiscall -arch=win32 ?_Read_s@?$basic_istream@GU?$char_traits@G@std@@@std@@QAEAAV12@PAGIH@Z(ptr ptr long long) basic_istream_wchar__Read_s diff -Nru wine1.7-1.7.15/dlls/msvcrt/tests/locale.c wine1.7-1.7.16/dlls/msvcrt/tests/locale.c --- wine1.7-1.7.15/dlls/msvcrt/tests/locale.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msvcrt/tests/locale.c 2014-04-04 19:13:44.000000000 +0000 @@ -49,9 +49,6 @@ ret = setlocale(20, "C"); ok(ret == NULL, "ret = %s\n", ret); - ret = setlocale(LC_ALL, ""); - ok(ret != NULL, "ret == NULL\n"); - ret = setlocale(LC_ALL, "C"); ok(!strcmp(ret, "C"), "ret = %s\n", ret); diff -Nru wine1.7-1.7.15/dlls/msxml3/main.c wine1.7-1.7.16/dlls/msxml3/main.c --- wine1.7-1.7.15/dlls/msxml3/main.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msxml3/main.c 2014-04-04 19:13:44.000000000 +0000 @@ -63,9 +63,9 @@ void wineXmlCallbackLog(char const* caller, xmlErrorLevel lvl, char const* msg, va_list ap) { - static const int max_size = 200; enum __wine_debug_class dbcl; - char buff[max_size]; + char buff[200]; + const int max_size = sizeof(buff) / sizeof(buff[0]); int len; switch (lvl) diff -Nru wine1.7-1.7.15/dlls/msxml3/node.c wine1.7-1.7.16/dlls/msxml3/node.c --- wine1.7-1.7.15/dlls/msxml3/node.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msxml3/node.c 2014-04-04 19:13:44.000000000 +0000 @@ -625,6 +625,9 @@ VARIANT var; HRESULT hr; + if (!child) + return E_INVALIDARG; + hr = IXMLDOMNode_get_nodeType(child, &type); if(FAILED(hr) || type == NODE_ATTRIBUTE) { if (outChild) *outChild = NULL; diff -Nru wine1.7-1.7.15/dlls/msxml3/tests/domdoc.c wine1.7-1.7.16/dlls/msxml3/tests/domdoc.c --- wine1.7-1.7.15/dlls/msxml3/tests/domdoc.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/msxml3/tests/domdoc.c 2014-04-04 19:13:44.000000000 +0000 @@ -6077,7 +6077,8 @@ hr = IXMLDOMDocument_loadXML(doc, _bstr_(""), &b); EXPECT_HR(hr, S_OK); - CreateStreamOnHGlobal(NULL, TRUE, &stream); + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); V_VT(&dest) = VT_UNKNOWN; V_UNKNOWN(&dest) = (IUnknown*)stream; hr = IXMLDOMDocument_save(doc, dest); @@ -8417,7 +8418,8 @@ hr = IXSLProcessor_put_output(processor, v); ok(hr == S_OK, "got 0x%08x\n", hr); - CreateStreamOnHGlobal(NULL, TRUE, &stream); + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); EXPECT_REF(stream, 1); V_VT(&v) = VT_UNKNOWN; @@ -8876,6 +8878,12 @@ EXPECT_NO_CHILDREN(doc); EXPECT_NO_CHILDREN(doc2); + hr = IXMLDOMDocument_appendChild(doc2, NULL, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + hr = IXMLDOMElement_appendChild(elem, NULL, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + /* append from another document */ hr = IXMLDOMDocument_appendChild(doc2, (IXMLDOMNode*)elem, NULL); ok(hr == S_OK, "got 0x%08x\n", hr); @@ -10316,7 +10324,8 @@ doc = create_document(&IID_IXMLDOMDocument); - IXMLDOMDocument_QueryInterface(doc, &IID_IUnknown, (void**)&unk); + hr = IXMLDOMDocument_QueryInterface(doc, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "got 0x%08x\n", hr); test_domobj_dispex(unk); IUnknown_Release(unk); @@ -10349,7 +10358,8 @@ /* IXMLDOMNodeList for children list */ hr = IXMLDOMDocument_get_childNodes(doc, &node_list); EXPECT_HR(hr, S_OK); - IXMLDOMNodeList_QueryInterface(node_list, &IID_IUnknown, (void**)&unk); + hr = IXMLDOMNodeList_QueryInterface(node_list, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "got 0x%08x\n", hr); test_domobj_dispex(unk); IUnknown_Release(unk); diff -Nru wine1.7-1.7.15/dlls/netcfgx/main.c wine1.7-1.7.16/dlls/netcfgx/main.c --- wine1.7-1.7.15/dlls/netcfgx/main.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/netcfgx/main.c 2014-04-04 19:13:44.000000000 +0000 @@ -19,16 +19,107 @@ */ #include +#define COBJMACROS + #include "windef.h" #include "winbase.h" #include "ole2.h" #include "rpcproxy.h" #include "wine/debug.h" +#include "netcfgx.h" +#include "netcfg_private.h" + WINE_DEFAULT_DEBUG_CHANNEL(netcfgx); static HINSTANCE NETCFGX_hInstance; +typedef HRESULT (*ClassFactoryCreateInstanceFunc)(IUnknown **); + +typedef struct netcfgcf +{ + IClassFactory IClassFactory_iface; + ClassFactoryCreateInstanceFunc fnCreateInstance; +} netcfgcf; + +static inline netcfgcf *impl_from_IClassFactory( IClassFactory *iface ) +{ + return CONTAINING_RECORD(iface, netcfgcf, IClassFactory_iface); +} + +static HRESULT WINAPI netcfgcf_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppobj ) +{ + TRACE("%s %p\n", debugstr_guid(riid), ppobj); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IClassFactory)) + { + IClassFactory_AddRef( iface ); + *ppobj = iface; + return S_OK; + } + + ERR("interface %s not implemented\n", debugstr_guid(riid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI netcfgcf_AddRef(IClassFactory *iface ) +{ + TRACE("%p\n", iface); + + return 2; +} + +static ULONG WINAPI netcfgcf_Release(IClassFactory *iface ) +{ + TRACE("%p\n", iface); + + return 1; +} + +static HRESULT WINAPI netcfgcf_CreateInstance(IClassFactory *iface,LPUNKNOWN pOuter, + REFIID riid, LPVOID *ppobj ) +{ + netcfgcf *This = impl_from_IClassFactory( iface ); + HRESULT hr; + IUnknown *punk; + + TRACE("%p %s %p\n", pOuter, debugstr_guid(riid), ppobj ); + + *ppobj = NULL; + + if (pOuter) + return CLASS_E_NOAGGREGATION; + + hr = This->fnCreateInstance( &punk ); + if (SUCCEEDED(hr)) + { + hr = IUnknown_QueryInterface( punk, riid, ppobj ); + + IUnknown_Release( punk ); + } + else + { + WARN("Cannot create an instance object. 0x%08x\n", hr); + } + return hr; +} + +static HRESULT WINAPI netcfgcf_LockServer(IClassFactory *iface, BOOL dolock) +{ + FIXME("(%p)->(%d),stub!\n",iface,dolock); + return S_OK; +} + +static const struct IClassFactoryVtbl netcfgcf_vtbl = +{ + netcfgcf_QueryInterface, + netcfgcf_AddRef, + netcfgcf_Release, + netcfgcf_CreateInstance, + netcfgcf_LockServer +}; + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); @@ -49,11 +140,23 @@ return TRUE; } +static netcfgcf netconfigcf = { {&netcfgcf_vtbl}, INetCfg_CreateInstance }; + HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { - FIXME("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + IClassFactory *cf = NULL; + + TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + + if(IsEqualCLSID(rclsid, &CLSID_CNetCfg)) + { + cf = &netconfigcf.IClassFactory_iface; + } + + if(!cf) + return CLASS_E_CLASSNOTAVAILABLE; - return CLASS_E_CLASSNOTAVAILABLE; + return IClassFactory_QueryInterface(cf, riid, ppv); } HRESULT WINAPI DllRegisterServer(void) diff -Nru wine1.7-1.7.15/dlls/netcfgx/Makefile.in wine1.7-1.7.16/dlls/netcfgx/Makefile.in --- wine1.7-1.7.15/dlls/netcfgx/Makefile.in 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/netcfgx/Makefile.in 2014-04-04 19:13:44.000000000 +0000 @@ -1,6 +1,8 @@ MODULE = netcfgx.dll +IMPORTS = uuid C_SRCS = \ - main.c + main.c \ + netcfg.c IDL_SRCS = netcfgx_classes.idl diff -Nru wine1.7-1.7.15/dlls/netcfgx/netcfg.c wine1.7-1.7.16/dlls/netcfgx/netcfg.c --- wine1.7-1.7.15/dlls/netcfgx/netcfg.c 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/netcfgx/netcfg.c 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,239 @@ +/* + * Copyright 2014 Alistair Leslie-Hughes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include +#include +#include + +#define COBJMACROS + +#include "netcfgx.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL( netcfgx ); + + +typedef struct NetConfiguration +{ + INetCfg INetCfg_iface; + INetCfgLock INetCfgLock_iface; + + LONG ref; +} NetConfiguration; + +static inline NetConfiguration *impl_from_INetCfg(INetCfg *iface) +{ + return CONTAINING_RECORD(iface, NetConfiguration, INetCfg_iface); +} + +static inline NetConfiguration *impl_from_INetCfgLock(INetCfgLock *iface) +{ + return CONTAINING_RECORD(iface, NetConfiguration, INetCfgLock_iface); +} + +static HRESULT WINAPI netcfg_QueryInterface(INetCfg *iface, REFIID riid, void **ppvObject) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_INetCfg) || + IsEqualGUID(riid, &IID_IUnknown)) + { + *ppvObject = &This->INetCfg_iface; + } + else if(IsEqualGUID(riid, &IID_INetCfgLock)) + { + *ppvObject = &This->INetCfgLock_iface; + } + else + { + FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppvObject); + + return S_OK; +} + +static ULONG WINAPI netcfg_AddRef(INetCfg *iface) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("%p ref=%u\n", This, ref); + + return ref; +} + +static ULONG WINAPI netcfg_Release(INetCfg *iface) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("%p ref=%u\n", This, ref); + + if (ref == 0) + { + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI netcfg_Initialize(INetCfg *iface, PVOID pvReserved) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + FIXME("%p %p\n", This, pvReserved); + + return S_OK; +} + +static HRESULT WINAPI netcfg_Uninitialize(INetCfg *iface) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + FIXME("%p\n", This); + + return S_OK; +} + +static HRESULT WINAPI netcfg_Apply(INetCfg *iface) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + FIXME("%p\n", This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI netcfg_Cancel(INetCfg *iface) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + FIXME("%p\n", This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI netcfg_EnumComponents(INetCfg *iface, const GUID *pguidClass, IEnumNetCfgComponent **ppenumComponent) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + FIXME("%p %s %p\n", This, debugstr_guid(pguidClass), ppenumComponent); + + return E_NOTIMPL; +} + +static HRESULT WINAPI netcfg_FindComponent(INetCfg *iface, LPCWSTR pszwInfId, INetCfgComponent **pComponent) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + FIXME("%p %s %p\n", This, debugstr_w(pszwInfId), pComponent); + + return E_NOTIMPL; +} + +static HRESULT WINAPI netcfg_QueryNetCfgClass(INetCfg *iface, const GUID *pguidClass, REFIID riid, void **ppvObject) +{ + NetConfiguration *This = impl_from_INetCfg(iface); + FIXME("%p %s %p\n", This, debugstr_guid(pguidClass), ppvObject); + + return E_NOTIMPL; +} + +static const struct INetCfgVtbl NetCfgVtbl = +{ + netcfg_QueryInterface, + netcfg_AddRef, + netcfg_Release, + netcfg_Initialize, + netcfg_Uninitialize, + netcfg_Apply, + netcfg_Cancel, + netcfg_EnumComponents, + netcfg_FindComponent, + netcfg_QueryNetCfgClass +}; + + +static HRESULT WINAPI netcfglock_QueryInterface(INetCfgLock *iface, REFIID riid,void **ppvObject) +{ + NetConfiguration *This = impl_from_INetCfgLock(iface); + + return netcfg_QueryInterface(&This->INetCfg_iface, riid, ppvObject); +} + +static ULONG WINAPI netcfglock_AddRef(INetCfgLock *iface) +{ + NetConfiguration *This = impl_from_INetCfgLock(iface); + + return netcfg_AddRef(&This->INetCfg_iface); +} + +static ULONG WINAPI netcfglock_Release(INetCfgLock *iface) +{ + NetConfiguration *This = impl_from_INetCfgLock(iface); + return netcfg_Release(&This->INetCfg_iface); +} + +static HRESULT WINAPI netcfglock_AcquireWriteLock(INetCfgLock *iface, DWORD cmsTimeout, + LPCWSTR pszwClientDescription, LPWSTR *ppszwClientDescription) +{ + NetConfiguration *This = impl_from_INetCfgLock(iface); + FIXME("%p %d %s %p\n", This, cmsTimeout, debugstr_w(pszwClientDescription), ppszwClientDescription); + + return S_OK; +} + +static HRESULT WINAPI netcfglock_ReleaseWriteLock(INetCfgLock *iface) +{ + NetConfiguration *This = impl_from_INetCfgLock(iface); + FIXME("%p\n", This); + + return S_OK; +} + +static HRESULT WINAPI netcfglock_IsWriteLocked(INetCfgLock *iface, LPWSTR *ppszwClientDescription) +{ + NetConfiguration *This = impl_from_INetCfgLock(iface); + FIXME("%p %p\n", This, ppszwClientDescription); + + return E_NOTIMPL; +} + +static const struct INetCfgLockVtbl NetCfgLockVtbl = +{ + netcfglock_QueryInterface, + netcfglock_AddRef, + netcfglock_Release, + netcfglock_AcquireWriteLock, + netcfglock_ReleaseWriteLock, + netcfglock_IsWriteLocked +}; + +HRESULT INetCfg_CreateInstance(IUnknown **ppUnk) +{ + NetConfiguration *This; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(NetConfiguration)); + if (!This) + return E_OUTOFMEMORY; + + This->INetCfg_iface.lpVtbl = &NetCfgVtbl; + This->INetCfgLock_iface.lpVtbl = &NetCfgLockVtbl; + This->ref = 1; + + *ppUnk = (IUnknown*)This; + + return S_OK; +} diff -Nru wine1.7-1.7.15/dlls/netcfgx/netcfg_private.h wine1.7-1.7.16/dlls/netcfgx/netcfg_private.h --- wine1.7-1.7.15/dlls/netcfgx/netcfg_private.h 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/netcfgx/netcfg_private.h 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,23 @@ +/* + * Copyright 2014 Alistair Leslie-Hughes + * + * 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 __NETCFG_PRIVATE_H__ +#define __NETCFG_PRIVATE_H__ + +extern HRESULT INetCfg_CreateInstance(IUnknown **ppUnk) DECLSPEC_HIDDEN; + +#endif diff -Nru wine1.7-1.7.15/dlls/netcfgx/tests/Makefile.in wine1.7-1.7.16/dlls/netcfgx/tests/Makefile.in --- wine1.7-1.7.15/dlls/netcfgx/tests/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/netcfgx/tests/Makefile.in 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,5 @@ +TESTDLL = netcfgx.dll +IMPORTS = uuid ole32 + +C_SRCS = \ + netcfgx.c diff -Nru wine1.7-1.7.15/dlls/netcfgx/tests/netcfgx.c wine1.7-1.7.16/dlls/netcfgx/tests/netcfgx.c --- wine1.7-1.7.15/dlls/netcfgx/tests/netcfgx.c 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/netcfgx/tests/netcfgx.c 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,93 @@ +/* + * Copyright 2014 Alistair Leslie-Hughes + * + * 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 WIN32_LEAN_AND_MEAN +#include + +#define COBJMACROS + +#include "netcfgx.h" +#include "wine/test.h" + +static void create_configuration(void) +{ + static const WCHAR tcpipW[] = {'M','S','_','T','C','P','I','P',0}; + static const WCHAR myclient[] = {'M','Y',' ','C','L','I','E','N','T',0}; + HRESULT hr; + INetCfg *config = NULL; + INetCfgLock *netlock = NULL; + INetCfgComponent *component = NULL; + LPWSTR client = NULL; + + hr = CoCreateInstance( &CLSID_CNetCfg, NULL, CLSCTX_ALL, &IID_INetCfg, (LPVOID*)&config); + ok(hr == S_OK, "Failed to create object\n"); + if(SUCCEEDED(hr)) + { + hr = INetCfg_QueryInterface(config, &IID_INetCfgLock, (LPVOID*)&netlock); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = INetCfgLock_AcquireWriteLock(netlock, 5000, myclient, &client); + ok(hr == S_OK || + hr == E_ACCESSDENIED /* Not run as admin */, "got 0x%08x\n", hr); + if(hr == S_OK) + { + trace("Lock value: %s\n", wine_dbgstr_w(client)); + CoTaskMemFree(client); + } + else if(hr == E_ACCESSDENIED) + trace("Not run with Admin permissions\n"); + + hr = INetCfg_Initialize(config, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + /* AcquireWriteLock needs to be run before Initialize */ + hr = INetCfgLock_AcquireWriteLock(netlock, 5000, myclient, &client); + todo_wine ok(hr == NETCFG_E_ALREADY_INITIALIZED || hr == E_ACCESSDENIED, "got 0x%08x\n", hr); + + hr = INetCfg_FindComponent(config, tcpipW, &component); + todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); + if(hr == S_OK) + { + INetCfgComponent_Release(component); + } + + hr = INetCfg_Apply(config); + todo_wine ok(hr == S_OK || hr == NETCFG_E_NO_WRITE_LOCK, "got 0x%08x\n", hr); + + hr = INetCfg_Uninitialize(config); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = INetCfgLock_ReleaseWriteLock(netlock); + ok(hr == S_OK, "got 0x%08x\n", hr); + + INetCfg_Release(config); + } +} + +START_TEST(netcfgx) +{ + HRESULT hr; + + hr = CoInitialize(0); + ok( hr == S_OK, "failed to init com\n"); + if (hr != S_OK) + return; + + create_configuration(); + + CoUninitialize(); +} diff -Nru wine1.7-1.7.15/dlls/ntdll/heap.c wine1.7-1.7.16/dlls/ntdll/heap.c --- wine1.7-1.7.15/dlls/ntdll/heap.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ntdll/heap.c 2014-04-04 19:13:44.000000000 +0000 @@ -879,7 +879,7 @@ commitSize = min( totalSize, (commitSize + COMMIT_MASK) & ~COMMIT_MASK ); /* allocate the memory block */ - if (NtAllocateVirtualMemory( NtCurrentProcess(), &address, 5, &totalSize, + if (NtAllocateVirtualMemory( NtCurrentProcess(), &address, 0, &totalSize, MEM_RESERVE, get_protection_type( flags ) )) { WARN("Could not allocate %08lx bytes\n", totalSize ); diff -Nru wine1.7-1.7.15/dlls/ntdll/ntdll.spec wine1.7-1.7.16/dlls/ntdll/ntdll.spec --- wine1.7-1.7.15/dlls/ntdll/ntdll.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ntdll/ntdll.spec 2014-04-04 19:13:44.000000000 +0000 @@ -797,6 +797,7 @@ @ stub RtlQuerySecurityObject @ stub RtlQueryTagHeap @ stdcall RtlQueryTimeZoneInformation(ptr) +@ stdcall RtlQueryUnbiasedInterruptTime(ptr) @ stub RtlQueueApcWow64Thread @ stdcall RtlQueueWorkItem(ptr ptr long) @ stdcall -register RtlRaiseException(ptr) diff -Nru wine1.7-1.7.15/dlls/ntdll/thread.c wine1.7-1.7.16/dlls/ntdll/thread.c --- wine1.7-1.7.15/dlls/ntdll/thread.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ntdll/thread.c 2014-04-04 19:13:44.000000000 +0000 @@ -256,6 +256,8 @@ RtlInitializeBitMap( &tls_expansion_bitmap, peb->TlsExpansionBitmapBits, sizeof(peb->TlsExpansionBitmapBits) * 8 ); RtlInitializeBitMap( &fls_bitmap, peb->FlsBitmapBits, sizeof(peb->FlsBitmapBits) * 8 ); + RtlSetBits( peb->TlsBitmap, 0, 1 ); /* TLS index 0 is reserved and should be initialized to NULL. */ + RtlSetBits( peb->FlsBitmap, 0, 1 ); InitializeListHead( &peb->FlsListHead ); InitializeListHead( &ldr.InLoadOrderModuleList ); InitializeListHead( &ldr.InMemoryOrderModuleList ); diff -Nru wine1.7-1.7.15/dlls/ntdll/time.c wine1.7-1.7.16/dlls/ntdll/time.c --- wine1.7-1.7.15/dlls/ntdll/time.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ntdll/time.c 2014-04-04 19:13:44.000000000 +0000 @@ -931,3 +931,12 @@ return STATUS_NOT_IMPLEMENTED; #endif } + +/*********************************************************************** + * RtlQueryUnbiasedInterruptTime [NTDLL.@] + */ +NTSTATUS WINAPI RtlQueryUnbiasedInterruptTime(ULONGLONG *time) +{ + *time = monotonic_counter(); + return STATUS_SUCCESS; +} diff -Nru wine1.7-1.7.15/dlls/ole32/filemoniker.c wine1.7-1.7.16/dlls/ole32/filemoniker.c --- wine1.7-1.7.15/dlls/ole32/filemoniker.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ole32/filemoniker.c 2014-04-04 19:13:44.000000000 +0000 @@ -935,11 +935,12 @@ FileMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** ppmkPrefix) { - LPOLESTR pathThis,pathOther,*stringTable1,*stringTable2,commonPath; - IBindCtx *pbind; + LPOLESTR pathThis = NULL, pathOther = NULL,*stringTable1,*stringTable2,commonPath = NULL; + IBindCtx *bindctx; DWORD mkSys; ULONG nb1,nb2,i,sameIdx; BOOL machineNameCase = FALSE; + HRESULT ret; if (ppmkPrefix==NULL) return E_POINTER; @@ -951,81 +952,81 @@ /* check if we have the same type of moniker */ IMoniker_IsSystemMoniker(pmkOther,&mkSys); + if (mkSys != MKSYS_FILEMONIKER) + return MonikerCommonPrefixWith(iface, pmkOther, ppmkPrefix); - if(mkSys==MKSYS_FILEMONIKER){ - HRESULT ret; - - ret = CreateBindCtx(0,&pbind); - if (FAILED(ret)) - return ret; - - /* create a string based on common part of the two paths */ - - ret = IMoniker_GetDisplayName(iface,pbind,NULL,&pathThis); - if (FAILED(ret)) - return ret; - ret = IMoniker_GetDisplayName(pmkOther,pbind,NULL,&pathOther); - if (FAILED(ret)) - return ret; - - nb1=FileMonikerImpl_DecomposePath(pathThis,&stringTable1); - if (FAILED(nb1)) - return nb1; - nb2=FileMonikerImpl_DecomposePath(pathOther,&stringTable2); - if (FAILED(nb2)) - { - free_stringtable(stringTable1); - return nb2; - } - - if (nb1==0 || nb2==0) - { - free_stringtable(stringTable1); - free_stringtable(stringTable2); - return MK_E_NOPREFIX; - } - - commonPath=HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*(min(lstrlenW(pathThis),lstrlenW(pathOther))+1)); - if (!commonPath) - return E_OUTOFMEMORY; - - *commonPath=0; + ret = CreateBindCtx(0, &bindctx); + if (FAILED(ret)) + return ret; - for(sameIdx=0; ( (stringTable1[sameIdx]!=NULL) && - (stringTable2[sameIdx]!=NULL) && - (lstrcmpiW(stringTable1[sameIdx],stringTable2[sameIdx])==0)); sameIdx++); + /* create a string based on common part of the two paths */ + ret = IMoniker_GetDisplayName(iface, bindctx, NULL, &pathThis); + if (FAILED(ret)) + goto failed; + + ret = IMoniker_GetDisplayName(pmkOther, bindctx, NULL, &pathOther); + if (FAILED(ret)) + goto failed; + + nb1 = FileMonikerImpl_DecomposePath(pathThis, &stringTable1); + if (FAILED(nb1)) { + ret = nb1; + goto failed; + } - if (sameIdx > 1 && *stringTable1[0]=='\\' && *stringTable2[1]=='\\'){ + nb2 = FileMonikerImpl_DecomposePath(pathOther, &stringTable2); + if (FAILED(nb2)) { + ret = nb2; + goto failed; + } - machineNameCase = TRUE; + if (nb1 == 0 || nb2 == 0) { + ret = MK_E_NOPREFIX; + goto failed; + } - for(i=2;i 1 && *stringTable1[0]=='\\' && *stringTable2[1]=='\\'){ + machineNameCase = TRUE; + + for(i=2;i 3 || nb2 > 3) ) - ret = MK_E_NOPREFIX; - else - { - for(i=0;i 3 || nb2 > 3) ) + ret = MK_E_NOPREFIX; else - return MonikerCommonPrefixWith(iface,pmkOther,ppmkPrefix); + { + for (i = 0; i < sameIdx; i++) + strcatW(commonPath,stringTable1[i]); + ret = CreateFileMoniker(commonPath, ppmkPrefix); + } + +failed: + IBindCtx_Release(bindctx); + CoTaskMemFree(pathThis); + CoTaskMemFree(pathOther); + CoTaskMemFree(commonPath); + free_stringtable(stringTable1); + free_stringtable(stringTable2); + + return ret; } /****************************************************************************** @@ -1105,8 +1106,7 @@ CoTaskMemFree(strgtable); } - if (word) - CoTaskMemFree(word); + CoTaskMemFree(word); return ret; } diff -Nru wine1.7-1.7.15/dlls/ole32/moniker.c wine1.7-1.7.16/dlls/ole32/moniker.c --- wine1.7-1.7.15/dlls/ole32/moniker.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ole32/moniker.c 2014-04-04 19:13:44.000000000 +0000 @@ -1248,8 +1248,10 @@ absFile=pathDec[nbElm-1]; /* failed if the path represents a directory and not an absolute file name*/ - if (!lstrcmpW(absFile, bkslashW)) + if (!lstrcmpW(absFile, bkslashW)) { + CoTaskMemFree(pathDec); return MK_E_INVALIDEXTENSION; + } /* get the extension of the file */ extension = NULL; @@ -1257,8 +1259,10 @@ for(i = length-1; (i >= 0) && *(extension = &absFile[i]) != '.'; i--) /* nothing */; - if (!extension || !lstrcmpW(extension, dotW)) + if (!extension || !lstrcmpW(extension, dotW)) { + CoTaskMemFree(pathDec); return MK_E_INVALIDEXTENSION; + } res=RegQueryValueW(HKEY_CLASSES_ROOT, extension, NULL, &sizeProgId); diff -Nru wine1.7-1.7.15/dlls/oleaut32/tests/safearray.c wine1.7-1.7.16/dlls/oleaut32/tests/safearray.c --- wine1.7-1.7.15/dlls/oleaut32/tests/safearray.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/oleaut32/tests/safearray.c 2014-04-04 19:13:44.000000000 +0000 @@ -1080,8 +1080,6 @@ return; /* Some early versions can't handle > 3 dims */ ok(sa->cbElements == sizeof(value), "int size mismatch\n"); - if (sa->cbElements != sizeof(value)) - return; /* Failure cases */ for (x = 0; x < NUM_DIMENSIONS; x++) @@ -1233,8 +1231,6 @@ return; ok(sa->cbElements == sizeof(BSTR), "BSTR size mismatch\n"); - if (sa->cbElements != sizeof(BSTR)) - return; indices[0] = sab.lLbound; value = SysAllocString(szTest); @@ -1297,8 +1293,6 @@ return; ok(sa->cbElements == sizeof(LPUNKNOWN), "LPUNKNOWN size mismatch\n"); - if (sa->cbElements != sizeof(LPUNKNOWN)) - return; indices[0] = sab.lLbound; xtunk.ref = 1; @@ -1331,8 +1325,6 @@ return; ok(sa->cbElements == sizeof(LPUNKNOWN), "LPUNKNOWN size mismatch\n"); - if (sa->cbElements != sizeof(LPUNKNOWN)) - return; indices[0] = 2; xtunk.ref = 1; @@ -1363,8 +1355,6 @@ return; ok(sa->cbElements == sizeof(VARIANT), "VARIANT size mismatch\n"); - if (sa->cbElements != sizeof(VARIANT)) - return; indices[0] = sab.lLbound; V_VT(&value) = VT_I4; @@ -1418,8 +1408,6 @@ return; ok(sa->cbElements == sizeof(int), "int size mismatch\n"); - if (sa->cbElements != sizeof(int)) - return; /* Fill the source array with some data; it doesn't matter what */ for (dimension = 0; dimension < size; dimension++) diff -Nru wine1.7-1.7.15/dlls/oleaut32/tests/vartest.c wine1.7-1.7.16/dlls/oleaut32/tests/vartest.c --- wine1.7-1.7.15/dlls/oleaut32/tests/vartest.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/oleaut32/tests/vartest.c 2014-04-04 19:13:44.000000000 +0000 @@ -6000,11 +6000,11 @@ VARTYPE i; HRESULT hres; + CHECKPTR(VarAnd); + true_str = SysAllocString(szTrue); false_str = SysAllocString(szFalse); - CHECKPTR(VarAnd); - /* Test all possible flag/vt combinations & the resulting vt type */ for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) { @@ -7479,11 +7479,11 @@ HRESULT hres; double r; + CHECKPTR(VarDiv); + num1_str = SysAllocString(str1); num2_str = SysAllocString(str2); - CHECKPTR(VarDiv); - /* Test all possible flag/vt combinations & the resulting vt type */ for (i = 0; i < sizeof(ExtraFlags)/sizeof(ExtraFlags[0]); i++) { diff -Nru wine1.7-1.7.15/dlls/oleaut32/tests/vartype.c wine1.7-1.7.16/dlls/oleaut32/tests/vartype.c --- wine1.7-1.7.15/dlls/oleaut32/tests/vartype.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/oleaut32/tests/vartype.c 2014-04-04 19:13:44.000000000 +0000 @@ -739,11 +739,15 @@ CHECKPTR(VarI1FromR4); CONVERT(VarI1FromR4, -129.0f); EXPECT_OVERFLOW; + CONVERT(VarI1FromR4, -128.51f); EXPECT_OVERFLOW; + CONVERT(VarI1FromR4, -128.5f); EXPECT(-128); CONVERT(VarI1FromR4, -128.0f); EXPECT(-128); CONVERT(VarI1FromR4, -1.0f); EXPECT(-1); CONVERT(VarI1FromR4, 0.0f); EXPECT(0); CONVERT(VarI1FromR4, 1.0f); EXPECT(1); CONVERT(VarI1FromR4, 127.0f); EXPECT(127); + CONVERT(VarI1FromR4, 127.49f); EXPECT(127); + CONVERT(VarI1FromR4, 127.5f); EXPECT_OVERFLOW; CONVERT(VarI1FromR4, 128.0f); EXPECT_OVERFLOW; CONVERT(VarI1FromR4, -1.5f); EXPECT(-2); @@ -762,11 +766,15 @@ CHECKPTR(VarI1FromR8); CONVERT(VarI1FromR8, -129.0); EXPECT_OVERFLOW; + CONVERT(VarI1FromR8, -128.51); EXPECT_OVERFLOW; + CONVERT(VarI1FromR8, -128.5); EXPECT(-128); CONVERT(VarI1FromR8, -128.0); EXPECT(-128); CONVERT(VarI1FromR8, -1.0); EXPECT(-1); CONVERT(VarI1FromR8, 0.0); EXPECT(0); CONVERT(VarI1FromR8, 1.0); EXPECT(1); CONVERT(VarI1FromR8, 127.0); EXPECT(127); + CONVERT(VarI1FromR8, 127.49); EXPECT(127); + CONVERT(VarI1FromR8, 127.5); EXPECT_OVERFLOW; CONVERT(VarI1FromR8, 128.0); EXPECT_OVERFLOW; CONVERT(VarI1FromR8, -1.5); EXPECT(-2); @@ -983,9 +991,13 @@ CHECKPTR(VarUI1FromR4); CONVERT(VarUI1FromR4, -1.0f); EXPECT_OVERFLOW; + CONVERT(VarUI1FromR4, -0.51f); EXPECT_OVERFLOW; + CONVERT(VarUI1FromR4, -0.5f); EXPECT(0); CONVERT(VarUI1FromR4, 0.0f); EXPECT(0); CONVERT(VarUI1FromR4, 1.0f); EXPECT(1); CONVERT(VarUI1FromR4, 255.0f); EXPECT(255); + CONVERT(VarUI1FromR4, 255.49f); EXPECT(255); + CONVERT(VarUI1FromR4, 255.5f); EXPECT_OVERFLOW; CONVERT(VarUI1FromR4, 256.0f); EXPECT_OVERFLOW; /* Rounding */ @@ -1005,9 +1017,13 @@ CHECKPTR(VarUI1FromR8); CONVERT(VarUI1FromR8, -1.0); EXPECT_OVERFLOW; + CONVERT(VarUI1FromR8, -0.51); EXPECT_OVERFLOW; + CONVERT(VarUI1FromR8, -0.5); EXPECT(0); CONVERT(VarUI1FromR8, 0.0); EXPECT(0); CONVERT(VarUI1FromR8, 1.0); EXPECT(1); CONVERT(VarUI1FromR8, 255.0); EXPECT(255); + CONVERT(VarUI1FromR8, 255.49); EXPECT(255); + CONVERT(VarUI1FromR8, 255.5); EXPECT_OVERFLOW; CONVERT(VarUI1FromR8, 256.0); EXPECT_OVERFLOW; /* Rounding */ @@ -1281,11 +1297,15 @@ CHECKPTR(VarI2FromR4); CONVERT(VarI2FromR4, -32769.0f); EXPECT_OVERFLOW; + CONVERT(VarI2FromR4, -32768.51f); EXPECT_OVERFLOW; + CONVERT(VarI2FromR4, -32768.5f); EXPECT(-32768); CONVERT(VarI2FromR4, -32768.0f); EXPECT(-32768); CONVERT(VarI2FromR4, -1.0f); EXPECT(-1); CONVERT(VarI2FromR4, 0.0f); EXPECT(0); CONVERT(VarI2FromR4, 1.0f); EXPECT(1); CONVERT(VarI2FromR4, 32767.0f); EXPECT(32767); + CONVERT(VarI2FromR4, 32767.49f); EXPECT(32767); + CONVERT(VarI2FromR4, 32767.5f); EXPECT_OVERFLOW; CONVERT(VarI2FromR4, 32768.0f); EXPECT_OVERFLOW; /* Rounding */ @@ -1305,11 +1325,15 @@ CHECKPTR(VarI2FromR8); CONVERT(VarI2FromR8, -32769.0); EXPECT_OVERFLOW; + CONVERT(VarI2FromR8, -32768.51); EXPECT_OVERFLOW; + CONVERT(VarI2FromR8, -32768.5); EXPECT(-32768); CONVERT(VarI2FromR8, -32768.0); EXPECT(-32768); CONVERT(VarI2FromR8, -1.0); EXPECT(-1); CONVERT(VarI2FromR8, 0.0); EXPECT(0); CONVERT(VarI2FromR8, 1.0); EXPECT(1); CONVERT(VarI2FromR8, 32767.0); EXPECT(32767); + CONVERT(VarI2FromR8, 32767.49); EXPECT(32767); + CONVERT(VarI2FromR8, 32767.5); EXPECT_OVERFLOW; CONVERT(VarI2FromR8, 32768.0); EXPECT_OVERFLOW; /* Rounding */ @@ -1529,9 +1553,13 @@ CHECKPTR(VarUI2FromR4); CONVERT(VarUI2FromR4, -1.0f); EXPECT_OVERFLOW; + CONVERT(VarUI2FromR4, -0.51f); EXPECT_OVERFLOW; + CONVERT(VarUI2FromR4, -0.5f); EXPECT(0); CONVERT(VarUI2FromR4, 0.0f); EXPECT(0); CONVERT(VarUI2FromR4, 1.0f); EXPECT(1); CONVERT(VarUI2FromR4, 65535.0f); EXPECT(65535); + CONVERT(VarUI2FromR4, 65535.49f); EXPECT(65535); + CONVERT(VarUI2FromR4, 65535.5f); EXPECT_OVERFLOW; CONVERT(VarUI2FromR4, 65536.0f); EXPECT_OVERFLOW; /* Rounding */ @@ -1551,9 +1579,13 @@ CHECKPTR(VarUI2FromR8); CONVERT(VarUI2FromR8, -1.0); EXPECT_OVERFLOW; + CONVERT(VarUI2FromR8, -0.51); EXPECT_OVERFLOW; + CONVERT(VarUI2FromR8, -0.5); EXPECT(0); CONVERT(VarUI2FromR8, 0.0); EXPECT(0); CONVERT(VarUI2FromR8, 1.0); EXPECT(1); CONVERT(VarUI2FromR8, 65535.0); EXPECT(65535); + CONVERT(VarUI2FromR8, 65535.49); EXPECT(65535); + CONVERT(VarUI2FromR8, 65535.5); EXPECT_OVERFLOW; CONVERT(VarUI2FromR8, 65536.0); EXPECT_OVERFLOW; /* Rounding */ @@ -1792,11 +1824,15 @@ CHECKPTR(VarI4FromR8); CONVERT(VarI4FromR8, -2147483649.0); EXPECT_OVERFLOW; + CONVERT(VarI4FromR8, -2147483648.51); EXPECT_OVERFLOW; + CONVERT(VarI4FromR8, -2147483648.5); EXPECT(-2147483647 - 1); CONVERT(VarI4FromR8, -2147483648.0); EXPECT(-2147483647 - 1); CONVERT(VarI4FromR8, -1.0); EXPECT(-1); CONVERT(VarI4FromR8, 0.0); EXPECT(0); CONVERT(VarI4FromR8, 1.0); EXPECT(1); CONVERT(VarI4FromR8, 2147483647.0); EXPECT(2147483647); + CONVERT(VarI4FromR8, 2147483647.49); EXPECT(2147483647); + CONVERT(VarI4FromR8, 2147483647.5); EXPECT_OVERFLOW; CONVERT(VarI4FromR8, 2147483648.0); EXPECT_OVERFLOW; CONVERT(VarI4FromR8, -1.5); EXPECT(-2); @@ -2017,6 +2053,8 @@ CHECKPTR(VarUI4FromR4); /* We can't test max values as they are not exactly representable in a float */ CONVERT(VarUI4FromR4, -1.0f); EXPECT_OVERFLOW; + CONVERT(VarUI4FromR4, -0.51f); EXPECT_OVERFLOW; + CONVERT(VarUI4FromR4, -0.5f); EXPECT(0); CONVERT(VarUI4FromR4, 0.0f); EXPECT(0); CONVERT(VarUI4FromR4, 1.0f); EXPECT(1); @@ -2037,9 +2075,13 @@ CHECKPTR(VarUI4FromR8); CONVERT(VarUI4FromR8, -1.0); EXPECT_OVERFLOW; + CONVERT(VarUI4FromR4, -0.51f); EXPECT_OVERFLOW; + CONVERT(VarUI4FromR4, -0.5f); EXPECT(0); CONVERT(VarUI4FromR8, 0.0); EXPECT(0); CONVERT(VarUI4FromR8, 1.0); EXPECT(1); CONVERT(VarUI4FromR8, 4294967295.0); EXPECT(4294967295ul); + CONVERT(VarUI4FromR8, 4294967295.49); EXPECT(4294967295ul); + CONVERT(VarUI4FromR8, 4294967295.5); EXPECT_OVERFLOW; CONVERT(VarUI4FromR8, 4294967296.0); EXPECT_OVERFLOW; CONVERT(VarUI4FromR8, -1.5); EXPECT_OVERFLOW; diff -Nru wine1.7-1.7.15/dlls/oleaut32/vartype.c wine1.7-1.7.16/dlls/oleaut32/vartype.c --- wine1.7-1.7.15/dlls/oleaut32/vartype.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/oleaut32/vartype.c 2014-04-04 19:13:44.000000000 +0000 @@ -362,7 +362,7 @@ */ HRESULT WINAPI VarI1FromR8(double dblIn, signed char* pcOut) { - if (dblIn < (double)I1_MIN || dblIn > (double)I1_MAX) + if (dblIn < I1_MIN - 0.5 || dblIn >= I1_MAX + 0.5) return DISP_E_OVERFLOW; VARIANT_DutchRound(CHAR, dblIn, *pcOut); return S_OK; @@ -652,7 +652,7 @@ */ HRESULT WINAPI VarUI1FromR8(double dblIn, BYTE* pbOut) { - if (dblIn < -0.5 || dblIn > (double)UI1_MAX) + if (dblIn < -0.5 || dblIn >= UI1_MAX + 0.5) return DISP_E_OVERFLOW; VARIANT_DutchRound(BYTE, dblIn, *pbOut); return S_OK; @@ -958,7 +958,7 @@ */ HRESULT WINAPI VarI2FromR8(double dblIn, SHORT* psOut) { - if (dblIn < (double)I2_MIN || dblIn > (double)I2_MAX) + if (dblIn < I2_MIN - 0.5 || dblIn >= I2_MAX + 0.5) return DISP_E_OVERFLOW; VARIANT_DutchRound(SHORT, dblIn, *psOut); return S_OK; @@ -1270,7 +1270,7 @@ */ HRESULT WINAPI VarUI2FromR8(double dblIn, USHORT* pusOut) { - if (dblIn < -0.5 || dblIn > (double)UI2_MAX) + if (dblIn < -0.5 || dblIn >= UI2_MAX + 0.5) return DISP_E_OVERFLOW; VARIANT_DutchRound(USHORT, dblIn, *pusOut); return S_OK; @@ -1550,7 +1550,7 @@ */ HRESULT WINAPI VarI4FromR8(double dblIn, LONG *piOut) { - if (dblIn < (double)I4_MIN || dblIn > (double)I4_MAX) + if (dblIn < I4_MIN - 0.5 || dblIn >= I4_MAX + 0.5) return DISP_E_OVERFLOW; VARIANT_DutchRound(LONG, dblIn, *piOut); return S_OK; @@ -1859,7 +1859,7 @@ */ HRESULT WINAPI VarUI4FromR8(double dblIn, ULONG *pulOut) { - if (dblIn < -0.5 || dblIn > (double)UI4_MAX) + if (dblIn < -0.5 || dblIn >= UI4_MAX + 0.5) return DISP_E_OVERFLOW; VARIANT_DutchRound(ULONG, dblIn, *pulOut); return S_OK; diff -Nru wine1.7-1.7.15/dlls/qcap/tests/qcap.c wine1.7-1.7.16/dlls/qcap/tests/qcap.c --- wine1.7-1.7.15/dlls/qcap/tests/qcap.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/qcap/tests/qcap.c 2014-04-04 19:13:44.000000000 +0000 @@ -1055,9 +1055,12 @@ REFERENCE_TIME off, tmp; LARGE_INTEGER li; BYTE *data; + HRESULT hr; - IMediaSample_GetTime(pSample, &off, &tmp); - IMediaSample_GetPointer(pSample, &data); + hr = IMediaSample_GetTime(pSample, &off, &tmp); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = IMediaSample_GetPointer(pSample, &data); + ok(hr == S_OK, "got 0x%08x\n", hr); li.QuadPart = off; IStream_Seek(avi_stream, li, STREAM_SEEK_SET, NULL); IStream_Write(avi_stream, data, IMediaSample_GetActualDataLength(pSample), NULL); @@ -1779,11 +1782,13 @@ props.cbAlign = 0xdeadbee3; props.cbPrefix = 0xdeadbee4; hr = IMemInputPin_GetAllocatorRequirements(memin, &props); - ok(hr == S_OK, "GetAllocatorRequirments returned %x\n", hr); - ok(props.cBuffers == 0xdeadbee1, "cBuffers = %d\n", props.cBuffers); - ok(props.cbBuffer == 0xdeadbee2, "cbBuffer = %d\n", props.cbBuffer); - ok(props.cbAlign == 1, "cbAlign = %d\n", props.cbAlign); - ok(props.cbPrefix == 8, "cbPrefix = %d\n", props.cbPrefix); + ok(hr==S_OK || broken(hr==E_INVALIDARG), "GetAllocatorRequirments returned %x\n", hr); + if(hr == S_OK) { + ok(props.cBuffers == 0xdeadbee1, "cBuffers = %d\n", props.cBuffers); + ok(props.cbBuffer == 0xdeadbee2, "cbBuffer = %d\n", props.cbBuffer); + ok(props.cbAlign == 1, "cbAlign = %d\n", props.cbAlign); + ok(props.cbPrefix == 8, "cbPrefix = %d\n", props.cbPrefix); + } hr = IMemInputPin_GetAllocator(memin, &memalloc); ok(hr == S_OK, "GetAllocator returned %x\n", hr); @@ -1824,13 +1829,13 @@ ok(memalloc != &MemAllocator, "memalloc == &MemAllocator\n"); IMemAllocator_Release(memalloc); - CreateStreamOnHGlobal(NULL, TRUE, &avi_stream); + hr = CreateStreamOnHGlobal(NULL, TRUE, &avi_stream); + ok(hr == S_OK, "got 0x%08x\n", hr); SET_EXPECT(MediaSeeking_GetPositions); SET_EXPECT(MemInputPin_QueryInterface_IStream); hr = IBaseFilter_Run(avimux, 0); ok(hr == S_OK, "Run returned %x\n", hr); CHECK_CALLED(MediaSeeking_GetPositions); - CHECK_CALLED(MemInputPin_QueryInterface_IStream); hr = IBaseFilter_GetState(avimux, 0, &state); ok(hr == S_OK, "GetState returned %x\n", hr); @@ -1911,6 +1916,7 @@ hr = IBaseFilter_Stop(avimux); ok(hr == S_OK, "Stop returned %x\n", hr); + CHECK_CALLED(MemInputPin_QueryInterface_IStream); hr = IBaseFilter_GetState(avimux, 0, &state); ok(hr == S_OK, "GetState returned %x\n", hr); diff -Nru wine1.7-1.7.15/dlls/riched20/editor.c wine1.7-1.7.16/dlls/riched20/editor.c --- wine1.7-1.7.15/dlls/riched20/editor.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/riched20/editor.c 2014-04-04 19:13:44.000000000 +0000 @@ -2858,6 +2858,8 @@ ed->horz_si.nPage = 0; ed->horz_si.nPos = 0; + ed->wheel_remain = 0; + OleInitialize(NULL); return ed; @@ -2925,6 +2927,23 @@ return TRUE; } +static inline int get_default_line_height( ME_TextEditor *editor ) +{ + int height = 0; + + if (editor->pBuffer && editor->pBuffer->pDefaultStyle) + height = editor->pBuffer->pDefaultStyle->tm.tmHeight; + if (height <= 0) height = 24; + + return height; +} + +static inline int calc_wheel_change( int *remain, int amount_per_click ) +{ + int change = amount_per_click * (float)*remain / WHEEL_DELTA; + *remain -= WHEEL_DELTA * change / amount_per_click; + return change; +} static const char * const edit_messages[] = { "EM_GETSEL", @@ -3142,11 +3161,14 @@ return ME_StreamOut(editor, wParam, (EDITSTREAM *)lParam); case WM_GETDLGCODE: { - UINT code = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS|DLGC_HASSETSEL; + UINT code = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS; + if (lParam) editor->bDialogMode = TRUE; if (editor->styleFlags & ES_MULTILINE) code |= DLGC_WANTMESSAGE; + if (!(editor->styleFlags & ES_SAVESEL)) + code |= DLGC_HASSETSEL; return code; } case EM_EMPTYUNDOBUFFER: @@ -3545,7 +3567,7 @@ { if (!(editor->styleFlags & ES_MULTILINE)) return FALSE; - ME_ScrollDown(editor, lParam * 8); /* FIXME follow the original */ + ME_ScrollDown( editor, lParam * get_default_line_height( editor ) ); return TRUE; } case WM_CLEAR: @@ -4132,6 +4154,7 @@ case WM_KILLFOCUS: ME_CommitUndo(editor); /* End coalesced undos for typed characters */ editor->bHaveFocus = FALSE; + editor->wheel_remain = 0; ME_HideCaret(editor); ME_SendOldNotify(editor, EN_KILLFOCUS); return 0; @@ -4218,14 +4241,9 @@ case WM_VSCROLL: { int origNPos; - int lineHeight; + int lineHeight = get_default_line_height( editor ); origNPos = editor->vert_si.nPos; - lineHeight = 24; - - if (editor->pBuffer && editor->pBuffer->pDefaultStyle) - lineHeight = editor->pBuffer->pDefaultStyle->tm.tmHeight; - if (lineHeight <= 0) lineHeight = 24; switch(LOWORD(wParam)) { @@ -4265,8 +4283,7 @@ } case WM_MOUSEWHEEL: { - int gcWheelDelta; - UINT pulScrollLines; + int delta; BOOL ctrl_is_down; if ((editor->nEventMask & ENM_MOUSEEVENTS) && @@ -4275,9 +4292,16 @@ ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; - gcWheelDelta = GET_WHEEL_DELTA_WPARAM(wParam); + delta = GET_WHEEL_DELTA_WPARAM(wParam); - if (abs(gcWheelDelta) >= WHEEL_DELTA) + /* if scrolling changes direction, ignore left overs */ + if ((delta < 0 && editor->wheel_remain < 0) || + (delta > 0 && editor->wheel_remain > 0)) + editor->wheel_remain += delta; + else + editor->wheel_remain = delta; + + if (editor->wheel_remain) { if (ctrl_is_down) { int numerator; @@ -4287,14 +4311,18 @@ } else { numerator = editor->nZoomNumerator * 100 / editor->nZoomDenominator; } - numerator = numerator + (gcWheelDelta / WHEEL_DELTA) * 10; + numerator += calc_wheel_change( &editor->wheel_remain, 10 ); if (numerator >= 10 && numerator <= 500) ME_SetZoom(editor, numerator, 100); } else { - SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0, &pulScrollLines, 0); - /* FIXME follow the original */ - if (pulScrollLines) - ME_ScrollDown(editor,pulScrollLines * (-gcWheelDelta / WHEEL_DELTA) * 8); + UINT max_lines = 3; + int lines = 0; + + SystemParametersInfoW( SPI_GETWHEELSCROLLLINES, 0, &max_lines, 0 ); + if (max_lines) + lines = calc_wheel_change( &editor->wheel_remain, (int)max_lines ); + if (lines) + ME_ScrollDown( editor, -lines * get_default_line_height( editor ) ); } } break; diff -Nru wine1.7-1.7.15/dlls/riched20/editstr.h wine1.7-1.7.16/dlls/riched20/editstr.h --- wine1.7-1.7.15/dlls/riched20/editstr.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/riched20/editstr.h 2014-04-04 19:13:44.000000000 +0000 @@ -443,6 +443,7 @@ SCROLLINFO vert_si, horz_si; BOOL bMouseCaptured; + int wheel_remain; } ME_TextEditor; typedef struct tagME_Context diff -Nru wine1.7-1.7.15/dlls/riched20/richole.c wine1.7-1.7.16/dlls/riched20/richole.c --- wine1.7-1.7.15/dlls/riched20/richole.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/riched20/richole.c 2014-04-04 19:13:44.000000000 +0000 @@ -515,6 +515,9 @@ { IRichEditOleImpl *This = impl_from_ITextDocument(me); TRACE("(%p)\n", me); + + if(!ppSel) + return E_INVALIDARG; *ppSel = &This->txtSel->ITextSelection_iface; ITextSelection_AddRef(*ppSel); return S_OK; @@ -1514,7 +1517,7 @@ return 0; } reo->clientSite = CreateOleClientSite(reo); - if (!reo->txtSel) + if (!reo->clientSite) { ITextSelection_Release(&reo->txtSel->ITextSelection_iface); heap_free(reo); diff -Nru wine1.7-1.7.15/dlls/riched20/tests/editor.c wine1.7-1.7.16/dlls/riched20/tests/editor.c --- wine1.7-1.7.15/dlls/riched20/tests/editor.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/riched20/tests/editor.c 2014-04-04 19:13:44.000000000 +0000 @@ -6729,6 +6729,16 @@ ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", res, expected); DestroyWindow(hwnd); + + hwnd = CreateWindowExA(0, RICHEDIT_CLASS20A, NULL, + WS_POPUP|ES_SAVESEL, + 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); + ok(hwnd != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS20A, (int) GetLastError()); + res = SendMessageA(hwnd, WM_GETDLGCODE, 0, 0); + expected = DLGC_WANTCHARS|DLGC_WANTTAB|DLGC_WANTARROWS; + ok(res == expected, "WM_GETDLGCODE returned %x but expected %x\n", + res, expected); + DestroyWindow(hwnd); } static void test_zoom(void) diff -Nru wine1.7-1.7.15/dlls/riched20/tests/richole.c wine1.7-1.7.16/dlls/riched20/tests/richole.c --- wine1.7-1.7.15/dlls/riched20/tests/richole.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/riched20/tests/richole.c 2014-04-04 19:13:44.000000000 +0000 @@ -117,6 +117,9 @@ ok(hres == S_OK, "IRichEditOle_QueryInterface\n"); ok(txtDoc != NULL, "IRichEditOle_QueryInterface\n"); + hres = ITextDocument_GetSelection(txtDoc, NULL); + ok(hres == E_INVALIDARG, "ITextDocument_GetSelection: 0x%x\n", hres); + ITextDocument_GetSelection(txtDoc, &txtSel); punk = NULL; diff -Nru wine1.7-1.7.15/dlls/rpcrt4/tests/server.c wine1.7-1.7.16/dlls/rpcrt4/tests/server.c --- wine1.7-1.7.15/dlls/rpcrt4/tests/server.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/rpcrt4/tests/server.c 2014-04-04 19:13:44.000000000 +0000 @@ -54,6 +54,9 @@ /* type check statements generated in header file */ fnprintf *p_printf = printf; +static const WCHAR helloW[] = { 'H','e','l','l','o',0 }; +static const WCHAR worldW[] = { 'W','o','r','l','d','!',0 }; + static void InitFunctionPointers(void) { HMODULE hrpcrt4 = GetModuleHandleA("rpcrt4.dll"); @@ -572,6 +575,34 @@ name->name[name->size - 1] = 0; } +void __cdecl s_get_names(int *n, str_array_t *names) +{ + str_array_t list; + + list = MIDL_user_allocate(2 * sizeof(list[0])); + list[0] = MIDL_user_allocate(6); + strcpy(list[0], "Hello"); + list[1] = MIDL_user_allocate(7); + strcpy(list[1], "World!"); + + *names = list; + *n = 2; +} + +void __cdecl s_get_namesw(int *n, wstr_array_t *names) +{ + wstr_array_t list; + + list = MIDL_user_allocate(2 * sizeof(list[0])); + list[0] = MIDL_user_allocate(sizeof(helloW)); + lstrcpyW(list[0], helloW); + list[1] = MIDL_user_allocate(sizeof(worldW)); + lstrcpyW(list[1], worldW); + + *names = list; + *n = 2; +} + int __cdecl s_sum_pcarr2(int n, int **pa) { return s_sum_conf_array(*pa, n); @@ -1191,12 +1222,36 @@ if (!old_windows_version) { + int n; + str_array_t names; + wstr_array_t namesw; + name.size = 10; name.name = buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, name.size); get_name(&name); ok(name.name == buffer, "[in,out] pointer should have stayed as %p but instead changed to %p\n", name.name, buffer); ok(!strcmp(name.name, "Jeremy Wh"), "name didn't unmarshall properly, expected \"Jeremy Wh\", but got \"%s\"\n", name.name); HeapFree(GetProcessHeap(), 0, name.name); + + n = -1; + names = NULL; + get_names(&n, &names); + ok(n == 2, "expected 2, got %d\n", n); + ok(!strcmp(names[0], "Hello"), "expected Hello, got %s\n", names[0]); + ok(!strcmp(names[1], "World!"), "expected World!, got %s\n", names[1]); + MIDL_user_free(names[0]); + MIDL_user_free(names[1]); + MIDL_user_free(names); + + n = -1; + namesw = NULL; + get_namesw(&n, &namesw); + ok(n == 2, "expected 2, got %d\n", n); + ok(!lstrcmpW(namesw[0], helloW), "expected Hello, got %s\n", wine_dbgstr_w(namesw[0])); + ok(!lstrcmpW(namesw[1], worldW), "expected World!, got %s\n", wine_dbgstr_w(namesw[1])); + MIDL_user_free(namesw[0]); + MIDL_user_free(namesw[1]); + MIDL_user_free(namesw); } pa2 = a; diff -Nru wine1.7-1.7.15/dlls/rpcrt4/tests/server.idl wine1.7-1.7.16/dlls/rpcrt4/tests/server.idl --- wine1.7-1.7.15/dlls/rpcrt4/tests/server.idl 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/rpcrt4/tests/server.idl 2014-04-04 19:13:44.000000000 +0000 @@ -328,6 +328,11 @@ } name_t; void get_name([in,out] name_t *name); + typedef char **str_array_t; + void get_names([out] int *n, [out, string, size_is(,*n)] str_array_t *names); + typedef WCHAR **wstr_array_t; + void get_namesw([out] int *n, [out, string, size_is(,*n)] wstr_array_t *names); + int sum_pcarr2(int n, [size_is(, n)] int **pa); int sum_L1_norms(int n, [size_is(n)] vector_t *vs); diff -Nru wine1.7-1.7.15/dlls/schedsvc/schedsvc.c wine1.7-1.7.16/dlls/schedsvc/schedsvc.c --- wine1.7-1.7.15/dlls/schedsvc/schedsvc.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/schedsvc/schedsvc.c 2014-04-04 19:13:44.000000000 +0000 @@ -29,6 +29,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(schedsvc); +static const char bom_utf8[] = { 0xef,0xbb,0xbf }; + HRESULT __cdecl SchRpcHighestVersion(DWORD *version) { TRACE("%p\n", version); @@ -105,7 +107,6 @@ static HRESULT write_xml_utf8(const WCHAR *name, DWORD disposition, const WCHAR *xmlW) { - static const char bom_utf8[] = { 0xef,0xbb,0xbf }; static const char comment[] = "\n"; HANDLE hfile; DWORD size; @@ -220,8 +221,6 @@ static int detect_encoding(const void *buffer, DWORD size) { - static const char bom_utf8[] = { 0xef,0xbb,0xbf }; - if (size >= sizeof(bom_utf8) && !memcmp(buffer, bom_utf8, sizeof(bom_utf8))) return CP_UTF8; else @@ -270,6 +269,9 @@ return S_OK; } + if (cp == CP_UTF8 && size >= sizeof(bom_utf8) && !memcmp(src, bom_utf8, sizeof(bom_utf8))) + src += sizeof(bom_utf8); + size = MultiByteToWideChar(cp, 0, src, -1, NULL, 0); *xml = heap_alloc(size * sizeof(WCHAR)); if (!*xml) return E_OUTOFMEMORY; @@ -324,18 +326,249 @@ return E_NOTIMPL; } +static void free_list(TASK_NAMES list, LONG count) +{ + LONG i; + + for (i = 0; i < count; i++) + heap_free(list[i]); + + heap_free(list); +} + +static inline BOOL is_directory(const WIN32_FIND_DATAW *data) +{ + if (data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + if (data->cFileName[0] == '.') + { + if (!data->cFileName[1] || (data->cFileName[1] == '.' && !data->cFileName[2])) + return FALSE; + } + return TRUE; + } + return FALSE; +} + +static inline BOOL is_file(const WIN32_FIND_DATAW *data) +{ + return !(data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); +} + HRESULT __cdecl SchRpcEnumFolders(const WCHAR *path, DWORD flags, DWORD *start_index, DWORD n_requested, DWORD *n_names, TASK_NAMES *names) { - FIXME("%s,%#x,%p,%u,%p,%p: stub\n", debugstr_w(path), flags, start_index, n_requested, n_names, names); - return E_NOTIMPL; + static const WCHAR allW[] = {'\\','*',0}; + HRESULT hr = S_OK; + WCHAR *full_name; + WCHAR pathW[MAX_PATH]; + WIN32_FIND_DATAW data; + HANDLE handle; + DWORD allocated, count, index; + TASK_NAMES list; + + TRACE("%s,%#x,%u,%u,%p,%p\n", debugstr_w(path), flags, *start_index, n_requested, n_names, names); + + *n_names = 0; + *names = NULL; + + if (flags & ~TASK_ENUM_HIDDEN) return E_INVALIDARG; + + if (!n_requested) n_requested = ~0u; + + full_name = get_full_name(path, NULL); + if (!full_name) return E_OUTOFMEMORY; + + if (strlenW(full_name) + 2 > MAX_PATH) + { + heap_free(full_name); + return HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE); + } + + strcpyW(pathW, full_name); + strcatW(pathW, allW); + + heap_free(full_name); + + allocated = 64; + list = heap_alloc(allocated * sizeof(list[0])); + if (!list) return E_OUTOFMEMORY; + + index = count = 0; + + handle = FindFirstFileW(pathW, &data); + if (handle == INVALID_HANDLE_VALUE) + { + heap_free(list); + if (GetLastError() == ERROR_PATH_NOT_FOUND) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + return HRESULT_FROM_WIN32(GetLastError()); + } + + do + { + if (is_directory(&data) && index++ >= *start_index) + { + if (count >= allocated) + { + TASK_NAMES new_list; + allocated *= 2; + new_list = heap_realloc(list, allocated * sizeof(list[0])); + if (!new_list) + { + hr = E_OUTOFMEMORY; + break; + } + list = new_list; + } + + TRACE("adding %s\n", debugstr_w(data.cFileName)); + + list[count] = heap_strdupW(data.cFileName); + if (!list[count]) + { + hr = E_OUTOFMEMORY; + break; + } + + count++; + + if (count >= n_requested) + { + hr = S_FALSE; + break; + } + } + } while (FindNextFileW(handle, &data)); + + FindClose(handle); + + if (FAILED(hr)) + { + free_list(list, count); + return hr; + } + + *n_names = count; + + if (count) + { + *names = list; + *start_index = index; + return hr; + } + + heap_free(list); + *names = NULL; + return *start_index ? S_FALSE : S_OK; } HRESULT __cdecl SchRpcEnumTasks(const WCHAR *path, DWORD flags, DWORD *start_index, DWORD n_requested, DWORD *n_names, TASK_NAMES *names) { - FIXME("%s,%#x,%p,%u,%p,%p: stub\n", debugstr_w(path), flags, start_index, n_requested, n_names, names); - return E_NOTIMPL; + static const WCHAR allW[] = {'\\','*',0}; + HRESULT hr = S_OK; + WCHAR *full_name; + WCHAR pathW[MAX_PATH]; + WIN32_FIND_DATAW data; + HANDLE handle; + DWORD allocated, count, index; + TASK_NAMES list; + + TRACE("%s,%#x,%u,%u,%p,%p\n", debugstr_w(path), flags, *start_index, n_requested, n_names, names); + + *n_names = 0; + *names = NULL; + + if (flags & ~TASK_ENUM_HIDDEN) return E_INVALIDARG; + + if (!n_requested) n_requested = ~0u; + + full_name = get_full_name(path, NULL); + if (!full_name) return E_OUTOFMEMORY; + + if (strlenW(full_name) + 2 > MAX_PATH) + { + heap_free(full_name); + return HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE); + } + + strcpyW(pathW, full_name); + strcatW(pathW, allW); + + heap_free(full_name); + + allocated = 64; + list = heap_alloc(allocated * sizeof(list[0])); + if (!list) return E_OUTOFMEMORY; + + index = count = 0; + + handle = FindFirstFileW(pathW, &data); + if (handle == INVALID_HANDLE_VALUE) + { + heap_free(list); + if (GetLastError() == ERROR_PATH_NOT_FOUND) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + return HRESULT_FROM_WIN32(GetLastError()); + } + + do + { + if (is_file(&data) && index++ >= *start_index) + { + if (count >= allocated) + { + TASK_NAMES new_list; + allocated *= 2; + new_list = heap_realloc(list, allocated * sizeof(list[0])); + if (!new_list) + { + hr = E_OUTOFMEMORY; + break; + } + list = new_list; + } + + TRACE("adding %s\n", debugstr_w(data.cFileName)); + + list[count] = heap_strdupW(data.cFileName); + if (!list[count]) + { + hr = E_OUTOFMEMORY; + break; + } + + count++; + + if (count >= n_requested) + { + hr = S_FALSE; + break; + } + } + } while (FindNextFileW(handle, &data)); + + FindClose(handle); + + if (FAILED(hr)) + { + free_list(list, count); + return hr; + } + + *n_names = count; + + if (count) + { + *names = list; + *start_index = index; + return hr; + } + + heap_free(list); + *names = NULL; + return *start_index ? S_FALSE : S_OK; } HRESULT __cdecl SchRpcEnumInstances(const WCHAR *path, DWORD flags, DWORD *n_guids, GUID **guids) diff -Nru wine1.7-1.7.15/dlls/schedsvc/schedsvc_private.h wine1.7-1.7.16/dlls/schedsvc/schedsvc_private.h --- wine1.7-1.7.15/dlls/schedsvc/schedsvc_private.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/schedsvc/schedsvc_private.h 2014-04-04 19:13:44.000000000 +0000 @@ -37,6 +37,12 @@ return MIDL_user_allocate(size); } +static void *heap_realloc(void *ptr, SIZE_T size) __WINE_ALLOC_SIZE(2); +static inline void *heap_realloc(void *ptr, SIZE_T size) +{ + return HeapReAlloc(GetProcessHeap(), 0, ptr, size); +} + static inline void heap_free(void *ptr) { MIDL_user_free(ptr); diff -Nru wine1.7-1.7.15/dlls/schedsvc/tests/Makefile.in wine1.7-1.7.16/dlls/schedsvc/tests/Makefile.in --- wine1.7-1.7.15/dlls/schedsvc/tests/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/schedsvc/tests/Makefile.in 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,8 @@ +TESTDLL = schedsvc.dll +IMPORTS = rpcrt4 + +C_SRCS = \ + rpcapi.c + +IDL_SRCS = \ + schrpc.idl diff -Nru wine1.7-1.7.15/dlls/schedsvc/tests/rpcapi.c wine1.7-1.7.16/dlls/schedsvc/tests/rpcapi.c --- wine1.7-1.7.15/dlls/schedsvc/tests/rpcapi.c 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/schedsvc/tests/rpcapi.c 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,493 @@ +/* + * Copyright 2014 Dmitry Timoshkov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include "schrpc.h" + +#include "wine/test.h" + +extern handle_t rpc_handle; + +static LONG CALLBACK rpc_exception_filter(EXCEPTION_POINTERS *ptrs) +{ + skip("Can't connect to Scheduler service: %#x\n", ptrs->ExceptionRecord->ExceptionCode); + + if (winetest_debug) + { + fprintf(stdout, "rpcapi: 0 tests executed (0 marked as todo, 0 failures), 1 skipped.\n"); + fflush(stdout); + } + ExitProcess(0); +} + +START_TEST(rpcapi) +{ + static unsigned char ncalrpc[] = "ncalrpc"; + static const WCHAR empty[] = { 0 }; + static const WCHAR Wine[] = { '\\','W','i','n','e',0 }; + static const WCHAR Wine_Folder1[] = { '\\','W','i','n','e','\\','F','o','l','d','e','r','1',0 }; + static const WCHAR Wine_Folder2[] = { '\\','W','i','n','e','\\','F','o','l','d','e','r','2',0 }; + static const WCHAR Folder1[] = { 'F','o','l','d','e','r','1',0 }; + static const WCHAR Folder2[] = { 'F','o','l','d','e','r','2',0 }; + static const WCHAR Wine_Task1[] = { '\\','W','i','n','e','\\','T','a','s','k','1',0 }; + static const WCHAR Wine_Task2[] = { '\\','W','i','n','e','\\','T','a','s','k','2',0 }; + static const WCHAR Wine_Task3[] = { '\\','W','i','n','e','\\','T','a','s','k','3',0 }; + static const WCHAR Wine_Folder1_Task1[] = { '\\','W','i','n','e','\\','F','o','l','d','e','r','1','\\','T','a','s','k','1',0 }; + static const WCHAR Task1[] = { 'T','a','s','k','1',0 }; + static const WCHAR Task2[] = { 'T','a','s','k','2',0 }; + static const WCHAR Task3[] = { 'T','a','s','k','3',0 }; + static const char xml1[] = + "\n" + "\n" + " \n" + " \"Task1\"\n" + " \n" + " \n" + " false\n" + " false\n" + " \n" + " \n" + " \n" + " \"task1.exe\"\n" + " \n" + " \n" + "\n"; + static const struct + { + DWORD flags, hr; + } create_new_task[] = + { + { 0, S_OK }, + { TASK_CREATE, S_OK }, + { TASK_UPDATE, 0x80070002 /* HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) */ }, + { TASK_CREATE | TASK_UPDATE, S_OK } + }; + static const struct + { + DWORD flags, hr; + } open_existing_task[] = + { + { 0, 0x800700b7 /* HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS) */ }, + { TASK_CREATE, 0x800700b7 /* HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS) */ }, + { TASK_UPDATE, S_OK }, + { TASK_CREATE | TASK_UPDATE, S_OK } + }; + WCHAR xmlW[sizeof(xml1)], *xml; + HRESULT hr; + DWORD version, start_index, count, i, enumed; + WCHAR *path; + TASK_XML_ERROR_INFO *info; + TASK_NAMES names; + unsigned char *binding_str; + PTOP_LEVEL_EXCEPTION_FILTER old_exception_filter; + + hr = RpcStringBindingComposeA(NULL, ncalrpc, NULL, NULL, NULL, &binding_str); + ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#x\n", hr); + hr = RpcBindingFromStringBindingA(binding_str, &rpc_handle); + ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#x\n", hr); + hr = RpcStringFreeA(&binding_str); + ok(hr == RPC_S_OK, "RpcStringFree error %#x\n", hr); + + /* widl generated RpcTryExcept/RpcExcept can't catch raised exceptions */ + old_exception_filter = SetUnhandledExceptionFilter(rpc_exception_filter); + + version = 0; + hr = SchRpcHighestVersion(&version); + ok(version == 0x10002 /* vista */ || version == 0x10003 /* win7 */ || version == 0x10004 /* win8 */, + "wrong version %#x\n", version); + + SetUnhandledExceptionFilter(old_exception_filter); + + hr = SchRpcCreateFolder(Wine_Folder1, NULL, 1); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + + hr = SchRpcCreateFolder(Wine_Folder1, NULL, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + hr = SchRpcCreateFolder(Wine_Folder1, NULL, 0); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + + hr = SchRpcCreateFolder(Wine_Folder2+1, empty, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + hr = SchRpcDelete(Wine+1, 0); + ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#x\n", hr); + + hr = SchRpcDelete(Wine_Folder1+1, 1); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + + hr = SchRpcDelete(Wine_Folder1+1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + hr = SchRpcDelete(Wine_Folder2, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + hr = SchRpcDelete(Wine, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + hr = SchRpcDelete(Wine, 0); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + + hr = SchRpcDelete(empty, 0); + ok(hr == E_ACCESSDENIED /* win7 */ || hr == E_INVALIDARG /* vista */, "expected E_ACCESSDENIED, got %#x\n", hr); + + hr = SchRpcCreateFolder(Wine, NULL, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, sizeof(xmlW)/sizeof(xmlW[0])); + + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine+1, xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!path, "expected NULL, path %p\n", path); + ok(!info, "expected NULL, info %p\n", info); + + for (i = 0; i < sizeof(create_new_task)/sizeof(create_new_task[0]); i++) + { + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine_Task1, xmlW, create_new_task[i].flags, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == create_new_task[i].hr, "%u: expected %#x, got %#x\n", i, create_new_task[i].hr, hr); + + if (hr == S_OK) + { + hr = SchRpcDelete(Wine_Task1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!info, "expected NULL, info %p\n", info); + MIDL_user_free(path); + } + } + + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine_Task1, xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!path, "expected NULL, path %p\n", path); + ok(!info, "expected NULL, info %p\n", info); + + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(NULL, xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!path, "expected NULL, path %p\n", path); + ok(!info, "expected NULL, info %p\n", info); + + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine_Folder1_Task1+1, xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!lstrcmpW(path, Wine_Folder1_Task1) /* win7 */ || !lstrcmpW(path, Wine_Folder1_Task1+1) /* vista */, + "expected \\Wine\\Folder1\\Task1, task actual path %s\n", wine_dbgstr_w(path)); + ok(!info, "expected NULL, info %p\n", info); + MIDL_user_free(path); + + for (i = 0; i < sizeof(open_existing_task)/sizeof(open_existing_task[0]); i++) + { + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine_Folder1_Task1+1, xmlW, open_existing_task[i].flags, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == open_existing_task[i].hr, "%u: expected %#x, got %#x\n", i, open_existing_task[i].hr, hr); + if (hr == S_OK) + { + ok(!lstrcmpW(path, Wine_Folder1_Task1) /* win7 */ || !lstrcmpW(path, Wine_Folder1_Task1+1) /* vista */, + "expected \\Wine\\Folder1\\Task1, task actual path %s\n", wine_dbgstr_w(path)); + MIDL_user_free(path); + } + else + ok(!path, "%u: expected NULL, path %p\n", i, path); + ok(!info, "%u: expected NULL, info %p\n", i, info); + } + + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine_Folder1_Task1+1, xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(!path, "expected NULL, path %p\n", path); + ok(!info, "expected NULL, info %p\n", info); + + count = 0; + xml = NULL; + hr = SchRpcRetrieveTask(Wine_Folder1_Task1, empty, &count, &xml); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + if (hr == S_OK) trace("%s\n", wine_dbgstr_w(xml)); + MIDL_user_free(xml); + + hr = SchRpcDelete(Wine_Folder1_Task1+1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + hr = SchRpcDelete(Wine_Folder1+1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + hr = SchRpcDelete(Wine+1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumFolders(Wine, TASK_ENUM_HIDDEN, &start_index, 0, &count, &names); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + ok(!count, "expected 0, got %u\n", count); + ok(!start_index, "expected 0, got %u\n", start_index); + ok(!names, "expected NULL, got %p\n", names); + + hr = SchRpcCreateFolder(Wine, NULL, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumFolders(Wine, 0, &start_index, 0, &count, &names); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!count, "expected 0, got %u\n", count); + ok(!start_index, "expected 0, got %u\n", start_index); + ok(!names, "expected NULL, got %p\n", names); + + hr = SchRpcCreateFolder(Wine_Folder1, NULL, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + hr = SchRpcCreateFolder(Wine_Folder2, NULL, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumFolders(Wine, 0, &start_index, 0, &count, &names); + ok(hr == S_OK, "expected S_FALSE, got %#x\n", hr); + ok(count == 2, "expected 2, got %u\n", count); + ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + enumed = 0; + for (i = 0; i < count; i++) + { + if (!lstrcmpW(names[i], Folder1)) + enumed += 1; + else if (!lstrcmpW(names[i], Folder2)) + enumed += 2; + MIDL_user_free(names[i]); + } + MIDL_user_free(names); + ok(enumed == 3, "expected 3, got %u\n", enumed); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumFolders(Wine, 0, &start_index, 1, &count, &names); + ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); + ok(count == 1, "expected 1, got %u\n", count); + ok(start_index == 1, "expected 1, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + ok(!lstrcmpW(names[0], Folder1), "expected Folder1, got %s\n", wine_dbgstr_w(names[0])); + MIDL_user_free(names[0]); + MIDL_user_free(names); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumFolders(Wine, 0, &start_index, 2, &count, &names); + ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); + ok(count == 2, "expected 2, got %u\n", count); + ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + enumed = 0; + for (i = 0; i < count; i++) + { + if (!lstrcmpW(names[i], Folder1)) + enumed += 1; + else if (!lstrcmpW(names[i], Folder2)) + enumed += 2; + MIDL_user_free(names[i]); + } + MIDL_user_free(names); + ok(enumed == 3, "expected 3, got %u\n", enumed); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumFolders(Wine, 0, &start_index, 10, &count, &names); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(count == 2, "expected 2, got %u\n", count); + ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + enumed = 0; + for (i = 0; i < count; i++) + { + if (!lstrcmpW(names[i], Folder1)) + enumed += 1; + else if (!lstrcmpW(names[i], Folder2)) + enumed += 2; + MIDL_user_free(names[i]); + } + MIDL_user_free(names); + ok(enumed == 3, "expected 3, got %u\n", enumed); + + start_index = 10; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumFolders(Wine, 0, &start_index, 0, &count, &names); + ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); + ok(!count, "expected 0, got %u\n", count); + ok(start_index == 10, "expected 10, got %u\n", start_index); + ok(!names, "expected NULL, got %p\n", names); + + hr = SchRpcDelete(Wine_Folder1+1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + hr = SchRpcDelete(Wine_Folder2, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumTasks(Wine_Folder1, TASK_ENUM_HIDDEN, &start_index, 0, &count, &names); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + ok(!count, "expected 0, got %u\n", count); + ok(!start_index, "expected 0, got %u\n", start_index); + ok(!names, "expected NULL, got %p\n", names); + + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine_Task1+1, xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!lstrcmpW(path, Wine_Task1) /* win7 */ || !lstrcmpW(path, Wine_Task1+1) /* vista */, + "expected \\Wine\\Task1, task actual path %s\n", wine_dbgstr_w(path)); + ok(!info, "expected NULL, info %p\n", info); + MIDL_user_free(path); + + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine_Task2, xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!lstrcmpW(path, Wine_Task2), "expected \\Wine\\Task2, task actual path %s\n", wine_dbgstr_w(path)); + ok(!info, "expected NULL, info %p\n", info); + MIDL_user_free(path); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumTasks(Wine, 0, &start_index, 0, &count, &names); + ok(hr == S_OK, "expected S_FALSE, got %#x\n", hr); + ok(count == 2, "expected 2, got %u\n", count); + ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + enumed = 0; + for (i = 0; i < count; i++) + { + if (!lstrcmpW(names[i], Task1)) + enumed += 1; + else if (!lstrcmpW(names[i], Task2)) + enumed += 2; + MIDL_user_free(names[i]); + } + MIDL_user_free(names); + ok(enumed == 3, "expected 3, got %u\n", enumed); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumTasks(Wine, 0, &start_index, 1, &count, &names); + ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); + ok(count == 1, "expected 1, got %u\n", count); + ok(start_index == 1, "expected 1, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + ok(!lstrcmpW(names[0], Task1), "expected Task1, got %s\n", wine_dbgstr_w(names[0])); + MIDL_user_free(names[0]); + MIDL_user_free(names); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumTasks(Wine, 0, &start_index, 2, &count, &names); + ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); + ok(count == 2, "expected 2, got %u\n", count); + ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + enumed = 0; + for (i = 0; i < count; i++) + { + if (!lstrcmpW(names[i], Task1)) + enumed += 1; + else if (!lstrcmpW(names[i], Task2)) + enumed += 2; + MIDL_user_free(names[i]); + } + MIDL_user_free(names); + ok(enumed == 3, "expected 3, got %u\n", enumed); + + start_index = 0; + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumTasks(Wine, 0, &start_index, 10, &count, &names); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(count == 2, "expected 2, got %u\n", count); + ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + enumed = 0; + for (i = 0; i < count; i++) + { + if (!lstrcmpW(names[i], Task1)) + enumed += 1; + else if (!lstrcmpW(names[i], Task2)) + enumed += 2; + MIDL_user_free(names[i]); + } + MIDL_user_free(names); + ok(enumed == 3, "expected 3, got %u\n", enumed); + + path = NULL; + info = NULL; + hr = SchRpcRegisterTask(Wine_Task3+1, xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(!lstrcmpW(path, Wine_Task3) /* win7 */ || !lstrcmpW(path, Wine_Task3+1) /* vista */, + "expected \\Wine\\Task3, task actual path %s\n", wine_dbgstr_w(path)); + ok(!info, "expected NULL, info %p\n", info); + MIDL_user_free(path); + + count = 0xdeadbeef; + names = NULL; + hr = SchRpcEnumTasks(Wine+1, 0, &start_index, 10, &count, &names); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(count == 1, "expected 1, got %u\n", count); + ok(start_index == 3, "expected 3, got %u\n", start_index); + ok(names != NULL, "names should not be NULL\n"); + ok(!lstrcmpW(names[0], Task3), "expected Task3, got %s\n", wine_dbgstr_w(names[0])); + MIDL_user_free(names[0]); + MIDL_user_free(names); + + hr = SchRpcDelete(Wine_Task1+1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + hr = SchRpcDelete(Wine_Task2+1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + hr = SchRpcDelete(Wine_Task3+1, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + hr = SchRpcDelete(Wine, 0); + ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + + hr = RpcBindingFree(&rpc_handle); + ok(hr == RPC_S_OK, "RpcBindingFree error %#x\n", hr); +} + +void __RPC_FAR *__RPC_USER MIDL_user_allocate(SIZE_T n) +{ + return HeapAlloc(GetProcessHeap(), 0, n); +} + +void __RPC_USER MIDL_user_free(void __RPC_FAR *p) +{ + HeapFree(GetProcessHeap(), 0, p); +} diff -Nru wine1.7-1.7.15/dlls/schedsvc/tests/schrpc.idl wine1.7-1.7.16/dlls/schedsvc/tests/schrpc.idl --- wine1.7-1.7.15/dlls/schedsvc/tests/schrpc.idl 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/dlls/schedsvc/tests/schrpc.idl 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,3 @@ +#pragma makedep client + +#include "wine/schrpc.idl" diff -Nru wine1.7-1.7.15/dlls/scrrun/filesystem.c wine1.7-1.7.16/dlls/scrrun/filesystem.c --- wine1.7-1.7.15/dlls/scrrun/filesystem.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/scrrun/filesystem.c 2014-04-04 19:13:44.000000000 +0000 @@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(scrrun); static const WCHAR bsW[] = {'\\',0}; +static const WCHAR utf16bom = 0xfeff; struct foldercollection { IFolderCollection IFolderCollection_iface; @@ -110,7 +111,7 @@ IOMode mode; BOOL unicode; - BOOL first_write; + BOOL first_read; LARGE_INTEGER size; HANDLE file; }; @@ -360,37 +361,178 @@ return E_NOTIMPL; } +/* + Reads 'toread' bytes from a file, converts if needed + BOM is skipped if 'bof' is set. + */ +static HRESULT textstream_read(struct textstream *stream, LONG toread, BOOL bof, BSTR *text) +{ + HRESULT hr = S_OK; + DWORD read; + char *buff; + BOOL ret; + + if (toread == 0) { + *text = SysAllocStringLen(NULL, 0); + return *text ? S_FALSE : E_OUTOFMEMORY; + } + + if (toread < sizeof(WCHAR)) + return CTL_E_ENDOFFILE; + + buff = heap_alloc(toread); + if (!buff) + return E_OUTOFMEMORY; + + ret = ReadFile(stream->file, buff, toread, &read, NULL); + if (!ret || toread != read) { + WARN("failed to read from file %d, %d, error %d\n", read, toread, GetLastError()); + heap_free(buff); + return E_FAIL; + } + + if (stream->unicode) { + int i = 0; + + /* skip BOM */ + if (bof && *(WCHAR*)buff == utf16bom) { + read -= sizeof(WCHAR); + i += sizeof(WCHAR); + } + + *text = SysAllocStringLen(read ? (WCHAR*)&buff[i] : NULL, read/sizeof(WCHAR)); + if (!*text) hr = E_OUTOFMEMORY; + } + else { + INT len = MultiByteToWideChar(CP_ACP, 0, buff, read, NULL, 0); + *text = SysAllocStringLen(NULL, len); + if (*text) + MultiByteToWideChar(CP_ACP, 0, buff, read, *text, len); + else + hr = E_OUTOFMEMORY; + } + heap_free(buff); + + return hr; +} + static HRESULT WINAPI textstream_Read(ITextStream *iface, LONG len, BSTR *text) { struct textstream *This = impl_from_ITextStream(iface); - FIXME("(%p)->(%p): stub\n", This, text); + LARGE_INTEGER start, end, dist; + DWORD toread; + HRESULT hr; + + TRACE("(%p)->(%d %p)\n", This, len, text); + + if (!text) + return E_POINTER; + + *text = NULL; + if (len <= 0) + return len == 0 ? S_OK : E_INVALIDARG; if (textstream_check_iomode(This, IORead)) return CTL_E_BADFILEMODE; - return E_NOTIMPL; + if (!This->first_read) { + VARIANT_BOOL eos; + + /* check for EOF */ + hr = ITextStream_get_AtEndOfStream(iface, &eos); + if (FAILED(hr)) + return hr; + + if (eos == VARIANT_TRUE) + return CTL_E_ENDOFFILE; + } + + /* read everything from current position */ + dist.QuadPart = 0; + SetFilePointerEx(This->file, dist, &start, FILE_CURRENT); + SetFilePointerEx(This->file, dist, &end, FILE_END); + toread = end.QuadPart - start.QuadPart; + /* rewind back */ + dist.QuadPart = start.QuadPart; + SetFilePointerEx(This->file, dist, NULL, FILE_BEGIN); + + This->first_read = FALSE; + if (This->unicode) len *= sizeof(WCHAR); + + hr = textstream_read(This, min(toread, len), start.QuadPart == 0, text); + if (FAILED(hr)) + return hr; + else + return toread <= len ? S_FALSE : S_OK; } static HRESULT WINAPI textstream_ReadLine(ITextStream *iface, BSTR *text) { struct textstream *This = impl_from_ITextStream(iface); + VARIANT_BOOL eos; + HRESULT hr; + FIXME("(%p)->(%p): stub\n", This, text); + if (!text) + return E_POINTER; + + *text = NULL; if (textstream_check_iomode(This, IORead)) return CTL_E_BADFILEMODE; + /* check for EOF */ + hr = ITextStream_get_AtEndOfStream(iface, &eos); + if (FAILED(hr)) + return hr; + + if (eos == VARIANT_TRUE) + return CTL_E_ENDOFFILE; + return E_NOTIMPL; } static HRESULT WINAPI textstream_ReadAll(ITextStream *iface, BSTR *text) { struct textstream *This = impl_from_ITextStream(iface); - FIXME("(%p)->(%p): stub\n", This, text); + LARGE_INTEGER start, end, dist; + DWORD toread; + HRESULT hr; + + TRACE("(%p)->(%p)\n", This, text); + + if (!text) + return E_POINTER; + *text = NULL; if (textstream_check_iomode(This, IORead)) return CTL_E_BADFILEMODE; - return E_NOTIMPL; + if (!This->first_read) { + VARIANT_BOOL eos; + + /* check for EOF */ + hr = ITextStream_get_AtEndOfStream(iface, &eos); + if (FAILED(hr)) + return hr; + + if (eos == VARIANT_TRUE) + return CTL_E_ENDOFFILE; + } + + /* read everything from current position */ + dist.QuadPart = 0; + SetFilePointerEx(This->file, dist, &start, FILE_CURRENT); + SetFilePointerEx(This->file, dist, &end, FILE_END); + toread = end.QuadPart - start.QuadPart; + /* rewind back */ + dist.QuadPart = start.QuadPart; + SetFilePointerEx(This->file, dist, NULL, FILE_BEGIN); + + This->first_read = FALSE; + + hr = textstream_read(This, toread, start.QuadPart == 0, text); + return FAILED(hr) ? hr : S_FALSE; } static HRESULT textstream_writestr(struct textstream *stream, BSTR text) @@ -399,15 +541,6 @@ BOOL ret; if (stream->unicode) { - if (stream->first_write) { - static const WCHAR utf16bom = 0xfeff; - DWORD written = 0; - BOOL ret = WriteFile(stream->file, &utf16bom, sizeof(utf16bom), &written, NULL); - if (!ret || written != sizeof(utf16bom)) - return create_error(GetLastError()); - stream->first_write = FALSE; - } - ret = WriteFile(stream->file, text, SysStringByteLen(text), &written, NULL); return (ret && written == SysStringByteLen(text)) ? S_OK : create_error(GetLastError()); } else { @@ -555,7 +688,7 @@ stream->ref = 1; stream->mode = mode; stream->unicode = unicode; - stream->first_write = TRUE; + stream->first_read = TRUE; stream->file = CreateFileW(filename, access, 0, NULL, disposition, FILE_ATTRIBUTE_NORMAL, NULL); if (stream->file == INVALID_HANDLE_VALUE) @@ -570,6 +703,16 @@ else stream->size.QuadPart = 0; + /* Write Unicode BOM */ + if (unicode && mode == ForWriting && (disposition == CREATE_ALWAYS || disposition == CREATE_NEW)) { + DWORD written = 0; + BOOL ret = WriteFile(stream->file, &utf16bom, sizeof(utf16bom), &written, NULL); + if (!ret || written != sizeof(utf16bom)) { + ITextStream_Release(&stream->ITextStream_iface); + return create_error(GetLastError()); + } + } + *ret = &stream->ITextStream_iface; return S_OK; } @@ -687,8 +830,17 @@ static HRESULT WINAPI drive_get_DriveLetter(IDrive *iface, BSTR *letter) { struct drive *This = impl_from_IDrive(iface); - FIXME("(%p)->(%p): stub\n", This, letter); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, letter); + + if (!letter) + return E_POINTER; + + *letter = SysAllocStringLen(This->root, 1); + if (!*letter) + return E_OUTOFMEMORY; + + return S_OK; } static HRESULT WINAPI drive_get_ShareName(IDrive *iface, BSTR *share_name) @@ -736,25 +888,55 @@ return E_NOTIMPL; } -static HRESULT WINAPI drive_get_AvailableSpace(IDrive *iface, VARIANT *avail) +static HRESULT WINAPI drive_get_AvailableSpace(IDrive *iface, VARIANT *v) { struct drive *This = impl_from_IDrive(iface); - FIXME("(%p)->(%p): stub\n", This, avail); - return E_NOTIMPL; + ULARGE_INTEGER avail; + + TRACE("(%p)->(%p)\n", This, v); + + if (!v) + return E_POINTER; + + if (!GetDiskFreeSpaceExW(This->root, &avail, NULL, NULL)) + return E_FAIL; + + V_VT(v) = VT_R8; + return VarR8FromUI8(avail.QuadPart, &V_R8(v)); } static HRESULT WINAPI drive_get_FreeSpace(IDrive *iface, VARIANT *v) { struct drive *This = impl_from_IDrive(iface); - FIXME("(%p)->(%p): stub\n", This, v); - return E_NOTIMPL; + ULARGE_INTEGER freespace; + + TRACE("(%p)->(%p)\n", This, v); + + if (!v) + return E_POINTER; + + if (!GetDiskFreeSpaceExW(This->root, &freespace, NULL, NULL)) + return E_FAIL; + + V_VT(v) = VT_R8; + return VarR8FromUI8(freespace.QuadPart, &V_R8(v)); } static HRESULT WINAPI drive_get_TotalSize(IDrive *iface, VARIANT *v) { struct drive *This = impl_from_IDrive(iface); - FIXME("(%p)->(%p): stub\n", This, v); - return E_NOTIMPL; + ULARGE_INTEGER total; + + TRACE("(%p)->(%p)\n", This, v); + + if (!v) + return E_POINTER; + + if (!GetDiskFreeSpaceExW(This->root, NULL, &total, NULL)) + return E_FAIL; + + V_VT(v) = VT_R8; + return VarR8FromUI8(total.QuadPart, &V_R8(v)); } static HRESULT WINAPI drive_get_VolumeName(IDrive *iface, BSTR *name) @@ -788,8 +970,17 @@ static HRESULT WINAPI drive_get_IsReady(IDrive *iface, VARIANT_BOOL *ready) { struct drive *This = impl_from_IDrive(iface); - FIXME("(%p)->(%p): stub\n", This, ready); - return E_NOTIMPL; + ULARGE_INTEGER freespace; + BOOL ret; + + TRACE("(%p)->(%p)\n", This, ready); + + if (!ready) + return E_POINTER; + + ret = GetDiskFreeSpaceExW(This->root, &freespace, NULL, NULL); + *ready = ret ? VARIANT_TRUE : VARIANT_FALSE; + return S_OK; } static const IDriveVtbl drivevtbl = { @@ -2456,11 +2647,18 @@ return E_NOTIMPL; } -static HRESULT WINAPI file_OpenAsTextStream(IFile *iface, IOMode IOMode, Tristate Format, ITextStream **ppts) +static HRESULT WINAPI file_OpenAsTextStream(IFile *iface, IOMode mode, Tristate format, ITextStream **stream) { struct file *This = impl_from_IFile(iface); - FIXME("(%p)->(%x %x %p)\n", This, IOMode, Format, ppts); - return E_NOTIMPL; + + TRACE("(%p)->(%d %d %p)\n", This, mode, format, stream); + + if (format == TristateUseDefault) { + FIXME("default format not handled, defaulting to unicode\n"); + format = TristateTrue; + } + + return create_textstream(This->path, OPEN_EXISTING, mode, format == TristateTrue, stream); } static const IFileVtbl file_vtbl = { @@ -3182,8 +3380,10 @@ return CTL_E_FILENOTFOUND; src_len = get_parent_folder_name(source, source_len); - if(src_len+1 >= MAX_PATH) + if(src_len+1 >= MAX_PATH) { + FindClose(f); return E_FAIL; + } if(src_len) { memcpy(src_path, source, src_len*sizeof(WCHAR)); src_path[src_len++] = '\\'; @@ -3326,10 +3526,9 @@ FindClose(f); return CTL_E_FILEALREADYEXISTS; } - }else { - FindClose(f); - return create_error(GetLastError()); } + + FindClose(f); return create_error(GetLastError()); } copied = TRUE; diff -Nru wine1.7-1.7.15/dlls/scrrun/scrrun.idl wine1.7-1.7.16/dlls/scrrun/scrrun.idl --- wine1.7-1.7.15/dlls/scrrun/scrrun.idl 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/scrrun/scrrun.idl 2014-04-04 19:13:44.000000000 +0000 @@ -27,6 +27,7 @@ cpp_quote("#undef DeleteFile") cpp_quote("#undef MoveFile") cpp_quote("#endif") +cpp_quote("#define CTL_E_ENDOFFILE STD_CTL_SCODE(62)") /* this is not defined in public headers */ [ uuid(420B2830-E718-11CF-893D-00A0C9054228), diff -Nru wine1.7-1.7.15/dlls/scrrun/tests/filesystem.c wine1.7-1.7.16/dlls/scrrun/tests/filesystem.c --- wine1.7-1.7.15/dlls/scrrun/tests/filesystem.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/scrrun/tests/filesystem.c 2014-04-04 19:13:44.000000000 +0000 @@ -40,6 +40,8 @@ return IUnknown_Release(iface); } +static const WCHAR crlfW[] = {'\r','\n',0}; + #define GET_REFCOUNT(iface) \ get_refcount((IUnknown*)iface) @@ -1233,6 +1235,67 @@ hr = IEnumVARIANT_Skip(enumvar, 1); ok(hr == S_FALSE, "got 0x%08x\n", hr); + /* reset and iterate again */ + hr = IEnumVARIANT_Reset(enumvar); + ok(hr == S_OK, "got 0x%08x\n", hr); + + while (IEnumVARIANT_Next(enumvar, 1, &var, &fetched) == S_OK) { + IDrive *drive = (IDrive*)V_DISPATCH(&var); + DriveTypeConst type; + BSTR str; + + hr = IDrive_get_DriveType(drive, &type); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = IDrive_get_DriveLetter(drive, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IDrive_get_DriveLetter(drive, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(SysStringLen(str) == 1, "got string %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + + hr = IDrive_get_IsReady(drive, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IDrive_get_TotalSize(drive, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IDrive_get_AvailableSpace(drive, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = IDrive_get_FreeSpace(drive, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + if (type == Fixed) { + VARIANT_BOOL ready = VARIANT_FALSE; + VARIANT size; + + hr = IDrive_get_IsReady(drive, &ready); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(ready == VARIANT_TRUE, "got %x\n", ready); + + V_VT(&size) = VT_EMPTY; + hr = IDrive_get_TotalSize(drive, &size); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&size) == VT_R8, "got %d\n", V_VT(&size)); + ok(V_R8(&size) > 0, "got %f\n", V_R8(&size)); + + V_VT(&size) = VT_EMPTY; + hr = IDrive_get_AvailableSpace(drive, &size); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&size) == VT_R8, "got %d\n", V_VT(&size)); + ok(V_R8(&size) > 0, "got %f\n", V_R8(&size)); + + V_VT(&size) = VT_EMPTY; + hr = IDrive_get_FreeSpace(drive, &size); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(V_VT(&size) == VT_R8, "got %d\n", V_VT(&size)); + ok(V_R8(&size) > 0, "got %f\n", V_R8(&size)); + } + VariantClear(&var); + } + IEnumVARIANT_Release(enumvar); IDriveCollection_Release(drives); } @@ -1241,6 +1304,7 @@ { static const WCHAR scrrunW[] = {'s','c','r','r','u','n','\\',0}; static const WCHAR testfileW[] = {'t','e','s','t','.','t','x','t',0}; + static const WCHAR bomAW[] = {0xff,0xfe,0}; WCHAR pathW[MAX_PATH], dirW[MAX_PATH]; ITextStream *stream; BSTR nameW, str; @@ -1283,6 +1347,19 @@ ok(hr == S_OK, "got 0x%08x\n", hr); ITextStream_Release(stream); + /* overwrite in Unicode mode, check for BOM */ + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + ITextStream_Release(stream); + + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = ITextStream_ReadAll(stream, &str); + ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr); + ok(!lstrcmpW(str, bomAW), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + ITextStream_Release(stream); + DeleteFileW(nameW); RemoveDirectoryW(dirW); SysFreeString(nameW); @@ -1292,7 +1369,6 @@ { static const WCHAR scrrunW[] = {'s','c','r','r','u','n','\\',0}; static const WCHAR testfileW[] = {'t','e','s','t','.','t','x','t',0}; - static const WCHAR crlfW[] = {'\r','\n',0}; WCHAR pathW[MAX_PATH], dirW[MAX_PATH]; WCHAR buffW[MAX_PATH], buff2W[MAX_PATH]; char buffA[MAX_PATH]; @@ -1363,6 +1439,285 @@ SysFreeString(nameW); } +static void test_ReadAll(void) +{ + static const WCHAR scrrunW[] = {'s','c','r','r','u','n','\\',0}; + static const WCHAR testfileW[] = {'t','e','s','t','.','t','x','t',0}; + static const WCHAR secondlineW[] = {'s','e','c','o','n','d',0}; + static const WCHAR aW[] = {'A',0}; + WCHAR pathW[MAX_PATH], dirW[MAX_PATH], buffW[500]; + ITextStream *stream; + BSTR nameW; + HRESULT hr; + BOOL ret; + BSTR str; + + GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW); + lstrcatW(pathW, scrrunW); + lstrcpyW(dirW, pathW); + lstrcatW(pathW, testfileW); + + ret = CreateDirectoryW(dirW, NULL); + ok(ret, "got %d, %d\n", ret, GetLastError()); + + /* Unicode file -> read with ascii stream */ + nameW = SysAllocString(pathW); + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = ITextStream_WriteLine(stream, nameW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str = SysAllocString(secondlineW); + hr = ITextStream_WriteLine(stream, str); + ok(hr == S_OK, "got 0x%08x\n", hr); + SysFreeString(str); + + hr = ITextStream_ReadAll(stream, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + str = (void*)0xdeadbeef; + hr = ITextStream_ReadAll(stream, &str); + ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr); + ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str); + + ITextStream_Release(stream); + + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = ITextStream_ReadAll(stream, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + /* Buffer content is not interpreted - BOM is kept, all data is converted to WCHARs */ + str = NULL; + hr = ITextStream_ReadAll(stream, &str); + ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr); + ok(str[0] == 0x00ff && str[1] == 0x00fe, "got %s, %d\n", wine_dbgstr_w(str), SysStringLen(str)); + SysFreeString(str); + ITextStream_Release(stream); + + /* Unicode file -> read with unicode stream */ + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + lstrcpyW(buffW, nameW); + lstrcatW(buffW, crlfW); + lstrcatW(buffW, secondlineW); + lstrcatW(buffW, crlfW); + str = NULL; + hr = ITextStream_ReadAll(stream, &str); + ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr); + ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + + /* ReadAll one more time */ + str = (void*)0xdeadbeef; + hr = ITextStream_ReadAll(stream, &str); + ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr); + ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str); + + /* ReadLine fails the same way */ + str = (void*)0xdeadbeef; + hr = ITextStream_ReadLine(stream, &str); + ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr); + ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str); + ITextStream_Release(stream); + + /* Open again and skip first line before ReadAll */ + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str = NULL; + hr = ITextStream_ReadLine(stream, &str); +todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(str != NULL, "got %p\n", str); +} + SysFreeString(str); + + lstrcpyW(buffW, secondlineW); + lstrcatW(buffW, crlfW); + str = NULL; + hr = ITextStream_ReadAll(stream, &str); + ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr); +todo_wine + ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + ITextStream_Release(stream); + + /* ASCII file, read with Unicode stream */ + /* 1. one byte content, not enough for Unicode read */ + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + str = SysAllocString(aW); + hr = ITextStream_Write(stream, str); + SysFreeString(str); + ITextStream_Release(stream); + + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str = (void*)0xdeadbeef; + hr = ITextStream_ReadAll(stream, &str); + ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr); + ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str); + + ITextStream_Release(stream); + + DeleteFileW(nameW); + RemoveDirectoryW(dirW); + SysFreeString(nameW); +} + +static void test_Read(void) +{ + static const WCHAR scrrunW[] = {'s','c','r','r','u','n','\\',0}; + static const WCHAR testfileW[] = {'t','e','s','t','.','t','x','t',0}; + static const WCHAR secondlineW[] = {'s','e','c','o','n','d',0}; + static const WCHAR aW[] = {'A',0}; + WCHAR pathW[MAX_PATH], dirW[MAX_PATH], buffW[500]; + ITextStream *stream; + BSTR nameW; + HRESULT hr; + BOOL ret; + BSTR str; + + GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW); + lstrcatW(pathW, scrrunW); + lstrcpyW(dirW, pathW); + lstrcatW(pathW, testfileW); + + ret = CreateDirectoryW(dirW, NULL); + ok(ret, "got %d, %d\n", ret, GetLastError()); + + /* Unicode file -> read with ascii stream */ + nameW = SysAllocString(pathW); + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_TRUE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = ITextStream_WriteLine(stream, nameW); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str = SysAllocString(secondlineW); + hr = ITextStream_WriteLine(stream, str); + ok(hr == S_OK, "got 0x%08x\n", hr); + SysFreeString(str); + + hr = ITextStream_Read(stream, 0, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = ITextStream_Read(stream, 1, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + hr = ITextStream_Read(stream, -1, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + str = (void*)0xdeadbeef; + hr = ITextStream_Read(stream, 1, &str); + ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr); + ok(str == NULL, "got %p\n", str); + + ITextStream_Release(stream); + + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + hr = ITextStream_Read(stream, 1, NULL); + ok(hr == E_POINTER, "got 0x%08x\n", hr); + + str = (void*)0xdeadbeef; + hr = ITextStream_Read(stream, -1, &str); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(str == NULL, "got %p\n", str); + + str = (void*)0xdeadbeef; + hr = ITextStream_Read(stream, 0, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(str == NULL, "got %p\n", str); + + /* Buffer content is not interpreted - BOM is kept, all data is converted to WCHARs */ + str = NULL; + hr = ITextStream_Read(stream, 2, &str); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(str[0] == 0x00ff && str[1] == 0x00fe, "got %s, %d\n", wine_dbgstr_w(str), SysStringLen(str)); + ok(SysStringLen(str) == 2, "got %d\n", SysStringLen(str)); + SysFreeString(str); + ITextStream_Release(stream); + + /* Unicode file -> read with unicode stream */ + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + lstrcpyW(buffW, nameW); + lstrcatW(buffW, crlfW); + lstrcatW(buffW, secondlineW); + lstrcatW(buffW, crlfW); + str = NULL; + hr = ITextStream_Read(stream, 500, &str); + ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr); + ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + + /* ReadAll one more time */ + str = (void*)0xdeadbeef; + hr = ITextStream_Read(stream, 10, &str); + ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr); + ok(str == NULL, "got %p\n", str); + + /* ReadLine fails the same way */ + str = (void*)0xdeadbeef; + hr = ITextStream_ReadLine(stream, &str); + ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr); + ok(str == NULL || broken(str == (void*)0xdeadbeef), "got %p\n", str); + ITextStream_Release(stream); + + /* Open again and skip first line before ReadAll */ + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str = NULL; + hr = ITextStream_ReadLine(stream, &str); +todo_wine { + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(str != NULL, "got %p\n", str); +} + SysFreeString(str); + + lstrcpyW(buffW, secondlineW); + lstrcatW(buffW, crlfW); + str = NULL; + hr = ITextStream_Read(stream, 100, &str); + ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr); +todo_wine + ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str)); + SysFreeString(str); + ITextStream_Release(stream); + + /* ASCII file, read with Unicode stream */ + /* 1. one byte content, not enough for Unicode read */ + hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + str = SysAllocString(aW); + hr = ITextStream_Write(stream, str); + SysFreeString(str); + ITextStream_Release(stream); + + hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream); + ok(hr == S_OK, "got 0x%08x\n", hr); + + str = (void*)0xdeadbeef; + hr = ITextStream_Read(stream, 500, &str); + ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr); + ok(str == NULL, "got %p\n", str); + + ITextStream_Release(stream); + + DeleteFileW(nameW); + RemoveDirectoryW(dirW); + SysFreeString(nameW); +} + START_TEST(filesystem) { HRESULT hr; @@ -1393,6 +1748,8 @@ test_DriveCollection(); test_CreateTextFile(); test_WriteLine(); + test_ReadAll(); + test_Read(); IFileSystem3_Release(fs3); diff -Nru wine1.7-1.7.15/dlls/scrrun/tests/scrrun.idl wine1.7-1.7.16/dlls/scrrun/tests/scrrun.idl --- wine1.7-1.7.15/dlls/scrrun/tests/scrrun.idl 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/scrrun/tests/scrrun.idl 2014-04-04 19:13:44.000000000 +0000 @@ -24,6 +24,7 @@ cpp_quote("#undef DeleteFile") cpp_quote("#undef MoveFile") cpp_quote("#endif") +cpp_quote("#define CTL_E_ENDOFFILE STD_CTL_SCODE(62)") /* this is not defined in public headers */ [ uuid(420B2830-E718-11CF-893D-00A0C9054228), diff -Nru wine1.7-1.7.15/dlls/setupapi/fakedll.c wine1.7-1.7.16/dlls/setupapi/fakedll.c --- wine1.7-1.7.15/dlls/setupapi/fakedll.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/setupapi/fakedll.c 2014-04-04 19:13:44.000000000 +0000 @@ -275,8 +275,14 @@ nt = info.nt = (IMAGE_NT_HEADERS *)(buffer + lfanew); /* some fields are copied from the source dll */ -#ifdef _WIN64 +#if defined __x86_64__ nt->FileHeader.Machine = IMAGE_FILE_MACHINE_AMD64; +#elif defined __aarch64__ + nt->FileHeader.Machine = IMAGE_FILE_MACHINE_ARM64; +#elif defined __arm__ + nt->FileHeader.Machine = IMAGE_FILE_MACHINE_ARMNT; +#elif defined __powerpc__ + nt->FileHeader.Machine = IMAGE_FILE_MACHINE_POWERPC; #else nt->FileHeader.Machine = IMAGE_FILE_MACHINE_I386; #endif diff -Nru wine1.7-1.7.15/dlls/setupapi/misc.c wine1.7-1.7.16/dlls/setupapi/misc.c --- wine1.7-1.7.15/dlls/setupapi/misc.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/setupapi/misc.c 2014-04-04 19:13:44.000000000 +0000 @@ -1412,7 +1412,8 @@ return ERROR_INVALID_PARAMETER; ret = SetupGetFileCompressionInfoExW( source, NULL, 0, &required, NULL, NULL, NULL ); - if (!(actual_name = MyMalloc( required ))) return ERROR_NOT_ENOUGH_MEMORY; + if (!(actual_name = MyMalloc( required * sizeof(WCHAR) ))) + return ERROR_NOT_ENOUGH_MEMORY; ret = SetupGetFileCompressionInfoExW( source, actual_name, required, &required, source_size, target_size, type ); diff -Nru wine1.7-1.7.15/dlls/shell32/shell32.spec wine1.7-1.7.16/dlls/shell32/shell32.spec --- wine1.7-1.7.15/dlls/shell32/shell32.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/shell32/shell32.spec 2014-04-04 19:13:44.000000000 +0000 @@ -347,7 +347,7 @@ @ stdcall SHCreateShellItemArrayFromShellItem(ptr ptr ptr) @ stdcall SHEmptyRecycleBinA(long str long) @ stdcall SHEmptyRecycleBinW(long wstr long) -@ stub SHExtractIconsW +@ stdcall SHExtractIconsW(wstr long long long ptr ptr long long) user32.PrivateExtractIconsW @ stdcall SHFileOperation(ptr) SHFileOperationA @ stdcall SHFileOperationA(ptr) @ stdcall SHFileOperationW(ptr) diff -Nru wine1.7-1.7.15/dlls/shell32/shellpath.c wine1.7-1.7.16/dlls/shell32/shellpath.c --- wine1.7-1.7.15/dlls/shell32/shellpath.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/shell32/shellpath.c 2014-04-04 19:13:44.000000000 +0000 @@ -2265,8 +2265,8 @@ if (FAILED(hr)) goto end; if(pszSubPath) { - /* make sure the new path does not exceed th bufferlength - * rememebr to backslash and the termination */ + /* make sure the new path does not exceed the buffer length + * and remember to backslash and terminate it */ if(MAX_PATH < (lstrlenW(szBuildPath) + lstrlenW(pszSubPath) + 2)) { hr = HRESULT_FROM_WIN32(ERROR_FILENAME_EXCED_RANGE); goto end; diff -Nru wine1.7-1.7.15/dlls/shell32/shfldr_unixfs.c wine1.7-1.7.16/dlls/shell32/shfldr_unixfs.c --- wine1.7-1.7.15/dlls/shell32/shfldr_unixfs.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/shell32/shfldr_unixfs.c 2014-04-04 19:13:44.000000000 +0000 @@ -170,9 +170,6 @@ #if !defined(__MINGW32__) && !defined(_MSC_VER) -#define ADJUST_THIS(c,m,p) ((c*)(((long)p)-(long)&(((c*)0)->lp##m##Vtbl))) -#define STATIC_CAST(i,p) ((i*)&p->lp##i##Vtbl) - #define LEN_SHITEMID_FIXED_PART ((USHORT) \ ( sizeof(USHORT) /* SHITEMID's cb field. */ \ + sizeof(PIDLTYPE) /* PIDLDATA's type field. */ \ @@ -971,14 +968,12 @@ return result; } -static IUnknown *UnixSubFolderIterator_Constructor(UnixFolder *pUnixFolder, SHCONTF fFilter); +static IEnumIDList *UnixSubFolderIterator_Constructor(UnixFolder *pUnixFolder, SHCONTF fFilter); static HRESULT WINAPI ShellFolder2_EnumObjects(IShellFolder2* iface, HWND hwndOwner, SHCONTF grfFlags, IEnumIDList** ppEnumIDList) { UnixFolder *This = impl_from_IShellFolder2(iface); - IUnknown *newIterator; - HRESULT hr; TRACE("(%p)->(%p 0x%08x %p)\n", This, hwndOwner, grfFlags, ppEnumIDList); @@ -987,11 +982,8 @@ return E_UNEXPECTED; } - newIterator = UnixSubFolderIterator_Constructor(This, grfFlags); - hr = IUnknown_QueryInterface(newIterator, &IID_IEnumIDList, (void**)ppEnumIDList); - IUnknown_Release(newIterator); - - return hr; + *ppEnumIDList = UnixSubFolderIterator_Constructor(This, grfFlags); + return S_OK; } static HRESULT CreateUnixFolder(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv, const CLSID *pCLSID); @@ -2373,13 +2365,18 @@ /* UnixSubFolderIterator object layout and typedef. */ typedef struct _UnixSubFolderIterator { - const IEnumIDListVtbl *lpIEnumIDListVtbl; - LONG m_cRef; + IEnumIDList IEnumIDList_iface; + LONG ref; SHCONTF m_fFilter; DIR *m_dirFolder; char m_szFolder[FILENAME_MAX]; } UnixSubFolderIterator; +static inline UnixSubFolderIterator *impl_from_IEnumIDList(IEnumIDList *iface) +{ + return CONTAINING_RECORD(iface, UnixSubFolderIterator, IEnumIDList_iface); +} + static void UnixSubFolderIterator_Destroy(UnixSubFolderIterator *iterator) { TRACE("(iterator=%p)\n", iterator); @@ -2405,35 +2402,34 @@ IEnumIDList_AddRef(iface); return S_OK; } - + static ULONG WINAPI UnixSubFolderIterator_IEnumIDList_AddRef(IEnumIDList* iface) { - UnixSubFolderIterator *This = ADJUST_THIS(UnixSubFolderIterator, IEnumIDList, iface); + UnixSubFolderIterator *This = impl_from_IEnumIDList(iface); + ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(iface=%p)\n", iface); - - return InterlockedIncrement(&This->m_cRef); + TRACE("(%p) ref=%d\n", This, ref); + + return ref; } static ULONG WINAPI UnixSubFolderIterator_IEnumIDList_Release(IEnumIDList* iface) { - UnixSubFolderIterator *This = ADJUST_THIS(UnixSubFolderIterator, IEnumIDList, iface); - ULONG cRef; - - TRACE("(iface=%p)\n", iface); + UnixSubFolderIterator *This = impl_from_IEnumIDList(iface); + ULONG ref = InterlockedDecrement(&This->ref); - cRef = InterlockedDecrement(&This->m_cRef); - - if (!cRef) + TRACE("(%p) ref=%d\n", This, ref); + + if (!ref) UnixSubFolderIterator_Destroy(This); - return cRef; + return ref; } static HRESULT WINAPI UnixSubFolderIterator_IEnumIDList_Next(IEnumIDList* iface, ULONG celt, LPITEMIDLIST* rgelt, ULONG* pceltFetched) { - UnixSubFolderIterator *This = ADJUST_THIS(UnixSubFolderIterator, IEnumIDList, iface); + UnixSubFolderIterator *This = impl_from_IEnumIDList(iface); ULONG i = 0; /* This->m_dirFolder will be NULL if the user doesn't have access rights for the dir. */ @@ -2492,8 +2488,8 @@ static HRESULT WINAPI UnixSubFolderIterator_IEnumIDList_Reset(IEnumIDList* iface) { - UnixSubFolderIterator *This = ADJUST_THIS(UnixSubFolderIterator, IEnumIDList, iface); - + UnixSubFolderIterator *This = impl_from_IEnumIDList(iface); + TRACE("(iface=%p)\n", iface); if (This->m_dirFolder) @@ -2521,21 +2517,20 @@ UnixSubFolderIterator_IEnumIDList_Clone }; -static IUnknown *UnixSubFolderIterator_Constructor(UnixFolder *pUnixFolder, SHCONTF fFilter) { +static IEnumIDList *UnixSubFolderIterator_Constructor(UnixFolder *pUnixFolder, SHCONTF fFilter) +{ UnixSubFolderIterator *iterator; TRACE("(pUnixFolder=%p)\n", pUnixFolder); - - iterator = SHAlloc((ULONG)sizeof(UnixSubFolderIterator)); - iterator->lpIEnumIDListVtbl = &UnixSubFolderIterator_IEnumIDList_Vtbl; - iterator->m_cRef = 0; + + iterator = SHAlloc(sizeof(*iterator)); + iterator->IEnumIDList_iface.lpVtbl = &UnixSubFolderIterator_IEnumIDList_Vtbl; + iterator->ref = 1; iterator->m_fFilter = fFilter; iterator->m_dirFolder = opendir(pUnixFolder->m_pszPath); lstrcpyA(iterator->m_szFolder, pUnixFolder->m_pszPath); - UnixSubFolderIterator_IEnumIDList_AddRef((IEnumIDList*)iterator); - - return (IUnknown*)iterator; + return &iterator->IEnumIDList_iface; } #else /* __MINGW32__ || _MSC_VER */ diff -Nru wine1.7-1.7.15/dlls/shell32/shlview_cmenu.c wine1.7-1.7.16/dlls/shell32/shlview_cmenu.c --- wine1.7-1.7.15/dlls/shell32/shlview_cmenu.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/shell32/shlview_cmenu.c 2014-04-04 19:13:44.000000000 +0000 @@ -285,9 +285,10 @@ return TRUE; } +#define MAX_PROP_PAGES 99 + static void DoOpenProperties(ContextMenu *This, HWND hwnd) { - static const UINT MAX_PROP_PAGES = 99; static const WCHAR wszFolder[] = {'F','o','l','d','e','r', 0}; static const WCHAR wszFiletypeAll[] = {'*',0}; LPSHELLFOLDER lpDesktopSF; diff -Nru wine1.7-1.7.15/dlls/shell32/tests/shelllink.c wine1.7-1.7.16/dlls/shell32/tests/shelllink.c --- wine1.7-1.7.15/dlls/shell32/tests/shelllink.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/shell32/tests/shelllink.c 2014-04-04 19:13:44.000000000 +0000 @@ -42,6 +42,7 @@ static HRESULT (WINAPI *pSHGetStockIconInfo)(SHSTOCKICONID, UINT, SHSTOCKICONINFO *); static DWORD (WINAPI *pGetLongPathNameA)(LPCSTR, LPSTR, DWORD); static DWORD (WINAPI *pGetShortPathNameA)(LPCSTR, LPSTR, DWORD); +static UINT (WINAPI *pSHExtractIconsW)(LPCWSTR, int, int, int, HICON *, UINT *, UINT, UINT); static const GUID _IID_IShellLinkDataList = { 0x45e2b4ae, 0xb1c3, 0x11d0, @@ -1095,6 +1096,63 @@ ok(hr == E_INVALIDARG, "NULL: got 0x%x\n", hr); } +static void test_SHExtractIcons(void) +{ + static const WCHAR notepadW[] = {'n','o','t','e','p','a','d','.','e','x','e',0}; + static const WCHAR shell32W[] = {'s','h','e','l','l','3','2','.','d','l','l',0}; + static const WCHAR emptyW[] = {0}; + UINT ret, ret2; + HICON icons[256]; + UINT ids[256], i; + + if (!pSHExtractIconsW) + { + win_skip("SHExtractIconsW not available\n"); + return; + } + + ret = pSHExtractIconsW(emptyW, 0, 16, 16, icons, ids, 1, 0); + ok(ret == ~0u, "got %u\n", ret); + + ret = pSHExtractIconsW(notepadW, 0, 16, 16, NULL, NULL, 1, 0); + ok(ret == 1 || broken(ret == 2) /* win2k */, "got %u\n", ret); + + icons[0] = (HICON)0xdeadbeef; + ret = pSHExtractIconsW(notepadW, 0, 16, 16, icons, NULL, 1, 0); + ok(ret == 1, "got %u\n", ret); + ok(icons[0] != (HICON)0xdeadbeef, "icon not set\n"); + DestroyIcon(icons[0]); + + icons[0] = (HICON)0xdeadbeef; + ids[0] = 0xdeadbeef; + ret = pSHExtractIconsW(notepadW, 0, 16, 16, icons, ids, 1, 0); + ok(ret == 1, "got %u\n", ret); + ok(icons[0] != (HICON)0xdeadbeef, "icon not set\n"); + ok(ids[0] != 0xdeadbeef, "id not set\n"); + DestroyIcon(icons[0]); + + ret = pSHExtractIconsW(shell32W, 0, 16, 16, NULL, NULL, 0, 0); + ret2 = pSHExtractIconsW(shell32W, 4, MAKELONG(32,16), MAKELONG(32,16), NULL, NULL, 256, 0); + ok(ret && ret == ret2, + "icon count should be independent of requested icon sizes and base icon index\n"); + + ret = pSHExtractIconsW(shell32W, 0, 16, 16, icons, ids, 0, 0); + ok(ret == ~0u || !ret /* < vista */, "got %u\n", ret); + + ret = pSHExtractIconsW(shell32W, 0, 16, 16, icons, ids, 3, 0); + ok(ret == 3, "got %u\n", ret); + for (i = 0; i < ret; i++) DestroyIcon(icons[i]); + + /* count must be a multiple of two when getting two sizes */ + ret = pSHExtractIconsW(shell32W, 0, MAKELONG(16,32), MAKELONG(16,32), icons, ids, 3, 0); + ok(!ret /* vista */ || ret == 4, "got %u\n", ret); + for (i = 0; i < ret; i++) DestroyIcon(icons[i]); + + ret = pSHExtractIconsW(shell32W, 0, MAKELONG(16,32), MAKELONG(16,32), icons, ids, 4, 0); + ok(ret == 4, "got %u\n", ret); + for (i = 0; i < ret; i++) DestroyIcon(icons[i]); +} + START_TEST(shelllink) { HRESULT r; @@ -1108,6 +1166,7 @@ pSHGetStockIconInfo = (void *)GetProcAddress(hmod, "SHGetStockIconInfo"); pGetLongPathNameA = (void *)GetProcAddress(hkernel32, "GetLongPathNameA"); pGetShortPathNameA = (void *)GetProcAddress(hkernel32, "GetShortPathNameA"); + pSHExtractIconsW = (void *)GetProcAddress(hmod, "SHExtractIconsW"); r = CoInitialize(NULL); ok(r == S_OK, "CoInitialize failed (0x%08x)\n", r); @@ -1120,6 +1179,7 @@ test_shdefextracticon(); test_GetIconLocation(); test_SHGetStockIconInfo(); + test_SHExtractIcons(); CoUninitialize(); } diff -Nru wine1.7-1.7.15/dlls/shell32/tests/shlexec.c wine1.7-1.7.16/dlls/shell32/tests/shlexec.c --- wine1.7-1.7.15/dlls/shell32/tests/shlexec.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/shell32/tests/shlexec.c 2014-04-04 19:13:44.000000000 +0000 @@ -747,10 +747,19 @@ "%s expected %d, but got %d\n", key, expected, result); } +static void _okChildIntBroken(const char* file, int line, const char* key, int expected) +{ + INT result; + result=GetPrivateProfileIntA("Arguments", key, expected, child_file); + ok_(file, line)(result == expected || broken(result != expected), + "%s expected %d, but got %d\n", key, expected, result); +} + #define okChildString(key, expected) _okChildString(__FILE__, __LINE__, (key), (expected), (expected)) #define okChildStringBroken(key, expected, broken) _okChildString(__FILE__, __LINE__, (key), (expected), (broken)) #define okChildPath(key, expected) _okChildPath(__FILE__, __LINE__, (key), (expected)) -#define okChildInt(key, expected) _okChildInt(__FILE__, __LINE__, (key), (expected)) +#define okChildInt(key, expected) _okChildInt(__FILE__, __LINE__, (key), (expected)) +#define okChildIntBroken(key, expected) _okChildIntBroken(__FILE__, __LINE__, (key), (expected)) /*** * @@ -2118,35 +2127,35 @@ const char* ifexec; int expectedArgs; const char* expectedDdeExec; - int todo; + BOOL broken; } dde_tests_t; static dde_tests_t dde_tests[] = { /* Test passing and not passing command-line * argument, no DDE */ - {"", NULL, NULL, NULL, NULL, FALSE, "", 0x0}, - {"\"%1\"", NULL, NULL, NULL, NULL, TRUE, "", 0x0}, + {"", NULL, NULL, NULL, NULL, FALSE, ""}, + {"\"%1\"", NULL, NULL, NULL, NULL, TRUE, ""}, /* Test passing and not passing command-line * argument, with DDE */ - {"", "[open(\"%1\")]", "shlexec", "dde", NULL, FALSE, "[open(\"%s\")]", 0x0}, - {"\"%1\"", "[open(\"%1\")]", "shlexec", "dde", NULL, TRUE, "[open(\"%s\")]", 0x0}, + {"", "[open(\"%1\")]", "shlexec", "dde", NULL, FALSE, "[open(\"%s\")]"}, + {"\"%1\"", "[open(\"%1\")]", "shlexec", "dde", NULL, TRUE, "[open(\"%s\")]"}, /* Test unquoted %1 in command and ddeexec * (test filename has space) */ - {"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", 0x0}, + {"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", TRUE /* before vista */}, /* Test ifexec precedence over ddeexec */ - {"", "[open(\"%1\")]", "shlexec", "dde", "[ifexec(\"%1\")]", FALSE, "[ifexec(\"%s\")]", 0x0}, + {"", "[open(\"%1\")]", "shlexec", "dde", "[ifexec(\"%1\")]", FALSE, "[ifexec(\"%s\")]"}, /* Test default DDE topic */ - {"", "[open(\"%1\")]", "shlexec", NULL, NULL, FALSE, "[open(\"%s\")]", 0x0}, + {"", "[open(\"%1\")]", "shlexec", NULL, NULL, FALSE, "[open(\"%s\")]"}, /* Test default DDE application */ - {"", "[open(\"%1\")]", NULL, "dde", NULL, FALSE, "[open(\"%s\")]", 0x0}, + {"", "[open(\"%1\")]", NULL, "dde", NULL, FALSE, "[open(\"%s\")]"}, - {NULL, NULL, NULL, NULL, NULL, 0, 0x0} + {NULL} }; static DWORD WINAPI hooked_WaitForInputIdle(HANDLE process, DWORD timeout) @@ -2266,47 +2275,19 @@ dde_ready_event = CreateEventA(NULL, FALSE, FALSE, "winetest_shlexec_dde_ready"); rc = shell_execute_ex(SEE_MASK_FLAG_DDEWAIT | SEE_MASK_FLAG_NO_UI, NULL, filename, NULL, NULL, NULL); CloseHandle(dde_ready_event); - if ((test->todo & 0x1)==0) - { - ok(32 < rc, "%s failed: rc=%lu err=%u\n", shell_call, - rc, GetLastError()); - } - else todo_wine - { - ok(32 < rc, "%s failed: rc=%lu err=%u\n", shell_call, - rc, GetLastError()); - } + ok(32 < rc, "%s failed: rc=%lu err=%u\n", shell_call, rc, GetLastError()); + if (32 < rc) { - if ((test->todo & 0x2)==0) - { - okChildInt("argcA", test->expectedArgs + 3); - } - else todo_wine - { + if (test->broken) + okChildIntBroken("argcA", test->expectedArgs + 3); + else okChildInt("argcA", test->expectedArgs + 3); - } - if (test->expectedArgs == 1) - { - if ((test->todo & 0x4) == 0) - { - okChildPath("argvA3", filename); - } - else todo_wine - { - okChildPath("argvA3", filename); - } - } - if ((test->todo & 0x8) == 0) - { - sprintf(params, test->expectedDdeExec, filename); - okChildPath("ddeExec", params); - } - else todo_wine - { - sprintf(params, test->expectedDdeExec, filename); - okChildPath("ddeExec", params); - } + + if (test->expectedArgs == 1) okChildPath("argvA3", filename); + + sprintf(params, test->expectedDdeExec, filename); + okChildPath("ddeExec", params); } delete_test_association(".sde"); diff -Nru wine1.7-1.7.15/dlls/user32/focus.c wine1.7-1.7.16/dlls/user32/focus.c --- wine1.7-1.7.15/dlls/user32/focus.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/user32/focus.c 2014-04-04 19:13:44.000000000 +0000 @@ -277,6 +277,7 @@ HWND parent; LONG style = GetWindowLongW( hwndTop, GWL_STYLE ); if (style & (WS_MINIMIZE | WS_DISABLED)) return 0; + if (!(style & WS_CHILD)) break; parent = GetAncestor( hwndTop, GA_PARENT ); if (!parent || parent == GetDesktopWindow()) { diff -Nru wine1.7-1.7.15/dlls/user32/nonclient.c wine1.7-1.7.16/dlls/user32/nonclient.c --- wine1.7-1.7.15/dlls/user32/nonclient.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/user32/nonclient.c 2014-04-04 19:13:44.000000000 +0000 @@ -1396,7 +1396,15 @@ { case HTCAPTION: { - HWND top = GetAncestor( hwnd, GA_ROOT ); + HWND top = hwnd, parent; + while(1) + { + if ((GetWindowLongW( top, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) != WS_CHILD) + break; + parent = GetAncestor( top, GA_PARENT ); + if (!parent || parent == GetDesktopWindow()) break; + top = parent; + } if (FOCUS_MouseActivate( top ) || (GetActiveWindow() == top)) SendMessageW( hwnd, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, lParam ); diff -Nru wine1.7-1.7.15/dlls/user32/tests/resource.c wine1.7-1.7.16/dlls/user32/tests/resource.c --- wine1.7-1.7.15/dlls/user32/tests/resource.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/user32/tests/resource.c 2014-04-04 19:13:44.000000000 +0000 @@ -333,11 +333,30 @@ static void test_PrivateExtractIcons(void) { const CHAR szShell32Dll[] = "shell32.dll"; HICON ahIcon[256]; - UINT aIconId[256]; - UINT cIcons, cIcons2; + UINT i, aIconId[256], cIcons, cIcons2; if (!pPrivateExtractIconsA) return; - + + cIcons = pPrivateExtractIconsA("", 0, 16, 16, ahIcon, aIconId, 1, 0); + ok(cIcons == ~0u, "got %u\n", cIcons); + + cIcons = pPrivateExtractIconsA("notepad.exe", 0, 16, 16, NULL, NULL, 1, 0); + ok(cIcons == 1 || broken(cIcons == 2) /* win2k */, "got %u\n", cIcons); + + ahIcon[0] = (HICON)0xdeadbeef; + cIcons = pPrivateExtractIconsA("notepad.exe", 0, 16, 16, ahIcon, NULL, 1, 0); + ok(cIcons == 1, "got %u\n", cIcons); + ok(ahIcon[0] != (HICON)0xdeadbeef, "icon not set\n"); + DestroyIcon(ahIcon[0]); + + ahIcon[0] = (HICON)0xdeadbeef; + aIconId[0] = 0xdeadbeef; + cIcons = pPrivateExtractIconsA("notepad.exe", 0, 16, 16, ahIcon, aIconId, 1, 0); + ok(cIcons == 1, "got %u\n", cIcons); + ok(ahIcon[0] != (HICON)0xdeadbeef, "icon not set\n"); + ok(aIconId[0] != 0xdeadbeef, "id not set\n"); + DestroyIcon(ahIcon[0]); + cIcons = pPrivateExtractIconsA(szShell32Dll, 0, 16, 16, NULL, NULL, 0, 0); cIcons2 = pPrivateExtractIconsA(szShell32Dll, 4, MAKELONG(32,16), MAKELONG(32,16), NULL, NULL, 256, 0); @@ -350,14 +369,18 @@ cIcons = pPrivateExtractIconsA(szShell32Dll, 0, 16, 16, ahIcon, aIconId, 3, 0); ok(cIcons == 3, "Three icons requested got cIcons=%d\n", cIcons); + for (i = 0; i < cIcons; i++) DestroyIcon(ahIcon[i]); /* count must be a multiple of two when getting two sizes */ cIcons = pPrivateExtractIconsA(szShell32Dll, 0, MAKELONG(16,32), MAKELONG(16,32), ahIcon, aIconId, 3, 0); ok(cIcons == 0 /* vista */ || cIcons == 4, "Three icons requested got cIcons=%d\n", cIcons); + for (i = 0; i < cIcons; i++) DestroyIcon(ahIcon[i]); + cIcons = pPrivateExtractIconsA(szShell32Dll, 0, MAKELONG(16,32), MAKELONG(16,32), ahIcon, aIconId, 4, 0); ok(cIcons == 4, "Four icons requested got cIcons=%d\n", cIcons); + for (i = 0; i < cIcons; i++) DestroyIcon(ahIcon[i]); } static void test_LoadImage(void) diff -Nru wine1.7-1.7.15/dlls/user32/tests/uitools.c wine1.7-1.7.16/dlls/user32/tests/uitools.c --- wine1.7-1.7.15/dlls/user32/tests/uitools.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/user32/tests/uitools.c 2014-04-04 19:13:44.000000000 +0000 @@ -63,7 +63,57 @@ ReleaseDC(0, hdc); } +static void test_SubtractRect(void) +{ + RECT rect1; + RECT rect2; + RECT rectr; + BOOL result; + + /* source rectangles don't intersect */ + SetRect(&rect1, 50, 50, 150, 100); + SetRect(&rect2, 250, 200, 1500, 1000); + result = SubtractRect(&rectr, &rect1, &rect2); + ok(result, "SubtractRect returned FALSE but subtraction should not be empty\n"); + ok(result && rectr.left == 50 && rectr.top == 50 && rectr.right ==150 + && rectr.bottom == 100, "wrong rect subtraction of SubtractRect " + "(dest rect={%d, %d, %d, %d})\n", rectr.left, rectr.top, rectr.right, rectr.bottom); + + /* source rect 2 partially overlaps rect 1 */ + SetRect(&rect1, 2431, 626, 3427, 1608); + SetRect(&rect2, 2499, 626, 3427, 1608); + result = SubtractRect(&rectr, &rect1, &rect2); + ok(result, "SubtractRect returned FALSE but subtraction should not be empty\n"); + ok(result && rectr.left == 2431 && rectr.top == 626 && rectr.right == 2499 + && rectr.bottom == 1608, "wrong rect subtraction of SubtractRect " + "(dest rect={%d, %d, %d, %d})\n", rectr.left, rectr.top, rectr.right, rectr.bottom); + + /* source rect 2 partially overlaps rect 1 - dest is src rect 2 */ + SetRect(&rect1, 2431, 626, 3427, 1608); + SetRect(&rect2, 2499, 626, 3427, 1608); + result = SubtractRect(&rect2, &rect1, &rect2); + ok(result, "SubtractRect returned FALSE but subtraction should not be empty\n"); + ok(result && rectr.left == 2431 && rectr.top == 626 && rectr.right == 2499 + && rectr.bottom == 1608, "wrong rect subtraction of SubtractRect " + "(dest rect={%d, %d, %d, %d})\n", rectr.left, rectr.top, rectr.right, rectr.bottom); + + /* source rect 2 completely overlaps rect 1 */ + SetRect(&rect1, 250, 250, 400, 500); + SetRect(&rect2, 50, 50, 1500, 1000); + result = SubtractRect(&rectr, &rect1, &rect2); + ok(!result, "SubtractRect returned TRUE but subtraction should be empty " + "(dest rect={%d, %d, %d, %d})\n", rectr.left, rectr.top, rectr.right, rectr.bottom); + + /* source rect 2 completely overlaps rect 1 - dest is src rect 2 */ + SetRect(&rect1, 250, 250, 400, 500); + SetRect(&rect2, 50, 50, 1500, 1000); + result = SubtractRect(&rect2, &rect1, &rect2); + ok(!result, "SubtractRect returned TRUE but subtraction should be empty " + "(dest rect={%d, %d, %d, %d})\n", rect2.left, rect2.top, rect2.right, rect2.bottom); +} + START_TEST(uitools) { test_FillRect(); + test_SubtractRect(); } diff -Nru wine1.7-1.7.15/dlls/user32/tests/win.c wine1.7-1.7.16/dlls/user32/tests/win.c --- wine1.7-1.7.15/dlls/user32/tests/win.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/user32/tests/win.c 2014-04-04 19:13:44.000000000 +0000 @@ -2794,6 +2794,7 @@ BOOL ret; HWND hwnd2; MSG msg; + LONG style; flush_events( TRUE ); ShowWindow(hwnd, SW_HIDE); @@ -2889,6 +2890,19 @@ todo_wine ok(GetActiveWindow() == hwnd2, "Expected active window %p, got %p.\n", hwnd2, GetActiveWindow()); todo_wine ok(GetFocus() == hwnd2, "Expected focus window %p, got %p.\n", hwnd2, GetFocus()); + SetForegroundWindow(hwnd); + check_wnd_state(hwnd, hwnd, hwnd, 0); + style = GetWindowLongA(hwnd2, GWL_STYLE) | WS_CHILD; + ok(SetWindowLongA(hwnd2, GWL_STYLE, style), "SetWindowLong failed\n"); + ok(SetForegroundWindow(hwnd2), "SetForegroundWindow failed\n"); + check_wnd_state(hwnd2, hwnd2, hwnd2, 0); + + SetForegroundWindow(hwnd); + check_wnd_state(hwnd, hwnd, hwnd, 0); + ok(SetWindowLongA(hwnd2, GWL_STYLE, style & (~WS_POPUP)), "SetWindowLong failed\n"); + ok(!SetForegroundWindow(hwnd2), "SetForegroundWindow failed\n"); + check_wnd_state(hwnd, hwnd, hwnd, 0); + SetEvent(thread_params.test_finished); WaitForSingleObject(thread, INFINITE); CloseHandle(thread_params.test_finished); @@ -3720,21 +3734,34 @@ ret = SetParent(popup, child1); ok(ret == desktop, "expected %p, got %p\n", desktop, ret); check_parents(popup, child1, child1, 0, 0, parent, popup); -todo_wine check_active_state(popup, 0, popup); SetActiveWindow(parent); + SetFocus(popup); + check_active_state(popup, 0, popup); + + EnableWindow(child1, FALSE); + check_active_state(popup, 0, popup); + SetFocus(parent); + check_active_state(parent, 0, parent); + SetFocus(popup); + check_active_state(popup, 0, popup); + EnableWindow(child1, TRUE); + + ShowWindow(child1, SW_MINIMIZE); + SetFocus(parent); + check_active_state(parent, 0, parent); + SetFocus(popup); + check_active_state(popup, 0, popup); + ShowWindow(child1, SW_HIDE); + + SetActiveWindow(parent); SetFocus(parent); check_active_state(parent, 0, parent); bret = SetForegroundWindow(popup); -todo_wine { - ok(bret || broken(!bret), "SetForegroundWindow() failed\n"); - if (!bret) - check_active_state(popup, 0, popup); - else - check_active_state(popup, popup, popup); - } + ok(bret, "SetForegroundWindow() failed\n"); + check_active_state(popup, popup, popup); ok(DestroyWindow(parent), "DestroyWindow() failed\n"); @@ -7483,6 +7510,26 @@ DestroyWindow(parent); } +static void test_window_without_child_style(void) +{ + HWND hwnd; + + hwnd = CreateWindowExA(0, "edit", NULL, WS_VISIBLE|WS_CHILD, + 0, 0, 50, 50, hwndMain, NULL, 0, NULL); + ok(hwnd != NULL, "CreateWindow failed\n"); + + ok(SetWindowLongA(hwnd, GWL_STYLE, GetWindowLongA(hwnd, GWL_STYLE) & (~WS_CHILD)), + "can't remove WS_CHILD style\n"); + + SetActiveWindow(hwndMain); + PostMessageW(hwnd, WM_LBUTTONUP, 0, 0); + SendMessageW(hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); + check_active_state(hwnd, hwnd, hwnd); + flush_events(TRUE); + + DestroyWindow(hwnd); +} + START_TEST(win) { HMODULE user32 = GetModuleHandleA( "user32.dll" ); @@ -7507,6 +7554,32 @@ if (!RegisterWindowClasses()) assert(0); + hwndMain = CreateWindowExA(/*WS_EX_TOOLWINDOW*/ 0, "MainWindowClass", "Main window", + WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | + WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE, + 100, 100, 200, 200, + 0, 0, GetModuleHandleA(NULL), NULL); + assert( hwndMain ); + + if(!SetForegroundWindow(hwndMain)) { + /* workaround for foreground lock timeout */ + INPUT input[2]; + UINT events_no; + + memset(input, 0, sizeof(input)); + input[0].type = INPUT_MOUSE; + U(input[0]).mi.dx = 101; + U(input[0]).mi.dy = 101; + U(input[0]).mi.dwFlags = MOUSEEVENTF_LEFTDOWN; + input[0].type = INPUT_MOUSE; + U(input[0]).mi.dx = 101; + U(input[0]).mi.dy = 101; + U(input[0]).mi.dwFlags = MOUSEEVENTF_LEFTUP; + events_no = SendInput(2, input, sizeof(input[0])); + ok(events_no == 2, "SendInput returned %d\n", events_no); + ok(SetForegroundWindow(hwndMain), "SetForegroundWindow failed\n"); + } + SetLastError(0xdeafbeef); GetWindowLongPtrW(GetDesktopWindow(), GWLP_WNDPROC); is_win9x = (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED); @@ -7518,17 +7591,11 @@ test_FindWindowEx(); test_SetParent(); - hwndMain = CreateWindowExA(/*WS_EX_TOOLWINDOW*/ 0, "MainWindowClass", "Main window", - WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | - WS_MAXIMIZEBOX | WS_POPUP, - 100, 100, 200, 200, - 0, 0, GetModuleHandleA(NULL), NULL); hwndMain2 = CreateWindowExA(/*WS_EX_TOOLWINDOW*/ 0, "MainWindowClass", "Main window 2", WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP, 100, 100, 200, 200, 0, 0, GetModuleHandleA(NULL), NULL); - assert( hwndMain ); assert( hwndMain2 ); our_pid = GetWindowThreadProcessId(hwndMain, NULL); @@ -7593,6 +7660,7 @@ test_winregion(); test_map_points(); test_update_region(); + test_window_without_child_style(); /* add the tests above this line */ if (hhook) UnhookWindowsHookEx(hhook); diff -Nru wine1.7-1.7.15/dlls/user32/uitools.c wine1.7-1.7.16/dlls/user32/uitools.c --- wine1.7-1.7.15/dlls/user32/uitools.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/user32/uitools.c 2014-04-04 19:13:44.000000000 +0000 @@ -1421,14 +1421,14 @@ SetRectEmpty( dest ); return FALSE; } - *dest = *src1; if (IntersectRect( &tmp, src1, src2 )) { - if (EqualRect( &tmp, dest )) + if (EqualRect( &tmp, src1 )) { SetRectEmpty( dest ); return FALSE; } + *dest = *src1; if ((tmp.top == dest->top) && (tmp.bottom == dest->bottom)) { if (tmp.left == dest->left) dest->left = tmp.right; @@ -1440,6 +1440,10 @@ else if (tmp.bottom == dest->bottom) dest->bottom = tmp.top; } } + else + { + *dest = *src1; + } return TRUE; } diff -Nru wine1.7-1.7.15/dlls/usp10/bidi.c wine1.7-1.7.16/dlls/usp10/bidi.c --- wine1.7-1.7.15/dlls/usp10/bidi.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/usp10/bidi.c 2014-04-04 19:13:44.000000000 +0000 @@ -827,10 +827,13 @@ static void computeIsolatingRunsSet(unsigned baselevel, WORD *pcls, WORD *pLevel, int uCount, struct list *set) { int run_start, run_end, i; - Run runs[uCount]; int run_count = 0; + Run *runs; IsolatedRun *current_isolated; + runs = HeapAlloc(GetProcessHeap(), 0, uCount * sizeof(Run)); + if (!runs) return; + list_init(set); /* Build Runs */ @@ -857,6 +860,7 @@ int type_fence, real_end; int j; current_isolated = HeapAlloc(GetProcessHeap(), 0, sizeof(IsolatedRun) + sizeof(WORD*)*uCount); + if (!current_isolated) break; run_start = runs[k].start; current_isolated->e = runs[k].e; @@ -944,6 +948,8 @@ } i++; } + + HeapFree(GetProcessHeap(), 0, runs); } /************************************************************* diff -Nru wine1.7-1.7.15/dlls/vbscript/compile.c wine1.7-1.7.16/dlls/vbscript/compile.c --- wine1.7-1.7.15/dlls/vbscript/compile.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/vbscript/compile.c 2014-04-04 19:13:44.000000000 +0000 @@ -873,8 +873,10 @@ if(FAILED(hres)) break; - if(!emit_catch_jmp(ctx, 0, case_labels[i])) - return E_OUTOFMEMORY; + if(!emit_catch_jmp(ctx, 0, case_labels[i])) { + hres = E_OUTOFMEMORY; + break; + } } } diff -Nru wine1.7-1.7.15/dlls/vbscript/global.c wine1.7-1.7.16/dlls/vbscript/global.c --- wine1.7-1.7.15/dlls/vbscript/global.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/vbscript/global.c 2014-04-04 19:13:44.000000000 +0000 @@ -1886,6 +1886,8 @@ static HRESULT Err_Number(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIANT *res) { + HRESULT hres; + TRACE("\n"); if(!This->desc) @@ -1896,7 +1898,8 @@ return E_NOTIMPL; } - return return_int(res, This->desc->ctx->err_number); + hres = This->desc->ctx->err_number; + return return_int(res, HRESULT_FACILITY(hres) == FACILITY_VBS ? HRESULT_CODE(hres) : hres); } static HRESULT Err_Source(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIANT *res) diff -Nru wine1.7-1.7.15/dlls/vbscript/interp.c wine1.7-1.7.16/dlls/vbscript/interp.c --- wine1.7-1.7.15/dlls/vbscript/interp.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/vbscript/interp.c 2014-04-04 19:13:44.000000000 +0000 @@ -2107,7 +2107,7 @@ op = exec.instr->op; hres = op_funcs[op](&exec); if(FAILED(hres)) { - ctx->err_number = hres; + ctx->err_number = hres = map_hres(hres); if(exec.resume_next) { unsigned stack_off; @@ -2124,9 +2124,8 @@ TRACE("unwind jmp %d stack_off %d\n", exec.instr->arg1.uint, exec.instr->arg2.uint); - instr_jmp(&exec, exec.instr->arg1.uint); - stack_off = exec.instr->arg2.uint; + instr_jmp(&exec, exec.instr->arg1.uint); if(exec.top > stack_off) { stack_popn(&exec, exec.top-stack_off); diff -Nru wine1.7-1.7.15/dlls/vbscript/tests/error.vbs wine1.7-1.7.16/dlls/vbscript/tests/error.vbs --- wine1.7-1.7.15/dlls/vbscript/tests/error.vbs 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/vbscript/tests/error.vbs 2014-04-04 19:13:44.000000000 +0000 @@ -23,6 +23,57 @@ const VB_E_FORLOOPNOTINITIALIZED = 92 const VB_E_OBJNOTCOLLECTION = 451 +const E_NOTIMPL = &h80004001& +const E_NOINTERFACE = &h80004002& +const DISP_E_UNKNOWNINTERFACE = &h80020001& +const DISP_E_MEMBERNOTFOUND = &h80020003& +const DISP_E_PARAMNOTFOUND = &h80020004& +const DISP_E_TYPEMISMATCH = &h80020005& +const DISP_E_UNKNOWNNAME = &h80020006& +const DISP_E_NONAMEDARGS = &h80020007& +const DISP_E_BADVARTYPE = &h80020008& +const DISP_E_OVERFLOW = &h8002000A& +const DISP_E_BADINDEX = &h8002000B& +const DISP_E_UNKNOWNLCID = &h8002000C& +const DISP_E_ARRAYISLOCKED = &h8002000D& +const DISP_E_BADPARAMCOUNT = &h8002000E& +const DISP_E_PARAMNOTOPTIONAL = &h8002000F& +const DISP_E_NOTACOLLECTION = &h80020011& +const TYPE_E_DLLFUNCTIONNOTFOUND = &h8002802F& +const TYPE_E_TYPEMISMATCH = &h80028CA0& +const TYPE_E_OUTOFBOUNDS = &h80028CA1& +const TYPE_E_IOERROR = &h80028CA2& +const TYPE_E_CANTCREATETMPFILE = &h80028CA3& +const STG_E_FILENOTFOUND = &h80030002& +const STG_E_PATHNOTFOUND = &h80030003& +const STG_E_TOOMANYOPENFILES = &h80030004& +const STG_E_ACCESSDENIED = &h80030005& +const STG_E_INSUFFICIENTMEMORY = &h80030008& +const STG_E_NOMOREFILES = &h80030012& +const STG_E_DISKISWRITEPROTECTED = &h80030013& +const STG_E_WRITEFAULT = &h8003001D& +const STG_E_READFAULT = &h8003001E& +const STG_E_SHAREVIOLATION = &h80030020& +const STG_E_LOCKVIOLATION = &h80030021& +const STG_E_FILEALREADYEXISTS = &h80030050& +const STG_E_MEDIUMFULL = &h80030070& +const STG_E_INVALIDNAME = &h800300FC& +const STG_E_INUSE = &h80030100& +const STG_E_NOTCURRENT = &h80030101& +const STG_E_CANTSAVE = &h80030103& +const REGDB_E_CLASSNOTREG = &h80040154& +const MK_E_UNAVAILABLE = &h800401E3& +const MK_E_INVALIDEXTENSION = &h800401E6& +const MK_E_CANTOPENFILE = &h800401EA& +const CO_E_CLASSSTRING = &h800401F3& +const CO_E_APPNOTFOUND = &h800401F5& +const O_E_APPDIDNTREG = &h800401FE& +const E_ACCESSDENIED = &h80070005& +const E_OUTOFMEMORY = &h8007000E& +const E_INVALIDARG = &h80070057& +const RPC_S_SERVER_UNAVAILABLE = &h800706BA& +const CO_E_SERVER_EXEC_FAILURE = &h80080005& + call ok(Err.Number = 0, "Err.Number = " & Err.Number) dim calledFunc @@ -247,4 +298,77 @@ call testForEachError() +sub testHresMap(hres, code) + on error resume next + + call Err.Clear() + call throwInt(hres) + call ok(Err.Number = code, "throw(" & hex(hres) & ") Err.Number = " & Err.Number) +end sub + +testHresMap E_NOTIMPL, 445 +testHresMap E_NOINTERFACE, 430 +testHresMap DISP_E_UNKNOWNINTERFACE, 438 +testHresMap DISP_E_MEMBERNOTFOUND, 438 +testHresMap DISP_E_PARAMNOTFOUND, 448 +testHresMap DISP_E_TYPEMISMATCH, 13 +testHresMap DISP_E_UNKNOWNNAME, 438 +testHresMap DISP_E_NONAMEDARGS, 446 +testHresMap DISP_E_BADVARTYPE, 458 +testHresMap DISP_E_OVERFLOW, 6 +testHresMap DISP_E_BADINDEX, 9 +testHresMap DISP_E_UNKNOWNLCID, 447 +testHresMap DISP_E_ARRAYISLOCKED, 10 +testHresMap DISP_E_BADPARAMCOUNT, 450 +testHresMap DISP_E_PARAMNOTOPTIONAL, 449 +testHresMap DISP_E_NOTACOLLECTION, 451 +testHresMap TYPE_E_DLLFUNCTIONNOTFOUND, 453 +testHresMap TYPE_E_TYPEMISMATCH, 13 +testHresMap TYPE_E_OUTOFBOUNDS, 9 +testHresMap TYPE_E_IOERROR, 57 +testHresMap TYPE_E_CANTCREATETMPFILE, 322 +testHresMap STG_E_FILENOTFOUND, 432 +testHresMap STG_E_PATHNOTFOUND, 76 +testHresMap STG_E_TOOMANYOPENFILES, 67 +testHresMap STG_E_ACCESSDENIED, 70 +testHresMap STG_E_INSUFFICIENTMEMORY, 7 +testHresMap STG_E_NOMOREFILES, 67 +testHresMap STG_E_DISKISWRITEPROTECTED, 70 +testHresMap STG_E_WRITEFAULT, 57 +testHresMap STG_E_READFAULT, 57 +testHresMap STG_E_SHAREVIOLATION, 75 +testHresMap STG_E_LOCKVIOLATION, 70 +testHresMap STG_E_FILEALREADYEXISTS, 58 +testHresMap STG_E_MEDIUMFULL, 61 +testHresMap STG_E_INVALIDNAME, 53 +testHresMap STG_E_INUSE, 70 +testHresMap STG_E_NOTCURRENT, 70 +testHresMap STG_E_CANTSAVE, 57 +testHresMap REGDB_E_CLASSNOTREG, 429 +testHresMap MK_E_UNAVAILABLE, 429 +testHresMap MK_E_INVALIDEXTENSION, 432 +testHresMap MK_E_CANTOPENFILE, 432 +testHresMap CO_E_CLASSSTRING, 429 +testHresMap CO_E_APPNOTFOUND, 429 +testHresMap O_E_APPDIDNTREG, 429 +testHresMap E_ACCESSDENIED, 70 +testHresMap E_OUTOFMEMORY, 7 +testHresMap E_INVALIDARG, 5 +testHresMap RPC_S_SERVER_UNAVAILABLE, 462 +testHresMap CO_E_SERVER_EXEC_FAILURE, 429 + +sub testVBErrorCodes() + on error resume next + + Err.clear() + throwInt(&h800a00aa&) + call ok(Err.number = 170, "Err.number = " & Err.number) + + Err.clear() + throwInt(&h800a10aa&) + call ok(Err.number = 4266, "Err.number = " & Err.number) +end sub + +call testVBErrorCodes + call reportSuccess() diff -Nru wine1.7-1.7.15/dlls/vbscript/tests/run.c wine1.7-1.7.16/dlls/vbscript/tests/run.c --- wine1.7-1.7.15/dlls/vbscript/tests/run.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/vbscript/tests/run.c 2014-04-04 19:13:44.000000000 +0000 @@ -120,6 +120,9 @@ #define DISPID_COLLOBJ_RESET 3000 +#define FACILITY_VBS 0xa +#define MAKE_VBSERROR(code) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_VBS, code) + static const WCHAR testW[] = {'t','e','s','t',0}; static const WCHAR emptyW[] = {0}; @@ -1224,6 +1227,9 @@ V_BOOL(pvarRes) = VARIANT_FALSE; } + if(V_VT(v) == (VT_VARIANT|VT_BYREF)) + v = V_VARIANTREF(v); + switch(V_VT(v)) { case VT_I2: hres = V_I2(v); @@ -1236,7 +1242,6 @@ return E_INVALIDARG; } - trace("throwing %08x (%d)\n", hres, hres); return hres; } } @@ -1983,6 +1988,17 @@ hres = parse_script_ar("throwInt(&h80080008&)"); ok(hres == 0x80080008, "hres = %08x\n", hres); + /* DISP_E_BADINDEX */ + hres = parse_script_ar("throwInt(&h8002000b&)"); + ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres); + + hres = parse_script_ar("throwInt(&h800a0009&)"); + ok(hres == MAKE_VBSERROR(9), "hres = %08x\n", hres); + + /* E_NOTIMPL */ + hres = parse_script_ar("throwInt(&h80004001&)"); + ok(hres == MAKE_VBSERROR(445), "hres = %08x\n", hres); + strict_dispid_check = FALSE; parse_script_a("Sub testsub\n" diff -Nru wine1.7-1.7.15/dlls/vbscript/vbdisp.c wine1.7-1.7.16/dlls/vbscript/vbdisp.c --- wine1.7-1.7.15/dlls/vbscript/vbdisp.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/vbscript/vbdisp.c 2014-04-04 19:13:44.000000000 +0000 @@ -968,6 +968,69 @@ return hres; } +#define RPC_E_SERVER_UNAVAILABLE 0x800706ba + +HRESULT map_hres(HRESULT hres) +{ + if(SUCCEEDED(hres) || HRESULT_FACILITY(hres) == FACILITY_VBS) + return hres; + + switch(hres) { + case E_NOTIMPL: return MAKE_VBSERROR(VBSE_ACTION_NOT_SUPPORTED); + case E_NOINTERFACE: return MAKE_VBSERROR(VBSE_OLE_NOT_SUPPORTED); + case DISP_E_UNKNOWNINTERFACE: return MAKE_VBSERROR(VBSE_OLE_NO_PROP_OR_METHOD); + case DISP_E_MEMBERNOTFOUND: return MAKE_VBSERROR(VBSE_OLE_NO_PROP_OR_METHOD); + case DISP_E_PARAMNOTFOUND: return MAKE_VBSERROR(VBSE_NAMED_PARAM_NOT_FOUND); + case DISP_E_TYPEMISMATCH: return MAKE_VBSERROR(VBSE_TYPE_MISMATCH); + case DISP_E_UNKNOWNNAME: return MAKE_VBSERROR(VBSE_OLE_NO_PROP_OR_METHOD); + case DISP_E_NONAMEDARGS: return MAKE_VBSERROR(VBSE_NAMED_ARGS_NOT_SUPPORTED); + case DISP_E_BADVARTYPE: return MAKE_VBSERROR(VBSE_INVALID_TYPELIB_VARIABLE); + case DISP_E_OVERFLOW: return MAKE_VBSERROR(VBSE_OVERFLOW); + case DISP_E_BADINDEX: return MAKE_VBSERROR(VBSE_OUT_OF_BOUNDS); + case DISP_E_UNKNOWNLCID: return MAKE_VBSERROR(VBSE_LOCALE_SETTING_NOT_SUPPORTED); + case DISP_E_ARRAYISLOCKED: return MAKE_VBSERROR(VBSE_ARRAY_LOCKED); + case DISP_E_BADPARAMCOUNT: return MAKE_VBSERROR(VBSE_FUNC_ARITY_MISMATCH); + case DISP_E_PARAMNOTOPTIONAL: return MAKE_VBSERROR(VBSE_PARAMETER_NOT_OPTIONAL); + case DISP_E_NOTACOLLECTION: return MAKE_VBSERROR(VBSE_NOT_ENUM); + case TYPE_E_DLLFUNCTIONNOTFOUND: return MAKE_VBSERROR(VBSE_INVALID_DLL_FUNCTION_NAME); + case TYPE_E_TYPEMISMATCH: return MAKE_VBSERROR(VBSE_TYPE_MISMATCH); + case TYPE_E_OUTOFBOUNDS: return MAKE_VBSERROR(VBSE_OUT_OF_BOUNDS); + case TYPE_E_IOERROR: return MAKE_VBSERROR(VBSE_IO_ERROR); + case TYPE_E_CANTCREATETMPFILE: return MAKE_VBSERROR(VBSE_CANT_CREATE_TMP_FILE); + case STG_E_FILENOTFOUND: return MAKE_VBSERROR(VBSE_OLE_FILE_NOT_FOUND); + case STG_E_PATHNOTFOUND: return MAKE_VBSERROR(VBSE_PATH_NOT_FOUND); + case STG_E_TOOMANYOPENFILES: return MAKE_VBSERROR(VBSE_TOO_MANY_FILES); + case STG_E_ACCESSDENIED: return MAKE_VBSERROR(VBSE_PERMISSION_DENIED); + case STG_E_INSUFFICIENTMEMORY: return MAKE_VBSERROR(VBSE_OUT_OF_MEMORY); + case STG_E_NOMOREFILES: return MAKE_VBSERROR(VBSE_TOO_MANY_FILES); + case STG_E_DISKISWRITEPROTECTED: return MAKE_VBSERROR(VBSE_PERMISSION_DENIED); + case STG_E_WRITEFAULT: return MAKE_VBSERROR(VBSE_IO_ERROR); + case STG_E_READFAULT: return MAKE_VBSERROR(VBSE_IO_ERROR); + case STG_E_SHAREVIOLATION: return MAKE_VBSERROR(VBSE_PATH_FILE_ACCESS); + case STG_E_LOCKVIOLATION: return MAKE_VBSERROR(VBSE_PERMISSION_DENIED); + case STG_E_FILEALREADYEXISTS: return MAKE_VBSERROR(VBSE_FILE_ALREADY_EXISTS); + case STG_E_MEDIUMFULL: return MAKE_VBSERROR(VBSE_DISK_FULL); + case STG_E_INVALIDNAME: return MAKE_VBSERROR(VBSE_FILE_NOT_FOUND); + case STG_E_INUSE: return MAKE_VBSERROR(VBSE_PERMISSION_DENIED); + case STG_E_NOTCURRENT: return MAKE_VBSERROR(VBSE_PERMISSION_DENIED); + case STG_E_CANTSAVE: return MAKE_VBSERROR(VBSE_IO_ERROR); + case REGDB_E_CLASSNOTREG: return MAKE_VBSERROR(VBSE_CANT_CREATE_OBJECT); + case MK_E_UNAVAILABLE: return MAKE_VBSERROR(VBSE_CANT_CREATE_OBJECT); + case MK_E_INVALIDEXTENSION: return MAKE_VBSERROR(VBSE_OLE_FILE_NOT_FOUND); + case MK_E_CANTOPENFILE: return MAKE_VBSERROR(VBSE_OLE_FILE_NOT_FOUND); + case CO_E_CLASSSTRING: return MAKE_VBSERROR(VBSE_CANT_CREATE_OBJECT); + case CO_E_APPNOTFOUND: return MAKE_VBSERROR(VBSE_CANT_CREATE_OBJECT); + case CO_E_APPDIDNTREG: return MAKE_VBSERROR(VBSE_CANT_CREATE_OBJECT); + case E_ACCESSDENIED: return MAKE_VBSERROR(VBSE_PERMISSION_DENIED); + case E_OUTOFMEMORY: return MAKE_VBSERROR(VBSE_OUT_OF_MEMORY); + case E_INVALIDARG: return MAKE_VBSERROR(VBSE_ILLEGAL_FUNC_CALL); + case RPC_E_SERVER_UNAVAILABLE: return MAKE_VBSERROR(VBSE_SERVER_NOT_FOUND); + case CO_E_SERVER_EXEC_FAILURE: return MAKE_VBSERROR(VBSE_CANT_CREATE_OBJECT); + } + + return hres; +} + HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, DISPPARAMS *dp, VARIANT *retv) { const WORD flags = DISPATCH_METHOD|(retv ? DISPATCH_PROPERTYGET : 0); diff -Nru wine1.7-1.7.15/dlls/vbscript/vbscript.h wine1.7-1.7.16/dlls/vbscript/vbscript.h --- wine1.7-1.7.15/dlls/vbscript/vbscript.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/vbscript/vbscript.h 2014-04-04 19:13:44.000000000 +0000 @@ -387,6 +387,41 @@ HRESULT create_regexp(IDispatch**) DECLSPEC_HIDDEN; +HRESULT map_hres(HRESULT) DECLSPEC_HIDDEN; + +#define FACILITY_VBS 0xa +#define MAKE_VBSERROR(code) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_VBS, code) + +#define VBSE_ILLEGAL_FUNC_CALL 5 +#define VBSE_OVERFLOW 6 +#define VBSE_OUT_OF_MEMORY 7 +#define VBSE_OUT_OF_BOUNDS 9 +#define VBSE_ARRAY_LOCKED 10 +#define VBSE_TYPE_MISMATCH 13 +#define VBSE_FILE_NOT_FOUND 53 +#define VBSE_IO_ERROR 57 +#define VBSE_FILE_ALREADY_EXISTS 58 +#define VBSE_DISK_FULL 61 +#define VBSE_TOO_MANY_FILES 67 +#define VBSE_PERMISSION_DENIED 70 +#define VBSE_PATH_FILE_ACCESS 75 +#define VBSE_PATH_NOT_FOUND 76 +#define VBSE_OLE_NOT_SUPPORTED 430 +#define VBSE_OLE_NO_PROP_OR_METHOD 438 +#define VBSE_ACTION_NOT_SUPPORTED 445 +#define VBSE_NAMED_ARGS_NOT_SUPPORTED 446 +#define VBSE_LOCALE_SETTING_NOT_SUPPORTED 447 +#define VBSE_NAMED_PARAM_NOT_FOUND 448 +#define VBSE_INVALID_TYPELIB_VARIABLE 458 +#define VBSE_FUNC_ARITY_MISMATCH 450 +#define VBSE_PARAMETER_NOT_OPTIONAL 449 +#define VBSE_NOT_ENUM 451 +#define VBSE_INVALID_DLL_FUNCTION_NAME 453 +#define VBSE_CANT_CREATE_TMP_FILE 322 +#define VBSE_OLE_FILE_NOT_FOUND 432 +#define VBSE_CANT_CREATE_OBJECT 429 +#define VBSE_SERVER_NOT_FOUND 462 + HRESULT WINAPI VBScriptFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; HRESULT WINAPI VBScriptRegExpFactory_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; diff -Nru wine1.7-1.7.15/dlls/wbemprox/builtin.c wine1.7-1.7.16/dlls/wbemprox/builtin.c --- wine1.7-1.7.15/dlls/wbemprox/builtin.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wbemprox/builtin.c 2014-04-04 19:13:44.000000000 +0000 @@ -75,6 +75,8 @@ {'_','_','P','A','R','A','M','E','T','E','R','S',0}; static const WCHAR class_physicalmediaW[] = {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','d','i','a',0}; +static const WCHAR class_physicalmemoryW[] = + {'W','i','n','3','2','_','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; static const WCHAR class_qualifiersW[] = {'_','_','Q','U','A','L','I','F','I','E','R','S',0}; static const WCHAR class_process_getowner_outW[] = @@ -101,10 +103,16 @@ {'A','d','a','p','t','e','r','T','y','p','e',0}; static const WCHAR prop_addresswidthW[] = {'A','d','d','r','e','s','s','W','i','d','t','h',0}; +static const WCHAR prop_availabilityW[] = + {'A','v','a','i','l','a','b','i','l','i','t','y',0}; static const WCHAR prop_bootableW[] = {'B','o','o','t','a','b','l','e',0}; static const WCHAR prop_bootpartitionW[] = {'B','o','o','t','P','a','r','t','i','t','i','o','n',0}; +static const WCHAR prop_buildnumberW[] = + {'B','u','i','l','d','N','u','m','b','e','r',0}; +static const WCHAR prop_capacityW[] = + {'C','a','p','a','c','i','t','y',0}; static const WCHAR prop_captionW[] = {'C','a','p','t','i','o','n',0}; static const WCHAR prop_classW[] = @@ -161,8 +169,12 @@ {'I','d','e','n','t','i','f','i','c','a','t','i','o','n','C','o','d','e',0}; static const WCHAR prop_indexW[] = {'I','n','d','e','x',0}; +static const WCHAR prop_installdateW[] = + {'I','n','s','t','a','l','l','D','a','t','e',0}; static const WCHAR prop_interfaceindexW[] = {'I','n','t','e','r','f','a','c','e','I','n','d','e','x',0}; +static const WCHAR prop_interfacetypeW[] = + {'I','n','t','e','r','f','a','c','e','T','y','p','e',0}; static const WCHAR prop_intvalueW[] = {'I','n','t','e','g','e','r','V','a','l','u','e',0}; static const WCHAR prop_ipconnectionmetricW[] = @@ -289,6 +301,7 @@ { { prop_deviceidW, CIM_STRING|COL_FLAG_KEY }, { prop_driveW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_mediatypeW, CIM_STRING }, { prop_nameW, CIM_STRING }, { prop_pnpdeviceidW, CIM_STRING } }; @@ -316,12 +329,14 @@ }; static const struct column col_diskdrive[] = { - { prop_deviceidW, CIM_STRING|COL_FLAG_KEY }, - { prop_indexW, CIM_UINT32, VT_I4 }, - { prop_manufacturerW, CIM_STRING }, - { prop_mediatypeW, CIM_STRING }, - { prop_modelW, CIM_STRING }, - { prop_serialnumberW, CIM_STRING } + { prop_deviceidW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY }, + { prop_indexW, CIM_UINT32, VT_I4 }, + { prop_interfacetypeW, CIM_STRING }, + { prop_manufacturerW, CIM_STRING }, + { prop_mediatypeW, CIM_STRING }, + { prop_modelW, CIM_STRING }, + { prop_serialnumberW, CIM_STRING }, + { prop_sizeW, CIM_UINT64 } }; static const struct column col_diskpartition[] = { @@ -368,10 +383,12 @@ }; static const struct column col_os[] = { + { prop_buildnumberW, CIM_STRING }, { prop_captionW, CIM_STRING }, { prop_codesetW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_countrycodeW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_csdversionW, CIM_STRING }, + { prop_installdateW, CIM_DATETIME }, { prop_lastbootuptimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, { prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, { prop_localeW, CIM_STRING|COL_FLAG_DYNAMIC }, @@ -380,6 +397,7 @@ { prop_oslanguageW, CIM_UINT32, VT_I4 }, { prop_osproductsuiteW, CIM_UINT32, VT_I4 }, { prop_ostypeW, CIM_UINT16, VT_I4 }, + { prop_serialnumberW, CIM_STRING }, { prop_servicepackmajorW, CIM_UINT16, VT_I4 }, { prop_servicepackminorW, CIM_UINT16, VT_I4 }, { prop_suitemaskW, CIM_UINT32, VT_I4 }, @@ -401,6 +419,10 @@ { prop_serialnumberW, CIM_STRING }, { prop_tagW, CIM_STRING } }; +static const struct column col_physicalmemory[] = +{ + { prop_capacityW, CIM_UINT64 } +}; static const struct column col_process[] = { { prop_captionW, CIM_STRING|COL_FLAG_DYNAMIC }, @@ -470,6 +492,7 @@ { { prop_adapterdactypeW, CIM_STRING }, { prop_adapterramW, CIM_UINT32, VT_I4 }, + { prop_availabilityW, CIM_UINT16 }, { prop_currentbitsperpixelW, CIM_UINT32 }, { prop_currenthorizontalresW, CIM_UINT32 }, { prop_currentverticalresW, CIM_UINT32 }, @@ -497,6 +520,8 @@ {'W','i','n','e',0}; static const WCHAR bios_versionW[] = {'W','I','N','E',' ',' ',' ','-',' ','1',0}; +static const WCHAR cdromdrive_mediatypeW[] = + {'C','D','-','R','O','M',0}; static const WCHAR cdromdrive_nameW[] = {'W','i','n','e',' ','C','D','-','R','O','M',' ','A','T','A',' ','D','e','v','i','c','e',0}; static const WCHAR cdromdrive_pnpdeviceidW[]= @@ -512,12 +537,14 @@ {'T','h','e',' ','W','i','n','e',' ','P','r','o','j','e','c','t',0}; static const WCHAR compsys_modelW[] = {'W','i','n','e',0}; -static const WCHAR diskdrive_deviceidW[] = - {'\\','\\','\\','\\','.','\\','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','0',0}; +static const WCHAR diskdrive_interfacetypeW[] = + {'I','D','E',0}; static const WCHAR diskdrive_manufacturerW[] = {'(','S','t','a','n','d','a','r','d',' ','d','i','s','k',' ','d','r','i','v','e','s',')',0}; -static const WCHAR diskdrive_mediatypeW[] = +static const WCHAR diskdrive_mediatype_fixedW[] = {'F','i','x','e','d',' ','h','a','r','d',' ','d','i','s','k',0}; +static const WCHAR diskdrive_mediatype_removableW[] = + {'R','e','m','o','v','a','b','l','e',' ','m','e','d','i','a',0}; static const WCHAR diskdrive_modelW[] = {'W','i','n','e',' ','D','i','s','k',' ','D','r','i','v','e',0}; static const WCHAR diskdrive_serialW[] = @@ -526,20 +553,26 @@ {'P','C','I','\\','V','E','N','_','8','0','8','6','&','D','E','V','_','1','0','0','E','&', 'S','U','B','S','Y','S','_','0','0','1','E','8','0','8','6','&','R','E','V','_','0','2','\\', '3','&','2','6','7','A','6','1','6','A','&','1','&','1','8',0}; +static const WCHAR os_32bitW[] = + {'3','2','-','b','i','t',0}; +static const WCHAR os_64bitW[] = + {'6','4','-','b','i','t',0}; +static const WCHAR os_buildnumberW[] = + {'2','6','0','0',0}; static const WCHAR os_captionW[] = {'M','i','c','r','o','s','o','f','t',' ','W','i','n','d','o','w','s',' ','X','P',' ', 'V','e','r','s','i','o','n',' ','=',' ','5','.','1','.','2','6','0','0',0}; static const WCHAR os_csdversionW[] = {'S','e','r','v','i','c','e',' ','P','a','c','k',' ','3',0}; -static const WCHAR os_32bitW[] = - {'3','2','-','b','i','t',0}; -static const WCHAR os_64bitW[] = - {'6','4','-','b','i','t',0}; +static const WCHAR os_installdateW[] = + {'2','0','1','4','0','1','0','1','0','0','0','0','0','0','.','0','0','0','0','0','0','+','0','0','0',0}; static const WCHAR os_nameW[] = {'M','i','c','r','o','s','o','f','t',' ','W','i','n','d','o','w','s',' ','X','P',' ', 'P','r','o','f','e','s','s','i','o','n','a','l','|','C',':','\\','W','I','N','D','O','W','S', '|','\\','D','e','v','i','c','e','\\','H','a','r','d','d','i','s','k','0', '\\','P','a','r','t','i','t','i','o','n','1',0}; +static const WCHAR os_serialnumberW[] = + {'1','2','3','4','5','-','O','E','M','-','1','2','3','4','5','6','7','-','1','2','3','4','5',0}; static const WCHAR os_versionW[] = {'5','.','1','.','2','6','0','0',0}; static const WCHAR physicalmedia_tagW[] = @@ -574,6 +607,7 @@ { const WCHAR *device_id; const WCHAR *drive; + const WCHAR *mediatype; const WCHAR *name; const WCHAR *pnpdevice_id; }; @@ -603,10 +637,12 @@ { const WCHAR *device_id; UINT32 index; + const WCHAR *interfacetype; const WCHAR *manufacturer; const WCHAR *mediatype; - const WCHAR *name; + const WCHAR *model; const WCHAR *serialnumber; + UINT64 size; }; struct record_diskpartition { @@ -653,10 +689,12 @@ }; struct record_operatingsystem { + const WCHAR *buildnumber; const WCHAR *caption; const WCHAR *codeset; const WCHAR *countrycode; const WCHAR *csdversion; + const WCHAR *installdate; const WCHAR *lastbootuptime; const WCHAR *localdatetime; const WCHAR *locale; @@ -665,6 +703,7 @@ UINT32 oslanguage; UINT32 osproductsuite; UINT16 ostype; + const WCHAR *serialnumber; UINT16 servicepackmajor; UINT16 servicepackminor; UINT32 suitemask; @@ -686,6 +725,10 @@ const WCHAR *serialnumber; const WCHAR *tag; }; +struct record_physicalmemory +{ + UINT64 capacity; +}; struct record_process { const WCHAR *caption; @@ -755,6 +798,7 @@ { const WCHAR *adapter_dactype; UINT32 adapter_ram; + UINT16 availability; UINT32 current_bitsperpixel; UINT32 current_horizontalres; UINT32 current_verticalres; @@ -774,11 +818,6 @@ { bios_descriptionW, bios_descriptionW, bios_manufacturerW, bios_releasedateW, bios_serialnumberW, bios_smbiosbiosversionW, bios_versionW } }; -static const struct record_diskdrive data_diskdrive[] = -{ - { diskdrive_deviceidW, 0, diskdrive_manufacturerW, diskdrive_mediatypeW, diskdrive_modelW, - diskdrive_serialW } -}; static const struct record_param data_param[] = { { class_processW, method_getownerW, -1, param_returnvalueW, CIM_UINT32, VT_I4 }, @@ -889,6 +928,7 @@ rec->device_id = cdromdrive_pnpdeviceidW; sprintfW( drive, fmtW, 'A' + i ); rec->drive = heap_strdupW( drive ); + rec->mediatype = cdromdrive_mediatypeW; rec->name = cdromdrive_nameW; rec->pnpdevice_id = cdromdrive_pnpdeviceidW; if (!match_row( table, row, cond, &status )) @@ -1270,11 +1310,13 @@ DWORD drives = GetLogicalDrives(); WIN32_FIND_DATAW data; HANDLE handle; - struct dirstack *dirstack = alloc_dirstack(2); + struct dirstack *dirstack; enum fill_status status = FILL_STATUS_UNFILTERED; if (!resize_table( table, 8, sizeof(*rec) )) return FILL_STATUS_FAILED; + dirstack = alloc_dirstack(2); + for (i = 0; i < sizeof(drives); i++) { if (!(drives & (1 << i))) continue; @@ -1300,6 +1342,7 @@ if (!resize_table( table, row + 1, sizeof(*rec) )) { status = FILL_STATUS_FAILED; + FindClose( handle ); goto done; } if (!strcmpW( data.cFileName, dotW ) || !strcmpW( data.cFileName, dotdotW )) continue; @@ -1309,6 +1352,7 @@ { if (push_dir( dirstack, new_path, len )) continue; heap_free( new_path ); + FindClose( handle ); status = FILL_STATUS_FAILED; goto done; } @@ -1442,16 +1486,6 @@ return status; } -static WCHAR *get_filesystem( const WCHAR *root ) -{ - static const WCHAR ntfsW[] = {'N','T','F','S',0}; - WCHAR buffer[MAX_PATH + 1]; - - if (GetVolumeInformationW( root, NULL, 0, NULL, NULL, NULL, buffer, MAX_PATH + 1 )) - return heap_strdupW( buffer ); - return heap_strdupW( ntfsW ); -} - static UINT64 get_freespace( const WCHAR *dir, UINT64 *disksize ) { WCHAR root[] = {'\\','\\','.','\\','A',':',0}; @@ -1473,6 +1507,69 @@ return free.QuadPart; } +static enum fill_status fill_diskdrive( struct table *table, const struct expr *cond ) +{ + static const WCHAR fmtW[] = + {'\\','\\','\\','\\','.','\\','\\','P','H','Y','S','I','C','A','L','D','R','I','V','E','%','u',0}; + WCHAR device_id[sizeof(fmtW)/sizeof(fmtW[0]) + 10], root[] = {'A',':','\\',0}; + struct record_diskdrive *rec; + UINT i, row = 0, offset = 0, index = 0, type; + UINT64 size = 1024 * 1024 * 1024; + DWORD drives = GetLogicalDrives(); + enum fill_status status = FILL_STATUS_UNFILTERED; + + if (!resize_table( table, 2, sizeof(*rec) )) return FILL_STATUS_FAILED; + + for (i = 0; i < sizeof(drives); i++) + { + if (drives & (1 << i)) + { + root[0] = 'A' + i; + type = GetDriveTypeW( root ); + if (type != DRIVE_FIXED && type != DRIVE_REMOVABLE) + continue; + + if (!resize_table( table, row + 1, sizeof(*rec) )) return FILL_STATUS_FAILED; + + rec = (struct record_diskdrive *)(table->data + offset); + sprintfW( device_id, fmtW, index ); + rec->device_id = heap_strdupW( device_id ); + rec->index = index; + rec->interfacetype = diskdrive_interfacetypeW; + rec->manufacturer = diskdrive_manufacturerW; + if (type == DRIVE_FIXED) + rec->mediatype = diskdrive_mediatype_fixedW; + else + rec->mediatype = diskdrive_mediatype_removableW; + rec->model = diskdrive_modelW; + rec->serialnumber = diskdrive_serialW; + get_freespace( root, &size ); + rec->size = size; + if (!match_row( table, row, cond, &status )) + { + free_row_values( table, row ); + continue; + } + offset += sizeof(*rec); + index++; + row++; + } + } + TRACE("created %u rows\n", row); + table->num_rows = row; + return status; +} + +static WCHAR *get_filesystem( const WCHAR *root ) +{ + static const WCHAR ntfsW[] = {'N','T','F','S',0}; + WCHAR buffer[MAX_PATH + 1]; + + if (GetVolumeInformationW( root, NULL, 0, NULL, NULL, NULL, buffer, MAX_PATH + 1 )) + return heap_strdupW( buffer ); + return heap_strdupW( ntfsW ); +} + static enum fill_status fill_diskpartition( struct table *table, const struct expr *cond ) { static const WCHAR fmtW[] = @@ -1734,6 +1831,24 @@ return status; } +static enum fill_status fill_physicalmemory( struct table *table, const struct expr *cond ) +{ + struct record_physicalmemory *rec; + enum fill_status status = FILL_STATUS_UNFILTERED; + UINT row = 0; + + if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; + + rec = (struct record_physicalmemory *)table->data; + rec->capacity = get_total_physical_memory(); + if (!match_row( table, row, cond, &status )) free_row_values( table, row ); + else row++; + + TRACE("created %u rows\n", row); + table->num_rows = row; + return status; +} + static WCHAR *get_cmdline( DWORD process_id ) { if (process_id == GetCurrentProcessId()) return heap_strdupW( GetCommandLineW() ); @@ -1993,10 +2108,12 @@ if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; rec = (struct record_operatingsystem *)table->data; + rec->buildnumber = os_buildnumberW; rec->caption = os_captionW; rec->codeset = get_codeset(); rec->countrycode = get_countrycode(); rec->csdversion = os_csdversionW; + rec->installdate = os_installdateW; rec->lastbootuptime = get_lastbootuptime(); rec->localdatetime = get_localdatetime(); rec->locale = get_locale(); @@ -2005,6 +2122,7 @@ rec->oslanguage = GetSystemDefaultLangID(); rec->osproductsuite = 2461140; /* Windows XP Professional */ rec->ostype = 18; /* WINNT */ + rec->serialnumber = os_serialnumberW; rec->servicepackmajor = 3; rec->servicepackminor = 0; rec->suitemask = 272; /* Single User + Terminal */ @@ -2232,6 +2350,7 @@ rec = (struct record_videocontroller *)table->data; rec->adapter_dactype = videocontroller_dactypeW; rec->adapter_ram = vidmem; + rec->availability = 3; /* Running or Full Power */ rec->current_bitsperpixel = get_bits_per_pixel( &hres, &vres ); rec->current_horizontalres = hres; rec->current_verticalres = vres; @@ -2258,7 +2377,7 @@ { class_compsysW, SIZEOF(col_compsys), col_compsys, 0, 0, NULL, fill_compsys }, { class_datafileW, SIZEOF(col_datafile), col_datafile, 0, 0, NULL, fill_datafile }, { class_directoryW, SIZEOF(col_directory), col_directory, 0, 0, NULL, fill_directory }, - { class_diskdriveW, SIZEOF(col_diskdrive), col_diskdrive, SIZEOF(data_diskdrive), 0, (BYTE *)data_diskdrive }, + { class_diskdriveW, SIZEOF(col_diskdrive), col_diskdrive, 0, 0, NULL, fill_diskdrive }, { class_diskpartitionW, SIZEOF(col_diskpartition), col_diskpartition, 0, 0, NULL, fill_diskpartition }, { class_logicaldiskW, SIZEOF(col_logicaldisk), col_logicaldisk, 0, 0, NULL, fill_logicaldisk }, { class_logicaldisk2W, SIZEOF(col_logicaldisk), col_logicaldisk, 0, 0, NULL, fill_logicaldisk }, @@ -2268,6 +2387,7 @@ { class_osW, SIZEOF(col_os), col_os, 0, 0, NULL, fill_os }, { class_paramsW, SIZEOF(col_param), col_param, SIZEOF(data_param), 0, (BYTE *)data_param }, { class_physicalmediaW, SIZEOF(col_physicalmedia), col_physicalmedia, SIZEOF(data_physicalmedia), 0, (BYTE *)data_physicalmedia }, + { class_physicalmemoryW, SIZEOF(col_physicalmemory), col_physicalmemory, 0, 0, NULL, fill_physicalmemory }, { class_processW, SIZEOF(col_process), col_process, 0, 0, NULL, fill_process }, { class_processorW, SIZEOF(col_processor), col_processor, 0, 0, NULL, fill_processor }, { class_qualifiersW, SIZEOF(col_qualifier), col_qualifier, SIZEOF(data_qualifier), 0, (BYTE *)data_qualifier }, diff -Nru wine1.7-1.7.15/dlls/wbemprox/class.c wine1.7-1.7.16/dlls/wbemprox/class.c --- wine1.7-1.7.15/dlls/wbemprox/class.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wbemprox/class.c 2014-04-04 19:13:44.000000000 +0000 @@ -476,17 +476,17 @@ TRACE("%p, %s, %08x, %s, %p\n", iface, debugstr_w(wszQualifierName), lFlags, debugstr_variant(pQualifierVal), pNames); - if (wszQualifierName || pQualifierVal) - { - FIXME("qualifier not supported\n"); - return E_NOTIMPL; - } - if (lFlags != WBEM_FLAG_ALWAYS) + if (lFlags != WBEM_FLAG_ALWAYS && + lFlags != WBEM_FLAG_NONSYSTEM_ONLY && + lFlags != WBEM_FLAG_SYSTEM_ONLY) { FIXME("flags %08x not supported\n", lFlags); return E_NOTIMPL; } - return get_properties( ec->query->view, pNames ); + if (wszQualifierName || pQualifierVal) + FIXME("qualifier not supported\n"); + + return get_properties( ec->query->view, lFlags, pNames ); } static HRESULT WINAPI class_object_BeginEnumeration( diff -Nru wine1.7-1.7.15/dlls/wbemprox/query.c wine1.7-1.7.16/dlls/wbemprox/query.c --- wine1.7-1.7.15/dlls/wbemprox/query.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wbemprox/query.c 2014-04-04 19:13:44.000000000 +0000 @@ -959,7 +959,7 @@ return set_value( view->table, row, column, val, type ); } -HRESULT get_properties( const struct view *view, SAFEARRAY **props ) +HRESULT get_properties( const struct view *view, LONG flags, SAFEARRAY **props ) { SAFEARRAY *sa; BSTR str; @@ -970,8 +970,14 @@ for (i = 0; i < view->table->num_cols; i++) { + BOOL is_system; + if (is_method( view->table, i )) continue; + is_system = is_system_prop( view->table->columns[i].name ); + if ((flags & WBEM_FLAG_NONSYSTEM_ONLY) && is_system) continue; + else if ((flags & WBEM_FLAG_SYSTEM_ONLY) && !is_system) continue; + str = SysAllocString( view->table->columns[i].name ); if (!str || SafeArrayPutElement( sa, &i, str ) != S_OK) { diff -Nru wine1.7-1.7.15/dlls/wbemprox/tests/query.c wine1.7-1.7.16/dlls/wbemprox/tests/query.c --- wine1.7-1.7.15/dlls/wbemprox/tests/query.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wbemprox/tests/query.c 2014-04-04 19:13:44.000000000 +0000 @@ -616,6 +616,40 @@ SysFreeString( query ); } +static void test_GetNames( IWbemServices *services ) +{ + static const WCHAR queryW[] = + {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_', + 'O','p','e','r','a','t','i','n','g','S','y','s','t','e','m',0}; + BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW ); + IEnumWbemClassObject *result; + HRESULT hr; + + hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result ); + ok( hr == S_OK, "got %08x\n", hr ); + + for (;;) + { + IWbemClassObject *obj; + SAFEARRAY *names; + ULONG count; + VARIANT val; + + IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count ); + if (!count) break; + + VariantInit( &val ); + hr = IWbemClassObject_GetNames( obj, NULL, WBEM_FLAG_NONSYSTEM_ONLY, &val, &names ); + ok( hr == S_OK, "got %08x\n", hr ); + + SafeArrayDestroy( names ); + IWbemClassObject_Release( obj ); + } + IEnumWbemClassObject_Release( result ); + SysFreeString( query ); + SysFreeString( wql ); +} + START_TEST(query) { static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0}; @@ -647,6 +681,7 @@ test_StdRegProv( services ); test_notification_query_async( services ); test_query_async( services ); + test_GetNames( services ); SysFreeString( path ); IWbemServices_Release( services ); diff -Nru wine1.7-1.7.15/dlls/wbemprox/wbemprox_private.h wine1.7-1.7.16/dlls/wbemprox/wbemprox_private.h --- wine1.7-1.7.15/dlls/wbemprox/wbemprox_private.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wbemprox/wbemprox_private.h 2014-04-04 19:13:44.000000000 +0000 @@ -200,7 +200,7 @@ SAFEARRAY *to_safearray( const struct array *, CIMTYPE ) DECLSPEC_HIDDEN; VARTYPE to_vartype( CIMTYPE ) DECLSPEC_HIDDEN; void destroy_array( struct array *, CIMTYPE ) DECLSPEC_HIDDEN; -HRESULT get_properties( const struct view *, SAFEARRAY ** ) DECLSPEC_HIDDEN; +HRESULT get_properties( const struct view *, LONG, SAFEARRAY ** ) DECLSPEC_HIDDEN; HRESULT get_object( const WCHAR *, IWbemClassObject ** ) DECLSPEC_HIDDEN; BSTR get_method_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; BSTR get_property_name( const WCHAR *, UINT ) DECLSPEC_HIDDEN; diff -Nru wine1.7-1.7.15/dlls/wined3d/arb_program_shader.c wine1.7-1.7.16/dlls/wined3d/arb_program_shader.c --- wine1.7-1.7.15/dlls/wined3d/arb_program_shader.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wined3d/arb_program_shader.c 2014-04-04 19:13:44.000000000 +0000 @@ -9,7 +9,7 @@ * Copyright 2006 Ivan Gyurdiev * Copyright 2006 Jason Green * Copyright 2006 Henri Verbeet - * Copyright 2007-2011, 2013 Stefan Dösinger for CodeWeavers + * Copyright 2007-2011, 2013-2014 Stefan Dösinger for CodeWeavers * Copyright 2009 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -1792,6 +1792,11 @@ static void shader_hw_nop(const struct wined3d_shader_instruction *ins) {} +static DWORD shader_arb_select_component(DWORD swizzle, DWORD component) +{ + return ((swizzle >> 2 * component) & 0x3) * 0x55; +} + static void shader_hw_mov(const struct wined3d_shader_instruction *ins) { const struct wined3d_shader *shader = ins->ctx->shader; @@ -1862,7 +1867,7 @@ * with more than one component. Thus replicate the first source argument over all * 4 components. For example, .xyzw -> .x (or better: .xxxx), .zwxy -> .z, etc) */ struct wined3d_shader_src_param tmp_src = ins->src[0]; - tmp_src.swizzle = (tmp_src.swizzle & 0x3) * 0x55; + tmp_src.swizzle = shader_arb_select_component(tmp_src.swizzle, 0); shader_arb_get_src_param(ins, &tmp_src, 0, src0_param); shader_addline(buffer, "ARL A0.x, %s;\n", src0_param); } @@ -2472,30 +2477,36 @@ } } -static void shader_hw_rcp(const struct wined3d_shader_instruction *ins) +static DWORD abs_modifier(DWORD mod, BOOL *need_abs) { - struct wined3d_shader_buffer *buffer = ins->ctx->buffer; - - char dst[50]; - char src[50]; + *need_abs = FALSE; - shader_arb_get_dst_param(ins, &ins->dst[0], dst); /* Destination */ - shader_arb_get_src_param(ins, &ins->src[0], 0, src); - if (ins->src[0].swizzle == WINED3DSP_NOSWIZZLE) + switch(mod) { - /* Dx sdk says .x is used if no swizzle is given, but our test shows that - * .w is used - */ - strcat(src, ".w"); + case WINED3DSPSM_NONE: return WINED3DSPSM_ABS; + case WINED3DSPSM_NEG: return WINED3DSPSM_ABS; + case WINED3DSPSM_BIAS: *need_abs = TRUE; return WINED3DSPSM_BIAS; + case WINED3DSPSM_BIASNEG: *need_abs = TRUE; return WINED3DSPSM_BIASNEG; + case WINED3DSPSM_SIGN: *need_abs = TRUE; return WINED3DSPSM_SIGN; + case WINED3DSPSM_SIGNNEG: *need_abs = TRUE; return WINED3DSPSM_SIGNNEG; + case WINED3DSPSM_COMP: *need_abs = TRUE; return WINED3DSPSM_COMP; + case WINED3DSPSM_X2: *need_abs = TRUE; return WINED3DSPSM_X2; + case WINED3DSPSM_X2NEG: *need_abs = TRUE; return WINED3DSPSM_X2NEG; + case WINED3DSPSM_DZ: *need_abs = TRUE; return WINED3DSPSM_DZ; + case WINED3DSPSM_DW: *need_abs = TRUE; return WINED3DSPSM_DW; + case WINED3DSPSM_ABS: return WINED3DSPSM_ABS; + case WINED3DSPSM_ABSNEG: return WINED3DSPSM_ABS; } - - shader_addline(buffer, "RCP%s %s, %s;\n", shader_arb_get_modifier(ins), dst, src); + FIXME("Unknown modifier %u\n", mod); + return mod; } static void shader_hw_scalar_op(const struct wined3d_shader_instruction *ins) { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; const char *instruction; + struct wined3d_shader_src_param src0_copy = ins->src[0]; + BOOL need_abs = FALSE; char dst[50]; char src[50]; @@ -2504,24 +2515,46 @@ { case WINED3DSIH_RSQ: instruction = "RSQ"; break; case WINED3DSIH_RCP: instruction = "RCP"; break; - case WINED3DSIH_EXP: instruction = "EX2"; break; - case WINED3DSIH_EXPP: instruction = "EXP"; break; + case WINED3DSIH_EXPP: + if (ins->ctx->reg_maps->shader_version.major < 2) + { + instruction = "EXP"; + break; + } + /* Drop through. */ + case WINED3DSIH_EXP: + instruction = "EX2"; + break; + case WINED3DSIH_LOG: + case WINED3DSIH_LOGP: + /* The precision requirements suggest that LOGP matches ARBvp's LOG + * instruction, but notice that the output of those instructions is + * different. */ + src0_copy.modifiers = abs_modifier(src0_copy.modifiers, &need_abs); + instruction = "LG2"; + break; default: instruction = ""; FIXME("Unhandled opcode %#x\n", ins->handler_idx); break; } + /* Dx sdk says .x is used if no swizzle is given, but our test shows that + * .w is used. */ + src0_copy.swizzle = shader_arb_select_component(src0_copy.swizzle, 3); + shader_arb_get_dst_param(ins, &ins->dst[0], dst); /* Destination */ - shader_arb_get_src_param(ins, &ins->src[0], 0, src); - if (ins->src[0].swizzle == WINED3DSP_NOSWIZZLE) + shader_arb_get_src_param(ins, &src0_copy, 0, src); + + if(need_abs) { - /* Dx sdk says .x is used if no swizzle is given, but our test shows that - * .w is used - */ - strcat(src, ".w"); + shader_addline(buffer, "ABS TA.w, %s;\n", src); + shader_addline(buffer, "%s%s %s, TA.w;\n", instruction, shader_arb_get_modifier(ins), dst); + } + else + { + shader_addline(buffer, "%s%s %s, %s;\n", instruction, shader_arb_get_modifier(ins), dst, src); } - shader_addline(buffer, "%s%s %s, %s;\n", instruction, shader_arb_get_modifier(ins), dst, src); } static void shader_hw_nrm(const struct wined3d_shader_instruction *ins) @@ -2761,64 +2794,6 @@ shader_addline(buffer, "MUL%s %s, %s, ycorrection.y;\n", shader_arb_get_modifier(ins), dst, dst_name); } -static DWORD abs_modifier(DWORD mod, BOOL *need_abs) -{ - *need_abs = FALSE; - - switch(mod) - { - case WINED3DSPSM_NONE: return WINED3DSPSM_ABS; - case WINED3DSPSM_NEG: return WINED3DSPSM_ABS; - case WINED3DSPSM_BIAS: *need_abs = TRUE; return WINED3DSPSM_BIAS; - case WINED3DSPSM_BIASNEG: *need_abs = TRUE; return WINED3DSPSM_BIASNEG; - case WINED3DSPSM_SIGN: *need_abs = TRUE; return WINED3DSPSM_SIGN; - case WINED3DSPSM_SIGNNEG: *need_abs = TRUE; return WINED3DSPSM_SIGNNEG; - case WINED3DSPSM_COMP: *need_abs = TRUE; return WINED3DSPSM_COMP; - case WINED3DSPSM_X2: *need_abs = TRUE; return WINED3DSPSM_X2; - case WINED3DSPSM_X2NEG: *need_abs = TRUE; return WINED3DSPSM_X2NEG; - case WINED3DSPSM_DZ: *need_abs = TRUE; return WINED3DSPSM_DZ; - case WINED3DSPSM_DW: *need_abs = TRUE; return WINED3DSPSM_DW; - case WINED3DSPSM_ABS: return WINED3DSPSM_ABS; - case WINED3DSPSM_ABSNEG: return WINED3DSPSM_ABS; - } - FIXME("Unknown modifier %u\n", mod); - return mod; -} - -static void shader_hw_log(const struct wined3d_shader_instruction *ins) -{ - struct wined3d_shader_buffer *buffer = ins->ctx->buffer; - char src0[50], dst[50]; - struct wined3d_shader_src_param src0_copy = ins->src[0]; - BOOL need_abs = FALSE; - const char *instr; - - switch(ins->handler_idx) - { - case WINED3DSIH_LOG: instr = "LG2"; break; - case WINED3DSIH_LOGP: instr = "LOG"; break; - default: - ERR("Unexpected instruction %d\n", ins->handler_idx); - return; - } - - /* LOG and LOGP operate on the absolute value of the input */ - src0_copy.modifiers = abs_modifier(src0_copy.modifiers, &need_abs); - - shader_arb_get_dst_param(ins, &ins->dst[0], dst); - shader_arb_get_src_param(ins, &src0_copy, 0, src0); - - if(need_abs) - { - shader_addline(buffer, "ABS TA, %s;\n", src0); - shader_addline(buffer, "%s%s %s, TA;\n", instr, shader_arb_get_modifier(ins), dst); - } - else - { - shader_addline(buffer, "%s%s %s, %s;\n", instr, shader_arb_get_modifier(ins), dst, src0); - } -} - static void shader_hw_pow(const struct wined3d_shader_instruction *ins) { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; @@ -5243,8 +5218,8 @@ /* WINED3DSIH_LABEL */ shader_hw_label, /* WINED3DSIH_LD */ NULL, /* WINED3DSIH_LIT */ shader_hw_map2gl, - /* WINED3DSIH_LOG */ shader_hw_log, - /* WINED3DSIH_LOGP */ shader_hw_log, + /* WINED3DSIH_LOG */ shader_hw_scalar_op, + /* WINED3DSIH_LOGP */ shader_hw_scalar_op, /* WINED3DSIH_LOOP */ shader_hw_loop, /* WINED3DSIH_LRP */ shader_hw_lrp, /* WINED3DSIH_LT */ NULL, @@ -5264,7 +5239,7 @@ /* WINED3DSIH_NRM */ shader_hw_nrm, /* WINED3DSIH_PHASE */ shader_hw_nop, /* WINED3DSIH_POW */ shader_hw_pow, - /* WINED3DSIH_RCP */ shader_hw_rcp, + /* WINED3DSIH_RCP */ shader_hw_scalar_op, /* WINED3DSIH_REP */ shader_hw_rep, /* WINED3DSIH_RET */ shader_hw_ret, /* WINED3DSIH_ROUND_NI */ NULL, diff -Nru wine1.7-1.7.15/dlls/wined3d/context.c wine1.7-1.7.16/dlls/wined3d/context.c --- wine1.7-1.7.15/dlls/wined3d/context.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wined3d/context.c 2014-04-04 19:13:44.000000000 +0000 @@ -719,9 +719,10 @@ } } -static void context_restore_pixel_format(struct wined3d_context *ctx) +static BOOL context_restore_pixel_format(struct wined3d_context *ctx) { const struct wined3d_gl_info *gl_info = ctx->gl_info; + BOOL ret = FALSE; if (ctx->restore_pf && IsWindow(ctx->restore_pf_win)) { @@ -730,7 +731,7 @@ HDC dc = GetDC(ctx->restore_pf_win); if (dc) { - if (!GL_EXTCALL(wglSetPixelFormatWINE(dc, ctx->restore_pf))) + if (!(ret = GL_EXTCALL(wglSetPixelFormatWINE(dc, ctx->restore_pf)))) { ERR("wglSetPixelFormatWINE failed to restore pixel format %d on window %p.\n", ctx->restore_pf, ctx->restore_pf_win); @@ -746,14 +747,19 @@ ctx->restore_pf = 0; ctx->restore_pf_win = NULL; + return ret; } -static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, int format) +static BOOL context_set_pixel_format(struct wined3d_context *context, HDC dc, BOOL private, int format) { const struct wined3d_gl_info *gl_info = context->gl_info; - int current = GetPixelFormat(dc); + int current; - if (current == format) return TRUE; + if (dc == context->hdc && context->hdc_is_private && context->hdc_has_format) + return TRUE; + + current = GetPixelFormat(dc); + if (current == format) goto success; if (!current) { @@ -766,8 +772,8 @@ } context->restore_pf = 0; - context->restore_pf_win = WindowFromDC(dc); - return TRUE; + context->restore_pf_win = private ? NULL : WindowFromDC(dc); + goto success; } /* By default WGL doesn't allow pixel format adjustments but we need it @@ -785,16 +791,16 @@ return FALSE; } - win = WindowFromDC(dc); + win = private ? NULL : WindowFromDC(dc); if (win != context->restore_pf_win) { context_restore_pixel_format(context); - context->restore_pf = current; + context->restore_pf = private ? 0 : current; context->restore_pf_win = win; } - return TRUE; + goto success; } /* OpenGL doesn't allow pixel format adjustments. Print an error and @@ -804,6 +810,11 @@ ERR("Unable to set pixel format %d on device context %p. Already using format %d.\n", format, dc, current); return TRUE; + +success: + if (dc == context->hdc && context->hdc_is_private) + context->hdc_has_format = TRUE; + return TRUE; } static BOOL context_set_gl_context(struct wined3d_context *ctx) @@ -811,7 +822,7 @@ struct wined3d_swapchain *swapchain = ctx->swapchain; BOOL backup = FALSE; - if (!context_set_pixel_format(ctx, ctx->hdc, ctx->pixel_format)) + if (!context_set_pixel_format(ctx, ctx->hdc, ctx->hdc_is_private, ctx->pixel_format)) { WARN("Failed to set pixel format %d on device context %p.\n", ctx->pixel_format, ctx->hdc); @@ -844,7 +855,7 @@ return FALSE; } - if (!context_set_pixel_format(ctx, dc, ctx->pixel_format)) + if (!context_set_pixel_format(ctx, dc, TRUE, ctx->pixel_format)) { ERR("Failed to set pixel format %d on device context %p.\n", ctx->pixel_format, dc); @@ -884,24 +895,20 @@ TRACE("Updating context %p window from %p to %p.\n", context, context->win_handle, context->swapchain->win_handle); - if (context->valid) + if (context->hdc) wined3d_release_dc(context->win_handle, context->hdc); - else - context->valid = 1; context->win_handle = context->swapchain->win_handle; + context->hdc_is_private = FALSE; + context->hdc_has_format = FALSE; context->needs_set = 1; + context->valid = 1; if (!(context->hdc = GetDC(context->win_handle))) { ERR("Failed to get a device context for window %p.\n", context->win_handle); - goto err; + context->valid = 0; } - - return; - -err: - context->valid = 0; } static void context_destroy_gl_resources(struct wined3d_context *context) @@ -1094,7 +1101,8 @@ if (!--context->level) { - context_restore_pixel_format(context); + if (context_restore_pixel_format(context)) + context->needs_set = 1; if (context->restore_ctx) { TRACE("Restoring GL context %p on device context %p.\n", context->restore_ctx, context->restore_dc); @@ -1122,7 +1130,8 @@ context->restore_dc = wglGetCurrentDC(); context->needs_set = 1; } - else if (context->pixel_format != GetPixelFormat(context->hdc)) + else if (!context->needs_set && !(context->hdc_is_private && context->hdc_has_format) + && context->pixel_format != GetPixelFormat(context->hdc)) context->needs_set = 1; } } @@ -1331,6 +1340,7 @@ int swap_interval; DWORD state; HDC hdc; + BOOL hdc_is_private = FALSE; TRACE("swapchain %p, target %p, window %p.\n", swapchain, target, swapchain->win_handle); @@ -1391,7 +1401,9 @@ { WARN("Failed to retireve device context, trying swapchain backup.\n"); - if (!(hdc = swapchain_get_backup_dc(swapchain))) + if ((hdc = swapchain_get_backup_dc(swapchain))) + hdc_is_private = TRUE; + else { ERR("Failed to retrieve a device context.\n"); goto out; @@ -1442,7 +1454,7 @@ ret->gl_info = gl_info; - if (!context_set_pixel_format(ret, hdc, pixel_format)) + if (!context_set_pixel_format(ret, hdc, hdc_is_private, pixel_format)) { ERR("Failed to set pixel format %d on device context %p.\n", pixel_format, hdc); context_release(ret); @@ -1519,6 +1531,8 @@ ret->glCtx = ctx; ret->win_handle = swapchain->win_handle; ret->hdc = hdc; + ret->hdc_is_private = hdc_is_private; + ret->hdc_has_format = TRUE; ret->pixel_format = pixel_format; ret->needs_set = 1; diff -Nru wine1.7-1.7.15/dlls/wined3d/directx.c wine1.7-1.7.16/dlls/wined3d/directx.c --- wine1.7-1.7.15/dlls/wined3d/directx.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wined3d/directx.c 2014-04-04 19:13:44.000000000 +0000 @@ -4473,8 +4473,8 @@ caps->MaxAnisotropy = gl_info->limits.anisotropy; caps->MaxPointSize = gl_info->limits.pointsize_max; - caps->MaxPrimitiveCount = 0xfffff; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */ - caps->MaxVertexIndex = 0xfffff; + caps->MaxPrimitiveCount = 0x555555; /* Taken from an AMD Radeon HD 5700 (Evergreen) GPU. */ + caps->MaxVertexIndex = 0xffffff; /* Taken from an AMD Radeon HD 5700 (Evergreen) GPU. */ caps->MaxStreams = MAX_STREAMS; caps->MaxStreamStride = 1024; diff -Nru wine1.7-1.7.15/dlls/wined3d/resource.c wine1.7-1.7.16/dlls/wined3d/resource.c --- wine1.7-1.7.15/dlls/wined3d/resource.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wined3d/resource.c 2014-04-04 19:13:44.000000000 +0000 @@ -100,7 +100,6 @@ resource->parent = parent; resource->parent_ops = parent_ops; resource->resource_ops = resource_ops; - wined3d_private_store_init(&resource->private_store); if (size) { @@ -144,8 +143,6 @@ adapter_adjust_memory(resource->device->adapter, 0 - resource->size); } - wined3d_private_store_cleanup(&resource->private_store); - wined3d_resource_free_sysmem(resource); device_resource_released(resource->device, resource); @@ -160,61 +157,6 @@ resource, resource->type); } -HRESULT CDECL wined3d_resource_set_private_data(struct wined3d_resource *resource, REFGUID guid, - const void *data, DWORD data_size, DWORD flags) -{ - TRACE("resource %p, riid %s, data %p, data_size %u, flags %#x.\n", - resource, debugstr_guid(guid), data, data_size, flags); - - return wined3d_private_store_set_private_data(&resource->private_store, guid, data, data_size, flags); -} - -HRESULT CDECL wined3d_resource_get_private_data(const struct wined3d_resource *resource, REFGUID guid, - void *data, DWORD *data_size) -{ - const struct wined3d_private_data *d; - DWORD size_in; - - TRACE("resource %p, guid %s, data %p, data_size %p.\n", - resource, debugstr_guid(guid), data, data_size); - - d = wined3d_private_store_get_private_data(&resource->private_store, guid); - if (!d) - return WINED3DERR_NOTFOUND; - - size_in = *data_size; - *data_size = d->size; - if (!data) - return WINED3D_OK; - if (size_in < d->size) - return WINED3DERR_MOREDATA; - - if (d->flags & WINED3DSPD_IUNKNOWN) - { - *(IUnknown **)data = d->content.object; - IUnknown_AddRef(d->content.object); - } - else - { - memcpy(data, d->content.data, d->size); - } - - return WINED3D_OK; -} - -HRESULT CDECL wined3d_resource_free_private_data(struct wined3d_resource *resource, REFGUID guid) -{ - struct wined3d_private_data *entry; - TRACE("resource %p, guid %s.\n", resource, debugstr_guid(guid)); - - entry = wined3d_private_store_get_private_data(&resource->private_store, guid); - if (!entry) - return WINED3DERR_NOTFOUND; - wined3d_private_store_free_private_data(&resource->private_store, entry); - - return WINED3D_OK; -} - DWORD resource_set_priority(struct wined3d_resource *resource, DWORD priority) { DWORD prev = resource->priority; diff -Nru wine1.7-1.7.15/dlls/wined3d/wined3d_private.h wine1.7-1.7.16/dlls/wined3d/wined3d_private.h --- wine1.7-1.7.15/dlls/wined3d/wined3d_private.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wined3d/wined3d_private.h 2014-04-04 19:13:44.000000000 +0000 @@ -1086,7 +1086,9 @@ DWORD lowest_disabled_stage : 4; /* Max MAX_TEXTURES, 8 */ DWORD rebind_fbo : 1; DWORD needs_set : 1; - DWORD padding : 18; + DWORD hdc_is_private : 1; + DWORD hdc_has_format : 1; /* only meaningful if hdc_is_private */ + DWORD padding : 16; DWORD shader_update_mask; DWORD constant_update_mask; DWORD numbered_array_mask; @@ -2006,7 +2008,6 @@ DWORD priority; void *heap_memory; struct list resource_list_entry; - struct wined3d_private_store private_store; void *parent; const struct wined3d_parent_ops *parent_ops; diff -Nru wine1.7-1.7.15/dlls/wined3d/wined3d.spec wine1.7-1.7.16/dlls/wined3d/wined3d.spec --- wine1.7-1.7.15/dlls/wined3d/wined3d.spec 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wined3d/wined3d.spec 2014-04-04 19:13:44.000000000 +0000 @@ -170,12 +170,9 @@ @ cdecl wined3d_query_incref(ptr) @ cdecl wined3d_query_issue(ptr long) -@ cdecl wined3d_resource_free_private_data(ptr ptr) @ cdecl wined3d_resource_get_desc(ptr ptr) @ cdecl wined3d_resource_get_parent(ptr) -@ cdecl wined3d_resource_get_private_data(ptr ptr ptr ptr) @ cdecl wined3d_resource_set_parent(ptr ptr) -@ cdecl wined3d_resource_set_private_data(ptr ptr ptr long long) @ cdecl wined3d_rendertarget_view_create(ptr ptr ptr) @ cdecl wined3d_rendertarget_view_decref(ptr) diff -Nru wine1.7-1.7.15/dlls/winemac.drv/macdrv_cocoa.h wine1.7-1.7.16/dlls/winemac.drv/macdrv_cocoa.h --- wine1.7-1.7.15/dlls/winemac.drv/macdrv_cocoa.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winemac.drv/macdrv_cocoa.h 2014-04-04 19:13:44.000000000 +0000 @@ -89,7 +89,7 @@ #ifndef DECLSPEC_HIDDEN -# if defined(__MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) +# if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) # define DECLSPEC_HIDDEN # elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) # define DECLSPEC_HIDDEN __attribute__((visibility ("hidden"))) diff -Nru wine1.7-1.7.15/dlls/winemac.drv/opengl.c wine1.7-1.7.16/dlls/winemac.drv/opengl.c --- wine1.7-1.7.15/dlls/winemac.drv/opengl.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winemac.drv/opengl.c 2014-04-04 19:13:44.000000000 +0000 @@ -1311,27 +1311,28 @@ */ static BOOL set_win_format(struct macdrv_win_data *data, int format) { - macdrv_window cocoa_window; - TRACE("hwnd %p format %d\n", data->hwnd, format); - if (!get_gl_view_window_rect(data, &cocoa_window, &data->gl_rect)) + if (!data->gl_view) { - ERR("no top-level parent with Cocoa window in this process\n"); - return FALSE; - } + macdrv_window cocoa_window; - if (data->gl_view) macdrv_dispose_view(data->gl_view); - data->gl_view = macdrv_create_view(cocoa_window, cgrect_from_rect(data->gl_rect)); + if (!get_gl_view_window_rect(data, &cocoa_window, &data->gl_rect)) + { + ERR("no top-level parent with Cocoa window in this process\n"); + return FALSE; + } - if (!data->gl_view) - { - WARN("failed to create GL view for window %p rect %s\n", cocoa_window, wine_dbgstr_rect(&data->gl_rect)); - return FALSE; - } + data->gl_view = macdrv_create_view(cocoa_window, cgrect_from_rect(data->gl_rect)); + if (!data->gl_view) + { + WARN("failed to create GL view for window %p rect %s\n", cocoa_window, wine_dbgstr_rect(&data->gl_rect)); + return FALSE; + } - TRACE("created GL view %p in window %p at %s\n", data->gl_view, cocoa_window, - wine_dbgstr_rect(&data->gl_rect)); + TRACE("created GL view %p in window %p at %s\n", data->gl_view, cocoa_window, + wine_dbgstr_rect(&data->gl_rect)); + } data->pixel_format = format; @@ -1503,13 +1504,25 @@ */ static void sync_swap_interval(struct wgl_context *context) { - struct macdrv_win_data *data; - - if (InterlockedCompareExchange(&context->update_swap_interval, FALSE, TRUE) && - (data = get_win_data(context->draw_hwnd))) + if (InterlockedCompareExchange(&context->update_swap_interval, FALSE, TRUE)) { - set_swap_interval(context, data->swap_interval); - release_win_data(data); + int interval; + + if (context->draw_hwnd) + { + struct macdrv_win_data *data = get_win_data(context->draw_hwnd); + if (data) + { + interval = data->swap_interval; + release_win_data(data); + } + else /* window was destroyed? */ + interval = 1; + } + else /* pbuffer */ + interval = 0; + + set_swap_interval(context, interval); } } @@ -2717,6 +2730,10 @@ SetLastError(ERROR_INVALID_PIXEL_FORMAT); return FALSE; } + + if (allow_vsync && + (InterlockedCompareExchange(&context->update_swap_interval, FALSE, TRUE) || pbuffer != context->draw_pbuffer)) + set_swap_interval(context, 0); } else { @@ -3018,7 +3035,7 @@ static BOOL macdrv_wglSwapIntervalEXT(int interval) { struct wgl_context *context = NtCurrentTeb()->glContext; - struct macdrv_win_data *data; + BOOL changed = FALSE; TRACE("interval %d\n", interval); @@ -3030,6 +3047,20 @@ if (interval > 1) interval = 1; + if (context->draw_hwnd) + { + struct macdrv_win_data *data = get_win_data(context->draw_hwnd); + if (data) + { + changed = data->swap_interval != interval; + if (changed) + data->swap_interval = interval; + release_win_data(data); + } + } + else /* pbuffer */ + interval = 0; + InterlockedExchange(&context->update_swap_interval, FALSE); if (!set_swap_interval(context, interval)) { @@ -3037,25 +3068,17 @@ return FALSE; } - if ((data = get_win_data(context->draw_hwnd))) + if (changed) { - BOOL changed = data->swap_interval != interval; - if (changed) - data->swap_interval = interval; - release_win_data(data); + struct wgl_context *ctx; - if (changed) + EnterCriticalSection(&context_section); + LIST_FOR_EACH_ENTRY(ctx, &context_list, struct wgl_context, entry) { - struct wgl_context *ctx; - - EnterCriticalSection(&context_section); - LIST_FOR_EACH_ENTRY(ctx, &context_list, struct wgl_context, entry) - { - if (ctx != context && ctx->draw_hwnd == context->draw_hwnd) - InterlockedExchange(&context->update_swap_interval, TRUE); - } - LeaveCriticalSection(&context_section); + if (ctx != context && ctx->draw_hwnd == context->draw_hwnd) + InterlockedExchange(&context->update_swap_interval, TRUE); } + LeaveCriticalSection(&context_section); } return TRUE; diff -Nru wine1.7-1.7.15/dlls/winex11.drv/opengl.c wine1.7-1.7.16/dlls/winex11.drv/opengl.c --- wine1.7-1.7.15/dlls/winex11.drv/opengl.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winex11.drv/opengl.c 2014-04-04 19:13:44.000000000 +0000 @@ -252,6 +252,7 @@ XVisualInfo *visual; /* information about the GL visual */ RECT rect; /* drawable rect, relative to whole window drawable */ int swap_interval; + BOOL refresh_swap_interval; }; enum glx_swap_control_method @@ -1185,6 +1186,43 @@ } } +static BOOL set_swap_interval(Drawable drawable, int interval) +{ + BOOL ret = TRUE; + + switch (swap_control_method) + { + case GLX_SWAP_CONTROL_EXT: + X11DRV_expect_error(gdi_display, GLXErrorHandler, NULL); + pglXSwapIntervalEXT(gdi_display, drawable, interval); + XSync(gdi_display, False); + ret = !X11DRV_check_error(); + break; + + case GLX_SWAP_CONTROL_MESA: + ret = !pglXSwapIntervalMESA(interval); + break; + + case GLX_SWAP_CONTROL_SGI: + /* wglSwapIntervalEXT considers an interval value of zero to mean that + * vsync should be disabled, but glXSwapIntervalSGI considers such a + * value to be an error. Just silently ignore the request for now. + */ + if (!interval) + WARN("Request to disable vertical sync is not handled\n"); + else + ret = !pglXSwapIntervalSGI(interval); + break; + + case GLX_SWAP_CONTROL_NONE: + /* Unlikely to happen on modern GLX implementations */ + WARN("Request to adjust swap interval is not handled\n"); + break; + } + + return ret; +} + static struct gl_drawable *get_gl_drawable( HWND hwnd, HDC hdc ) { struct gl_drawable *gl; @@ -1314,6 +1352,8 @@ } } + if (gl->drawable) + gl->refresh_swap_interval = TRUE; return gl->drawable != 0; } @@ -1330,6 +1370,7 @@ * there is no way to query it, so we have to store it here. */ gl->swap_interval = 1; + gl->refresh_swap_interval = TRUE; gl->format = format; gl->visual = pglXGetVisualFromFBConfig( gdi_display, format->fbconfig ); if (!gl->visual) @@ -1355,7 +1396,10 @@ EnterCriticalSection( &context_section ); if (!XFindContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char **)&prev )) + { + gl->swap_interval = prev->swap_interval; free_gl_drawable( prev ); + } XSaveContext( gdi_display, (XID)hwnd, gl_hwnd_context, (char *)gl ); LeaveCriticalSection( &context_section ); @@ -2279,11 +2323,9 @@ LeaveCriticalSection( &context_section ); escape.code = X11DRV_SET_DRAWABLE; - escape.hwnd = 0; escape.drawable = object->drawable; escape.mode = IncludeInferiors; SetRect( &escape.dc_rect, 0, 0, object->width, object->height ); - escape.fbconfig_id = object->fmt->fmt_id; ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); TRACE( "(%p)->(%p)\n", object, hdc ); @@ -2957,36 +2999,8 @@ return FALSE; } - switch (swap_control_method) - { - case GLX_SWAP_CONTROL_EXT: - X11DRV_expect_error(gdi_display, GLXErrorHandler, NULL); - pglXSwapIntervalEXT(gdi_display, gl->drawable, interval); - XSync(gdi_display, False); - ret = !X11DRV_check_error(); - break; - - case GLX_SWAP_CONTROL_MESA: - ret = !pglXSwapIntervalMESA(interval); - break; - - case GLX_SWAP_CONTROL_SGI: - /* wglSwapIntervalEXT considers an interval value of zero to mean that - * vsync should be disabled, but glXSwapIntervalSGI considers such a - * value to be an error. Just silently ignore the request for now. - */ - if (!interval) - WARN("Request to disable vertical sync is not handled\n"); - else - ret = !pglXSwapIntervalSGI(interval); - break; - - case GLX_SWAP_CONTROL_NONE: - /* Unlikely to happen on modern GLX implementations */ - WARN("Request to adjust swap interval is not handled\n"); - break; - } - + ret = set_swap_interval(gl->drawable, interval); + gl->refresh_swap_interval = FALSE; if (ret) gl->swap_interval = interval; else @@ -3202,6 +3216,12 @@ return FALSE; } + if (gl->refresh_swap_interval) + { + set_swap_interval(gl->drawable, gl->swap_interval); + gl->refresh_swap_interval = FALSE; + } + switch (gl->type) { case DC_GL_PIXMAP_WIN: diff -Nru wine1.7-1.7.15/dlls/winex11.drv/window.c wine1.7-1.7.16/dlls/winex11.drv/window.c --- wine1.7-1.7.15/dlls/winex11.drv/window.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winex11.drv/window.c 2014-04-04 19:13:44.000000000 +0000 @@ -1970,10 +1970,8 @@ struct x11drv_escape_set_drawable escape; HWND parent; - escape.code = X11DRV_SET_DRAWABLE; - escape.hwnd = hwnd; - escape.mode = IncludeInferiors; - escape.fbconfig_id = 0; + escape.code = X11DRV_SET_DRAWABLE; + escape.mode = IncludeInferiors; escape.dc_rect.left = win_rect->left - top_rect->left; escape.dc_rect.top = win_rect->top - top_rect->top; @@ -2019,12 +2017,10 @@ struct x11drv_escape_set_drawable escape; escape.code = X11DRV_SET_DRAWABLE; - escape.hwnd = GetDesktopWindow(); escape.drawable = root_window; escape.mode = IncludeInferiors; escape.dc_rect = get_virtual_screen_rect(); OffsetRect( &escape.dc_rect, -2 * escape.dc_rect.left, -2 * escape.dc_rect.top ); - escape.fbconfig_id = 0; ExtEscape( hdc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL ); } diff -Nru wine1.7-1.7.15/dlls/winex11.drv/wintab.c wine1.7-1.7.16/dlls/winex11.drv/wintab.c --- wine1.7-1.7.15/dlls/winex11.drv/wintab.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winex11.drv/wintab.c 2014-04-04 19:13:44.000000000 +0000 @@ -415,7 +415,7 @@ return FALSE; } -static BOOL is_stylus(const char *name, const char *type) +static UINT get_cursor_type(const char *name, const char *type) { int i; static const char* tablet_stylus_whitelist[] = { @@ -426,23 +426,21 @@ NULL }; + /* First check device type to avoid cases where name is "Pen and Eraser" and type is "ERASER" */ for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { - if (name && match_token(name, tablet_stylus_whitelist[i])) - return TRUE; if (type && match_token(type, tablet_stylus_whitelist[i])) - return TRUE; + return CSR_TYPE_PEN; } - - return FALSE; -} - -static BOOL is_eraser(const char *name, const char *type) -{ - if (name && match_token(name, "eraser")) - return TRUE; if (type && match_token(type, "eraser")) - return TRUE; - return FALSE; + return CSR_TYPE_ERASER; + for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { + if (name && match_token(name, tablet_stylus_whitelist[i])) + return CSR_TYPE_PEN; + } + if (name && match_token(name, "eraser")) + return CSR_TYPE_ERASER; + + return CSR_TYPE_OTHER; } /* cursors are placed in gSysCursor rows depending on their type @@ -538,6 +536,8 @@ gSysContext.lcSensZ = 65536; gSysContext.lcSysSensX= 65536; gSysContext.lcSysSensY= 65536; + gSysContext.lcOutExtX= GetSystemMetrics(SM_CXSCREEN); + gSysContext.lcOutExtY= GetSystemMetrics(SM_CYSCREEN); /* initialize cursors */ disable_system_cursors(); @@ -635,13 +635,7 @@ cursor.NPBTNMARKS[1] = 1 ; cursor.CAPABILITIES = CRC_MULTIMODE; - /* prefer finding TYPE_PEN(most capable) */ - if (is_stylus(target->name, device_type)) - cursor.TYPE = CSR_TYPE_PEN; - else if (is_eraser(target->name, device_type)) - cursor.TYPE = CSR_TYPE_ERASER; - else - cursor.TYPE = CSR_TYPE_OTHER; + cursor.TYPE = get_cursor_type(target->name, device_type); any = target->inputclassinfo; diff -Nru wine1.7-1.7.15/dlls/winex11.drv/x11drv.h wine1.7-1.7.16/dlls/winex11.drv/x11drv.h --- wine1.7-1.7.15/dlls/winex11.drv/x11drv.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winex11.drv/x11drv.h 2014-04-04 19:13:44.000000000 +0000 @@ -283,11 +283,9 @@ struct x11drv_escape_set_drawable { enum x11drv_escape_codes code; /* escape code (X11DRV_SET_DRAWABLE) */ - HWND hwnd; /* window for this drawable */ Drawable drawable; /* X drawable */ int mode; /* ClipByChildren or IncludeInferiors */ RECT dc_rect; /* DC rectangle relative to drawable */ - XID fbconfig_id; /* fbconfig id used by the GL drawable */ }; struct x11drv_escape_get_drawable diff -Nru wine1.7-1.7.15/dlls/winhttp/cookie.c wine1.7-1.7.16/dlls/winhttp/cookie.c --- wine1.7-1.7.15/dlls/winhttp/cookie.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winhttp/cookie.c 2014-04-04 19:13:44.000000000 +0000 @@ -134,10 +134,6 @@ const WCHAR *p; int len; - if (!(cookie = heap_alloc_zero( sizeof(cookie_t) ))) return NULL; - - list_init( &cookie->entry ); - if (!(p = strchrW( string, '=' ))) { WARN("no '=' in %s\n", debugstr_w(string)); @@ -148,6 +144,11 @@ WARN("empty cookie name in %s\n", debugstr_w(string)); return NULL; } + + if (!(cookie = heap_alloc_zero( sizeof(cookie_t) ))) return NULL; + + list_init( &cookie->entry ); + len = p - string; if (!(cookie->name = heap_alloc( (len + 1) * sizeof(WCHAR) ))) { diff -Nru wine1.7-1.7.15/dlls/winhttp/tests/winhttp.c wine1.7-1.7.16/dlls/winhttp/tests/winhttp.c --- wine1.7-1.7.15/dlls/winhttp/tests/winhttp.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winhttp/tests/winhttp.c 2014-04-04 19:13:44.000000000 +0000 @@ -1721,6 +1721,11 @@ SetLastError(0xdeadbeef); ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0); + if(ret == 1) + { + skip("nxdomain returned success. Broken ISP redirects?\n"); + return; + } ok(!ret, "sent request\n"); ok(GetLastError() == ERROR_WINHTTP_NAME_NOT_RESOLVED, "expected ERROR_WINHTTP_NAME_NOT_RESOLVED got %u\n", GetLastError()); diff -Nru wine1.7-1.7.15/dlls/wininet/tests/http.c wine1.7-1.7.16/dlls/wininet/tests/http.c --- wine1.7-1.7.15/dlls/wininet/tests/http.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wininet/tests/http.c 2014-04-04 19:13:44.000000000 +0000 @@ -2196,7 +2196,7 @@ if (!memcmp(buffer, "GET ", sizeof("GET ")-1) && !strstr(buffer, "Cache-Control: no-cache\r\n")) send(c, okmsg, sizeof(okmsg)-1, 0); else if (strstr(buffer, "Cache-Control: no-cache\r\n")) send(c, okmsg, sizeof(okmsg)-1, 0); - send(c, notokmsg, sizeof(notokmsg)-1, 0); + else send(c, notokmsg, sizeof(notokmsg)-1, 0); } if (strstr(buffer, "GET /test_premature_disconnect")) trace("closing connection\n"); @@ -2213,7 +2213,7 @@ static void test_basic_request(int port, const char *verb, const char *url) { HINTERNET hi, hc, hr; - DWORD r, count; + DWORD r, count, error; char buffer[0x100]; hi = InternetOpenA(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); @@ -2225,7 +2225,10 @@ hr = HttpOpenRequestA(hc, verb, url, NULL, NULL, NULL, 0, 0); ok(hr != NULL, "HttpOpenRequest failed\n"); + SetLastError(0xdeadbeef); r = HttpSendRequestA(hr, NULL, 0, NULL, 0); + error = GetLastError(); + ok(error == ERROR_SUCCESS || broken(error != ERROR_SUCCESS), "expected ERROR_SUCCESS, got %u\n", error); ok(r, "HttpSendRequest failed\n"); count = 0; @@ -2241,32 +2244,6 @@ InternetCloseHandle(hi); } -static void test_last_error(int port) -{ - HINTERNET hi, hc, hr; - DWORD error; - BOOL r; - - hi = InternetOpenA(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); - ok(hi != NULL, "open failed\n"); - - hc = InternetConnectA(hi, "localhost", port, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 0); - ok(hc != NULL, "connect failed\n"); - - hr = HttpOpenRequestA(hc, NULL, "/test1", NULL, NULL, NULL, 0, 0); - ok(hr != NULL, "HttpOpenRequest failed\n"); - - SetLastError(0xdeadbeef); - r = HttpSendRequestA(hr, NULL, 0, NULL, 0); - error = GetLastError(); - ok(r, "HttpSendRequest failed\n"); - ok(error == ERROR_SUCCESS || broken(error != ERROR_SUCCESS), "expected ERROR_SUCCESS, got %u\n", error); - - InternetCloseHandle(hr); - InternetCloseHandle(hc); - InternetCloseHandle(hi); -} - static void test_proxy_indirect(int port) { HINTERNET hi, hc, hr; @@ -3078,12 +3055,17 @@ CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_SENT); CHECK_NOTIFIED(INTERNET_STATUS_RECEIVING_RESPONSE); CHECK_NOTIFIED(INTERNET_STATUS_RESPONSE_RECEIVED); - CHECK_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION); - CHECK_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED); CHECK_NOTIFIED(INTERNET_STATUS_REQUEST_COMPLETE); close_async_handle(session, hCompleteEvent, 2); CloseHandle(hCompleteEvent); + + /* + * The connection should be closed before closing handle. This is true for most + * wininet versions (including Wine), but some old win2k versions fail to do that. + */ + CHECK_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION); + CHECK_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED); } static void test_conn_close(int port) @@ -3933,6 +3915,7 @@ ret = HttpSendRequestA(request, NULL, 0, NULL, 0); ok(ret, "HttpSendRequest failed %u\n", GetLastError()); test_status_code(request, 200); + InternetCloseHandle(request); request = HttpOpenRequestA(connect, "POST", "/test_cache_control_verb", NULL, NULL, NULL, INTERNET_FLAG_NO_CACHE_WRITE, 0); @@ -3940,6 +3923,7 @@ ret = HttpSendRequestA(request, NULL, 0, NULL, 0); ok(ret, "HttpSendRequest failed %u\n", GetLastError()); test_status_code(request, 200); + InternetCloseHandle(request); request = HttpOpenRequestA(connect, "HEAD", "/test_cache_control_verb", NULL, NULL, NULL, INTERNET_FLAG_NO_CACHE_WRITE, 0); @@ -3947,6 +3931,7 @@ ret = HttpSendRequestA(request, NULL, 0, NULL, 0); ok(ret, "HttpSendRequest failed %u\n", GetLastError()); test_status_code(request, 200); + InternetCloseHandle(request); request = HttpOpenRequestA(connect, "GET", "/test_cache_control_verb", NULL, NULL, NULL, INTERNET_FLAG_NO_CACHE_WRITE, 0); @@ -3954,8 +3939,8 @@ ret = HttpSendRequestA(request, NULL, 0, NULL, 0); ok(ret, "HttpSendRequest failed %u\n", GetLastError()); test_status_code(request, 200); - InternetCloseHandle(request); + InternetCloseHandle(connect); InternetCloseHandle(session); } @@ -3994,7 +3979,6 @@ test_response_without_headers(si.port); test_HttpQueryInfo(si.port); test_HttpSendRequestW(si.port); - test_last_error(si.port); test_options(si.port); test_no_content(si.port); test_conn_close(si.port); diff -Nru wine1.7-1.7.15/dlls/winmm/tests/capture.c wine1.7-1.7.16/dlls/winmm/tests/capture.c --- wine1.7-1.7.15/dlls/winmm/tests/capture.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/winmm/tests/capture.c 2014-04-04 19:13:44.000000000 +0000 @@ -454,7 +454,8 @@ format.cbSize=0; rc=waveInOpen(&win,device,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR || rc==WAVERR_BADFORMAT || - rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, + rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM || + rc==MMSYSERR_ALLOCATED, "waveInOpen(%s): returned: %s\n",dev_name(device),wave_in_error(rc)); if (rc==MMSYSERR_NOERROR) { waveInClose(win); @@ -472,7 +473,8 @@ format.cbSize=0; rc=waveInOpen(&win,device,&format,0,0,CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR || rc==WAVERR_BADFORMAT || - rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, + rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM || + rc==MMSYSERR_ALLOCATED, "waveInOpen(%s): returned: %s\n",dev_name(device),wave_in_error(rc)); if (rc==MMSYSERR_NOERROR) { waveInClose(win); @@ -496,7 +498,8 @@ rc=waveInOpen(&win,device,&wfex.Format,0,0, CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR || rc==WAVERR_BADFORMAT || - rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, + rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM || + rc==MMSYSERR_ALLOCATED, "waveInOpen(%s): returned: %s\n",dev_name(device),wave_in_error(rc)); if (rc==MMSYSERR_NOERROR) { waveInClose(win); @@ -520,7 +523,8 @@ rc=waveInOpen(&win,device,&wfex.Format,0,0, CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR || rc==WAVERR_BADFORMAT || - rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, + rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM || + rc==MMSYSERR_ALLOCATED, "waveInOpen(%s): returned: %s\n",dev_name(device),wave_in_error(rc)); if (rc==MMSYSERR_NOERROR) { waveInClose(win); @@ -544,7 +548,8 @@ rc=waveInOpen(&win,device,&wfex.Format,0,0, CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR || rc==WAVERR_BADFORMAT || - rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, + rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM || + rc==MMSYSERR_ALLOCATED, "waveInOpen(%s): returned: %s\n",dev_name(device),wave_in_error(rc)); if (rc==MMSYSERR_NOERROR) { waveInClose(win); @@ -571,7 +576,8 @@ rc=waveInOpen(&win,device,&wfex.Format,0,0, CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR || rc==WAVERR_BADFORMAT || - rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, + rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM || + rc==MMSYSERR_ALLOCATED, "waveInOpen(%s): returned: %s\n",dev_name(device),wave_in_error(rc)); if (rc==MMSYSERR_NOERROR) { waveInClose(win); @@ -596,7 +602,8 @@ rc=waveInOpen(&win,device,&wfex.Format,0,0, CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR || rc==WAVERR_BADFORMAT || - rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, + rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM || + rc==MMSYSERR_ALLOCATED, "waveInOpen(%s): returned: %s\n",dev_name(device),wave_in_error(rc)); if (rc==MMSYSERR_NOERROR) { waveInClose(win); @@ -620,7 +627,8 @@ rc=waveInOpen(&win,device,&wfex.Format,0,0, CALLBACK_NULL|WAVE_FORMAT_DIRECT); ok(rc==MMSYSERR_NOERROR || rc==WAVERR_BADFORMAT || - rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM, + rc==MMSYSERR_INVALFLAG || rc==MMSYSERR_INVALPARAM || + rc==MMSYSERR_ALLOCATED, "waveInOpen(%s): returned: %s\n",dev_name(device),wave_in_error(rc)); if (rc==MMSYSERR_NOERROR) { waveInClose(win); diff -Nru wine1.7-1.7.15/dlls/wldap32/tests/parse.c wine1.7-1.7.16/dlls/wldap32/tests/parse.c --- wine1.7-1.7.15/dlls/wldap32/tests/parse.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wldap32/tests/parse.c 2014-04-04 19:13:44.000000000 +0000 @@ -48,7 +48,7 @@ timeout.tv_sec = 20; timeout.tv_usec = 0; ret = ldap_search_ext_sA( ld, (char *)"", LDAP_SCOPE_ONELEVEL, (char *)"(ou=*)", NULL, 0, ctrls, NULL, &timeout, 10, &res ); - if (ret == LDAP_SERVER_DOWN) + if (ret == LDAP_SERVER_DOWN || ret == LDAP_TIMEOUT) { skip("test server can't be reached\n"); ldap_control_freeA( sort ); diff -Nru wine1.7-1.7.15/dlls/ws2_32/socket.c wine1.7-1.7.16/dlls/ws2_32/socket.c --- wine1.7-1.7.15/dlls/ws2_32/socket.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ws2_32/socket.c 2014-04-04 19:13:44.000000000 +0000 @@ -3337,12 +3337,13 @@ #endif #ifdef HAS_IRDA +#define MAX_IRDA_DEVICES 10 + case WS_SOL_IRLMP: switch(optname) { case WS_IRLMP_ENUMDEVICES: { - static const int MAX_IRDA_DEVICES = 10; char buf[sizeof(struct irda_device_list) + (MAX_IRDA_DEVICES - 1) * sizeof(struct irda_device_info)]; int res; @@ -3402,6 +3403,7 @@ return SOCKET_ERROR; } break; /* case WS_SOL_IRLMP */ +#undef MAX_IRDA_DEVICES #endif /* Levels WS_IPPROTO_TCP and WS_IPPROTO_IP convert directly */ @@ -3671,6 +3673,40 @@ (USHORT)(ioctl & 0xffff)); } +/* do an ioctl call through the server */ +static DWORD server_ioctl_sock( SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, + LPVOID out_buff, DWORD out_size, LPDWORD ret_size, + LPWSAOVERLAPPED overlapped, + LPWSAOVERLAPPED_COMPLETION_ROUTINE completion ) +{ + HANDLE event = overlapped ? overlapped->hEvent : 0; + HANDLE handle = SOCKET2HANDLE( s ); + struct ws2_async *wsa; + NTSTATUS status; + PIO_STATUS_BLOCK io; + + if (!(wsa = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*wsa) ))) + return WSA_NOT_ENOUGH_MEMORY; + wsa->hSocket = handle; + wsa->user_overlapped = overlapped; + wsa->completion_func = completion; + io = (overlapped ? (PIO_STATUS_BLOCK)overlapped : &wsa->local_iosb); + + status = NtDeviceIoControlFile( handle, event, (PIO_APC_ROUTINE)ws2_async_apc, wsa, io, code, + in_buff, in_size, out_buff, out_size ); + if (status == STATUS_NOT_SUPPORTED) + { + FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n", + code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3); + } + else if (status == STATUS_SUCCESS) + *ret_size = io->Information; /* "Information" is the size written to the output buffer */ + + if (status != STATUS_PENDING) RtlFreeHeap( GetProcessHeap(), 0, wsa ); + + return NtStatusToWSAError( status ); +} + /********************************************************************** * WSAIoctl (WS2_32.50) * @@ -3863,12 +3899,6 @@ break; } - case WS_SIO_ADDRESS_LIST_CHANGE: - FIXME("-> SIO_ADDRESS_LIST_CHANGE request: stub\n"); - /* FIXME: error and return code depend on whether socket was created - * with WSA_FLAG_OVERLAPPED, but there is no easy way to get this */ - break; - case WS_SIO_ADDRESS_LIST_QUERY: { DWORD size; @@ -4104,11 +4134,29 @@ WSASetLastError(WSAEOPNOTSUPP); return SOCKET_ERROR; default: - FIXME("unsupported WS_IOCTL cmd (%s)\n", debugstr_wsaioctl(code)); status = WSAEOPNOTSUPP; break; } + if (status == WSAEOPNOTSUPP) + { + status = server_ioctl_sock(s, code, in_buff, in_size, out_buff, out_size, &total, + overlapped, completion); + if (status != WSAEOPNOTSUPP) + { + if (status == 0 || status == WSA_IO_PENDING) + TRACE("-> %s request\n", debugstr_wsaioctl(code)); + else + ERR("-> %s request failed with status 0x%x\n", debugstr_wsaioctl(code), status); + + /* overlapped and completion operations will be handled by the server */ + completion = NULL; + overlapped = NULL; + } + else + FIXME("unsupported WS_IOCTL cmd (%s)\n", debugstr_wsaioctl(code)); + } + if (completion) { FIXME( "completion routine %p not supported\n", completion ); diff -Nru wine1.7-1.7.15/dlls/ws2_32/tests/sock.c wine1.7-1.7.16/dlls/ws2_32/tests/sock.c --- wine1.7-1.7.15/dlls/ws2_32/tests/sock.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/ws2_32/tests/sock.c 2014-04-04 19:13:44.000000000 +0000 @@ -5518,11 +5518,21 @@ result = (ADDRINFOW *)0xdeadbeef; ret = pGetAddrInfoW(NULL, NULL, NULL, &result); + if(ret == 0) + { + skip("nxdomain returned success. Broken ISP redirects?\n"); + return; + } ok(ret == WSAHOST_NOT_FOUND, "got %d expected WSAHOST_NOT_FOUND\n", ret); ok(result == NULL, "got %p\n", result); result = (ADDRINFOW *)0xdeadbeef; ret = pGetAddrInfoW(nxdomain, NULL, NULL, &result); + if(ret == 0) + { + skip("nxdomain returned success. Broken ISP redirects?\n"); + return; + } ok(ret == WSAHOST_NOT_FOUND, "got %d expected WSAHOST_NOT_FOUND\n", ret); ok(result == NULL, "got %p\n", result); @@ -5659,6 +5669,11 @@ result = (ADDRINFOA *)0xdeadbeef; ret = pgetaddrinfo("nxdomain.codeweavers.com", NULL, NULL, &result); + if(ret == 0) + { + skip("nxdomain returned success. Broken ISP redirects?\n"); + return; + } ok(ret == WSAHOST_NOT_FOUND, "got %d expected WSAHOST_NOT_FOUND\n", ret); ok(result == NULL, "got %p\n", result); diff -Nru wine1.7-1.7.15/dlls/wtsapi32/tests/wtsapi.c wine1.7-1.7.16/dlls/wtsapi32/tests/wtsapi.c --- wine1.7-1.7.15/dlls/wtsapi32/tests/wtsapi.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wtsapi32/tests/wtsapi.c 2014-04-04 19:13:44.000000000 +0000 @@ -45,41 +45,33 @@ info = NULL; SetLastError(0xdeadbeef); ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 1, 1, &info, &count); - todo_wine ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); - todo_wine ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); if (info) WTSFreeMemory(info); info = NULL; SetLastError(0xdeadbeef); ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 0, &info, &count); - todo_wine ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); - todo_wine ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); if (info) WTSFreeMemory(info); info = NULL; SetLastError(0xdeadbeef); ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 2, &info, &count); - todo_wine ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); - todo_wine ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); if (info) WTSFreeMemory(info); SetLastError(0xdeadbeef); ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, NULL, &count); ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); - todo_wine ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); info = NULL; SetLastError(0xdeadbeef); ret = WTSEnumerateProcessesW(WTS_CURRENT_SERVER_HANDLE, 0, 1, &info, NULL); ok(!ret, "expected WTSEnumerateProcessesW to fail\n"); - todo_wine ok(GetLastError()== ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got: %d\n", GetLastError()); if (info) WTSFreeMemory(info); diff -Nru wine1.7-1.7.15/dlls/wtsapi32/wtsapi32.c wine1.7-1.7.16/dlls/wtsapi32/wtsapi32.c --- wine1.7-1.7.15/dlls/wtsapi32/wtsapi32.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/dlls/wtsapi32/wtsapi32.c 2014-04-04 19:13:44.000000000 +0000 @@ -87,7 +87,11 @@ FIXME("Stub %p 0x%08x 0x%08x %p %p\n", hServer, Reserved, Version, ppProcessInfo, pCount); - if (!ppProcessInfo || !pCount) return FALSE; + if (!ppProcessInfo || !pCount || Reserved != 0 || Version != 1) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } *pCount = 0; *ppProcessInfo = NULL; diff -Nru wine1.7-1.7.15/documentation/README.de wine1.7-1.7.16/documentation/README.de --- wine1.7-1.7.15/documentation/README.de 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.de 2014-04-04 19:13:44.000000000 +0000 @@ -32,7 +32,7 @@ folgenden Betriebssysteme: Linux version 2.0.36 oder neuer - FreeBSD 7.0 oder neuer + FreeBSD 8.0 oder neuer Solaris x86 9 oder neuer NetBSD-current Mac OS X 10.5 oder neuer @@ -43,7 +43,7 @@ Umständen in der Zukunft unterstützt. FreeBSD-Info: - Wine läuft prinzipiell erst ab FreeBSD 7.0 richtig. Siehe dazu auch + Wine läuft prinzipiell erst ab FreeBSD 8.0 richtig. Siehe dazu auch http://wiki.freebsd.org/Wine für weitere Informationen. Solaris-Info: diff -Nru wine1.7-1.7.15/documentation/README.es wine1.7-1.7.16/documentation/README.es --- wine1.7-1.7.15/documentation/README.es 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.es 2014-04-04 19:13:44.000000000 +0000 @@ -30,7 +30,7 @@ Para compilar y ejecutar Wine, deberá tener uno de los siguientes: Linux versión 2.0.36 o superior - FreeBSD 7.0 o superior + FreeBSD 8.0 o superior Solaris x86 9 o superior NetBSD-current Mac OS X 10.5 o superior @@ -42,7 +42,7 @@ Información sobre FreeBSD: Por lo general Wine no funcionará correctamente en versiones anteriores a - FreeBSD 7.0. Visite http://wiki.freebsd.org/Wine para más información. + FreeBSD 8.0. Visite http://wiki.freebsd.org/Wine para más información. Información sobre Solaris: Lo más probable es que necesite compilar con el conjunto de herramientas GNU diff -Nru wine1.7-1.7.15/documentation/README.fi wine1.7-1.7.16/documentation/README.fi --- wine1.7-1.7.15/documentation/README.fi 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.fi 2014-04-04 19:13:44.000000000 +0000 @@ -28,7 +28,7 @@ Winen kääntämiseen tarvitaan jokin seuraavista: Linuxin versio 2.0.36 tai uudempi - FreeBSD 7.0 tai uudempi + FreeBSD 8.0 tai uudempi Solaris x86 9 tai uudempi NetBSD-current Mac OS X 10.5 tai uudempi @@ -38,7 +38,7 @@ muillekin käyttöjärjestelmille, joissa on tarvittava tuki säikeille. Tietoa FreeBSD:lle: - Pääsääntöisesti Wine ei toimi vanhemmilla versioilla kuin FreeBSD 7.0. + Pääsääntöisesti Wine ei toimi vanhemmilla versioilla kuin FreeBSD 8.0. Osoitteessa http://wiki.freebsd.org/Wine kerrotaan tästä lisää. Tietoa Solarikselle: diff -Nru wine1.7-1.7.15/documentation/README.fr wine1.7-1.7.16/documentation/README.fr --- wine1.7-1.7.15/documentation/README.fr 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.fr 2014-04-04 19:13:44.000000000 +0000 @@ -30,7 +30,7 @@ d'exploitation suivants : Linux version 2.0.36 ou ultérieur - FreeBSD 7.0 ou ultérieur + FreeBSD 8.0 ou ultérieur Solaris x86 9 ou ultérieur NetBSD-current Mac OS X 10.5 ou ultérieur @@ -42,7 +42,7 @@ Informations FreeBSD : Wine ne fonctionnera généralement pas bien avec les versions FreeBSD - antérieures à 7.0. Voyez http://wiki.freebsd.org/Wine pour plus + antérieures à 8.0. Voyez http://wiki.freebsd.org/Wine pour plus d'informations. Informations Solaris : diff -Nru wine1.7-1.7.15/documentation/README.it wine1.7-1.7.16/documentation/README.it --- wine1.7-1.7.15/documentation/README.it 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.it 2014-04-04 19:13:44.000000000 +0000 @@ -31,7 +31,7 @@ Per compilare ed eseguire Wine, è necessario avere uno dei seguenti sistemi: Linux versione 2.0.36 o successiva - FreeBSD 7.0 o successiva + FreeBSD 8.0 o successiva Solaris x86 9 o successiva NetBSD-current Mac OS X 10.5 o successiva @@ -42,7 +42,7 @@ Informazioni per FreeBSD: In generale Wine non funzionerà correttamente con versioni precedenti - a FreeBSD 7.0. + a FreeBSD 8.0. Leggere http://wiki.freebsd.org/Wine per maggiori informazioni. Informazioni per Solaris: diff -Nru wine1.7-1.7.15/documentation/README.ja wine1.7-1.7.16/documentation/README.ja --- wine1.7-1.7.15/documentation/README.ja 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.ja 2014-04-04 19:13:44.000000000 +0000 @@ -30,7 +30,7 @@ Wineをコンパイルし実行するには、以下のうち一つを持っていなければなりません: Linux バージョン2.0.36以上 - FreeBSD 7.0以降 + FreeBSD 8.0以降 Solaris x86 9以降 NetBSD-current Mac OS X 10.5以降 @@ -41,7 +41,7 @@ 将来サポートされるかもしれません。 FreeBSD情報: - Wineは一般的にFreeBSD 7.0より前のバージョン上で正しく動作しないでしょう。 + Wineは一般的にFreeBSD 8.0より前のバージョン上で正しく動作しないでしょう。 詳細については http://wiki.freebsd.org/Wine を参照してください。 Solaris情報: diff -Nru wine1.7-1.7.15/documentation/README.no wine1.7-1.7.16/documentation/README.no --- wine1.7-1.7.15/documentation/README.no 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.no 2014-04-04 19:13:44.000000000 +0000 @@ -29,7 +29,7 @@ Følgende kreves for å bygge og kjøre Wine: Linux versjon 2.0.36 eller nyere - FreeBSD 7.0 eller nyere + FreeBSD 8.0 eller nyere Solaris x86 9 eller nyere NetBSD-current Mac OS X 10.5 eller nyere @@ -39,7 +39,7 @@ støtter kjernetråder støttes kanskje i framtiden. Informasjon for FreeBSD: - Wine vil som regel ikke virke på FreeBSD-versjoner eldre enn 7.0. + Wine vil som regel ikke virke på FreeBSD-versjoner eldre enn 8.0. Se for mer informasjon. Informsjon for Solaris: diff -Nru wine1.7-1.7.15/documentation/README.pt_br wine1.7-1.7.16/documentation/README.pt_br --- wine1.7-1.7.15/documentation/README.pt_br 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.pt_br 2014-04-04 19:13:44.000000000 +0000 @@ -31,7 +31,7 @@ Para compilar e executar o Wine, voc deve ter o seguinte: Linux verso 2.0.36 ou posterior - FreeBSD 7.0 ou posterior + FreeBSD 8.0 ou posterior Solaris x86 9 ou posterior NetBSD-atual Mac OS X 10.5 ou posterior @@ -42,7 +42,7 @@ ter suporte no futuro. Informaes para o FreeBSD: - O Wine em geral no deve funcionar corretamente em verses antes da 7.0. + O Wine em geral no deve funcionar corretamente em verses antes da 8.0. Veja http://wiki.freebsd.org/Wine para mais informaes. Informaes para o Solaris: diff -Nru wine1.7-1.7.15/documentation/README.ru wine1.7-1.7.16/documentation/README.ru --- wine1.7-1.7.15/documentation/README.ru 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.ru 2014-04-04 19:13:44.000000000 +0000 @@ -29,7 +29,7 @@ Компиляция и запуск Wine поддерживается в следующих операционных системах: Linux версии 2.0.36 или более новой - FreeBSD 7.0 или более новой + FreeBSD 8.0 или более новой Solaris x86 9 или более новой NetBSD-текущей версии Mac OS X 10.5 или более новой @@ -40,7 +40,7 @@ возможно будут поддерживаться Wine в будущем. FreeBSD: - Wine не будет работать как следует на версиях ниже, чем FreeBSD 7.0. + Wine не будет работать как следует на версиях ниже, чем FreeBSD 8.0. Посетите для дополнительной информации. Solaris: diff -Nru wine1.7-1.7.15/documentation/README.sv wine1.7-1.7.16/documentation/README.sv --- wine1.7-1.7.15/documentation/README.sv 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/documentation/README.sv 2014-04-04 19:13:44.000000000 +0000 @@ -28,7 +28,7 @@ Fr att kompilera och kra Wine krvs ett av fljande: Linux version 2.0.36 eller senare - FreeBSD 7.0 eller senare + FreeBSD 8.0 eller senare Solaris x86 9 eller senare NetBSD-current Mac OS X 10.5 eller senare @@ -38,7 +38,7 @@ stder kerneltrdar kommer eventuellt att stdjas i framtiden. Information fr FreeBSD: - Wine kommer i regel inte att fungera p FreeBSD-versioner ldre n 7.0. + Wine kommer i regel inte att fungera p FreeBSD-versioner ldre n 8.0. Se http://wiki.freebsd.org/Wine fr mer information. Information fr Solaris: diff -Nru wine1.7-1.7.15/fonts/tahomabd.sfd wine1.7-1.7.16/fonts/tahomabd.sfd --- wine1.7-1.7.15/fonts/tahomabd.sfd 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/fonts/tahomabd.sfd 2014-04-04 19:13:44.000000000 +0000 @@ -102,6 +102,7 @@ !<)rC!;6Els31Q VStem: 361 308 LayerCount: 2 @@ -19527,8 +19529,63 @@ Refer: 970 806 S 1 0 0 1 -146.5 13 2 Refer: 85 116 N 1 0 0 1 0 0 3 EndChar + +StartChar: afii10101 +Encoding: 1108 1108 975 +Width: 1088 +Flags: W +HStem: -22 156<379.84 750.074> +LayerCount: 2 +Fore +SplineSet +734.45 688 m 17 + 246.609 688.039 l 1 + 258.777 769.045 285.982 836.366 328.226 890 c 0 + 369.559 951.333 453.559 982 580.226 982 c 0 + 684.893 982 789.893 953.333 895.226 896 c 1 + 895.226 1053 l 1 + 795.893 1099 692.893 1127.67 586.226 1139 c 1 + 418.226 1127 290.559 1081.33 203.226 1002 c 0 + 97.8926 902.667 45.2256 763 45.2256 583 c 0 + 29.8926 393 69.2256 245.667 163.226 141 c 0 + 241.226 32.333 367.559 -22 542.226 -22 c 0 + 662.893 -22 774.559 2 877.226 50 c 1 + 868.226 255 l 1 + 771.559 174.333 669.559 134 562.226 134 c 0 + 436.226 134 350.559 174.667 305.226 256 c 1 + 251.998 323.661 228.885 418.995 235.885 542 c 1 + 734.45 542 l 1 + 734.45 688 l 17 +EndSplineSet +EndChar + +StartChar: afii10053 +Encoding: 1028 1028 976 +Width: 1367 +Flags: W +HStem: 729.5 175.5<257.219 961> 1151 21G<1065.79 1173> +VStem: 43 205.5<450.026 729.5 905 1041.58> +LayerCount: 2 +Fore +SplineSet +257.219 905 m 1 + 961 905 l 1 + 961 729 l 1 + 248.5 729.5 l 0 + 248.5 275.006 486.995 167.646 688 144 c 0 + 826.667 128 988.33 192.333 1173 337 c 1 + 1173 101 l 1 + 780.549 -139.979 189.12 -67.8848 67 502 c 0 + 51 576.667 43 657 43 743 c 0 + 43 1215.54 271.645 1486.98 690 1516 c 0 + 876.797 1528.44 1006.01 1474.75 1173 1390 c 1 + 1173 1151 l 1 + 958.577 1330.82 779.285 1356.53 688 1346 c 0 + 435.849 1314.62 292.256 1167.62 257.219 905 c 1 +EndSplineSet +EndChar EndChars -BitmapFont: 9 976 7 2 1 +BitmapFont: 9 978 7 2 1 BDFChar: 0 65536 9 1 7 0 6 rdo`RJqEt% BDFChar: 1 32 3 0 0 0 0 @@ -20401,12 +20458,16 @@ ^jlCb BDFChar: 974 539 4 0 1 -3 -2 ^jlCb +BDFChar: 975 1108 5 0 4 0 4 +GeigaGQ7^D +BDFChar: 976 1028 7 0 5 0 6 +Gg*tu^s%$' BDFRefChar: 971 52 0 0 N BDFRefChar: 972 84 0 0 N BDFRefChar: 973 53 0 0 N BDFRefChar: 974 85 0 0 N EndBitmapFont -BitmapFont: 10 976 8 2 1 +BitmapFont: 10 978 8 2 1 BDFChar: 0 65536 10 1 8 0 7 s+,`PJUrCP BDFChar: 1 32 3 0 0 0 0 @@ -21279,12 +21340,16 @@ ^jlCb BDFChar: 974 539 4 0 1 -3 -2 ^jlCb +BDFChar: 975 1108 6 0 4 0 4 +GeigaGQ7^D +BDFChar: 976 1028 7 0 5 0 6 +Gg*tu^s%$' BDFRefChar: 971 52 0 0 N BDFRefChar: 972 84 0 0 N BDFRefChar: 973 53 0 0 N BDFRefChar: 974 85 0 0 N EndBitmapFont -BitmapFont: 11 976 9 2 1 FontForge +BitmapFont: 11 978 9 2 1 FontForge BDFStartProperties: 36 FONT 1 "-FontForge-Tahoma-Normal-R-Normal--11-80-96-96-P-62-ISO10646-1" FONTBOUNDINGBOX 1 "15 11 0 -2" @@ -22192,12 +22257,16 @@ @))aB BDFChar: 974 539 5 0 2 -3 -2 @))aB +BDFChar: 975 1108 6 0 4 0 5 +Geiga^j#hZ +BDFChar: 976 1028 7 0 5 0 7 +I)*Pm^qda5 BDFRefChar: 971 52 0 0 N BDFRefChar: 972 84 0 0 N BDFRefChar: 973 53 0 0 N BDFRefChar: 974 85 0 0 N EndBitmapFont -BitmapFont: 12 976 10 2 1 FontForge +BitmapFont: 12 978 10 2 1 FontForge BDFStartProperties: 36 FONT 1 "-FontForge-Tahoma-Normal-R-Normal--12-90-96-96-P-70-ISO10646-1" FONTBOUNDINGBOX 1 "16 12 0 -2" @@ -22907,12 +22976,16 @@ @))aB BDFChar: 974 539 6 1 3 -3 -2 @))aB +BDFChar: 975 1108 6 0 5 0 6 +Gf7De^r1Ht +BDFChar: 976 1028 8 0 6 0 8 +I)<\7pqX\^HiO-H BDFRefChar: 971 52 0 0 N BDFRefChar: 972 84 0 0 N BDFRefChar: 973 53 0 0 N BDFRefChar: 974 85 0 0 N EndBitmapFont -BitmapFont: 13 976 10 3 1 FontForge +BitmapFont: 13 978 10 3 1 FontForge BDFStartProperties: 36 FONT 1 "-FontForge-Tahoma-Normal-R-Normal--13-100-96-96-P-73-ISO10646-1" FONTBOUNDINGBOX 1 "15 13 0 -3" @@ -23618,12 +23691,16 @@ @))aB BDFChar: 974 539 4 0 2 -3 -2 @))aB +BDFChar: 975 1108 7 0 5 0 6 +Gf7Dm^r1Ht +BDFChar: 976 1028 9 0 7 0 8 +5%27Br4p*V4obQ_ BDFRefChar: 971 52 0 0 N BDFRefChar: 972 84 0 0 N BDFRefChar: 973 53 0 0 N BDFRefChar: 974 85 0 0 N EndBitmapFont -BitmapFont: 15 976 12 3 1 FontForge +BitmapFont: 15 978 12 3 1 FontForge BDFStartProperties: 36 FONT 1 "-FontForge-Tahoma-Normal-R-Normal--15-110-96-96-P-85-ISO10646-1" FONTBOUNDINGBOX 1 "19 15 0 -3" @@ -24329,12 +24406,16 @@ @))aB BDFChar: 974 539 5 1 3 -3 -2 @))aB +BDFChar: 975 1108 8 0 5 0 7 +3(/;dJ:L$I +BDFChar: 976 1028 10 0 7 0 10 +5!a^LJGaqJJ3c@! BDFRefChar: 971 52 0 0 N BDFRefChar: 972 84 0 0 N BDFRefChar: 973 53 0 0 N BDFRefChar: 974 85 0 0 N EndBitmapFont -BitmapFont: 16 976 13 3 1 FontForge +BitmapFont: 16 978 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" @@ -25040,6 +25121,10 @@ @))aB BDFChar: 974 539 5 1 3 -3 -2 @))aB +BDFChar: 975 1108 8 0 5 0 8 +3(/:Ipjdl_2uipY +BDFChar: 976 1028 11 0 8 0 11 +*rmF65QH<7J,oQKJ,k*"J,hh7+FkO6 BDFRefChar: 971 52 0 0 N BDFRefChar: 972 84 0 0 N BDFRefChar: 973 53 0 0 N Binary files /tmp/UlZwLJraaE/wine1.7-1.7.15/fonts/tahomabd.ttf and /tmp/SQMqeS5W6s/wine1.7-1.7.16/fonts/tahomabd.ttf differ diff -Nru wine1.7-1.7.15/fonts/tahoma.sfd wine1.7-1.7.16/fonts/tahoma.sfd --- wine1.7-1.7.15/fonts/tahoma.sfd 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/fonts/tahoma.sfd 2014-04-04 19:13:44.000000000 +0000 @@ -102,6 +102,7 @@ !<)rC!;6Els31Q + +#ifdef __cplusplus +extern "C" { +#endif + +#define PHYSICAL_MONITOR_DESCRIPTION_SIZE 128 + +typedef struct _PHYSICAL_MONITOR +{ + HANDLE hPhysicalMonitor; + WCHAR szPhysicalMonitorDescription[PHYSICAL_MONITOR_DESCRIPTION_SIZE]; +} PHYSICAL_MONITOR, *LPPHYSICAL_MONITOR; + +#ifdef __cplusplus +} +#endif + +#endif /* __WINE_PHYSICALMONITORENUMERATIONAPI_H */ diff -Nru wine1.7-1.7.15/include/rpcndr.h wine1.7-1.7.16/include/rpcndr.h --- wine1.7-1.7.15/include/rpcndr.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/include/rpcndr.h 2014-04-04 19:13:44.000000000 +0000 @@ -429,7 +429,7 @@ } MIDL_STUBLESS_PROXY_INFO, *PMIDL_STUBLESS_PROXY_INFO; -#if defined(__i386__) && !defined(__MSC_VER) && !defined(__MINGW32__) && !defined(__CYGWIN__) +#if defined(__i386__) && !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__CYGWIN__) /* Calling convention for returning structures/unions is different between Windows and gcc on i386 */ typedef LONG_PTR CLIENT_CALL_RETURN; #else diff -Nru wine1.7-1.7.15/include/winbase.h wine1.7-1.7.16/include/winbase.h --- wine1.7-1.7.15/include/winbase.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/include/winbase.h 2014-04-04 19:13:44.000000000 +0000 @@ -1512,6 +1512,23 @@ /* initialization callback prototype */ typedef BOOL (WINAPI *PINIT_ONCE_FN)(PINIT_ONCE,PVOID,PVOID*); +typedef struct _REASON_CONTEXT +{ + ULONG Version; + DWORD Flags; + union + { + struct + { + HMODULE LocalizedReasonModule; + ULONG LocalizedReasonId; + ULONG ReasonStringCount; + LPWSTR *ReasonStrings; + } Detailed; + LPWSTR SimpleReasonString; + } Reason; +} REASON_CONTEXT, *PREASON_CONTEXT; + WINBASEAPI BOOL WINAPI ActivateActCtx(HANDLE,ULONG_PTR *); WINADVAPI BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID); WINADVAPI BOOL WINAPI AddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID); @@ -2363,6 +2380,7 @@ WINBASEAPI BOOL WINAPI SetVolumeMountPointW(LPCSTR,LPCSTR); #define SetVolumeMountPoint WINELIB_NAME_AW(SetVolumeMountPoint) WINBASEAPI BOOL WINAPI SetWaitableTimer(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,BOOL); +WINBASEAPI BOOL WINAPI SetWaitableTimerEx(HANDLE,const LARGE_INTEGER*,LONG,PTIMERAPCROUTINE,LPVOID,REASON_CONTEXT*,ULONG); WINBASEAPI BOOL WINAPI SetupComm(HANDLE,DWORD,DWORD); WINBASEAPI DWORD WINAPI SignalObjectAndWait(HANDLE,HANDLE,DWORD,BOOL); WINBASEAPI DWORD WINAPI SizeofResource(HMODULE,HRSRC); diff -Nru wine1.7-1.7.15/include/wine/schrpc.idl wine1.7-1.7.16/include/wine/schrpc.idl --- wine1.7-1.7.15/include/wine/schrpc.idl 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/include/wine/schrpc.idl 2014-04-04 19:13:44.000000000 +0000 @@ -67,11 +67,11 @@ HRESULT SchRpcEnumFolders([in, string] const WCHAR *path, [in] DWORD flags, [in, out] DWORD *start_index, [in] DWORD n_requested, [out] DWORD *n_names, - [out, size_is(,*n_names)] TASK_NAMES *names); + [out, string, size_is(,*n_names)] TASK_NAMES *names); HRESULT SchRpcEnumTasks([in, string] const WCHAR *path, [in] DWORD flags, [in, out] DWORD *start_index, [in] DWORD n_requested, [out] DWORD *n_names, - [out, size_is(,*n_names)] TASK_NAMES *names); + [out, string, size_is(,*n_names)] TASK_NAMES *names); HRESULT SchRpcEnumInstances([in, string, unique] const WCHAR *path, [in] DWORD flags, [out] DWORD *n_guids, [out, size_is(,*n_guids)] GUID **guids); diff -Nru wine1.7-1.7.15/include/wine/wined3d.h wine1.7-1.7.16/include/wine/wined3d.h --- wine1.7-1.7.15/include/wine/wined3d.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/include/wine/wined3d.h 2014-04-04 19:13:44.000000000 +0000 @@ -2340,15 +2340,10 @@ return WINED3D_OK; } -HRESULT __cdecl wined3d_resource_free_private_data(struct wined3d_resource *resource, REFGUID guid); void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource, struct wined3d_resource_desc *desc); void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resource); -HRESULT __cdecl wined3d_resource_get_private_data(const struct wined3d_resource *resource, - REFGUID guid, void *data, DWORD *data_size); void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent); -HRESULT __cdecl wined3d_resource_set_private_data(struct wined3d_resource *resource, - REFGUID guid, const void *data, DWORD data_size, DWORD flags); HRESULT __cdecl wined3d_rendertarget_view_create(struct wined3d_resource *resource, void *parent, struct wined3d_rendertarget_view **rendertarget_view); diff -Nru wine1.7-1.7.15/include/winnt.h wine1.7-1.7.16/include/winnt.h --- wine1.7-1.7.15/include/winnt.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/include/winnt.h 2014-04-04 19:13:44.000000000 +0000 @@ -154,7 +154,7 @@ # define DECLSPEC_EXPORT #endif -#if defined(__MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) +#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) # define DECLSPEC_HIDDEN #elif defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) # define DECLSPEC_HIDDEN __attribute__((visibility ("hidden"))) diff -Nru wine1.7-1.7.15/include/winternl.h wine1.7-1.7.16/include/winternl.h --- wine1.7-1.7.15/include/winternl.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/include/winternl.h 2014-04-04 19:13:44.000000000 +0000 @@ -2469,6 +2469,7 @@ NTSYSAPI NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER); NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID); NTSYSAPI NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*); +NTSYSAPI NTSTATUS WINAPI RtlQueryUnbiasedInterruptTime(ULONGLONG*); NTSYSAPI NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG); NTSYSAPI void WINAPI RtlRaiseException(PEXCEPTION_RECORD); NTSYSAPI void WINAPI RtlRaiseStatus(NTSTATUS); diff -Nru wine1.7-1.7.15/loader/wine.inf.in wine1.7-1.7.16/loader/wine.inf.in --- wine1.7-1.7.15/loader/wine.inf.in 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/loader/wine.inf.in 2014-04-04 19:13:44.000000000 +0000 @@ -2546,6 +2546,9 @@ 11,wbem,wbemprox.dll 11,wbem,wmic.exe 11,wbem,wmiutils.dll +; empty folders to make sure the parent dirs are not removed +16410,Microsoft, +16412,Microsoft, 16422,Internet Explorer,iexplore.exe 16427,System\OLE DB,oledb32.dll 16427,System\OLE DB,msdaps.dll diff -Nru wine1.7-1.7.15/po/ar.po wine1.7-1.7.16/po/ar.po --- wine1.7-1.7.15/po/ar.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/ar.po 2014-04-04 19:13:44.000000000 +0000 @@ -11628,6 +11628,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "تصدير الفرع المختار من السجل إلى ملف نصي" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "فشل فتح '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/bg.po wine1.7-1.7.16/po/bg.po --- wine1.7-1.7.15/po/bg.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/bg.po 2014-04-04 19:13:44.000000000 +0000 @@ -11500,6 +11500,74 @@ "Записва цялото или част от съдържанието на системния регистър във текстов " "файл" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/ca.po wine1.7-1.7.16/po/ca.po --- wine1.7-1.7.15/po/ca.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/ca.po 2014-04-04 19:13:44.000000000 +0000 @@ -11856,6 +11856,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exporta la branca del registre seleccionada a un fitxer de text" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "S'ha fallat en obrir '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/cs.po wine1.7-1.7.16/po/cs.po --- wine1.7-1.7.15/po/cs.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/cs.po 2014-04-04 19:13:44.000000000 +0000 @@ -11509,6 +11509,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exportuje vybranou větev registru do textového souboru" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Otevření „%1“ se nezdařilo\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/da.po wine1.7-1.7.16/po/da.po --- wine1.7-1.7.15/po/da.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/da.po 2014-04-04 19:13:44.000000000 +0000 @@ -11765,6 +11765,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Eksporter udvalgte gren af registreringsdatabasen til en tekst fil" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Kunne ikke åbne «%1»\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/de.po wine1.7-1.7.16/po/de.po --- wine1.7-1.7.15/po/de.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/de.po 2014-04-04 19:13:44.000000000 +0000 @@ -5,7 +5,7 @@ "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To: http://bugs.winehq.org\n" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2013-12-02 22:42+0100\n" +"PO-Revision-Date: 2014-03-29 15:03+0100\n" "Last-Translator: Julian Rüger\n" "Language-Team: none\n" "Language: German\n" @@ -6593,10 +6593,8 @@ msgstr "Der Benutzername konnte nicht gefunden werden.\n" #: winerror.mc:3741 -#, fuzzy -#| msgid "The site does not exist.\n" msgid "This network connection does not exist.\n" -msgstr "Die Seite existiert nicht.\n" +msgstr "Diese Netzwerkverbindung existiert nicht.\n" #: localspl.rc:31 localui.rc:31 winspool.rc:30 msgid "Local Port" @@ -11745,6 +11743,110 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exportiert den ausgewählten Zweig der Registry in eine Textdatei" +#: regsvr32.rc:32 +#, fuzzy +#| msgid "" +#| "Wine DLL Registration Server\n" +#| "\n" +#| "Provides DLL registration services.\n" +#| "\n" +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" +"Wine DLL-Registrierungsserver\n" +"\n" +"Stellt Dienste zur DLL-Registrierung bereit.\n" +"\n" + +#: regsvr32.rc:40 +#, fuzzy +#| msgid "" +#| "Usage:\n" +#| " regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +#| "\n" +#| "Options:\n" +#| " [/u] Unregister a module from the server.\n" +#| " [/s] Silent mode (no messages will be displayed).\n" +#| " [/i] Call DllInstall, passing an optional [cmdline].\n" +#| "\tWhen used with [/u], regsvr32 also calls DLL Uninstall.\n" +#| " [/n] Do not call DllRegisterServer. This option must be used with [/" +#| "i].\n" +#| "\n" +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" +"Aufruf:\n" +" regsvr32 [/u] [/s] [/n] [/i[:Befehlszeile]] DllName\n" +"\n" +"Optionen:\n" +" [/u] Registrierung eines Moduls vom Server aufheben.\n" +" [/s] Stiller Modus (es werden keine Meldungen angezeigt).\n" +" [/i] DllInstall mit einer optionalen [Befehlszeile] aufrufen.\n" +"\tBei Angabe von [/u], ruft regsvr32 auch DLL Uninstall auf.\n" +" [/n] DllRegisterServer nicht aufrufen. Muss in Verbindung mit [/i]\n" +"\tbenutzt werden.\n" +"\n" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" +"regsvr32: Ungültiges oder nicht erkanntes Argument [%1]\n" +"\n" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "regsvr32: DLL '%1' konnte nicht geladen werden\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "regsvr32: %1 nicht in DLL '%2' implementiert\n" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "regsvr32: DLL '%1' konnte nicht registriert werden\n" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "regsvr32: DLL '%1' erfolgreich registriert\n" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "regsvr32: Registrierung von DLL '%1' konnte nicht aufgehoben werden\n" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "regsvr32: Registrierung von DLL '%1' erfolgreich aufgehoben\n" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "regsvr32: DLL '%1' konnte nicht installiert werden\n" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "regsvr32: DLL '%1' erfolgreich installiert\n" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "regsvr32: DLL '%1' konnte nicht deinstalliert werden\n" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "regsvr32: DLL '%1' erfolgreich deinstalliert\n" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/el.po wine1.7-1.7.16/po/el.po --- wine1.7-1.7.15/po/el.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/el.po 2014-04-04 19:13:44.000000000 +0000 @@ -11297,6 +11297,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/en.po wine1.7-1.7.16/po/en.po --- wine1.7-1.7.15/po/en.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/en.po 2014-04-04 19:13:44.000000000 +0000 @@ -11667,6 +11667,90 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exports selected branch of the registry to a text file" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "regsvr32: Failed to load DLL '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "regsvr32: %1 not implemented in DLL '%2'\n" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "regsvr32: Failed to register DLL '%1'\n" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "regsvr32: Successfully registered DLL '%1'\n" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "regsvr32: Failed to unregister DLL '%1'\n" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "regsvr32: Successfully unregistered DLL '%1'\n" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "regsvr32: Failed to install DLL '%1'\n" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "regsvr32: Successfully installed DLL '%1'\n" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "regsvr32: Failed to uninstall DLL '%1'\n" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "regsvr32: Successfully uninstalled DLL '%1'\n" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/en_US.po wine1.7-1.7.16/po/en_US.po --- wine1.7-1.7.15/po/en_US.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/en_US.po 2014-04-04 19:13:44.000000000 +0000 @@ -11667,6 +11667,90 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exports selected branch of the registry to a text file" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "regsvr32: Failed to load DLL '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "regsvr32: %1 not implemented in DLL '%2'\n" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "regsvr32: Failed to register DLL '%1'\n" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "regsvr32: Successfully registered DLL '%1'\n" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "regsvr32: Failed to unregister DLL '%1'\n" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "regsvr32: Successfully unregistered DLL '%1'\n" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "regsvr32: Failed to install DLL '%1'\n" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "regsvr32: Successfully installed DLL '%1'\n" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "regsvr32: Failed to uninstall DLL '%1'\n" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "regsvr32: Successfully uninstalled DLL '%1'\n" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/eo.po wine1.7-1.7.16/po/eo.po --- wine1.7-1.7.15/po/eo.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/eo.po 2014-04-04 19:13:44.000000000 +0000 @@ -11163,6 +11163,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Eksportas elektitan branĉon de la registrejo al tekstodosiero" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/es.po wine1.7-1.7.16/po/es.po --- wine1.7-1.7.15/po/es.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/es.po 2014-04-04 19:13:44.000000000 +0000 @@ -11852,6 +11852,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exporta la rama seleccionada del registro a un archivo de texto" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "No se pudo abrir '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/fa.po wine1.7-1.7.16/po/fa.po --- wine1.7-1.7.15/po/fa.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/fa.po 2014-04-04 19:13:44.000000000 +0000 @@ -11304,6 +11304,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/fi.po wine1.7-1.7.16/po/fi.po --- wine1.7-1.7.15/po/fi.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/fi.po 2014-04-04 19:13:44.000000000 +0000 @@ -11647,6 +11647,90 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Vie rekisterin valitun haaran tekstitiedostoon" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" +"Winen DLL-rekisteröintityökalu\n" +"\n" +"Tuottaa DLL-rekisteröintipalvelut.\n" +"\n" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" +"Käyttö:\n" +" regsvr32 [/u] [/s] [/n] [/i[:komentorivi]] Dll-tiedostonNimi\n" +"\n" +"Valitsimet:\n" +" [/u] Pura palvelimen rekisteröinti.\n" +" [/s] Hiljainen tila (mitään viestejä ei näytetä).\n" +" [/i] Kutsu funktiota DllInstall, välitä valinnainen [komentorivi].\n" +"\tValitsimen [/u] kanssa kutsuu funktiota DllInstall poistotilassa.\n" +" [/n] Älä kutsu funktiota DllRegisterServer. Vaatii valitsimen [/i].\n" +"\n" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" +"regsvr32: Virheellinen tai tuntematon valitsin [%1]\n" +"\n" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "regsvr32: DLL:n '%1' lataaminen epäonnistui\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "regsvr32: %1-toteutusta ei ole DLL:ssä '%2'\n" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "regsvr32: DLL:n '%1' rekisteröinti epäonnistui\n" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "regsvr32: DLL '%1' rekisteröity\n" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "regsvr32: DLL:n '%1' rekisteröinnin purkaminen epäonnistui\n" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "regsvr32: DLL:n '%1' rekisteröinti purettu\n" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "regsvr32: DLL:n '%1' asennus epäonnistui\n" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "regsvr32: DLL '%1' asennettu\n" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "regsvr32: DLL:n '%1' asennuksen purku epäonnistui\n" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "regsvr32: DLL:n '%1' asennus purettu\n" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/fr.po wine1.7-1.7.16/po/fr.po --- wine1.7-1.7.15/po/fr.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/fr.po 2014-04-04 19:13:44.000000000 +0000 @@ -11803,6 +11803,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exporte la branche du registre sélectionnée dans un fichier texte" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Impossible d'ouvrir « %1 »\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/he.po wine1.7-1.7.16/po/he.po --- wine1.7-1.7.15/po/he.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/he.po 2014-04-04 19:13:44.000000000 +0000 @@ -11840,6 +11840,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "יצוא הענף הנבחר מרישום המערכת לקובץ טקסט" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Failed to open '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/hi.po wine1.7-1.7.16/po/hi.po --- wine1.7-1.7.15/po/hi.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/hi.po 2014-04-04 19:13:44.000000000 +0000 @@ -11118,6 +11118,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/hr.po wine1.7-1.7.16/po/hr.po --- wine1.7-1.7.15/po/hr.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/hr.po 2014-04-04 19:13:44.000000000 +0000 @@ -11327,6 +11327,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Neuspjelo otvaranje '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/hu.po wine1.7-1.7.16/po/hu.po --- wine1.7-1.7.15/po/hu.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/hu.po 2014-04-04 19:13:44.000000000 +0000 @@ -11771,6 +11771,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Az egész kijelölt regisztrációs ágat kiexportálja egy szövegfájlba" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "'%1' megnyitása sikertelen\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/it.po wine1.7-1.7.16/po/it.po --- wine1.7-1.7.15/po/it.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/it.po 2014-04-04 19:13:44.000000000 +0000 @@ -11852,6 +11852,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Esporta il ramo selezionato del registro in un file di testo" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Impossibile aprire '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/ja.po wine1.7-1.7.16/po/ja.po --- wine1.7-1.7.15/po/ja.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/ja.po 2014-04-04 19:13:44.000000000 +0000 @@ -11661,6 +11661,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "選択したレジストリ キー以下をテキスト ファイルに出力" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "'%1' を開けません\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/ko.po wine1.7-1.7.16/po/ko.po --- wine1.7-1.7.15/po/ko.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/ko.po 2014-04-04 19:13:44.000000000 +0000 @@ -11652,6 +11652,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "레지스트리의 선택된 부분을 텍스트 파일로 내보내기" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "'%1' 열기 실패\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/lt.po wine1.7-1.7.16/po/lt.po --- wine1.7-1.7.15/po/lt.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/lt.po 2014-04-04 19:13:44.000000000 +0000 @@ -5,7 +5,7 @@ "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To: http://bugs.winehq.org\n" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2014-02-10 22:51+0300\n" +"PO-Revision-Date: 2014-04-03 21:16+0300\n" "Last-Translator: Aurimas Fišeras \n" "Language-Team: komp_lt@konf.lt\n" "Language: Lithuanian\n" @@ -11673,6 +11673,90 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Eksportuoja pasirinktą registro šaką į tekstinį failą" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" +"Wine DLL bibliotekų registravimo programa\n" +"\n" +"Teikia DLL bibliotekų registravimo paslaugą.\n" +"\n" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" +"Naudojimas:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdeilutė]] DllVardas\n" +"\n" +"Parametrai:\n" +" [/u] Išregistruoti serverį.\n" +" [/s] Tyli veiksena (nebus rodomi pranešimai).\n" +" [/i] Kviesti „DllInstall“, perduodant nebūtiną [cmdeilutę].\n" +"\tKai naudojama su [/u], „DllInstall“ kviečiamas pašalinimo veiksenoje.\n" +" [/n] Nekviesti „DllRegisterServer“. Privalo būti naudojamas su [/i].\n" +"\n" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" +"regsvr32: Netinkamas arba neatpažintas parametras [%1]\n" +"\n" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "regsvr32: Nepavyko įkelti DLL bibliotekos „%1“\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "regsvr32: %1 neįgyvendinta DLL bibliotekoje „%2“\n" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "regsvr32: Nepavyko užregistruoti DLL bibliotekos „%1“\n" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "regsvr32: Sėkmingai užregistruota DLL biblioteka „%1“\n" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "regsvr32: Nepavyko išregistruoti DLL bibliotekos „%1“\n" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "regsvr32: Sėkmingai išregistruota DLL biblioteka „%1“\n" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "regsvr32: Nepavyko įdiegti DLL bibliotekos „%1“\n" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "regsvr32: Sėkmingai įdiegta DLL biblioteka „%1“\n" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "regsvr32: Nepavyko pašalinti DLL bibliotekos „%1“\n" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "regsvr32: Sėkmingai pašalinta DLL biblioteka „%1“\n" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/ml.po wine1.7-1.7.16/po/ml.po --- wine1.7-1.7.15/po/ml.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/ml.po 2014-04-04 19:13:44.000000000 +0000 @@ -11118,6 +11118,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/nb_NO.po wine1.7-1.7.16/po/nb_NO.po --- wine1.7-1.7.15/po/nb_NO.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/nb_NO.po 2014-04-04 19:13:44.000000000 +0000 @@ -11670,6 +11670,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Eksporterer den valgte greinen av registeret til en tekstfil" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Klarte ikke åpne «%1»\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/nl.po wine1.7-1.7.16/po/nl.po --- wine1.7-1.7.15/po/nl.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/nl.po 2014-04-04 19:13:44.000000000 +0000 @@ -11818,6 +11818,76 @@ "Exporteert de geselecteerde subsleutel van het register naar een tekst " "bestand" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Openen van '%1' is mislukt\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/or.po wine1.7-1.7.16/po/or.po --- wine1.7-1.7.15/po/or.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/or.po 2014-04-04 19:13:44.000000000 +0000 @@ -11118,6 +11118,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/pa.po wine1.7-1.7.16/po/pa.po --- wine1.7-1.7.15/po/pa.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/pa.po 2014-04-04 19:13:44.000000000 +0000 @@ -11118,6 +11118,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/pl.po wine1.7-1.7.16/po/pl.po --- wine1.7-1.7.15/po/pl.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/pl.po 2014-04-04 19:13:44.000000000 +0000 @@ -11727,6 +11727,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Eksportuje zaznaczoną gałąź rejestru do pliku tekstowego" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Nieudane otwarcie '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/pt_BR.po wine1.7-1.7.16/po/pt_BR.po --- wine1.7-1.7.15/po/pt_BR.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/pt_BR.po 2014-04-04 19:13:44.000000000 +0000 @@ -11730,6 +11730,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exporta o ramo do registro selecionado para um arquivo de texto" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Falha ao abrir '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/pt_PT.po wine1.7-1.7.16/po/pt_PT.po --- wine1.7-1.7.15/po/pt_PT.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/pt_PT.po 2014-04-04 19:13:44.000000000 +0000 @@ -11737,6 +11737,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exporta o ramo seleccionado do registo para um ficheiro de texto" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Falhou ao abrir '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/rm.po wine1.7-1.7.16/po/rm.po --- wine1.7-1.7.15/po/rm.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/rm.po 2014-04-04 19:13:44.000000000 +0000 @@ -11200,6 +11200,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/ro.po wine1.7-1.7.16/po/ro.po --- wine1.7-1.7.15/po/ro.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/ro.po 2014-04-04 19:13:44.000000000 +0000 @@ -11859,6 +11859,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exportă ramura de registru selectată ca fișier text" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Deschiderea „%1” a eșuat\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/ru.po wine1.7-1.7.16/po/ru.po --- wine1.7-1.7.15/po/ru.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/ru.po 2014-04-04 19:13:44.000000000 +0000 @@ -11673,6 +11673,90 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Экспортирует выделенную ветку реестра в текстовый файл" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" +"Утилита регистрации DLL в Wine\n" +"\n" +"Используется для регистрации DLL.\n" +"\n" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" +"Использование:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] имя_dll\n" +"\n" +"Параметры:\n" +" [/u] Разрегистрировать сервер.\n" +" [/s] Тихий режим (сообщения не выводятся).\n" +" [/i] Вызвать DllInstall с дополнительными параметрами [cmdline].\n" +"\tПри использовании с [/u] DllInstall будет вызвана в режиме удаления.\n" +" [/n] Не вызывать DllRegisterServer. Используется с [/i].\n" +"\n" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" +"regsvr32: неверный или неизвестный параметр [%1]\n" +"\n" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "regsvr32: не удалось загрузить DLL «%1»\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "regsvr32: %1 не реализован в DLL «%2»\n" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "regsvr32: не удалось зарегистрировать «%1»\n" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "regsvr32: DLL «%1» успешно зарегистрирована\n" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "regsvr32: не удалось разрегистрировать DLL «%1»\n" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "regsvr32: DLL «%1» успешно разрегистрирована\n" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "regsvr32: не удалось установить DLL «%1»\n" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "regsvr32: DLL «%1» успешно установлена\n" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "regsvr32: не удалось удалить DLL «%1»\n" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "regsvr32: DLL «%1» успешно удалена\n" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/sk.po wine1.7-1.7.16/po/sk.po --- wine1.7-1.7.15/po/sk.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/sk.po 2014-04-04 19:13:44.000000000 +0000 @@ -11316,6 +11316,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/sl.po wine1.7-1.7.16/po/sl.po --- wine1.7-1.7.15/po/sl.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/sl.po 2014-04-04 19:13:44.000000000 +0000 @@ -11793,6 +11793,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Izvozi izbrano vejo registra v besedilno datoteko" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Odpiranje '%1' je spodletelo\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/sr_RS@cyrillic.po wine1.7-1.7.16/po/sr_RS@cyrillic.po --- wine1.7-1.7.15/po/sr_RS@cyrillic.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/sr_RS@cyrillic.po 2014-04-04 19:13:44.000000000 +0000 @@ -11733,6 +11733,75 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Отварање „%s“ датотеке није успело\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/sr_RS@latin.po wine1.7-1.7.16/po/sr_RS@latin.po --- wine1.7-1.7.15/po/sr_RS@latin.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/sr_RS@latin.po 2014-04-04 19:13:44.000000000 +0000 @@ -11879,6 +11879,75 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Otvaranje „%s“ datoteke nije uspelo\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/sv.po wine1.7-1.7.16/po/sv.po --- wine1.7-1.7.15/po/sv.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/sv.po 2014-04-04 19:13:44.000000000 +0000 @@ -11562,6 +11562,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Exporterar vald gren av registret till en textfil" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "Misslyckades med att öppna '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/te.po wine1.7-1.7.16/po/te.po --- wine1.7-1.7.15/po/te.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/te.po 2014-04-04 19:13:44.000000000 +0000 @@ -11118,6 +11118,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/th.po wine1.7-1.7.16/po/th.po --- wine1.7-1.7.15/po/th.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/th.po 2014-04-04 19:13:44.000000000 +0000 @@ -11334,6 +11334,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/tr.po wine1.7-1.7.16/po/tr.po --- wine1.7-1.7.15/po/tr.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/tr.po 2014-04-04 19:13:44.000000000 +0000 @@ -11623,6 +11623,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Sistem kaydının seçilen kısmını dosyasına aktarır" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "'%1' açılamadı\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/uk.po wine1.7-1.7.16/po/uk.po --- wine1.7-1.7.15/po/uk.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/uk.po 2014-04-04 19:13:44.000000000 +0000 @@ -5,7 +5,7 @@ "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To: http://bugs.winehq.org\n" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2014-03-11 16:05+0300\n" +"PO-Revision-Date: 2014-04-02 17:53+0300\n" "Last-Translator: Andrey Gusev \n" "Language-Team: none\n" "Language: Ukrainian\n" @@ -11701,6 +11701,90 @@ msgid "Exports selected branch of the registry to a text file" msgstr "Експортує вибрану гілку реєстру до текстового файлу" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" +"Утиліта реєстрації DLL у Wine\n" +"\n" +"Слугує сервісом для реєстрації DLL\n" +"\n" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" +"Використання:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Опції:\n" +" [/u] Скасувати реєстрацію сервера.\n" +" [/s] Тихий режим (повідомлення не відображатимуться).\n" +" [/i] Виклик DllInstall з додатковими параметрами [cmdline].\n" +"\tПри використанні з [/u] DllInstall буде викликана в режимі видалення.\n" +" [/n] Не викликати DllRegisterServer. Має використовуватися з [/i].\n" +"\n" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" +"regsvr32: Невірний або нерозпізнаний параметр [%1]\n" +"\n" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "regsvr32: Не вдалося завантажити DLL '%1'\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "regsvr32: %1 не реалізовано у DLL '%2'\n" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "regsvr32: Не вдалося зареєструвати DLL '%1'\n" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "regsvr32: DLL '%1' успішно зареєстрована\n" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "regsvr32: Не вдалося скасувати реєстрацію DLL '%1'\n" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "regsvr32: Реєстрація для DLL '%1' успішно скасована\n" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "regsvr32: Не вдалося встановити DLL '%1'\n" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "regsvr32: DLL '%1' успішно встановлена\n" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "regsvr32: Не вдалося видалити DLL '%1'\n" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "regsvr32: DLL '%1' успішно видалена\n" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/wa.po wine1.7-1.7.16/po/wa.po --- wine1.7-1.7.15/po/wa.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/wa.po 2014-04-04 19:13:44.000000000 +0000 @@ -11248,6 +11248,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/wine.pot wine1.7-1.7.16/po/wine.pot --- wine1.7-1.7.15/po/wine.pot 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/wine.pot 2014-04-04 19:13:44.000000000 +0000 @@ -11057,6 +11057,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/zh_CN.po wine1.7-1.7.16/po/zh_CN.po --- wine1.7-1.7.15/po/zh_CN.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/zh_CN.po 2014-04-04 19:13:44.000000000 +0000 @@ -11169,6 +11169,74 @@ msgid "Exports selected branch of the registry to a text file" msgstr "把选定的注册表分支导出为文本文件" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/po/zh_TW.po wine1.7-1.7.16/po/zh_TW.po --- wine1.7-1.7.15/po/zh_TW.po 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/po/zh_TW.po 2014-04-04 19:13:44.000000000 +0000 @@ -11537,6 +11537,76 @@ msgid "Exports selected branch of the registry to a text file" msgstr "匯出註冊表的所選分支到文字檔" +#: regsvr32.rc:32 +msgid "" +"Wine DLL Registration Utility\n" +"\n" +"Provides DLL registration services.\n" +"\n" +msgstr "" + +#: regsvr32.rc:40 +msgid "" +"Usage:\n" +" regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n" +"\n" +"Options:\n" +" [/u] Unregister a server.\n" +" [/s] Silent mode (no messages will be displayed).\n" +" [/i] Call DllInstall, passing an optional [cmdline].\n" +"\tWhen used with [/u] DllInstall is called in uninstall mode.\n" +" [/n] Do not call DllRegisterServer. This option must be used with [/i].\n" +"\n" +msgstr "" + +#: regsvr32.rc:41 +msgid "" +"regsvr32: Invalid or unrecognized switch [%1]\n" +"\n" +msgstr "" + +#: regsvr32.rc:42 +#, fuzzy +#| msgid "Failed to open '%1'\n" +msgid "regsvr32: Failed to load DLL '%1'\n" +msgstr "開啟 %1 失敗\n" + +#: regsvr32.rc:43 +msgid "regsvr32: %1 not implemented in DLL '%2'\n" +msgstr "" + +#: regsvr32.rc:44 +msgid "regsvr32: Failed to register DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:45 +msgid "regsvr32: Successfully registered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:46 +msgid "regsvr32: Failed to unregister DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:47 +msgid "regsvr32: Successfully unregistered DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:48 +msgid "regsvr32: Failed to install DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:49 +msgid "regsvr32: Successfully installed DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:50 +msgid "regsvr32: Failed to uninstall DLL '%1'\n" +msgstr "" + +#: regsvr32.rc:51 +msgid "regsvr32: Successfully uninstalled DLL '%1'\n" +msgstr "" + #: start.rc:55 msgid "" "Application could not be started, or no application associated with the " diff -Nru wine1.7-1.7.15/programs/oleview/details.c wine1.7-1.7.16/programs/oleview/details.c --- wine1.7-1.7.15/programs/oleview/details.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/programs/oleview/details.c 2014-04-04 19:13:44.000000000 +0000 @@ -158,7 +158,7 @@ RegCloseKey(hCurKey); - memmove(&wszData[6], wszData, sizeof(WCHAR[lenData])); + memmove(&wszData[6], wszData, lenData * sizeof(WCHAR)); memcpy(wszData, wszCLSID, sizeof(WCHAR[6])); wszData[5] = '\\'; @@ -187,7 +187,7 @@ RegCloseKey(hCurKey); - memmove(&wszData[8], wszData, sizeof(WCHAR[lenData])); + memmove(&wszData[8], wszData, lenData * sizeof(WCHAR)); memcpy(wszData, wszTypeLib, sizeof(WCHAR[8])); wszData[7] = '\\'; RegOpenKeyW(HKEY_CLASSES_ROOT, wszData, &hCurKey); @@ -238,9 +238,9 @@ if(RegQueryValueW(hKey, NULL, wszTree, (LONG *)&lenTree) == ERROR_SUCCESS) { memmove(&wszTree[lenBuffer-lastLenBuffer+3], wszTree, - sizeof(WCHAR[lenTree])); + lenTree * sizeof(WCHAR)); memcpy(wszTree, &buffer[lastLenBuffer], - sizeof(WCHAR[lenBuffer-lastLenBuffer])); + (lenBuffer - lastLenBuffer) * sizeof(WCHAR)); if(lenTree == 1) wszTree[lenBuffer-lastLenBuffer] = '\0'; else diff -Nru wine1.7-1.7.15/programs/oleview/tree.c wine1.7-1.7.16/programs/oleview/tree.c --- wine1.7-1.7.15/programs/oleview/tree.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/programs/oleview/tree.c 2014-04-04 19:13:44.000000000 +0000 @@ -225,7 +225,7 @@ int bufLen; BOOL ret; - memset(buffer, 0, sizeof(WCHAR[bufSize])); + memset(buffer, 0, bufSize * sizeof(WCHAR)); memset(&tvi, 0, sizeof(TVITEMW)); tvi.hItem = item; @@ -239,8 +239,8 @@ if(tvi.lParam && (((ITEM_INFO *)tvi.lParam)->cFlag & (REGPATH|REGTOP))) { bufLen = lstrlenW(((ITEM_INFO *)tvi.lParam)->info); - memmove(&buffer[bufLen], buffer, sizeof(WCHAR[bufSize-bufLen])); - memcpy(buffer, ((ITEM_INFO *)tvi.lParam)->info, sizeof(WCHAR[bufLen])); + memmove(&buffer[bufLen], buffer, (bufSize - bufLen) * sizeof(WCHAR)); + memcpy(buffer, ((ITEM_INFO *)tvi.lParam)->info, bufLen * sizeof(WCHAR)); } if(tvi.lParam && ((ITEM_INFO *)tvi.lParam)->cFlag & REGTOP) break; diff -Nru wine1.7-1.7.15/programs/regsvr32/Makefile.in wine1.7-1.7.16/programs/regsvr32/Makefile.in --- wine1.7-1.7.15/programs/regsvr32/Makefile.in 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/programs/regsvr32/Makefile.in 2014-04-04 19:13:44.000000000 +0000 @@ -1,6 +1,6 @@ MODULE = regsvr32.exe APPMODE = -mconsole -IMPORTS = ole32 +IMPORTS = ole32 user32 C_SRCS = \ regsvr32.c diff -Nru wine1.7-1.7.15/programs/regsvr32/regsvr32.c wine1.7-1.7.16/programs/regsvr32/regsvr32.c --- wine1.7-1.7.15/programs/regsvr32/regsvr32.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/programs/regsvr32/regsvr32.c 2014-04-04 19:13:44.000000000 +0000 @@ -51,10 +51,13 @@ #include "config.h" #include "wine/port.h" -#include #include #include #include +#include "regsvr32.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(regsvr32); typedef HRESULT (*DLLREGISTER) (void); typedef HRESULT (*DLLUNREGISTER) (void); @@ -62,16 +65,38 @@ static BOOL Silent = FALSE; -static int Usage(void) +static void __cdecl output_write(UINT id, ...) { - printf("regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname ...\n"); - printf("\t[/u] unregister server\n"); - printf("\t[/s] silent (no message boxes)\n"); - printf("\t[/i] Call DllInstall passing it an optional [cmdline];\n"); - printf("\t when used with /u calls dll uninstall\n"); - printf("\t[/n] Do not call DllRegisterServer; this option " - "must be used with [/i]\n"); - return 0; + char fmt[1024]; + __ms_va_list va_args; + char *str; + DWORD len, nOut, ret; + + if (Silent) return; + + if (!LoadStringA(GetModuleHandleA(NULL), id, fmt, sizeof(fmt)/sizeof(fmt[0]))) + { + WINE_FIXME("LoadString failed with %d\n", GetLastError()); + return; + } + + __ms_va_start(va_args, id); + SetLastError(NO_ERROR); + len = FormatMessageA(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ALLOCATE_BUFFER, + fmt, 0, 0, (LPSTR)&str, 0, &va_args); + __ms_va_end(va_args); + if (len == 0 && GetLastError() != NO_ERROR) + { + WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_a(fmt)); + return; + } + + ret = WriteConsoleA(GetStdHandle(STD_OUTPUT_HANDLE), str, len, &nOut, NULL); + + if (!ret) + WINE_WARN("regsvr32: WriteConsoleA() failed.\n"); + + LocalFree(str); } /** @@ -89,16 +114,13 @@ *DllHandle = LoadLibraryExA(strDll, 0, LOAD_WITH_ALTERED_SEARCH_PATH); if(!*DllHandle) { - if(!Silent) - printf("Failed to load DLL %s\n", strDll); - + output_write(STRING_DLL_LOAD_FAILED, strDll); ExitProcess(1); } proc = (VOID *) GetProcAddress(*DllHandle, procName); if(!proc) { - if(!Silent) - printf("%s not implemented in DLL %s\n", procName, strDll); + output_write(STRING_PROC_NOT_IMPLEMENTED, procName, strDll); FreeLibrary(*DllHandle); return NULL; } @@ -118,13 +140,10 @@ hr = pfRegister(); if(FAILED(hr)) { - if(!Silent) - printf("Failed to register DLL %s\n", strDll); - + output_write(STRING_REGISTER_FAILED, strDll); return -1; } - if(!Silent) - printf("Successfully registered DLL %s\n", strDll); + output_write(STRING_REGISTER_SUCCESSFUL, strDll); if(DllHandle) FreeLibrary(DllHandle); @@ -144,13 +163,10 @@ hr = pfUnregister(); if(FAILED(hr)) { - if(!Silent) - printf("Failed to unregister DLL %s\n", strDll); - + output_write(STRING_UNREGISTER_FAILED, strDll); return -1; } - if(!Silent) - printf("Successfully unregistered DLL %s\n", strDll); + output_write(STRING_UNREGISTER_SUCCESSFUL, strDll); if(DllHandle) FreeLibrary(DllHandle); @@ -170,14 +186,16 @@ hr = pfInstall(install, command_line); if(FAILED(hr)) { - if(!Silent) - printf("Failed to %s DLL %s\n", install ? "install" : "uninstall", - strDll); + if (install) + output_write(STRING_INSTALL_FAILED, strDll); + else + output_write(STRING_UNINSTALL_FAILED, strDll); return -1; } - if(!Silent) - printf("Successfully %s DLL %s\n", install ? "installed" : "uninstalled", - strDll); + if (install) + output_write(STRING_INSTALL_SUCCESSFUL, strDll); + else + output_write(STRING_UNINSTALL_SUCCESSFUL, strDll); if(DllHandle) FreeLibrary(DllHandle); @@ -197,7 +215,7 @@ OleInitialize(NULL); /* Strictly, the Microsoft version processes all the flags before - * the files (e.g. regsvr32 file1 /s file2 is silent even for file1. + * the files (e.g. regsvr32 file1 /s file2 is silent even for file1). * For ease, we will not replicate that and will process the arguments * in order. */ @@ -254,7 +272,11 @@ else if((!strcasecmp(argv[i], "/c"))||(!strcasecmp(argv[i], "-c"))) /* console output */; else if (argv[i][0] == '/' && (!argv[i][2] || argv[i][2] == ':')) - printf("Unrecognized switch %s\n", argv[i]); + { + output_write(STRING_UNRECOGNIZED_SWITCH, argv[i]); + output_write(STRING_USAGE); + return 1; + } else { char *DllName = argv[i]; @@ -285,10 +307,9 @@ if (!DllFound) { - if(!Silent) - return Usage(); - else - return -1; + output_write(STRING_HEADER); + output_write(STRING_USAGE); + return 1; } OleUninitialize(); diff -Nru wine1.7-1.7.15/programs/regsvr32/regsvr32.h wine1.7-1.7.16/programs/regsvr32/regsvr32.h --- wine1.7-1.7.15/programs/regsvr32/regsvr32.h 1970-01-01 00:00:00.000000000 +0000 +++ wine1.7-1.7.16/programs/regsvr32/regsvr32.h 2014-04-04 19:13:44.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * Regsvr32 definitions + * + * Copyright 2014 Hugh McMaster + * + * 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 + */ + +/* Resource strings */ +#define STRING_HEADER 1000 +#define STRING_USAGE 1001 +#define STRING_UNRECOGNIZED_SWITCH 1002 +#define STRING_DLL_LOAD_FAILED 1003 +#define STRING_PROC_NOT_IMPLEMENTED 1004 +#define STRING_REGISTER_FAILED 1005 +#define STRING_REGISTER_SUCCESSFUL 1006 +#define STRING_UNREGISTER_FAILED 1007 +#define STRING_UNREGISTER_SUCCESSFUL 1008 +#define STRING_INSTALL_FAILED 1009 +#define STRING_INSTALL_SUCCESSFUL 1010 +#define STRING_UNINSTALL_FAILED 1011 +#define STRING_UNINSTALL_SUCCESSFUL 1012 diff -Nru wine1.7-1.7.15/programs/regsvr32/regsvr32.rc wine1.7-1.7.16/programs/regsvr32/regsvr32.rc --- wine1.7-1.7.15/programs/regsvr32/regsvr32.rc 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/programs/regsvr32/regsvr32.rc 2014-04-04 19:13:44.000000000 +0000 @@ -1,6 +1,7 @@ -/* Language neutral resources. +/* Regsvr32 resource strings * * Copyright 2003 Stefan Leichter + * Copyright 2014 Hugh McMaster * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -17,8 +18,40 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include +#include "regsvr32.h" + +#pragma makedep po + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + STRING_HEADER, "Wine DLL Registration Utility\n\n\ +Provides DLL registration services.\n\n" + STRING_USAGE, "Usage:\n\ +\ regsvr32 [/u] [/s] [/n] [/i[:cmdline]] DllName\n\n\ +Options:\n\ +\ [/u] Unregister a server.\n\ +\ [/s] Silent mode (no messages will be displayed).\n\ +\ [/i] Call DllInstall, passing an optional [cmdline].\n\ +\tWhen used with [/u] DllInstall is called in uninstall mode.\n\ +\ [/n] Do not call DllRegisterServer. This option must be used with [/i].\n\n" + STRING_UNRECOGNIZED_SWITCH, "regsvr32: Invalid or unrecognized switch [%1]\n\n" + STRING_DLL_LOAD_FAILED, "regsvr32: Failed to load DLL '%1'\n" + STRING_PROC_NOT_IMPLEMENTED, "regsvr32: %1 not implemented in DLL '%2'\n" + STRING_REGISTER_FAILED, "regsvr32: Failed to register DLL '%1'\n" + STRING_REGISTER_SUCCESSFUL, "regsvr32: Successfully registered DLL '%1'\n" + STRING_UNREGISTER_FAILED, "regsvr32: Failed to unregister DLL '%1'\n" + STRING_UNREGISTER_SUCCESSFUL, "regsvr32: Successfully unregistered DLL '%1'\n" + STRING_INSTALL_FAILED, "regsvr32: Failed to install DLL '%1'\n" + STRING_INSTALL_SUCCESSFUL, "regsvr32: Successfully installed DLL '%1'\n" + STRING_UNINSTALL_FAILED, "regsvr32: Failed to uninstall DLL '%1'\n" + STRING_UNINSTALL_SUCCESSFUL, "regsvr32: Successfully uninstalled DLL '%1'\n" +} + #define WINE_FILEDESCRIPTION_STR "Wine Register Server" -#define WINE_FILENAME_STR "REGSVR32" +#define WINE_FILENAME_STR "REGSVR32.EXE" #define WINE_FILETYPE VFT_APP #define WINE_FILEVERSION 5,0,1586,1 #define WINE_FILEVERSION_STR "5.0.1586.1" diff -Nru wine1.7-1.7.15/server/queue.c wine1.7-1.7.16/server/queue.c --- wine1.7-1.7.15/server/queue.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/server/queue.c 2014-04-04 19:13:44.000000000 +0000 @@ -2869,9 +2869,9 @@ reply->send_msg_old = (reply->previous && desktop->foreground_input != queue->input); reply->send_msg_new = FALSE; - if (is_top_level_window( req->handle ) && - ((thread = get_window_thread( req->handle ))) && - (thread->queue->input->desktop == desktop)) + if (is_valid_foreground_window( req->handle ) && + (thread = get_window_thread( req->handle )) && + thread->queue->input->desktop == desktop) { set_foreground_input( desktop, thread->queue->input ); reply->send_msg_new = (desktop->foreground_input != queue->input); diff -Nru wine1.7-1.7.15/server/user.h wine1.7-1.7.16/server/user.h --- wine1.7-1.7.15/server/user.h 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/server/user.h 2014-04-04 19:13:44.000000000 +0000 @@ -152,7 +152,7 @@ extern void destroy_window( struct window *win ); extern void destroy_thread_windows( struct thread *thread ); extern int is_child_window( user_handle_t parent, user_handle_t child ); -extern int is_top_level_window( user_handle_t window ); +extern int is_valid_foreground_window( user_handle_t window ); extern int is_window_visible( user_handle_t window ); extern int is_window_transparent( user_handle_t window ); extern int make_window_active( user_handle_t window ); diff -Nru wine1.7-1.7.15/server/window.c wine1.7-1.7.16/server/window.c --- wine1.7-1.7.15/server/window.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/server/window.c 2014-04-04 19:13:44.000000000 +0000 @@ -581,11 +581,11 @@ return 0; } -/* check whether window is a top-level window */ -int is_top_level_window( user_handle_t window ) +/* check if window can be set as foreground window */ +int is_valid_foreground_window( user_handle_t window ) { struct window *win = get_user_object( window, USER_WINDOW ); - return (win && (is_desktop_window(win) || is_desktop_window(win->parent))); + return win && (win->style & (WS_POPUP|WS_CHILD)) != WS_CHILD; } /* make a window active if possible */ diff -Nru wine1.7-1.7.15/tools/makedep.c wine1.7-1.7.16/tools/makedep.c --- wine1.7-1.7.15/tools/makedep.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/tools/makedep.c 2014-04-04 19:13:44.000000000 +0000 @@ -94,22 +94,43 @@ static const struct strarray empty_strarray; +/* variables common to all makefiles */ +static struct strarray linguas; +static struct strarray dll_flags; +static struct strarray target_flags; +static struct strarray msvcrt_flags; +static struct strarray extra_cflags; +static struct strarray cpp_flags; +static struct strarray unwind_flags; +static struct strarray libs; +static struct strarray cmdline_vars; +static struct strarray top_make_vars; +static const char *root_src_dir; +static const char *tools_dir; +static const char *tools_ext; +static const char *exe_ext; +static const char *dll_ext; +static const char *man_ext; +static const char *dll_prefix; +static const char *crosstarget; +static const char *fontforge; +static const char *convert; +static const char *rsvg; +static const char *icotool; + +/* variables that can be set by individual makefiles */ static struct strarray include_args; static struct strarray define_args; static struct strarray appmode; -static struct strarray dllflags; static struct strarray imports; static struct strarray make_vars; -static struct strarray cmdline_vars; static struct strarray testlist_files; - static const char *base_dir; static const char *src_dir; static const char *top_src_dir; static const char *top_obj_dir; static const char *parent_dir; -static const char *tools_dir; -static const char *tools_ext; + static const char *makefile_name = "Makefile"; static const char *Separator = "### Dependencies"; static const char *input_file_name; @@ -324,6 +345,42 @@ /******************************************************************* + * strarray_get_value + * + * Find a value in a name/value pair string array. + */ +static char *strarray_get_value( const struct strarray *array, const char *name ) +{ + unsigned int i; + + for (i = 0; i < array->count; i += 2) + if (!strcmp( array->str[i], name )) return xstrdup( array->str[i + 1] ); + return NULL; +} + + +/******************************************************************* + * strarray_set_value + * + * Define a value in a name/value pair string array. + */ +static void strarray_set_value( struct strarray *array, const char *name, const char *value ) +{ + unsigned int i; + + /* redefining a variable replaces the previous value */ + for (i = 0; i < array->count; i += 2) + { + if (strcmp( array->str[i], name )) continue; + array->str[i + 1] = value; + return; + } + strarray_add( array, name ); + strarray_add( array, value ); +} + + +/******************************************************************* * output_filename */ static void output_filename( const char *name ) @@ -507,9 +564,8 @@ */ static char *tools_dir_path( const char *path ) { - if (tools_dir) return strmake( "%s/tools/%s", tools_dir, path ); - if (top_obj_dir) return strmake( "%s/tools/%s", top_obj_dir, path ); - return strmake( "tools/%s", path ); + if (tools_dir) return top_obj_dir_path( strmake( "%s/tools/%s", tools_dir, path )); + return top_obj_dir_path( strmake( "tools/%s", path )); } @@ -518,9 +574,7 @@ */ static char *tools_path( const char *name ) { - if (tools_dir) return strmake( "%s/tools/%s/%s%s", tools_dir, name, name, tools_ext ); - if (top_obj_dir) return strmake( "%s/tools/%s/%s%s", top_obj_dir, name, name, tools_ext ); - return strmake( "tools/%s/%s%s", name, name, tools_ext ); + return strmake( "%s/%s%s", tools_dir_path( name ), name, tools_ext ); } @@ -1208,15 +1262,11 @@ */ static char *get_make_variable( const char *name ) { - unsigned int i; + char *ret; - for (i = 0; i < cmdline_vars.count; i += 2) - if (!strcmp( cmdline_vars.str[i], name )) - return xstrdup( cmdline_vars.str[i + 1] ); - - for (i = 0; i < make_vars.count; i += 2) - if (!strcmp( make_vars.str[i], name )) - return xstrdup( make_vars.str[i + 1] ); + if ((ret = strarray_get_value( &cmdline_vars, name ))) return ret; + if ((ret = strarray_get_value( &make_vars, name ))) return ret; + if ((ret = strarray_get_value( &top_make_vars, name ))) return ret; return NULL; } @@ -1290,7 +1340,6 @@ */ static int set_make_variable( struct strarray *array, const char *assignment ) { - unsigned int i; char *p, *name; p = name = xstrdup( assignment ); @@ -1305,15 +1354,7 @@ *p++ = 0; while (isspace(*p)) p++; - /* redefining a variable replaces the previous value */ - for (i = 0; i < array->count; i += 2) - { - if (strcmp( array->str[i], name )) continue; - array->str[i + 1] = p; - return 1; - } - strarray_add( array, name ); - strarray_add( array, p ); + strarray_set_value( array, name, p ); return 1; } @@ -1321,26 +1362,23 @@ /******************************************************************* * parse_makefile */ -static void parse_makefile(void) +static void parse_makefile( const char *name, const char *separator, struct strarray *vars ) { char *buffer; FILE *file; - input_file_name = base_dir_path( makefile_name ); - if (!(file = fopen( input_file_name, "r" ))) - { - fatal_perror( "open" ); - exit( 1 ); - } + *vars = empty_strarray; + input_file_name = name; + if (!(file = fopen( input_file_name, "r" ))) fatal_perror( "open" ); input_line = 0; while ((buffer = get_line( file ))) { - if (Separator && !strncmp( buffer, Separator, strlen(Separator) )) break; + if (separator && !strncmp( buffer, separator, strlen(separator) )) break; if (*buffer == '\t') continue; /* command */ while (isspace( *buffer )) buffer++; if (*buffer == '#') continue; /* comment */ - set_make_variable( &make_vars, buffer ); + set_make_variable( vars, buffer ); } fclose( file ); input_file_name = NULL; @@ -1465,7 +1503,6 @@ struct incl_file *source; unsigned int i; int is_win16 = 0; - const char *dllext = ".so"; struct strarray object_files = empty_strarray; struct strarray crossobj_files = empty_strarray; struct strarray res_files = empty_strarray; @@ -1480,18 +1517,13 @@ struct strarray includes = empty_strarray; struct strarray subdirs = empty_strarray; struct strarray phony_targets = empty_strarray; - struct strarray linguas = get_expanded_make_var_array( "LINGUAS" ); struct strarray all_targets = get_expanded_make_var_array( "PROGRAMS" ); - struct strarray targetflags = get_expanded_make_var_array( "TARGETFLAGS" ); struct strarray delayimports = get_expanded_make_var_array( "DELAYIMPORTS" ); struct strarray extradllflags = get_expanded_make_var_array( "EXTRADLLFLAGS" ); char *module = get_expanded_make_variable( "MODULE" ); - char *exeext = get_expanded_make_variable( "EXEEXT" ); char *testdll = get_expanded_make_variable( "TESTDLL" ); char *staticlib = get_expanded_make_variable( "STATICLIB" ); - char *crosstarget = get_expanded_make_variable( "CROSSTARGET" ); - if (exeext && !strcmp( exeext, ".exe" )) dllext = ""; if (module && strendswith( module, ".a" )) staticlib = module; for (i = 0; i < extradllflags.count; i++) if (!strcmp( extradllflags.str[i], "-m16" )) is_win16 = 1; @@ -1562,7 +1594,7 @@ output( "%s.res: %s %s\n", obj, tools_path( "wrc" ), source->filename ); output( "\t%s -o $@ %s", tools_path( "wrc" ), source->filename ); if (is_win16) output_filename( "-m16" ); - else output_filenames( targetflags ); + else output_filenames( target_flags ); output_filename( "--nostdinc" ); output_filenames( includes ); output_filenames( define_args ); @@ -1617,7 +1649,7 @@ output_filenames( targets ); output( ": %s\n", tools_path( "widl" )); output( "\t%s -o $@ %s", tools_path( "widl" ), source->filename ); - output_filenames( targetflags ); + output_filenames( target_flags ); output_filenames( includes ); output_filenames( define_args ); output_filenames( extradefs ); @@ -1657,12 +1689,12 @@ else if (!strcmp( ext, "sfd" )) /* font file */ { char *ttf_file = src_dir_path( strmake( "%s.ttf", obj )); - char *fontforge = get_expanded_make_variable( "FONTFORGE" ); if (fontforge && !src_dir) { output( "%s: %s\n", ttf_file, source->filename ); output( "\t%s -script %s %s $@\n", fontforge, top_dir_path( "fonts/genttf.ff" ), source->filename ); + if (!(source->flags & FLAG_SFD_FONTS)) output( "all: %s\n", ttf_file ); } if (source->flags & FLAG_INSTALL) { @@ -1687,27 +1719,24 @@ output( "\t$(INSTALL_DATA) %s $(DESTDIR)$(fontdir)/%s\n", font, font ); output( "uninstall::\n" ); output( "\t$(RM) $(DESTDIR)$(fontdir)/%s\n", font ); - strarray_add_uniq( &phony_targets, "install" ); - strarray_add_uniq( &phony_targets, "install-lib" ); - strarray_add_uniq( &phony_targets, "uninstall" ); } } + if (source->flags & (FLAG_INSTALL | FLAG_SFD_FONTS)) + { + strarray_add_uniq( &phony_targets, "install" ); + strarray_add_uniq( &phony_targets, "install-lib" ); + strarray_add_uniq( &phony_targets, "uninstall" ); + } continue; /* no dependencies */ } else if (!strcmp( ext, "svg" )) /* svg file */ { - char *convert = get_expanded_make_variable( "CONVERT" ); - char *rsvg = get_expanded_make_variable( "RSVG" ); - char *icotool = get_expanded_make_variable( "ICOTOOL" ); if (convert && rsvg && icotool && !src_dir) { output( "%s.ico %s.bmp: %s\n", obj, obj, source->filename ); output( "\tCONVERT=\"%s\" ICOTOOL=\"%s\" RSVG=\"%s\" %s %s $@\n", convert, icotool, rsvg, top_dir_path( "tools/buildimage" ), source->filename ); } - free( convert ); - free( rsvg ); - free( icotool ); continue; /* no dependencies */ } else if (!strcmp( ext, "res" )) @@ -1728,9 +1757,13 @@ output_filenames( includes ); output_filenames( define_args ); output_filenames( extradefs ); - if (module || staticlib || testdll) output_filenames( dllflags ); - output_filenames( get_expanded_make_var_array( "EXTRACFLAGS" )); - output_filenames( get_expanded_make_var_array( "CPPFLAGS" )); + if (module || staticlib || testdll) + { + output_filenames( dll_flags ); + if (use_msvcrt) output_filenames( msvcrt_flags ); + } + output_filenames( extra_cflags ); + output_filenames( cpp_flags ); output_filename( "$(CFLAGS)" ); output( "\n" ); if (crosstarget && need_cross) @@ -1742,7 +1775,7 @@ output_filenames( define_args ); output_filenames( extradefs ); output_filename( "-DWINE_CROSSTEST" ); - output_filenames( get_expanded_make_var_array( "CPPFLAGS" )); + output_filenames( cpp_flags ); output_filename( "$(CFLAGS)" ); output( "\n" ); } @@ -1752,7 +1785,7 @@ output( "%s.ok:\n", obj ); output( "\t%s $(RUNTESTFLAGS) -T %s -M %s -p %s%s %s && touch $@\n", top_dir_path( "tools/runtest" ), top_obj_dir, - testdll, replace_extension( testdll, ".dll", "_test.exe" ), dllext, obj ); + testdll, replace_extension( testdll, ".dll", "_test.exe" ), dll_ext, obj ); } if (!strcmp( ext, "c" ) && !(source->flags & FLAG_GENERATED)) strarray_add( &c2man_files, source->filename ); @@ -1776,7 +1809,7 @@ output( "\t%s -O pot -o $@", tools_path( "wrc" )); output_filenames( po_files ); if (is_win16) output_filename( "-m16" ); - else output_filenames( targetflags ); + else output_filenames( target_flags ); output_filename( "--nostdinc" ); output_filenames( includes ); output_filenames( define_args ); @@ -1817,15 +1850,15 @@ for (i = 0; i < delayimports.count; i++) strarray_add( &all_libs, strmake( "-Wb,-d%s", delayimports.str[i] )); strarray_add( &all_libs, "-lwine" ); - strarray_addall( &all_libs, get_expanded_make_var_array( "LIBPORT" )); + strarray_add( &all_libs, top_obj_dir_path( "libs/port/libwine_port.a" )); strarray_addall( &all_libs, get_expanded_make_var_array( "EXTRALIBS" )); - strarray_addall( &all_libs, get_expanded_make_var_array( "LIBS" )); + strarray_addall( &all_libs, libs ); - if (*dllext) + if (*dll_ext) { - strarray_add( &all_targets, strmake( "%s%s", module, dllext )); + strarray_add( &all_targets, strmake( "%s%s", module, dll_ext )); strarray_add( &all_targets, strmake( "%s.fake", module )); - output( "%s%s %s.fake:", module, dllext, module ); + output( "%s%s %s.fake:", module, dll_ext, module ); } else { @@ -1839,8 +1872,8 @@ output( "\t%s -o $@", tools_path( "winegcc" )); output_filename( strmake( "-B%s", tools_dir_path( "winebuild" ))); if (tools_dir) output_filename( strmake( "--sysroot=%s", top_obj_dir )); - output_filenames( targetflags ); - output_filenames( get_expanded_make_var_array( "UNWINDFLAGS" )); + output_filenames( target_flags ); + output_filenames( unwind_flags ); if (spec_file) { output( " -shared %s", spec_file ); @@ -1855,12 +1888,12 @@ if (spec_file && importlib) { - if (*dllext) + if (*dll_ext) { strarray_add( &clean_files, strmake( "lib%s.def", importlib )); output( "lib%s.def: %s %s\n", importlib, tools_path( "winebuild" ), spec_file ); output( "\t%s -w --def -o $@ --export %s", tools_path( "winebuild" ), spec_file ); - output_filenames( targetflags ); + output_filenames( target_flags ); if (is_win16) output_filename( "-m16" ); output( "\n" ); if (implib_objs.count) @@ -1883,7 +1916,7 @@ output_filenames( implib_objs ); output( "\n" ); output( "\t%s -w --implib -o $@ --export %s", tools_path( "winebuild" ), spec_file ); - output_filenames( targetflags ); + output_filenames( target_flags ); output_filenames( implib_objs ); output( "\n" ); } @@ -1905,13 +1938,11 @@ { if (c2man_files.count) { - char *manext = get_expanded_make_variable( "api_manext" ); - output( "manpages::\n" ); output( "\t%s -w %s", top_dir_path( "tools/c2man.pl" ), spec_file ); output_filename( strmake( "-R%s", top_dir_path( "" ))); output_filename( strmake( "-I%s", top_dir_path( "include" ))); - output_filename( strmake( "-o %s/man%s", top_obj_dir_path( "documentation" ), manext ? manext : "3w" )); + output_filename( strmake( "-o %s/man%s", top_obj_dir_path( "documentation" ), man_ext )); output_filenames( c2man_files ); output( "\n" ); output( "htmlpages::\n" ); @@ -1976,26 +2007,26 @@ for (i = 0; i < imports.count; i++) strarray_add( &all_libs, strmake( "-l%s", imports.str[i] )); strarray_addall( &all_libs, get_expanded_make_var_array( "LIBS" )); - strarray_add( &all_targets, strmake( "%s%s", testmodule, dllext )); - strarray_add( &clean_files, strmake( "%s%s", stripped, dllext )); - output( "%s%s:\n", testmodule, dllext ); + strarray_add( &all_targets, strmake( "%s%s", testmodule, dll_ext )); + strarray_add( &clean_files, strmake( "%s%s", stripped, dll_ext )); + output( "%s%s:\n", testmodule, dll_ext ); output( "\t%s -o $@", tools_path( "winegcc" )); output_filename( strmake( "-B%s", tools_dir_path( "winebuild" ))); if (tools_dir) output_filename( strmake( "--sysroot=%s", top_obj_dir )); - output_filenames( targetflags ); - output_filenames( get_expanded_make_var_array( "UNWINDFLAGS" )); + output_filenames( target_flags ); + output_filenames( unwind_flags ); output_filenames( appmode ); output_filenames( object_files ); output_filenames( res_files ); output_filenames( all_libs ); output_filename( "$(LDFLAGS)" ); output( "\n" ); - output( "%s%s:\n", stripped, dllext ); + output( "%s%s:\n", stripped, dll_ext ); output( "\t%s -o $@", tools_path( "winegcc" )); output_filename( strmake( "-B%s", tools_dir_path( "winebuild" ))); if (tools_dir) output_filename( strmake( "--sysroot=%s", top_obj_dir )); - output_filenames( targetflags ); - output_filenames( get_expanded_make_var_array( "UNWINDFLAGS" )); + output_filenames( target_flags ); + output_filenames( unwind_flags ); output_filename( strmake( "-Wb,-F,%s", testmodule )); output_filenames( appmode ); output_filenames( object_files ); @@ -2003,7 +2034,7 @@ output_filenames( all_libs ); output_filename( "$(LDFLAGS)" ); output( "\n" ); - output( "%s%s %s%s:", testmodule, dllext, stripped, dllext ); + output( "%s%s %s%s:", testmodule, dll_ext, stripped, dll_ext ); output_filenames( object_files ); output_filenames( res_files ); output( "\n" ); @@ -2012,9 +2043,9 @@ { char *testres = replace_extension( testdll, ".dll", "_test.res" ); output( "all: %s/%s\n", top_obj_dir_path( "programs/winetest" ), testres ); - output( "%s/%s: %s%s\n", top_obj_dir_path( "programs/winetest" ), testres, stripped, dllext ); + output( "%s/%s: %s%s\n", top_obj_dir_path( "programs/winetest" ), testres, stripped, dll_ext ); output( "\techo \"%s TESTRES \\\"%s%s\\\"\" | %s -o $@\n", - testmodule, stripped, dllext, tools_path( "wrc" )); + testmodule, stripped, dll_ext, tools_path( "wrc" )); } if (crosstarget) @@ -2040,7 +2071,7 @@ } output_filenames( ok_files ); - output( ": %s%s ../%s%s\n", testmodule, dllext, testdll, dllext ); + output( ": %s%s ../%s%s\n", testmodule, dll_ext, testdll, dll_ext ); output( "check test:" ); output_filenames( ok_files ); output( "\n" ); @@ -2309,23 +2340,19 @@ base_dir = path; if (!strcmp( base_dir, "." )) base_dir = NULL; output_file_name = base_dir_path( makefile_name ); - parse_makefile(); + parse_makefile( output_file_name, Separator, &make_vars ); src_dir = get_expanded_make_variable( "srcdir" ); top_src_dir = get_expanded_make_variable( "top_srcdir" ); top_obj_dir = get_expanded_make_variable( "top_builddir" ); parent_dir = get_expanded_make_variable( "PARENTSRC" ); - tools_dir = get_expanded_make_variable( "TOOLSDIR" ); - tools_ext = get_expanded_make_variable( "TOOLSEXT" ); /* ignore redundant source paths */ if (src_dir && !strcmp( src_dir, "." )) src_dir = NULL; if (top_src_dir && top_obj_dir && !strcmp( top_src_dir, top_obj_dir )) top_src_dir = NULL; - if (tools_dir && top_obj_dir && !strcmp( tools_dir, top_obj_dir )) tools_dir = NULL; if (top_obj_dir && !strcmp( top_obj_dir, "." )) top_obj_dir = NULL; appmode = get_expanded_make_var_array( "APPMODE" ); - dllflags = get_expanded_make_var_array( "DLLFLAGS" ); imports = get_expanded_make_var_array( "IMPORTS" ); use_msvcrt = 0; @@ -2338,8 +2365,6 @@ define_args = empty_strarray; strarray_add( &define_args, "-D__WINESRC__" ); - if (!tools_ext) tools_ext = ""; - value = get_expanded_make_var_array( "EXTRAINCL" ); for (i = 0; i < value.count; i++) if (!strncmp( value.str[i], "-I", 2 )) @@ -2348,8 +2373,6 @@ strarray_add_uniq( &define_args, value.str[i] ); strarray_addall( &define_args, get_expanded_make_var_array( "EXTRADEFS" )); - if (use_msvcrt) strarray_add( &dllflags, get_expanded_make_variable( "MSVCRTFLAGS" )); - list_init( &sources ); list_init( &includes ); @@ -2477,6 +2500,35 @@ signal( SIGHUP, exit_on_signal ); #endif + parse_makefile( makefile_name, "# End of common header", &top_make_vars ); + + linguas = get_expanded_make_var_array( "LINGUAS" ); + target_flags = get_expanded_make_var_array( "TARGETFLAGS" ); + msvcrt_flags = get_expanded_make_var_array( "MSVCRTFLAGS" ); + dll_flags = get_expanded_make_var_array( "DLLFLAGS" ); + extra_cflags = get_expanded_make_var_array( "EXTRACFLAGS" ); + cpp_flags = get_expanded_make_var_array( "CPPFLAGS" ); + unwind_flags = get_expanded_make_var_array( "UNWINDFLAGS" ); + libs = get_expanded_make_var_array( "LIBS" ); + + root_src_dir = get_expanded_make_variable( "srcdir" ); + tools_dir = get_expanded_make_variable( "TOOLSDIR" ); + tools_ext = get_expanded_make_variable( "TOOLSEXT" ); + exe_ext = get_expanded_make_variable( "EXEEXT" ); + man_ext = get_expanded_make_variable( "api_manext" ); + dll_ext = (exe_ext && !strcmp( exe_ext, ".exe" )) ? "" : ".so"; + dll_prefix = get_expanded_make_variable( "DLLPREFIX" ); + crosstarget = get_expanded_make_variable( "CROSSTARGET" ); + fontforge = get_expanded_make_variable( "FONTFORGE" ); + convert = get_expanded_make_variable( "CONVERT" ); + rsvg = get_expanded_make_variable( "RSVG" ); + icotool = get_expanded_make_variable( "ICOTOOL" ); + + if (tools_dir && !strcmp( tools_dir, "." )) tools_dir = NULL; + if (!tools_ext) tools_ext = ""; + if (!dll_prefix) dll_prefix = ""; + if (!man_ext) man_ext = "3w"; + for (i = 1; i < argc; i++) update_makefile( argv[i] ); return 0; } diff -Nru wine1.7-1.7.15/tools/make_xftmpl.c wine1.7-1.7.16/tools/make_xftmpl.c --- wine1.7-1.7.15/tools/make_xftmpl.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/tools/make_xftmpl.c 2014-04-04 19:13:44.000000000 +0000 @@ -69,13 +69,6 @@ #define TOKEN_CSTRING 51 #define TOKEN_ARRAY 52 -struct parser -{ - FILE *infile; - FILE *outfile; - int line_no; -}; - struct keyword { const char *word; @@ -106,7 +99,10 @@ static char *option_inc_size_name = NULL; static const char *option_outfile_name = "-"; static char *program_name; +static FILE *infile; +static int line_no; static const char *infile_name; +static FILE *outfile; static BYTE *output_data; static UINT output_pos, output_size; @@ -114,15 +110,15 @@ #define __attribute__(x) #endif -static void fatal_error( struct parser *parser, const char *msg, ... ) __attribute__ ((__format__ (__printf__, 2, 3))); +static void fatal_error( const char *msg, ... ) __attribute__ ((__format__ (__printf__, 1, 2))); -static void fatal_error( struct parser *parser, const char *msg, ... ) +static void fatal_error( const char *msg, ... ) { va_list valist; va_start( valist, msg ); if (infile_name) { - fprintf( stderr, "%s:%d:", infile_name, parser->line_no ); + fprintf( stderr, "%s:%d:", infile_name, line_no ); fprintf( stderr, " error: " ); } else fprintf( stderr, "%s: error: ", program_name ); @@ -132,43 +128,43 @@ } -static inline BOOL read_byte(struct parser *parser, char *byte) +static inline BOOL read_byte( char *byte ) { - int c = fgetc(parser->infile); + int c = fgetc(infile); *byte = c; - if (c == '\n') parser->line_no++; + if (c == '\n') line_no++; return c != EOF; } -static inline BOOL unread_byte(struct parser *parser, char last_byte) +static inline BOOL unread_byte( char last_byte ) { - if (last_byte == '\n') parser->line_no--; - return ungetc(last_byte, parser->infile) != EOF; + if (last_byte == '\n') line_no--; + return ungetc(last_byte, infile) != EOF; } -static inline BOOL read_bytes(struct parser *parser, void *data, DWORD size) +static inline BOOL read_bytes( void *data, DWORD size ) { - return fread(data, size, 1, parser->infile) > 0; + return fread(data, size, 1, infile) > 0; } -static BOOL write_c_hex_bytes(struct parser *parser) +static BOOL write_c_hex_bytes(void) { UINT i; for (i = 0; i < output_pos; i++) { if (i % 12 == 0) - fprintf(parser->outfile, "\n "); - fprintf(parser->outfile, " 0x%02x,", output_data[i]); + fprintf(outfile, "\n "); + fprintf(outfile, " 0x%02x,", output_data[i]); } return TRUE; } -static BOOL write_raw_bytes(struct parser *parser) +static BOOL write_raw_bytes(void) { - return fwrite(output_data, output_pos, 1, parser->outfile) > 0; + return fwrite(output_data, output_pos, 1, outfile) > 0; } -static inline BOOL write_bytes(struct parser *parser, const void *data, DWORD size) +static inline BOOL write_bytes(const void *data, DWORD size) { if (output_pos + size > output_size) { @@ -181,19 +177,36 @@ return TRUE; } -static inline BOOL write_byte(struct parser *parser, BYTE value) +static inline BOOL write_byte(BYTE value) +{ + return write_bytes( &value, sizeof(value) ); +} + +static inline BOOL write_word(WORD value) +{ + return write_byte( value ) && + write_byte( value >> 8 ); +} + +static inline BOOL write_dword(DWORD value) { - return write_bytes(parser, &value, sizeof(value)); + return write_word( value ) && + write_word( value >> 16 ); } -static inline BOOL write_word(struct parser *parser, WORD value) +static inline BOOL write_float(float value) { - return write_bytes(parser, &value, sizeof(value)); + DWORD val; + memcpy( &val, &value, sizeof(value) ); + return write_dword( val ); } -static inline BOOL write_dword(struct parser *parser, DWORD value) +static inline BOOL write_guid(const GUID *guid) { - return write_bytes(parser, &value, sizeof(value)); + return write_dword( guid->Data1 ) && + write_word( guid->Data2 ) && + write_word( guid->Data3 ) && + write_bytes( guid->Data4, sizeof(guid->Data4) ); } static int compare_names(const void *a, const void *b) @@ -201,7 +214,7 @@ return strcasecmp(*(const char **)a, *(const char **)b); } -static BOOL parse_keyword(struct parser *parser, const char *name) +static BOOL parse_keyword( const char *name ) { const struct keyword *keyword; @@ -210,10 +223,10 @@ if (!keyword) return FALSE; - return write_word(parser, keyword->token); + return write_word(keyword->token); } -static BOOL parse_guid(struct parser *parser) +static BOOL parse_guid(void) { char buf[39]; GUID guid; @@ -222,11 +235,11 @@ static const char *guidfmt = "<%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X>"; buf[0] = '<'; - if (!read_bytes(parser, buf + 1, 37)) fatal_error( parser, "truncated GUID\n" ); + if (!read_bytes(buf + 1, 37)) fatal_error( "truncated GUID\n" ); buf[38] = 0; ret = sscanf(buf, guidfmt, &guid.Data1, tab, tab+1, tab+2, tab+3, tab+4, tab+5, tab+6, tab+7, tab+8, tab+9); - if (ret != 11) fatal_error( parser, "invalid GUID '%s'\n", buf ); + if (ret != 11) fatal_error( "invalid GUID '%s'\n", buf ); guid.Data2 = tab[0]; guid.Data3 = tab[1]; @@ -239,35 +252,35 @@ guid.Data4[6] = tab[8]; guid.Data4[7] = tab[9]; - return write_word(parser, TOKEN_GUID) && - write_bytes(parser, &guid, sizeof(guid)); + return write_word(TOKEN_GUID) && + write_guid(&guid); } -static BOOL parse_name(struct parser *parser) +static BOOL parse_name(void) { char c; int len = 0; char name[512]; - while (read_byte(parser, &c) && len < sizeof(name) && + while (read_byte(&c) && len < sizeof(name) && (isalnum(c) || c == '_' || c == '-')) { if (len + 1 < sizeof(name)) name[len++] = c; } - unread_byte(parser, c); + unread_byte(c); name[len] = 0; - if (parse_keyword(parser, name)) { + if (parse_keyword(name)) { return TRUE; } else { - return write_word(parser, TOKEN_NAME) && - write_dword(parser, len) && - write_bytes(parser, name, len); + return write_word(TOKEN_NAME) && + write_dword(len) && + write_bytes(name, len); } } -static BOOL parse_number(struct parser *parser) +static BOOL parse_number(void) { int len = 0; char c; @@ -275,7 +288,7 @@ BOOL dot = FALSE; BOOL ret; - while (read_byte(parser, &c) && + while (read_byte(&c) && ((!len && c == '-') || (!dot && c == '.') || isdigit(c))) { if (len + 1 < sizeof(buffer)) @@ -283,33 +296,33 @@ if (c == '.') dot = TRUE; } - unread_byte(parser, c); + unread_byte(c); buffer[len] = 0; if (dot) { float value; ret = sscanf(buffer, "%f", &value); - if (!ret) fatal_error( parser, "invalid float token\n" ); - ret = write_word(parser, TOKEN_FLOAT) && - write_bytes(parser, &value, sizeof(value)); + if (!ret) fatal_error( "invalid float token\n" ); + ret = write_word(TOKEN_FLOAT) && + write_float(value); } else { int value; ret = sscanf(buffer, "%d", &value); - if (!ret) fatal_error( parser, "invalid integer token\n" ); - ret = write_word(parser, TOKEN_INTEGER) && - write_dword(parser, value); + if (!ret) fatal_error( "invalid integer token\n" ); + ret = write_word(TOKEN_INTEGER) && + write_dword(value); } return ret; } -static BOOL parse_token(struct parser *parser) +static BOOL parse_token(void) { char c; int len; char *tok, buffer[512]; - if (!read_byte(parser, &c)) + if (!read_byte(&c)) return FALSE; switch (c) @@ -320,27 +333,27 @@ case '\t': return TRUE; - case '{': return write_word(parser, TOKEN_OBRACE); - case '}': return write_word(parser, TOKEN_CBRACE); - case '[': return write_word(parser, TOKEN_OBRACKET); - case ']': return write_word(parser, TOKEN_CBRACKET); - case '(': return write_word(parser, TOKEN_OPAREN); - case ')': return write_word(parser, TOKEN_CPAREN); - case ',': return write_word(parser, TOKEN_COMMA); - case ';': return write_word(parser, TOKEN_SEMICOLON); - case '.': return write_word(parser, TOKEN_DOT); + case '{': return write_word(TOKEN_OBRACE); + case '}': return write_word(TOKEN_CBRACE); + case '[': return write_word(TOKEN_OBRACKET); + case ']': return write_word(TOKEN_CBRACKET); + case '(': return write_word(TOKEN_OPAREN); + case ')': return write_word(TOKEN_CPAREN); + case ',': return write_word(TOKEN_COMMA); + case ';': return write_word(TOKEN_SEMICOLON); + case '.': return write_word(TOKEN_DOT); case '/': - if (!read_byte(parser, &c) || c != '/') - fatal_error( parser, "invalid single '/' comment token\n" ); - while (read_byte(parser, &c) && c != '\n'); + if (!read_byte(&c) || c != '/') + fatal_error( "invalid single '/' comment token\n" ); + while (read_byte(&c) && c != '\n'); return c == '\n'; case '#': len = 0; - while (read_byte(parser, &c) && c != '\n') + while (read_byte(&c) && c != '\n') if (len + 1 < sizeof(buffer)) buffer[len++] = c; - if (c != '\n') fatal_error( parser, "line too long\n" ); + if (c != '\n') fatal_error( "line too long\n" ); buffer[len] = 0; tok = strtok( buffer, " \t" ); if (!tok || strcmp( tok, "pragma" )) return TRUE; @@ -361,28 +374,28 @@ return TRUE; case '<': - return parse_guid(parser); + return parse_guid(); case '"': len = 0; /* FIXME: Handle '\' (e.g. "valid\"string") */ - while (read_byte(parser, &c) && c != '"') { + while (read_byte(&c) && c != '"') { if (len + 1 < sizeof(buffer)) buffer[len++] = c; } - if (c != '"') fatal_error( parser, "unterminated string\n" ); - return write_word(parser, TOKEN_STRING) && - write_dword(parser, len) && - write_bytes(parser, buffer, len); + if (c != '"') fatal_error( "unterminated string\n" ); + return write_word(TOKEN_STRING) && + write_dword(len) && + write_bytes(buffer, len); default: - unread_byte(parser, c); + unread_byte(c); if (isdigit(c) || c == '-') - return parse_number(parser); + return parse_number(); if (isalpha(c) || c == '_') - return parse_name(parser); - fatal_error( parser, "invalid character '%c' to start token\n", c ); + return parse_name(); + fatal_error( "invalid character '%c' to start token\n", c ); } return TRUE; @@ -443,7 +456,6 @@ int main(int argc, char **argv) { char header[16]; - struct parser parser; char **args; char *header_name = NULL; @@ -457,17 +469,17 @@ return 1; } - parser.infile = stdin; - parser.outfile = NULL; + infile = stdin; + outfile = NULL; if (!strcmp(infile_name, "-")) { infile_name = "stdin"; - } else if (!(parser.infile = fopen(infile_name, "rb"))) { + } else if (!(infile = fopen(infile_name, "rb"))) { perror(infile_name); goto error; } - if (!read_bytes(&parser, header, sizeof(header))) { + if (!read_bytes(header, sizeof(header))) { fprintf(stderr, "%s: Failed to read file header\n", program_name); goto error; } @@ -496,7 +508,7 @@ if (!strcmp(option_outfile_name, "-")) { option_outfile_name = "stdout"; - parser.outfile = stdout; + outfile = stdout; } else { output_file = option_outfile_name; atexit(cleanup_files); @@ -505,19 +517,19 @@ #ifdef SIGHUP signal(SIGHUP, exit_on_signal); #endif - if (!(parser.outfile = fopen(output_file, "wb"))) { + if (!(outfile = fopen(output_file, "wb"))) { perror(option_outfile_name); goto error; } } - if (!write_bytes(&parser, "xof 0302bin 0064", 16)) + if (!write_bytes("xof 0302bin 0064", 16)) goto error; - parser.line_no = 1; - while (parse_token(&parser)); + line_no = 1; + while (parse_token()); - if (ferror(parser.outfile) || ferror(parser.infile)) + if (ferror(outfile) || ferror(infile)) goto error; if (option_header) @@ -525,7 +537,7 @@ char *str_ptr; if (!option_inc_var_name) - fatal_error( &parser, "variable name must be specified with -i or #pragma name\n" ); + fatal_error( "variable name must be specified with -i or #pragma name\n" ); header_name = strrchr(option_outfile_name, '/'); if (header_name) @@ -546,7 +558,7 @@ str_ptr++; } - fprintf(parser.outfile, + fprintf(outfile, "/* File generated automatically from %s; do not edit */\n" "\n" "#ifndef __WINE_%s\n" @@ -554,31 +566,31 @@ "\n" "unsigned char %s[] = {", infile_name, header_name, header_name, option_inc_var_name); - write_c_hex_bytes( &parser ); - fprintf(parser.outfile, "\n};\n\n"); + write_c_hex_bytes(); + fprintf(outfile, "\n};\n\n"); if (option_inc_size_name) - fprintf(parser.outfile, "#define %s %u\n\n", option_inc_size_name, output_pos); - fprintf(parser.outfile, "#endif /* __WINE_%s */\n", header_name); - if (ferror(parser.outfile)) + fprintf(outfile, "#define %s %u\n\n", option_inc_size_name, output_pos); + fprintf(outfile, "#endif /* __WINE_%s */\n", header_name); + if (ferror(outfile)) goto error; } - else write_raw_bytes( &parser ); + else write_raw_bytes(); - fclose(parser.infile); - fclose(parser.outfile); + fclose(infile); + fclose(outfile); output_file = NULL; return 0; error: - if (parser.infile) { - if (ferror(parser.infile)) + if (infile) { + if (ferror(infile)) perror(infile_name); - fclose(parser.infile); + fclose(infile); } - if (parser.outfile) { - if (ferror(parser.outfile)) + if (outfile) { + if (ferror(outfile)) perror(option_outfile_name); - fclose(parser.outfile); + fclose(outfile); } return 1; } diff -Nru wine1.7-1.7.15/tools/widl/typegen.c wine1.7-1.7.16/tools/widl/typegen.c --- wine1.7-1.7.15/tools/widl/typegen.c 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/tools/widl/typegen.c 2014-04-04 19:13:44.000000000 +0000 @@ -85,6 +85,8 @@ static unsigned int field_memsize(const type_t *type, unsigned int *offset); static unsigned int fields_memsize(const var_list_t *fields, unsigned int *align); static unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align); +static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type, + const char *name, unsigned int *typestring_offset); static unsigned int write_struct_tfs(FILE *file, type_t *type, const char *name, unsigned int *tfsoff); static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *type, const char *name, int write_ptr, unsigned int *tfsoff); @@ -2316,7 +2318,7 @@ error("Unsupported member type %d\n", type_get_type(type)); } -static void write_array_element_type(FILE *file, const type_t *type, +static void write_array_element_type(FILE *file, const attr_list_t *attrs, const type_t *type, int cont_is_complex, unsigned int *tfsoff) { type_t *elem = type_array_get_element(type); @@ -2331,7 +2333,7 @@ ref->typestring_offset, tfsoff); return; } - if (cont_is_complex && is_string_type(NULL, elem)) + if (cont_is_complex && is_string_type(attrs, elem)) { write_string_tfs(file, NULL, elem, TYPE_CONTEXT_CONTAINER, NULL, tfsoff); return; @@ -2728,7 +2730,7 @@ return pointer_count; } -static void write_pointer_description(FILE *file, type_t *type, +static void write_pointer_description(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *typestring_offset) { unsigned int offset_in_buffer; @@ -2757,7 +2759,7 @@ if (is_conformant_array(type) && (type_array_is_decl_as_ptr(type) || !current_structure)) write_conformant_array_pointer_descriptions( - file, NULL, type, 0, typestring_offset); + file, attrs, type, 0, typestring_offset); else if (type_get_type(type) == TYPE_STRUCT && get_struct_fc(type) == RPC_FC_CPSTRUCT) { @@ -2809,6 +2811,9 @@ else elem_type = type_pointer_get_ref(type); + if (type_get_type(elem_type) == TYPE_POINTER && is_array(type)) + return write_array_tfs(file, attrs, type, name, typestring_offset); + if (type_get_type(elem_type) != TYPE_BASIC) { error("write_string_tfs: Unimplemented for non-basic type %s\n", name); @@ -2899,7 +2904,8 @@ if (!pointer_type) pointer_type = RPC_FC_RP; - write_embedded_types(file, attrs, type_array_get_element(type), name, FALSE, typestring_offset); + if (!is_string_type(attrs, type_array_get_element(type))) + write_embedded_types(file, attrs, type_array_get_element(type), name, FALSE, typestring_offset); size = type_memsize(is_conformant_array(type) ? type_array_get_element(type) : type); align = type_buffer_alignment(is_conformant_array(type) ? type_array_get_element(type) : type); @@ -2962,12 +2968,12 @@ print_file(file, 2, "0x%x,\t/* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *typestring_offset += 2; - write_pointer_description(file, type, typestring_offset); + write_pointer_description(file, is_string_type(attrs, type) ? attrs : NULL, type, typestring_offset); print_file(file, 2, "0x%x,\t/* FC_END */\n", RPC_FC_END); *typestring_offset += 1; } - write_array_element_type(file, type, FALSE, typestring_offset); + write_array_element_type(file, is_string_type(attrs, type) ? attrs : NULL, type, FALSE, typestring_offset); write_end(file, typestring_offset); } else @@ -2982,7 +2988,7 @@ += write_conf_or_var_desc(file, current_structure, baseoff, type, length_is); - write_array_element_type(file, type, TRUE, typestring_offset); + write_array_element_type(file, is_string_type(attrs, type) ? attrs : NULL, type, TRUE, typestring_offset); write_end(file, typestring_offset); } @@ -3149,7 +3155,7 @@ print_file(file, 2, "0x%x,\t/* FC_PP */\n", RPC_FC_PP); print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *tfsoff += 2; - write_pointer_description(file, type, tfsoff); + write_pointer_description(file, NULL, type, tfsoff); print_file(file, 2, "0x%x,\t/* FC_END */\n", RPC_FC_END); *tfsoff += 1; } @@ -3581,12 +3587,26 @@ case TGT_POINTER: { enum type_context ref_context; + type_t *ref = type_pointer_get_ref(type); + if (context == TYPE_CONTEXT_TOPLEVELPARAM) ref_context = TYPE_CONTEXT_PARAM; else if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) ref_context = TYPE_CONTEXT_CONTAINER; else ref_context = context; + + if (is_string_type(attrs, ref)) + { + if (context != TYPE_CONTEXT_CONTAINER_NO_POINTERS) + write_pointer_tfs(file, attrs, type, *typeformat_offset + 4, context, typeformat_offset); + + offset = write_type_tfs(file, indent, attrs, ref, name, ref_context, typeformat_offset); + if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) + return 0; + return offset; + } + offset = write_type_tfs( file, indent, attrs, type_pointer_get_ref(type), name, ref_context, typeformat_offset); if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) diff -Nru wine1.7-1.7.15/VERSION wine1.7-1.7.16/VERSION --- wine1.7-1.7.15/VERSION 2014-03-21 21:37:09.000000000 +0000 +++ wine1.7-1.7.16/VERSION 2014-04-04 19:13:44.000000000 +0000 @@ -1 +1 @@ -Wine version 1.7.15 +Wine version 1.7.16