From a4785c4deec624a6d36d6d3e42e4bf8c340dbeb6 Mon Sep 17 00:00:00 2001 From: Jan Zerebecki Date: Fri, 22 Aug 2008 17:42:48 +0200 Subject: [PATCH] push a9ea98eed33411fd355fd4e8b78f7880f1dd09a3 --- ANNOUNCE | 1541 +++++++++++++++++++------------- VERSION | 2 +- configure | 18 +- dlls/advapi32/service.c | 2 +- dlls/advapi32/tests/service.c | 932 ++++++++++++++++++- dlls/comctl32/comctl_Cn.rc | 8 +- dlls/comdlg32/cdlg_Cn.rc | 112 ++- dlls/crypt32/str.c | 11 - dlls/d3d8/tests/device.c | 38 - dlls/d3d9/tests/device.c | 36 - dlls/ddraw/device.c | 1 + dlls/ddraw/tests/d3d.c | 9 + dlls/dpnet/dpnet_private.h | 11 + dlls/dpnet/peer.c | 328 ++++++- dlls/dsound/capture.c | 2 +- dlls/dsound/dsound_main.c | 6 +- dlls/dsound/primary.c | 4 +- dlls/gdiplus/gdiplus.spec | 4 +- dlls/gdiplus/graphics.c | 56 ++ dlls/mstask/mstask_private.h | 4 + dlls/mstask/task.c | 181 +++- dlls/mstask/tests/task.c | 100 ++- dlls/msxml3/Makefile.in | 1 + dlls/msxml3/dispex.c | 630 +++++++++++++ dlls/msxml3/main.c | 286 ++---- dlls/msxml3/msxml_private.h | 79 +- dlls/msxml3/queryresult.c | 114 ++- dlls/msxml3/regsvr.c | 18 +- dlls/msxml3/tests/domdoc.c | 10 + dlls/msxml3/tests/schema.c | 1 + dlls/oleaut32/tests/varformat.c | 4 + dlls/rasapi32/tests/rasapi.c | 5 +- dlls/shell32/shell32_Cn.rc | 52 +- dlls/user32/resources/user32_Zh.rc | 12 +- dlls/winealsa.drv/waveout.c | 4 +- dlls/wined3d/context.c | 28 +- dlls/wined3d/device.c | 107 +-- dlls/wined3d/drawprim.c | 14 +- dlls/wined3d/surface.c | 6 +- dlls/wined3d/utils.c | 26 +- dlls/wined3d/wined3d_private.h | 19 +- include/gdiplusflat.h | 5 + programs/clock/Zh.rc | 4 +- programs/notepad/Ja.rc | 10 +- programs/progman/Zh.rc | 4 +- programs/regedit/Ja.rc | 8 +- programs/regedit/edit.c | 14 +- programs/regedit/framewnd.c | 13 +- programs/regedit/main.h | 4 +- programs/regedit/treeview.c | 73 +- programs/winecfg/Ja.rc | 16 +- programs/wineconsole/wineconsole_Zh.rc | 4 +- programs/winefile/Zh.rc | 4 +- programs/winhlp32/No.rc | 8 + programs/winhlp32/Zh.rc | 30 +- 55 files changed, 3670 insertions(+), 1349 deletions(-) rewrite ANNOUNCE (96%) create mode 100644 dlls/msxml3/dispex.c rewrite dlls/msxml3/main.c (61%) diff --git a/ANNOUNCE b/ANNOUNCE dissimilarity index 96% index 9b14216d945..b692da06983 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,607 +1,934 @@ -The Wine development release 1.1.2 is now available. - -What's new in this release (see below for details): - - Control panel improvements and new appwiz panel. - - Restructurations of state handling in Direct3D. - - Support for timer queue functions. - - Many MSXML improvements. - - Several fixes to Solaris support. - - Various bug fixes. - -The source is available from the following locations: - - http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.1.2.tar.bz2 - http://prdownloads.sourceforge.net/wine/wine-1.1.2.tar.bz2 - -Binary packages for various distributions will be available from: - - http://www.winehq.org/site/download - -You will find documentation on http://www.winehq.org/site/documentation - -You can also get the current source directly from the git -repository. Check http://www.winehq.org/site/git for details. - -Wine is available thanks to the work of many people. See the file -AUTHORS in the distribution for the complete list. - ----------------------------------------------------------------- - -Bugs fixed in 1.1.2: - - 1789 msvcrt type conversion problem - 3714 ERMapper 7 won't run because of registry key issues - 4919 Morrowind fails to start with the error "Unknown Stencil Mode Format" - 6650 MSTSC (Remote Desktop) crashes - 7778 Discworld II info window about no CD in drive not drawn - 7788 Morrowind Elder Scrolls 3 crashes very early in game - 7930 C&C 3 slows down after changing graphics settings - 8176 EverQuest 1 terrain textures disappearing - 8604 No videoplayback in spongebob squarepants - whitescreen - 9035 Adobe/Macromedia Studio MX installer fails - 9709 Solid cyan screen when entering character select in EQ - 9855 Red Alert: A Path Beyond crashes with a sound error - 10146 Wine versions >0.9.43 break PokerAce Hud, as the application fails to create a timer during start-up. - 10936 wine cannot switch 32bit to 16bit - 10991 SPlan 6.0 (schematic editor): Status bar is not show completely - 11198 C & C Tiberian Sun reporsts comctl32.dll is an older version on winver higher then 98 - 11936 window size is too small in the "vc2008 redist installer" and "Firefox 3" [dogfood] - 11950 TheBat! 3.99.1 show white squares not icons under wine after 0.9.56 - 12023 Broken sound in Live For Speed game - 12210 Copy/paste corruption in The Elder Scrolls Construction Set - 12302 Lord of the Rings: Shadows of Angmar unplayable due to high lag - 12491 PES 2008 crash at launch with a "fail to get video memory" message - 12582 solidworks crash at startup in mshtml - 12718 Typing the username in MSN Messenger 7.5 is really slow - 12722 intel software codecs video not working for thief/system shock - 12783 Allocation of PEB and TEB can overlap dll mappings - 12905 EVE Online light effects and some other objects are not blended correctly when HDR is enabled - 13307 graphical glitches on wzebra board - 13325 Fireworks 8 trial doesn't draw window background initially - 13450 "Race driver : Grid" demo crash in the menu - 13860 Sacrifice Demo: d3d_surface errors fill console - 13991 eDrawings viewer needs gdiplus.GdipCreateBitmapFromResource - 13999 No videoplayback in spongebob squarepants - whitescreen - 14019 systray icon not displayed in dual screen - 14040 Microsoft Virtual Earth 3D beta inner installer aborts when reading registry - 14155 Enterprise Architect - Text on diagrams renders upside down - 14197 white window when starting the patcher - 14225 HTML help: Browsing local help url's fail & local graphic url's not shown. - 14249 Hearts of Iron 2: Armageddon crashes - 14273 Fonts unreadable on TaxAct forms - 14277 SnelStart installer bails out with error box - 14326 CAJViewer 7.0 hangs on startup - 14344 Morrowind crashes when loading a saved game if music is enabled. - 14351 RtlpWaitForCriticalSection times out towards end of tests - 14356 alt.binz does not run anymore - 14393 atoi() implemenation on large integers is wrong - 14429 compile fail in msxml_private.h:94 - 14439 Office 2003 Pro install aborts in 1.1.1 with MS error code 1627 - 14441 Rose Online Evolution crash with new msxml patch - 14462 Blitzin2: Cursor not visible - 14483 WinVerifyTrustEx doesn't return expected HRESULT for PE images not digitally signed (TRUST_E_NOSIGNATURE) - 14502 iphlpapi missing Icmp* functions - 14523 msiexec hangs when installing msxml3.msi in 1.1.1 - 14524 richtext error 'Insurgency-2.1rc1-Full.exe' - 14527 90º rotated text not shown - 14539 RtlIsTextUnicode regression: ideographic space should not be used in check for reversed control chars - 14568 Silence FIXME from CoGetContextToken stub to prevent flooding of trace output when COM+ context is queried from .NET runtime - 14578 Thief, System Shock 2 - video intros hang/crash in the end - ----------------------------------------------------------------- - -Changes since 1.1.1: - -Adam Petaccia (11): - gdiplus: Stub GdipNewPrivateFontCollection. - gdiplus: Stub GdipDeletePrivateFontCollection. - gdiplus: Stub GdipPrivateAddFontFile. - gdiplus: Stub GdipGetFontCollectionFamilyCount. - gdiplus: Stub GdipGetFontCollectionFamilyList. - gdiplus: Implement GdipCreateRegion and mark the tests todo_wine instead of skipping over them all. - gdiplus: Implement GdipDeleteRegion. - gdiplus: Implement GdipSetEmpty. - gdiplus: Implement GdipSetInfinite. - gdiplus: Implement GdipGetRegionDataSize. - gdiplus: Stub GdipIsStyleAvailable. - -Alex Villacís Lasso (5): - richedit: Shorten EM_AUTOURLDETECT tests. - richedit: Tests for visibility behavior of richedit scrollbars, with todo_wine. - richedit: More tests for visibility behavior of richedit scrollbars, with todo_wine. - richedit: Tests for WM_SIZE/scrollbar recursion bug, with todo_wine. - richedit: Do not read actual scrollbar state for scrollbar update, use internal state instead. - -Alexander Dorofeyev (13): - ddraw: Force surfaces without memory flags to video memory on creation. - ddraw/tests: Add tests for surface caps memory flags. - quartz: Make Filtermapper aggregatable. - quartz: Aggregate filtermapper in filtergraph. - quartz/tests: Test querying IFilterMapper2 from FilterGraph. - quartz/tests: Add filtermapper aggregation tests. - quartz/tests: Fix interface leaks in aggregation test. - quartz: Fix interface leak in FilterGraph2_RemoveFilter. - quartz/tests: Fix interface leaks in filtergraph test. - quartz: Fix variant handling in GetFilterInfo. - quartz: Add missing VariantClear after GetFilterInfo calls. - quartz: Fix interface leak in FilterGraph2_Render. - ddraw: Improve IDirect3DDevice7_Load implementation. - -Alexander Nicolaysen Sørnes (10): - wordpad: Show error message if saving fails. - regedit: Fix concat handling in unicode import. - regedit: Add missing fclose on file import. - notepad: Fix opening Unicode files. - regedit: Update Norwegian Bokmål translation. - wordpad: Show error if file open fails. - winefile: Don't access uninitialized value. - regedit: Fixes for Norwegian Bokmål translation. - Updated Norwegian Bokmål Readme file. - dpnet: Register DirectPlay8ThreadPool object. - -Alexandre Julliard (14): - msxml3: Fix compile without xml headers. - mstask: Add stubs for the duplicate stdcall entry points. - icmp: The import library is not needed. - dbghelp: Always initialize section pointer in ImageDirectoryEntryToDataEx. - winetest: Fix a compiler warning with the size_t type. - Avoid exporting common symbols since that's broken on Mac OS X. - winebuild: Add Solaris as a separate platform. - winebuild: Don't put the PE header in the .init section on Solaris. - winegcc: Add support for specifying section alignment on Solaris. - user32: Fix MapWindowPoints behavior in the process that owns the desktop window. - user32/tests: Make sure the bitmap info passed to CreateDIBSection contains a valid color table. - inetmib1: Check for failure of the iphlpapi functions instead of blindly trusting them. - make_makefiles: Explicitly list the Wine headers that should be exported. - shell32: Define a valid cursor for the control panel window. - -Andrew Talbot (15): - rpcrt4: Remove unneeded address-of operator from array name. - setupapi: Remove unneeded address-of operator from array name. - shlwapi: Remove unneeded address-of operator from array name. - user32: Remove unneeded address-of operators from array names. - wined3d: Remove unneeded address-of operators from array names. - winedos: Remove unneeded address-of operators from array names. - winejoystick.drv: Remove unneeded address-of operator from array name. - winex11.drv: Remove unneeded address-of operators from array names. - wininet: Remove unneeded address-of operators from array names. - wintrust: Remove unneeded address-of operators from array names. - ws2_32: Remove unneeded address-of operators from array names. - shell32: Remove unneeded address-of operators from array names. - advpack: Remove a useless test. - advpack: Fix sign-compare warnings. - advapi32: Sign-compare warnings fix. - -Aric Stewart (7): - comctl32: rebar: Record what changes and only redo the Layout if something of relevance changes. - comctl32: rebar: Prevent unnecessary triggering of RBBIM_CHILDSIZE changes. - mlang: Basic implementation of fnIMultiLanguage2_GetCodePageDescription. - mlang: Stub implementation of IMLangFontLink2. - mlang: A very basic implementation of the IMLangLineBreakConsole interface and IMLangString interface. - mlang: Correct and fill out Japanese locale information. - winex11: Add Japanese Mac keyboard layout as many of the vkey code are quite different. - -Aurimas Fischer (1): - richedit: Spelling fixes. - -Cesar Eduardo Barros (1): - kernel32: Add stub for CreateHardLink. - -Dan Hipschman (12): - libs/wine: Avoid over-allocating memory in default_dbgstr_wn. - kernel32/tests: Fix p_BindIoCompletionCallback declaration so it compiles with the MS compiler. - kernel32/tests: Add tests for timer queues. - kernel32: Add a stub for ChangeTimerQueueTimer. - kernel32/tests: Add tests for Change/DeleteTimerQueueTimer. - kernel32/tests: Check that timers are not NULL in timer queue tests. - ntdll: Implement [Rtl]Create/DeleteTimerQueue[Ex]. - ntdll: Implement RtlCreateTimer for kernel32's CreateTimerQueueTimer. - include: Add WT_TRANSFER_IMPERSONATION to winnt.h. - ntdll: Implement the timer queue thread. - ntdll: Implement RtlUpdateTimer for kernel32's ChangeTimerQueueTimer. - ntdll: Implement RtlDeleteTimer for kernel32's DeleteTimerQueueTimer. - -Dan Kegel (2): - tools: Allow running tests with valgrind. - winmm/tests: Test mciSendString with non-null return string buffer. - -Daniel Santos (1): - ws2_32: WSASendTo() should clear last error on success. - -David Adam (1): - d3dx8: Implement D3DXSphereBoundProbe. - -Detlef Riekenberg (8): - winetest: Run tests again on Win9x. - crypt32/tests: Make the msg tests usable on win9x (avoid crash). - oleaut32/tests: Fix tmarshal tests on win9x. - oleaut32/tests: Run more typelib tests on win9x. - kernel32/tests: Run the tests again on Win9x. - msxml3/tests: Fix failure and crash on win9x. - cryptnet/tests: Make the tests usable on win9x. - appwiz.cpl: Do not access memory after HeapFree in FreeAppInfo. - -Dmitry Timoshkov (2): - gdi32: Relax the gm.gmCellIncX comparison. - Revert "gdi32: Reselect objects into the DC only if scaling factors change.". - -Dylan Smith (4): - richedit: Enforce the maximum font size. - richedit: Cannot undo setting of default character format. - richedit: Fixed regression caused by destroying the caret. - richedit: Fixed regression that caused endless loop. - -Eric Pouech (9): - winhelp: Pick nicer fonts for buttons. - winhelp: Fixed memory leak in macro handling. - winhelp: Implemented SetHelpOnFile macro. - winhelp: Implemented SetPopupColor macro. - winhelp: Allow MACRO_Execute to be called recursively. - winhelp: Move the check about correct RLE decoding inside the decoding routine itself. - winhelp: Constify the internal .hlp file parsing. - winhelp: Double clicking in the index list should open the page. - richedit: Add an assert to point out what we're expecting. - -Francois Gouget (9): - msxml3: Fix compilation on systems that don't support nameless unions. - winejack: Fix detection of jack libraries with a bad soname. - wintrust/tests: Fix compilation on systems that don't support nameless unions. - sane.ds: Use 'sane-config --ldflags'. - regedit: Remove a couple of left-over debug statements. - Assorted spelling fixes. - gphoto2.ds: Make use of `gphoto2-config --libs` for the configure check. - wineesd: Make use of `esd-config --libs` for the configure check. - configure: Use cups-config to probe for cups support. - -Frans Kool (5): - shell32: Fixed Dutch translations. - regedit: Fixed Dutch translations. - winhlp32: Fixed Dutch translations. - wordpad: Fixed and added Dutch translations. - wordpad: Added missing Dutch translations. - -Gal Topper (2): - comdlg32: PrintDlgEx: Change scope of strings for later reuse. - comdlg32: PrintDlgEx: Add support for RETURNDEFAULT. - -Gerald Pfeifer (9): - comctl32: rebar: Simplify by shedding off unused parameters. - ntdll/tests: Use NTSTATUS instead of DWORD for status variables. - comctl32: header: Simplify by shedding off unused parameters. - comctl32: Fix type of loop variable in HEADER_DeleteItem. - d3d9: Fix type of loop variable in stream_test() and texop_test(). - avifil32: Make size parameter of AVIFILE_ReadBlock DWORD instead of LONG. - comctl32: datetime: Simplify by shedding off unused parameters. - winedbg: Fix the type of four loop variables and reduce scope of one. - wordpad: Remove unused parameter for preview_command(). - -H. Verbeet (8): - wined3d: Improve some shader traces. - wined3d: Use rev_tex_unit_map instead of assuming there's a 1:1 mapping between samplers and texture units. - wined3d: Store the texture in a local variable in sampler_texmatrix(). - d3d9: Use color_match() in vshader_version_varying_test(). - d3d9: Replace color_near() with color_match(). - d3d9: Correct some shader comments. - server: Calling ResumeThread() on a terminated thread is valid. - d3d9: Use color_match() in test_vshader_input(). - -Hans Leidekker (10): - dnsapi: Fix a number of memory leaks. - snmpapi: Fix a memory leak in the test. - cabinet: Fix a memory leak. - setupapi: Fix two memory leaks in the test. - wininet: Fix a memory leak. - wininet: Make another test pass on IE6. - wininet: Delete local file on error in FtpGetFile. - wininet: Move insertion of cookie header from HttpOpenRequest to HttpSendRequest. - wininet: Fix cookie buffer overflow. - usp10: Use a valid string analysis when testing ScriptXtoCP and ScriptCPtoX. - -Huw Davies (6): - user32: Don't read past the end of a global memory block. - gdiplus: Skip some tests if certain fonts are not installed. - winmm: Only fill in the MIXERLINEA struct if the call to mixerGetLineInfoW succeeds. - user32: Don't access pConv after it's been freed. - gdiplus: Remove incorrect test. - user32: Don't send the menu clicks if we can't retrieve the item rect. - -Hwang YunSong(황윤성) (1): - winhlp32: Updated Korean resource. - -Ismael Barros (2): - dplayx: Moved dplaysp.h to include/wine. - dplayx: Basic implementation of dpwsockx.dll, needed by dplayx. - -Jacek Caban (13): - mshtml: Allow timers to be cleaned during processing. - mshtml: Added IHTMLElement2::getElementsByTagName implementation. - mshtml: Added IHTMLElement2::getElementsByTagName tests. - msi: Added Session::Message implementation. - wininet: Move InternetQueryOption(INTERNET_OPTION_USER_AGENT) to vtbl. - wininet: Moved more InternetQueryOption implementation to vtbl. - wininet: Moved InternetQueryOption(INTERNET_OPTION_PROXY) implementation to vtbl. - wininet: Move remeining InternetQueryOption implementation to vtbl. - hhctrl.ocx: Fixed ref count handling in IOleClientSiteImpl. - mshtml: Added IHTMLDocument2::put_title implementation. - mshtml: Added IHTMLDocument2::get_title implementation. - mshtml: Added IHTMLDocument2::[get|put]_title tests. - mshtml: Added IOmNavigator::get_appCodeName implementation. - -James Hawkins (24): - comctl32: Explicity set the number of tics before testing tic placement. - comctl32: Free the trackbar tics. - fusion: Allow parsing the blob stream without a #. - fusion: Load the table row numbers before calculating the table offsets. - fusion: The VersionLength member is not constant, so dynamically load the metadata header. - fusion: Add the CorTokenType and use those constants in the assembly code. - fusion: Add handling for alternate-sized table indices in the metadata. - fusion: Handle DWORD-sized string indices when loading the assembly name. - fusion: The cases are tokens, not table indices. - kernel32: Add tests for GetPrivateProfileString. - kernel32: Fix removing trailing spaces from lpDefault for GetPrivateProfileString. - kernel32: Return the default value if lpKeyName is empty. - services: Assign the service manager db to the lock in LockServiceDatabase. - msi: Initialize the update function pointer when creating the control. - kernel32: Don't get the profile string if the buffer length is zero. - msi: Add more tests for MsiGetSourcePath. - msi: Test getting the source path from a package with compressed files. - msi: Test getting the source path from a package with short file names. - msi: Halt the installation with an error if a source file is missing. - msi: msidbFileAttributesVital has no effect on the installation of files. - msi: Test mixing short and long source paths when installing a file. - msi: Use the newly added defines from the msidbSumInfoSourceType enumeration. - msi: Set all folders' source paths to the root directory if the source type is compressed. - msi: Determine the source path based on the short/long file names bit of the Word Count summary property. - -John Reiser (3): - configure: Add check for valgrind/valgrind.h. - ntdll: When tracking allocated blocks, RtlDestroyHeap must notify that all the blocks are being freed. - ntdll: Tell valgrind to load the .pdb debugging info for the module that was just loaded. - -Jon Griffiths (2): - msvcrt: Fix exponents in *printf family. - mswsock: Implement 3 functions by calling through SIO_GET_EXTENSION_FUNCTION_POINTER. - -Juan Lang (14): - crypt32: Add MS root certs to root store. - crypt32: Don't expect ImageGetCertificateData to succeed when Certificate is NULL. - wintrust: Move provider function tests to their own function. - wintrust: Add tests for WinVerifyTrust/WinVerifyTrustEx. - wintrust: Execute WinVerifyTrust as a sequence of steps, and return the error code from the first failing step of the sequence. - wintrust: Correct error slot for SoftpubLoadSignature. - crypt32: Reorganize root store creation code. - iphlpapi: Move Icmp* functions from icmp to iphlpapi. - iphlpapi: Partially implement IcmpSendEcho2 using IcmpSendEcho. - crypt32: Fix GUID output for failing tests by passing buffer to output function. - crypt32: Test CryptRetrieveSubjectGUID with a cab file. - crypt32: Add cab file checking to CryptSIPRetrieveSubjectGUID. - wintrust: Don't assume input file is a PE file in CryptSIPGetSignedDataMsg. - wintrust: Implement CryptSIPGetSignedDataMsg for cabinet files. - -Kai Blin (1): - secur32: Fix GetComputerObjectName tests for domain members. - -Kirill K. Smirnov (1): - shell32: Avoid usage of undefined xdg_results variable, since XDG_UserDirLookup() always corrupts it. - -Lei Zhang (10): - user32: Add a test for SetWindowPos. - user32: Clamp newly created windows to the minimum window size. - oleaut32: Check return values in several functions. - winex11: X11DRV_DIB_[GS]etImageBits should return 0 on failure. - gdi32: CreateDIBitmap should check for SetDIBits failure. - gdiplus: Add tests for passing negative strides to GdipCreateBitmapFromScan0. - ole32: Silence FIXME from CoGetContextToken stub. - ntdll: Use our own implementation of atoi and atol. - gdi32: Add a test for font orientation. - gdi32: Glyph advances should be measured for unrotated characters. - -Luis Busquets (4): - d3dx9: Implement D3DXGetShaderSize(). - d3dx9: Add a test for D3DXGetShaderSize(). - d3dx9: Implement D3DXGetShaderVersion(). - d3dx9: Add a test for D3DXGetShaderVersion(). - -Maarten Lankhorst (11): - quartz: Fix incorrect use of mtCurrent in transform filter. - quartz: Fix memory and sample leaks. - quartz: Only allocate 1 buffer in transform filter. - quartz: Fix reference leak in avi splitter on end of stream. - winemp3: Be more tolerant to what a valid mp3 header is. - quartz: Explicitly handle wave headers in avi splitter. - quartz: Fix wrong assignment of variable in parser. - include: Fix typo in vmrender.idl. - quartz: Fix handling of zero byte samples and endofstreams. - quartz: Fix bugs that occur during connection. - quartz: Fix end of stream handling in avi splitter. - -Mathias Kosch (2): - winex11: Fix typo in X11DRV_SetDIBits optimization. - advapi32: Fix RegGetValue when dwFlags includes RRF_RT_ANY. - -Michael Stefaniuc (1): - msxml3: Remove redundant NULL check before HeapFree (Smatch). - -Mikołaj Zalewski (16): - comctl32: statusbar: Window is always Unicode, CCM_SETUNICODEFORMAT should change the notify format. - comctl32: statusbar: Rename NtfUnicode to bUnicode to make is more consistent with other controls, use NF_REQUERY in WM_CREATE. - comctl32: statusbar: WM_CREATE should not resize the window - it should happen in WM_SIZE. - comctl32: statusbar: Don't issue a WM_PAINT during a WM_CREATE. - comctl32: statusbar: WM_SETFONT should change the bar height. - comctl32: Fix the file version string declaration. - oleaut32: Use custom file version in VERSIONINFO. - comctl32: statusbar: Change the height expression to one that seems to be the same as in Windows. - comctl32: Don't print ERRs for reflected messages. - comctl32: toolbar: TB_SETBITMAPSIZE should not change a coordinate when passed -1 (with testcase). - comctl32: statusbar: Test and fix SB_SETMINHEIGHT. - comctl32: statusbar: Optimize STATUSBAR_RefreshPart. - shell32: autocomplete: Don't pass NULL pceltFetched to IEnumString_Next. - include: Add KEY_WOW64_* defines. - advapi32: Remove access checks from advapi32 (makes KEY_WOW64_* work). - advapi32: tests: Make WOW64 test pass under Win2k, fix a flag. - -Nicolas Le Cam (2): - comctl32/tests: Fix a test failure in multiple platforms. - kernel32/tests: Fix a failing test in Vista. - -Nikolay Sivov (8): - gdiplus: Implemented GdipCreateBitmapFromResource. - gdiplus: Fix GdipCreatePathIter to handle NULL as path. Fix tests. - gdiplus: Fix for GdipPathIterNextMarker to handle path without markers. Fix tests. - gdiplus: Make GdipInvertMatrix test pass on native switching to matrix with determinant 16. - gdiplus: implemeted GdipGetPathGradientBlendCount with test. - gdiplus: Implement GdipGetPathGradientBlend with basic tests. - gdiplus: Implemented GdipGetPathGradientRect with test. - gdiplus: Fix swapped got-expected in brush test. - -Owen Rudge (18): - shell32: Remove "no control panels" found message. - shell32: Use wide functions when creating control panel. - shell32: Load Control Panel title from resources. - shell32: Add menu bar to Control Panel. - shell32: Add code to process menu item selections. - shell32: Add About dialog to Control Panel. - shell32: Remove existing painting methods from control panel. - shell32: Use a listview for the control panel. - shell32: Add status bar to control panel. - appwiz.cpl: Add skeleton Add/Remove Programs control panel. - appwiz.cpl: Display Add/Remove Programs dialog. - appwiz.cpl: Add column headers to listview. - appwiz.cpl: Add imagelist for listview. - appwiz.cpl: Check to see if buttons should be enabled. - appwiz.cpl: Read installed application information from registry. - appwiz.cpl: Add applications to list, remove on window close. - appwiz.cpl: Add uninstall routine for applications. - appwiz.cpl: Add basic Support Information dialog. - -Philip Nilsson (4): - wined3d: Enable filtering for D3DFMT_A4R4G4B4. - d3dx8: Allow input and output parameters pointing to the same place. - d3dx9: Implement D3DXPlaneTransformArray. - d3dx9: Use UINT instead of unsigned int where appropriate. - -Piotr Caban (25): - msxml3: Fixed typo in create_bsc. - msxml3: Added stub implementation of ISAXLocator. - msxml3: Added partial implementation of ISAXXMLReader_parse. - msxml3: Added ISAXContentHandler_startDocument event. - msxml3: Added ISAXLocator_getLineNumber and ISAXLocator_getColumnNumber partial implementation. - msxml3: Added ISAXContentHandler_endDocument event. - msxml3: Added ISAXContentHandler_startElement event. - msxml3: Added ISAXContentHandler_endElement event. - msxml3: Added ISAXContentHandler_characters event. - msxml3: Added ISAXContentHandler_putDocumentLocator event. - msxml3: Added ISAXLocator_getPublicId. - msxml3: Added ISAXLocator_getSystemId. - msxml3/tests: Added more tests for ISAXXMLReader_parse and ISAXLocator. - msxml3: Do not invoke ISAXXMLReader_endDocument when parser was stopped. - msxml3/tests: Added tests for ISAXXMLReader_putErrorHandler and ISAXXMLReader_getErrorHandler. - msxml3: Add error handling. - msxml3: Added support for SafeArrays in ISAXXMLReader_parse. - msxml3/tests: Added test for ISAXXMLReader_parse with SafeArray as argument. - msxml3: Reorganize ISAXXMLReader_parse function. - msxml3: Added support for more arguments in ISAXXMLReader_parse. - msxml3: Change ISAXXMLReader_getLine and ISAXXMLReader_getColumn functions. - msxml3: Change ISAXXMLReader_characters implementation so it works correctly on files with '\r' characters. - msxml3/tests: Add test for parsing from IStream. - msxml3/tests: Add test for parsing document with '\r' characters. - msxml3: Fix for accessing uninitialized memory. - -Reece Dunn (13): - uxtheme/tests: Use HRESULT_FROM_WIN32 to check the error codes, not LOWORD. - shell32: Do not use a fixed path in the shelllink tests. - shell32: Make the tests build with the Vista SDK. - oleaut32: Fix the vartype tests on Vista. - shell32/tests: Vista returns E_INVALIDARG if the path sent to SetPath is invalid. - comctl32: Fixed the MRU tests on Vista. - setupapi/tests: Use FIELD_OFFSET instead of offsetof. - user32: Fixed building the tests with the Vista SDK. - shell32: Don't crash if the shlexec tests fail to create an extension in the registry. - crypt32/tests: Be more verbose on the failing base64 tests on Vista to help locate the failures. - comctl32: Made the button theme drawing code extensible. - crypt32/tests: fix the protectdata tests on Vista. - oleaut32: Fix the SafeArrayGetVartype tests on Vista and use that behaviour. - -Rob Shearman (6): - rpcrt4: Implement MesEncodeIncrementalHandleCreate, MesDecodeIncrementalHandleCreate, MesIncrementalHandleReset and MesHandleFree. - rpcrt4: Implement NdrMesProcEncodeDecode. - rpcrt4: Implement MesDecodeBufferHandleCreate and MesEncodeFixedBufferHandleCreate. - rpcrt4: Ignore the return value of functions when unmarshalling a pickled procedure. - rpcrt4: Implement RpcCancelThreadEx. - rpcrt4: Fix the memory pointer passed into the conformant array marshaller in NdrComplexStructMarshall. - -Roy Shea (4): - mstask: Skeleton implementation of Task Scheduler Service. - mstask: Generate C file with GUID definitions from mstask.idl. - mstask: TaskScheduler stub with AddRef, QueryInterface, and Release. - mstask: Implement ClassFactory, DllGetClassObject, and DllCanUnloadNow. - -Stefan Dösinger (41): - wined3d: Remove the atifs shader backend. - wined3d: NP2 coordinate adjustment is a vertex operation. - wined3d: Move fixed function texture dimension updates to the fragment pipeline. - wined3d: Simplify the fragment pipeline selection. - wined3d: Give the nvts/nvrc code its own pipeline implementation. - wined3d: WINED3DTSS_TEXCOORDINDEX belongs to the vertex pipeline. - wined3d: Move shader constant affecting states to the misc pipeline. - wined3d: Give nv* fixed function stuff its own state template. - wined3d: Separate texture_activate_dimensions. - wined3d: Remove some dead code. - wined3d: Add extension information to the states. - wined3d: Coalesce the nvrc and nvts+nvrc state template. - wined3d: Move an extension check into the state template. - wined3d: Move a few extension checks into the state template. - wined3d: Move the range fog support test to the template. - wined3d: Split the psizemin handler. - wined3d: Split the psizemax state handler. - wined3d: Move the point sprite support test into the template. - wined3d: Test for multisampling in the template. - wined3d: Only register the np2 texture fixup if needed. - wined3d: Check for ATI_ENVMAP_BUMPMAP in the template. - wined3d: Move the vertexblend support check to the template. - wined3d: Remove GL_EXT_vertex_weighting stubs. - wined3d: Remove more dead code. - wined3d: Move an VBO support check to the state template. - d3d9: Unset the vertex shader in the compare_instructions test. - wined3d: Fix the MULTIPLYADD parameter orders in atifs. - wined3d: Correct the D3DTOP_LERP parameter order. - wined3d: Use GL_ARB_texture_non_power_of_two emulation. - wined3d: Use the nofilter mipmap lookup for np2 textures. - wined3d: Use less strict pixel format matching if the match fails. - wined3d: Fix a copy and paste bug. - wined3d: Whitespace fix. - wined3d: Set WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET. - wined3d: Remove some #ifdefs. - wined3d: Move set_tex_op(_nvrc) to their specific files. - d3d: D3DDECLTYPE_UNUSED is not valid in vertex declarations. - wined3d: Honor the texcoordindex when setting the texture matrix. - wined3d: Support ATI's D3DFMT_ATI2N format. - wined3d: ATI2N support using GL_EXT_texture_compression_rgtc. - wined3d: Make the MAC ARBvp implementation happy about ARL. - -Stefan Leichter (1): - rasapi32: RasEnumDevicesA test: initialize the input parameters before each call, make sure the return buffer is big enough. - -Ulrich Hecht (1): - dsound: Fix notification order. - -Vincent Povirk (3): - wininet: Always respect Proxy-Connection: or Connection: if it exists. - ole32: Add tests for OleIsCurrentClipboard(NULL). - ole32: Always return false when asked if NULL is the current clipboard. - -Vladimir Pankratov (1): - winhlp32: Update Russian translation. - -Zac Brown (3): - ntdll: Remove byte reversed U+3000 (CJK space) from being checked in RtlIsTextUnicode. - winhttp/tests: Add test for opening request. - include/winhttp.h: Add remaining flags. - -Zhangrong Huang (2): - msxml3: Add support for accessing document node. - msxml3: Add support for accessing CDATASection node. - --- -Alexandre Julliard -julliard@winehq.org +The Wine development release 1.1.3 is now available. + +What's new in this release (see below for details): + - Beginnings of ddraw overlay support. + - Many more crypt32 functions. + - Improved support for tables in Richedit. + - Support for NETWM window maximization. + - Many installer fixes. + - Tweaks for better PulseAudio support. + - Various bug fixes. + +The source is available from the following locations: + + http://ibiblio.org/pub/linux/system/emulators/wine/wine-1.1.3.tar.bz2 + http://prdownloads.sourceforge.net/wine/wine-1.1.3.tar.bz2 + +Binary packages for various distributions will be available from: + + http://www.winehq.org/site/download + +You will find documentation on http://www.winehq.org/site/documentation + +You can also get the current source directly from the git +repository. Check http://www.winehq.org/site/git for details. + +Wine is available thanks to the work of many people. See the file +AUTHORS in the distribution for the complete list. + +---------------------------------------------------------------- + +Bugs fixed in 1.1.3: + + 1439 commdlg.dll.so comdlg32.dll.so, a possible font dialog bug ? + 2538 Reaktor menus not displayed properly - gray bars + 2605 Borland qtinf70 draw problems + 3307 wininet: A cookie set during a 302 response won't be used during an automatic redirect + 3332 Explore Folder using ShellExecute fails + 3546 CLSID_InternetShortcut not available... + 4101 Picasa: Unable to use Blogthis after signin. + 5033 WINE_GET_SONAME does not pick up libjack soname + 5286 TreeView in Becky! Internet Mail doesn't work properly + 5504 riched20:Spinner on textfields and comboboxes + 6160 eDrawings somewhat installs completely but fails to run + 6519 Wine blacks out rotated font bitmap + 6534 Counter Strike 1.6 crashes after asking for the gecko engine + 7118 Wine does not listen to the clipboard + 7211 Wine does not correctly launch Guild Wars + 8829 EVE Online model of Large Artillery Battery structure is mostly transparent + 9670 SparVoip crashes + 10303 Unable to play Windows Media files + 10437 Altium Designer crash + 10620 PAF 5 help viewer hits unhandled page fault while closing + 10684 Some games fail to restore pre-launch gamma + 10951 Flashlight is darker then it should be in Half-Life 2: Episode 2 + 11029 Black & White game does not respond to mouse clicks + 11098 Vaz Modular 3.03 hangs on exit + 11526 Wine dies when starting Sigma Photo Pro 3.0 + 11616 Soulbringer crashes after intro + 11766 Heap corruption in crypt32 during Sandra benchmark? + 12087 winrar add file dialog cannot get multi-select files correctly + 12089 winrar crashes when I try to add a file with a long file name + 12206 Can't install Timeshift Demo + 12364 Overlapping of windows within Photoshop CS2 + 12486 Microsoft Office Standard 2007 installation failure + 12521 Origin 8.0: License expires immediately without native msxml3 + 12624 Installer failes to register typelib + 12634 WMP10 main window spurious window decorations + 12839 iphplapi: iphplapi.ok test fails in PC-BSD but not Linux + 12856 user32: menu.ok test fails in PC-BSD but not Linux + 12919 kernel32: virtual test fails in PC-BSD but not Linux + 12921 kernel32: toolhelp test fails in PC-BSD but not Linux + 13051 UI elements in Picasa displayed incorrectly after minimize and restore + 13173 Dragon NaturallySpeaking 9.0 Preferred crash on unimplemented gdiplus.dll.GdipCreateLineBrushFromRectWithAngleI + 13191 Trackmania Nations Forever doesn't work with PC2/3 shaders or with bloom-effect + 13217 Minimize/restore needs to send a WM_SYSCOMMAND message + 13231 msi: source.ok fails in Opensolaris + 13236 shell32: shlexec.ok fails in Opensolaris + 13256 Age of Mythology: missing bilinear filtering + 13268 MsiExec Runtime Error during install + 13446 Joining certain servers crashes Counter Strike: Source + 13550 Wrong textures being displayed at wrong places. + 13573 Room Arranger 5.04 needs GdipDrawEllipseI + 13586 Prince of Persia The Two Thrones: weird rendering bug - duplications on the sides + 13590 MS Office 2003: Cannot install Service Pack + 13601 can't compile wine with Xcode 3.1 or iPhone SDK + 13785 Opera 9.27 crashes at MSI install when you choose target location + 13877 Microsoft Office Enterprise 2007 fails to install + 14031 Max Payne 2: GL_INVALID_OPERATION in texture_activate_dimensions + 14038 Max Payne 2: bullet time screen filled with solid color + 14122 MagicMaps crashes in 2D window when user session via nxclient + 14183 HttpSendRequest() should fetch connection parameters instead of HttpOpenRequest(), especially Cookies. + 14192 ElsterFormular 2007/2008: Data submission fails with "Errorcode 49152" + 14199 Vertical text not rendered in schematic view of Altium DXP 2004 + 14227 MathCAD 2000 Pro 2D graph text label bug + 14268 carto exploreur 3 - crash + 14280 Richedit's EM_SETTEXTEX ignores ST_SELECTION + 14339 Download does not initialize when using Blizzard Downloader. + 14379 Ares does not connect to its network + 14384 Can not install MSDN - installer crashes + 14468 Hearts of Iron 2: Armageddon stops loading savegames + 14509 RegGetValue sometimes doesn't work properly + 14513 msysgit installer fails due to missing CreateHardLinkA stub + 14591 Oblivion crashes in wine 1.1.1 + 14594 crypt32.CryptHashMessage needed for VS.NET 2005 (deployment project type creation) + 14605 Star Wars Galaxies: USB joystick crashes application + 14615 rks_trial game is drawn out of place in its window + 14635 Regression - Cups printer not showing after upgrade to 1.1.2 + 14678 Office 2003 Pro installer page faults at end of install process + 14679 Diablo II Installer from Blizzard account download doesnt work. + 14683 Microsoft Money 2007: Crash on program startup + 14696 Mordor: the Depths of Dejenol installer crashes when running UNWIP.EXE + 14706 Max Payne 2: Windows no longer transparent + 14712 offcolour ingame text in Battlefield 1942 + 14714 intermittant crashes while playing bf1942 + 14716 distant objects not obscured by fog in bf1942 + 14720 Steam: uninstaller no longer launches from wine uninstaller + 14724 Max Payne 2: PP effect performance (ORM=fbo) + 14725 unimplemented function gdiplus.dll.GdipSetStringFormatTabStops + 14726 AW broser crashes, starts fine with native wininet + 14738 Sacred Underworld crashes when opening a lan game + 14745 wined3d BltOverride - blits from non-pow2 surfaces cause issues without GL_ARB_texture_non_power_of_two + 14790 after full tilt poker upgrade, client crashes randomly + 14816 Build breaks on "Solaris Express Community Edition" (SX:CE) (Solaris 11) at git + many warnings + 14908 listview items does not appear selected + 14911 Unable to run Drakensang demo + 14917 Ddraw Realizepalette regression + +---------------------------------------------------------------- + +Changes since 1.1.2: + +Adam Petaccia (11): + gdiplus: Implement GdipGetRegionData. + gdiplus: Implement GdipCreateRegionPath. + gdiplus: Implement GdipCreateRegionRect. + gdiplus: Implement GdipCreateRegionRectI. + gdiplus: Implement GdipCloneRegion. + gdiplus: Implement GdipCombineRegionRect. + gdiplus: Implement GdipCombineRegionRectI. + gdiplus: Implement GdipCombineRegionRegion. + gdiplus: Implement GdipCombineRegionPath. + gdiplus: Add another test to getregiondata. + gdiplus: Skip the generic font tests if we don't have the required fonts. + +Alexander Dorofeyev (5): + wined3d: Add ActivateContext in color_fill_fbo. + ddraw/tests: Skip cubemap tests when cubemap isn't supported. + wined3d: Disable TEXTURE_RECTANGLE in SetupForBlit. + wined3d: Set D3DPTEXTURECAPS_TRANSPARENCY. + wined3d: Fix copy paste error in IWineGDISurfaceImpl_RealizePalette. + +Alexander Morozov (4): + include/ddk/wdm.h: Add defines. + ntoskrnl.exe: Add stubs for IoAllocateIrp, IoInitializeIrp and IoFreeIrp. + ntoskrnl.exe: Add stub for IoDeleteSymbolicLink. + kernel32: Fix a typo. + +Alexander Nicolaysen Sørnes (13): + dpnet: Add basic DirectPlay8ThreadPool implementation. + shell32: Update Norwegian Bokmål translation. + appwiz.cpl: Fix overlapping controls. + appwiz.cpl: Add Norwegian Bokmål translation. + regedit: Convert deletion to unicode. + regedit: Convert printing&help to unicode. + regedit: Convert clipboard handling to unicode. + kernel32/winerr: Add Norwegian Bokmål translation. + regedit: Fix passing null pointer. + winhlp32: Update Norwegian Bokmål translation. + regedit: Convert key creation to unicode. + regedit: Convert AddEntryToTree to unicode. + dpnet: Add stubbed DirectPlay8Peer interface. + +Alexandre Julliard (24): + configure: Don't use cups-config --libs, it returns garbage. + wine.inf; Don't overwrite path and temp dir environment variables on upgrades. + ntdll: Use the generic int 0x91 syscall on Solaris so that it works on all CPUs. + user32/tests: Fix some tests on Win9x. + user32: Return a proper rectangle from WINPOS_MinMaximize. + user32: Add an entry point for ShowWindow to the driver interface. + winex11: Fetch the current X window position on ShowWindow resulting from a window manager event. + winex11: Send WM_SYSCOMMAND instead of calling ShowWindow directly to minimize/restore a window. + winex11: Check for wm maximized state in ConfigureNotify and update the window state accordingly. + winex11: Also check the maximized when restoring a minimized window. + user32/tests: Fix some message test failures on various Windows versions. + gdi32/tests: Allow some more rounding errors in glyph sizes. + test.h: Fetch environment variables from the Win32 environment not the Unix one. + winetest: Set environment variables in the Win32 environment. + user32/tests: Fix the listbox LB_DIR tests when directories are present. + user32/tests: Don't check last error on success in the broadcast tests. + user32/tests: Fix some test failures on win9x. + user32/tests: Fix a number of message sequence tests that could sometimes fail. + gdi32/tests: Fix some test failures on Win9x. + makefiles: Add missing entries for mstask tests. + configure: Require autoconf version 2.59d. + configure: Generate the makefiles list in configure instead of make_makefiles. + kernel32: Fix a compiler warning on Mac OS. + Avoid some size_t printf format warnings. + +Alistair Leslie-Hughes (10): + msxml3: Format get_xml string to be more like msxml3. + advapi32: Fix two tests for w2k8. + advapi32: Fix test under w2k8. + msxml3: Added and corrected trace string. + mshtml: Implement HTMLStyle get_background. + mshtml: Implement IDispatch for IHTMLStyle. + mshtml: Implement IDispatch for IHTMLElement. + mshtml: Implement IDispatch for IHTMLElement2. + mshtml: Implement IDispatch for IHTMLAnchorElement. + ole32: Stop crash under w2k8. + +Andre Wisplinghoff (2): + user32: Make dde test use skip function. + user32: Add a test for ToUnicode. + +Andrew Talbot (18): + advapi32: Remove unused variable. + browseui: Sign-compare warning fix. + appwiz.cpl: Sign-compare warning fix. + dmband: Sign-compare warning fix. + dmcompos: Sign-compare warning fix. + dmime: Sign-compare warning fix. + dmloader: Sign-compare warning fix. + dmscript: Sign-compare warning fix. + dmsynth: Sign-compare warning fix. + dmusic: Sign-compare warning fix. + d3dxof: Sign-compare warning fix. + dmstyle: Sign-compare warning fix. + dnsapi: Sign-compare warnings fix. + dswave: Sign-compare warning fix. + fusion: Sign-compare warnings fix. + gphoto2.ds: Sign-compare warning fix. + hhctrl.ocx: Sign-compare warning fix. + dmime: Indirection levels fix. + +Aric Stewart (4): + mlang: Japanese conversion tests. + wined3d: Check validity of rects before locking surface in Blt. + wined3d: Rework surface Blt a bit to only lock the part of the destination surface being drawn to. + dinput: The DIK_ keycode is not the same as the scancode. + +Austin English (1): + user32: Test what FindWindow does when window isn't found. + +Christian Costa (8): + winmm: Implement stub for midiConnect and midiDisconnect. + winealsa.drv: Improve midi port names. + d3dxof: Implement some parsing in RegisterTemplates. + d3dxof: Create FileEnumObject using its constructor. + d3dxof: Create FileData object using its constructor. Fix return value of CreateEnumObject. + d3dxof: Add basic tests. + d3dxof: Add text format support to RegisterTemplates and fix corresponding test. + msvcirt: Implement some ostream stubs. + +Colin Finck (3): + Fix some hackish usages of WideCharToMultiByte. + kernel32: Add a lot of new tests for the actual WideCharToMultiByte string conversion as well. + kernel32/tests: Fix a wrong length passed to a WideCharToMultiByte test, which led to a use of uninitialized stack memory. + +Damjan Jovanovic (3): + shdocvw: Add IUniformResourceLocator declarations to intshcut.h. + shdocvw: Rudimentary implementation of CLSID_InternetShortcut. + oleaut32: Add a failing VarFormat test. + +Dan Hipschman (6): + ntdll: Fix a small timer-queue bug whereby a deleted timer may still expire. + ntdll: Add support for a default timer queue. + kernel32/tests: Add tests for undocumented default timer queue "features". + widl: Honor typedef pointer attributes. + advapi32: Implement GetSecurityInfo. + advapi32/tests: Add tests for GetSecurityInfo with a NULL security descriptor pointer. + +Dan Kegel (2): + wininet: HTTP_QUERY_RAW_HEADERS_CRLF length shouldn't include nul. + shell32/tests: Test whether SHGetFileInfo should clear hIcon. + +David Adam (6): + d3dx8: Only the points in the positive ray are taken in account in D3DXSphereBoundProbe. + d3dx8: Implement D3DXBoxBoundProbe. + wordpad: Update the French translation. + appwiz.cpl: Add the French resource. + ddraw: Only ddraw checks wether one can give a null pointer to SetMaterial. + d3d8/d3d9: Remove unconsistent tests for SetMaterial. + +Detlef Riekenberg (9): + kernel32/tests: Fix a crash on win9x (lpDefault is truncated inplace). + crypt32/tests: Fix test on win9x (CreateFileW not implemented). + shlwapi/tests: Fix a buffer overflow that results in a crash on Win9x. + advapi32/tests: Handle the results from Win9x in the registry tests. + shell32/tests: Do not crash on Win9x when testing shlfileop. + shlwapi/tests: Fix istream tests on win9x (GetTempPathW). + shell32/tests: Fix shelllink test on win9x (GetTempPathW). + spoolss/tests: Fix a test on vista/w2k8. + winealsa.drv: Fix a typo in an error message. + +Dmitry Timoshkov (6): + mlang: Add a test for a CodePageToCodePages failure, make it pass under Wine. + mlang: Remove noise from mlang test output. + mlang: Do not use MAX_PATH for not path related things. + mlang: Remove debugging stuff. + gdi32: Avoid loading a bitmap if a glyph transformation is being requested. + gdi32: Replace DC transform by font scaling for bitmap fonts. + +Dustin Brody (1): + riched20: EM_SETTEXTTEX obeys ST_SELECTION with RTF inputs. + +Dylan Smith (18): + richedit: Added OleInitialize for clipboard operations. + richedit: Use tabstops to store cell positions. + richedit: Joined paragraph format depends on number of characters deleted. + richedit: Fixed rtf reader bug that caused large start indents. + richedit: Removed assumption about the order of rtf indent control words. + richedit: Word/Line/Paragraph selection had selection anchor on wrong side. + richedit: Handle tab key properly within table cells. + richedit: Protect deletion of cell boundaries when not deleting row. + richedit: Reversed deletion direction so tables are inserted forwards. + richedit: Each cell can contain multiple paragraphs in msftedit. + richedit: Added in support for streaming in and out nested tables. + richedit: EM_[SG]ETPARAFORMAT returned the wrong value. + richedit: Substitute space for \tab and \par control words for simple tables. + richedit: Removed an unused local variable and assignments to it. + richedit: Adjust table spacing with horizontal gap and left edge. + richedit: Borders are drawn for simple tables. + richedit: Borders are now drawn for tables and nested tables. + richedit: Added support for changing cell border colours. + +Eric Pouech (1): + winedbg: Don't force integral values while displaying a stack value, it doesn't work for float/double values. + +Francois Gouget (12): + gdiplus: Add a trailing '\n' to a Wine trace. + appwiz.cpl: Fix compilation on systems that don't support nameless unions. + appwiz.cpl: Fix the CPlApplet() prototype. + gdi32: Include config.h before using HAVE_XXX. + quartz: assert.h is not a local include. + winex11.drv: Fix the SysCommand() and ImeGetRegisterWordStyle() prototypes. + mscoree: Fix the ND_WI8() prototype. + Add some API documentation stubs to make winapi_check happy. + configure: Fix the 'no sound card' warning. + d3d9: Add an API documentation stub to make winapi_check happy. + Assorted spelling fixes. + dplayx/tests: Fix compilation on systems that don't support nameless unions. + +Frans Kool (1): + appwiz.cpl: Added Dutch resources. + +François Dorin (1): + ole32: Fix return value for DefaultHandler_SetExtent. + +Gerald Pfeifer (4): + comctl32: Push down function scope variable into the different case statements which allows us using more specific types in case. + comctl32: Remove unused parameter from _read_bitmap(). + Add return statements to avoid gcc warnings. + winhttp: #include for sockaddr_in. + +H. Verbeet (17): + wined3d: Container dirtification is already handled in ModifyLocation(). + wined3d: FBO texture == drawable handling is already handled in LoadLocation(). + wined3d: Call LoadLocation() on higher render targets as well, simplify some code in drawPrimitive. + wined3d: Move setting the draw buffer to a separate function. + wined3d: Use CTXUSAGE_RESOURCELOAD for ActivateContext() in color_fill_fbo(). + wined3d: Mark STATE_SCISSORRECT dirty in color_fill_fbo(). + wined3d: Apply FBO state in ActivateContext(). + wined3d: Handle CTXUSAGE_BLIT with offscreen targets and FBO ORM. + wined3d: Move creating a texture id from PreLoad to BindTexture. + d3d8: Don't store shader_handle's. + secur32: Reserved3 / Reserved4 are actually EncryptMessage / DecryptMessage. + wined3d: Don't free backends if they're not created yet. + wined3d: Don't allocate This->draw_buffers in the error path for Init3D(). + mountmgr: Include the terminating NULL in mount ids. + wined3d: Move depth stencil location handling code up a couple of lines. + wined3d: Track FBOs per-context. + wined3d: Remove useless hash_table_entry_t typedef. + +Hans Leidekker (17): + wininet: Use getaddrinfo for thread-safe resolving if available. + wininet: Properly initialize access type when no proxy is configured. + winhttp: Add a handle management implementation. + winhttp: Implement WinHttpOpen and WinHttpCloseHandle. + winhttp: Implement WinHttpConnect. + winhttp: Implement WinHttpOpenRequest. + winhttp: Implement WinHttpSetStatusCallback. Start sending notifications. + winhttp: Add stub implementations for WinHttpGetDefaultProxyConfiguration, WinHttpGetProxyForUrl and WinHttpSetDefaultProxyConfiguration. + winhttp: Forward WinHttpCrackUrl and WinHttpCreateUrl to wininet for the time being. + winhttp: Implement WinHttpTimeFromSystemTime and WinHttpTimeToSystemTime. + include: Add prototype for WinHttpQueryOption. + winhttp: Deliver status notifications to the application. + winhttp: Add a stub implementation for WinHttpSetTimeouts. + winhttp: Implement WinHttpAddRequestHeaders. + winhttp: Implement WinHttpQueryHeaders. + winhttp: Use default values for verb, object and version parameters in WinHttpOpenRequest. + winhttp: Add some tests for WinHttpAddRequestHeaders. + +Hongbo Ni (13): + user32: Implement WM_UNICHAR for edit control. + riched32: Implement WM_UNICHAR support. + msvcmaker: Fix msvc project file generation under MinGW32. + notepad: Update simplified Chinese resource. + clock: Update simplified Chinese resource. + winhlp32: Update simplified Chinese resource. + winefile: Update simplified Chinese resource. + winconsole: Update simplified Chinese resource. + progman: Update simplified Chinese resource. + user32: Update simplified Chinese resource. + shell32: Update simplified Chinese resource. + comdlg32: Update simplified Chinese resource. + comctl32: Update simplified Chinese resource. + +Huw Davies (9): + gdi32: Keep track of the number of unique fonts that are created and return this in the second DWORD of the GdiRealizationInfo structure. + kernel32: GetCalendarInfo shouldn't return HRESULT codes. Change a MESSAGE to a FIXME. + wineps.drv: Make sure we call CreateFontIndirect with zero width, otherwise we'll get a scaled-width font. + gdi32: Don't use biSizeImage for a BI_BITFIELDS dib. + include: Fix CRYPT_SMIME_CAPABILITIES definition. + crypt32: Don't write to pvStructInfo if it's NULL. + crypt32: Initialize the size to zero. + crypt32: Don't decrease the size of the buffer, since we're already counting the characters that we're adding to it. + crypt32: Remove some unnecessary code. + +Hwang YunSong(황윤성) (1): + shell32: Updated Korean resource. + +Ismael Barros (28): + dplayx: Fix the definition of DirectPlayCreate. + dplayx: Changed debug channel from dplayx to dplay. + dplayx: Tests for DirectPlayCreate. + dplayx: Tests for EnumConnections. + dplayx: Tests for InitializeConnection. + dplayx: Tests for GetCaps. + dplayx: Tests for Open. + dplayx: Tests for EnumSessions. + dplayx: Tests for Get/SetSessionDesc. + dplayx: Tests for CreatePlayer. + dplayx: Tests for GetPlayerCaps. + dplayx: Tests for Get/SetPlayerData. + dplayx: Tests for Get/SetPlayerName. + dplayx: Tests for GetPlayerAccount. + dplayx: Tests for GetPlayerAddress. + dplayx: Tests for GetPlayerFlags. + dplayx: Tests for CreateGroup. + dplayx: Tests for GroupOwner. + dplayx: Tests for EnumPlayers. + dplayx: Tests for EnumGroups. + dplayx: Tests for EnumGroupsInGroup. + dplayx: Tests for checking the behaviour of groups in a p2p session. + dplayx: Tests for checking the behaviour of groups in a C/S session. + dplayx: Tests for Send. + dplayx: Tests for Receive. + dplayx: Tests for GetMessageCount. + dplayx: Tests for GetMessageQueue. + dplayx: Tests for checking remote data replication. + +Jacek Caban (8): + mshtml: Added IHTMLElement2::get_scrollHeight implementation. + mshtml: Added IOmNavigator::get_platform implementation. + mshtml: Added IHTMLElement2::get_scrollWidth implementation. + mshtml: Forward IHTMLTextContainer::get_scroll[Hight|Width] implementation to IHTMLElement2. + mshtml: Added IHTMLElement2::get_scrollTop implementation. + mshtml: Forward IHTMLTextContainer::get_scrollTop to IHTMLElement2. + mshtml: Added IHTMLElement::get_offsetHeight implementation. + mshtml: Use heap_alloc_zero for HTMLWindow allocation. + +James Hawkins (42): + msi: Handle the package context when unpublishing the product. + msi: Validate the szProduct parameter of MsiConfigureProductEx. + msi: Properly locate the published product in MsiConfigureProductEx. + msi: Handle the INSTALLSTATE_ABSENT state in MsiConfigureProductEx. + msi: Set the ALLUSERS property for the machine context. + msi: Add tests for MsiConfigureProductEx. + msi: Directly register the typelib if it's not embedded in a PE module. + msi: Reimplement MsiOpenProduct. + msi: Add tests for MsiOpenProduct. + msi: Add a stub implementation of MsiEnumPatchesEx. + msi: Change an ERR that was supposed to be a TRACE. + winex11: Reduce console spam for AlphaBlend deficiencies. + advpack: Skip the TranslateInfEx tests in win9x. + advpack: Fix a failing test in win98. + msi: Test how MsiConfigureProductEx locates the source package. + msi: Also check the LocalPackage install property when searching for the product package. + ole32: Test the file access and share modes of StgCreateDocFile. + fusion: Handle loading 64-bit .NET assemblies. + fusion: Align the metadata header pointer on a DWORD boundary. + fusion: Ignore the case of the assembly filename extension. + msi: Ignore all non-stream elements when filling the _Streams table. + msi: Perform costing again for the InstallExecute sequence. + msi: Factor out media handling and use the new interface to efficiently extract assemblies. + msi: Ignore a file that has a missing component. + msi: Don't check for a NULL component, as the component is guaranteed to exist. + msi: Don't remove a file if the old file is strictly newer than the version to be installed. + msi: A file's component's state does not determine file removal. + msi: Remove misc files from the RemoveFile table. + msi: Test the file access and share modes of MsiOpenDatabase. + ole32: Storage sharing should be implemented in ole32, not the lower-level file API. + msi: Add more tests for feature and component states. + msi: Base removal of a file on the component's action, not the file's state. + msi: Use MsiQueryComponent state to determine the component's state. + msi: Use MsiQueryFeatureState to determine the feature's state. + msi: Handle processing a component that is installed to source. + msi: If the filename is empty or NULL, remove the directory. + msi: Downgrade an ERR to a TRACE. + msi: Handle components installed as source in MsiQueryComponentState. + msi: Remove an invalid setting of the install state. + msi: Don't remove a file that is installed as source. + msi: Fix the logic to determine the appropriate action of the component. + msi: Don't remove a misc file if the action is unknown. + +Jeff Latimer (5): + user32: DdeClientTransaction should return 0 in the last param for DDE_DATA. + user32: DdeQueryString returns a NULL str if there is no handle. + user32: DdeClientTransaction should check that pData is not NULL for XTYP_REQUEST. + user32/tests: Add tests for for invalid DDE conditions. + user32: Check for invalid conversation and return the correct error. + +Jeff Zaroyko (1): + winmm: Remove misleading message. + +Juan Lang (54): + shlwapi: Use CharNextA to iterate through characters in PathAddBackslashA. Fixes problems with MBCS paths. + crypt32: Move simplified message functions to their own file. + crypt32: Move simplified message tests to their own file. + crypt32: Add stub for CryptHashMessage. + crypt32: Add tests for CryptHashMessage. + crypt32: Implement CryptHashMessage. + rsaenh: Test and correct the maximum allowable salt length. + crypt32: Add test showing only file header is checked for cabinet files. + crypt32: Fix some test failures on Win9x. + msisip: Add stub dll. + msisip: Implement DllRegisterServer/DllUnregisterServer. + msisip: Implement MsiSIPIsMyTypeOfFile. + msisip: Implement MsiSIPGetSignedDataMsg. + tools/wine.inf: Register msisip.dll. + crypt32: Use ReadFile rather than a memory-mapped file to check the type of a file. + crypt32: Create a helper to load a SIP function from an open key. + crypt32: More fully implement CryptSIPRetrieveSubjectGuid. + crypt32: Use CryptSIPRetrieveSubjectGuid to determine how to read a message object from a file, rather than assuming the source file is always a PE executable. + ws2_32: Delay import iphlpapi. + crypt32: Add stub for CryptMsgGetAndVerifySigner. + crypt32: Add tests for CryptMsgGetAndVerifySigner. + crypt32: Implement CryptMsgGetAndVerifySigner. + crypt32: Add stub for CryptMsgVerifyCountersignatureEncodedEx. + crypt32: Add stub for CryptHashToBeSigned. + crypt32: Add tests for CryptHashToBeSigned. + crypt32: Implement CryptHashToBeSigned. + crypt32: Implement CERT_SIGNATURE_HASH_PROP_ID. + crypt32: Implement CertFindCertificateInStore for CERT_FIND_SIGNATURE_HASH. + crypt32: Set *pcbStructInfo on more success paths. + crypt32: Fix length calculation for decoding CRL_DIST_POINT_NAME. + crypt32: Free memory using the correct function on failure. + wincrypt.h: Add more missing definitions. + crypt32: Add tests for encoding/decoding CMSG_CMS_SIGNER_INFO. + crypt32: Implement CMSG_CMS_SIGNER_INFO encoding. + crypt32: Implement decoding CMSG_CMS_SIGNER_INFO. + crypt32: Allow messages to be opened when compiled with CMSG_SIGNER_ENCODE_INFO_HAS_CMS_FIELDS if CMS fields aren't actually used. + crypt32: Allow messages to be opened when compiled with CMSG_SIGNED_ENCODE_INFO_HAS_CMS_FIELDS if CMS fields aren't actually used. + crypt32: Allow CMS fields to be set when opening a signed message to encode. + crypt32: Always set *pcbStructInfo. + crypt32: Use CMS messages rather than PKCS messages internally. + crypt32: Test and correct encoding of signed CMS messages. + crypt32: Add more tests for the version of encoded signed CMS messages. + crypt32: Add tests for CMSG_CMS_SIGNER_INFO_PARAM. + crypt32: Implement CMSG_CMS_SIGNER_INFO_PARAM. + crypt32: Support the KeyId type of signer in CMSG_SIGNER_INFO_PARAM. + crypt32: Support the KeyId type of signer in CMSG_SIGNER_CERT_INFO_PARAM. + crypt32: Pass address of blob to store data rather than message to CDecodeMsg_CopyData. + crypt32: Rewrite CDecodeMsg_Update for better detached data handling. + crypt32: Handle the detached portion of detached signed messages. + crypt32: Remove an unneeded helper. + crypt32: Reduce excessive indenting. + crypt32: Add tests for encoding/decoding PKCS_SMIME_CAPABILITIES. With help from Huw Davies. + crypt32: Add support for encoding PKCS_SMIME_CAPABILITIES. + crypt32: Add support for decoding PKCS_SMIME_CAPABILITIES. + +Ken Thomases (1): + kernel32: Strip modifiers from the Mac locale so setlocale can parse it. + +Kirill K. Smirnov (10): + winhlp32: Remove superfluous buttons from propsheet dialog templates. + winhlp32: Remove outdated comment. + wineconsole: Check return value of CreateWindow() for errors, do not rely upon callback function. + winhlp32: Fix parsing system header of win3.0 help file. + winhlp32: Fix off-by-one error. + winhlp32: Clear richedit area before setting text. + winhlp32: Set correct font size while generating rtf stream. + winhlp32: Load internal file containing pagenum->topicoffset mapping. + winhlp32: Fix offsets handling for old 3.0 files. + winhlp32: Use TopicOffset mapping and get rid of unused function. + +Lei Zhang (4): + cmd: Check the return value from HeapAlloc. + comctl32: Add a test for TTM_GETTEXT. + shell32: Handle directories in ShellExecute. + comctl32: Set listview focus on WM_LBUTTONUP instead of WM_LBUTTONDOWN. + +Luis C. Busquets Pérez (3): + d3dx9: Implementation of D3DXGetPixelShaderProfile. + d3dx9: Implementation of D3DXGetVertexShaderProfile. + d3dx9: Avoid assignment in D3DXGetVertexShaderProfile. + +Maarten Lankhorst (14): + qcap: Make the server directly register a filter instead of the workarounds. + uuids: Add MEDIASUBTYPE_AYUV. + quartz: Trace the iface pointer in the memory allocator. + quartz: Make transform filter return hresult from running/pausing. + quartz: Use correct media type in transformfilter's QueryAccept. + quartz: Pass InputPin as parameter to transform filter. + quartz: Fix end of file handling when first request is already end of file. + quartz: Fix support for files with multiple odml indexes. + winealsa.drv: Add ability to recover from underruns to directsound driver. + winealsa.drv: Fix compiler warnings and remove deprecated calls. + dsound: Remove int24_struct from conversion routines. + winmm: Test opening the same device twice. + winealsa.drv: Tune some parameters to make pulseaudio work. + dsound: Tune some parameters to make pulseaudio work. + +Michael Karcher (6): + winex11: Fix GetDIBits with monochrome pixmaps. + kernel32: Fix profile sharing mode. + msvcrt/file: stdio should clamp characters to 8 bits. + kernel32/tests: Fix profile crash on NT and up. + ntdll: Add sub-second resolution to NtQueryInformationFile. + kernel32: Fix profile cache logic and don't cache new files. + +Michael Stefaniuc (4): + msxml3: Remove redundant NULL checks before HeapFree and fix a memleak (Smatch). + advapi/tests: CreateFile returns INVALID_HANDLE_VALUE on error (Smatch). + riched20: Remove redundant NULL check before HeapFree (Smatch). + d3dxof: Remove unreachable break after return (Smatch). + +Mikołaj Zalewski (1): + shell32: autocomplete: There is no need for separate IAutoComplete and IAutoComplete2 vtbls. + +Muneyuki Noguchi (3): + regedit: Update Japanese translation. + notepad: Update Japanese translation. + winecfg: Update Japanese translation. + +Nikolay Sivov (30): + gdiplus: Added testfile for customlinecap + constr./destr. tests. + gdiplus: Implemented GdipGetCustomLineCapStrokeJoin with basic test. + gdiplus: Implemented GdipSetCustomLineCapStrokeJoin + tests. + gdiplus: Implemented GdipGetCustomLineCapBaseInset + test. + gdiplus: Implemented GdipGetCustomLineCapWidthScale with some tests. + gdiplus: Add a test that shows GdipCreateFontFromLogfontW problem with empty FaceName. + gdiplus: GdipGetStringFormatDigitSubstitution implemented. + gdiplus: GdipSetStringFormatDigitSubstitution implemented. + gdiplus: GdipStringFormatGetGenericTypographic implemented. + gdiplus: GdipGetStringFormatTabStopCount implementation with tests. + gdiplus: Implemented Gdip[Get/Set]StringFormatTabStops with tests. + gdiplus: Use LANG_NEUTRAL instead of 0. + gdiplus: Implemented GdipStringFormatGetGenericDefault with tests. + gdiplus: Implemented Gdip[Get/Set]PenMode. + gdiplus: Implemented GdipGetPenCustom[Start/End]Cap. + gdiplus: Implemented GdipFillPolygon2/GdipFillPolygon2I. + gdiplus: Move some Beziers helpers to gdiplus.c to use them for graphicspath. + gdiplus: Implemented GdipAddPathCurve2 with tests. + gdiplus: Implemented GdipAddPathCurve2I using GdipAddPathCurve2. + gdiplus: Implemented GdipAddPathCurve/GdipAddPathCurveI. + gdiplus: Implemented GdipAddPathClosedCurve2 with tests. + gdiplus: Implemented GdipAddPathClosedCurve2I using GdipAddPathClosedCurve2. + gdiplus: Implemented GdipAddPathClosedCurve/GdipAddPathClosedCurveI. + gdiplus: Implemented GdipReversePath with tests. + gdiplus: Implemented GdipAddPathPie/GdipAddPathPieI with test. + gdiplus: Implemented GdipPathIterIsValid with tests. + gdiplus: Implemented GdipPathIterNextSubpathPath with tests. + gdiplus: Implemented GdipResetWorldTransform. + gdiplus: Implemented GdipPathIterNextMarkerPath with tests. + gdiplus: Implemented GdipFillClosedCurve2[I]. + +Owen Rudge (5): + winefile: Fix absolute pidl conversion for non-filesystem shell objects. + shell32: Fix descriptions being applied to wrong entries in control panel. + shell32: Ensure status bar in control panel is reset when menu closed. Also reset to blank when item deselected. + appwiz.cpl: Gather extra information for Support Info dialog. + uninstaller: Remove GUI portion of Wine uninstaller. + +Paul Vriens (20): + comctl32/tests: Run tests again on Win95. + crypt32/tests: Don't crash on some win9x boxes. + gdi32/tests: Don't test unimplemented functions. + mshtml/tests: Don't fail on unimplemented function. + crypt32/tests: Use CryptAcquireContextA instead of CryptAcquireContextW. + kernel32/tests: Skip tests when codepage is not available. + mlang/tests: Skip tests for unsupported code page identifiers. + crypt32/tests: Don't crash on some win9x boxes. + iphlpapi/tests: Skip some tests for unsupported functions. + kernel32/tests: Fix a test failure on Win9x. + quartz/tests: Skip some tests on NT4. + kernel32/tests: Show the setting of the debugger registry value. + include/wine/svcctl.idl: Remove duplicate define. + ole32/tests: Fix a test on win98 and W2K. + advapi32/tests: Add helper function to get function pointers. + advapi32/tests: Add tests for QueryServiceStatus. + advapi32/tests: Add tests for QueryServiceStatusEx. + advapi32/tests: Add tests for EnumServicesStatusA. + advapi32: Prevent a crash when passing an allowed NULL parameter. + advapi32/tests: Add tests for EnumServicesStatusExA. + +Piotr Caban (33): + msxml3: Generalize bsc_t implementation. + msxml3: Added ISAXXMLReader_parseURL implementation. + msxml3/tests: Added test for ISAXXMLReader_parseURL. + msxml3: Added stub implementation of ISAXAttributes. + msxml3: Initialize ISAXAttribute structure. + msxml3: Add ISAXAttribute_getLength implementation. + msxml3: Added ISAXAttributes_getLocalName implementation. + msxml3: Added ISAXAttributes_getValue implementation. + msxml3: Reorganize parse_buffer function (make use of libxml2 parserInternals.h). + msxml3: Added ISAXAttributes_getQName implementation. + msxml3: Prepare functions for IVBSAX... interfaces implementation. + msxml3: Added IVBSAXAttributes implementation. + msxml3: Prepare libxml2 callbacks for IVBSAX... interfaces implementation. + msxml3: Add IVBSAXLocator implementation. + msxml3: Integrate implementation of IVBSAXXMLReader and ISAXXMLReader interfaces. + msxml3: Return QNames properly. + msxml3: Add NULL pointers check in getLocalName, getQName and getValue. + msxml3: Add implementation of ISAXAttributes_getURI. + msxml3: Add ISAXContentHandler_startPrefixMapping event. + msxml3: Add namespaces to attributes. + msxml3: Add ISAXContentHandler_endPrefix event. + msxml3: Fix checking if ContentHandler was set. + msxml3: Add ISAXAttributes_getName implementation. + msxml3: Add ISAXAttributes_getIndexFromName implementation. + msxml3: Add ISAXAttributes_getIndexFromQName implementation. + msxml3: Add ISAXAttributes_getValueFromName implementation. + msxml3: Add ISAXAttributes_getValueFromQName implementation. + msxml3: Add error handling when reading from IStream. + msxml3: Fix IVBErrorHandler related bugs. + msxml3: Use LoadTypeLibEx to register typelib. + msxml3: Code clean up. + msxml3: Added queryresult's IDispatchEx implementation. + msxml3: Added IDispatchEx QueryInterface test. + +Reece Dunn (6): + crypt32: Check Vista error codes for the msg tests. + secur32: Fix the ntlm tests crashing on Vista. + secur32: Fix the schannel tests crashing on Vista. + shell32: Fix shlexec crashing on Vista. + crypt32: Removed the failing base64 test in Vista. + shlwapi: Fixed the string tests on Vista. + +Rico Schüller (1): + inetmib1: Fix wrong arguments. + +Rob Shearman (50): + oleaut32: Use the typelib debug channel for debug messages output during loading of SLTG typelibs. + oleaut32: Move the debug logging of the variable type in SLTG_DoVars. + oleaut32: Dump the loaded module in SLTG_ProcessModule. + oleaut32: Handle strings with a length of 0xffff in SLTG_DoVars. + oleaut32: Fix the loading of the parameter name for SLTG propget functions. + rpcrt4: Validate the uuid portion of the string passed to RpcStringBindingParseA/W. + rpcrt4: Factorise conformant array NDR functions and use them to fix the wire-representation of complex structures with conformant arrays. + rpcrt4: Add tests for a complex struct with conformant array. + rpcrt4: Factorise conformant varying array functions into array_* functions. + rpcrt4: Factorise conformant string functions into array_* functions. + rpcrt4: Re-implement part of the conformant varying structure processing routines using array_* functions. + rpcrt4: Fix a typo in the ncalrpc protseq in the epm_endpoints structure. + rpcrt4: Fix crash calculation of tower size in rpcrt4_ncalrpc_get_top_of_tower. + rpcrt4: Fix crash in rpcrt4_ncalrpc_parse_top_of_tower due to unconditionally dereferencing networkaddr and endpoint variables. + rpcrt4: Fix the protid used in ncalrpc tower functions. + rpcss: Warn in ept_insert if TowerExplode fails. + rpcss: Register the endpoint for the ncalrpc protseq for the endpoint mapper. + rpcrt4: Check that strings in SMB, NB and pipe floors are nul-terminated before copying the data. + include: Fix the WINELIB_NAME_AW macro for RpcBindingToStringBinding. + rpcrt4: Add test for RpcBindingToStringBindingA. + rpcrt4: Fix RpcBindingToStringBinding to not generate a UUID string if the object UUID is nil. + rpcrt4: Print a warning if connecting to a named pipe failed in rpcrt4_conn_open_pipe in the !wait case. + rpcrt4: Fix RpcStringBindingComposeA/W and RpcStringBindingParseA/W to escape and unescape delimiters in the string binding. + oleaut32: Avoid unnecessary allocations in TLB_MultiByteToBSTR and SLTG_ReadString. + oleaut32: Fix invalid free of import library entry name with SLTG typelibs. + cryptnet: Fix mismatch between sizeof and countof quantities in CRYPT_GetUrlFromCertificateCRLDistPoint. + appwiz.cpl: Fix leak of thread and process handles in UninstallProgram. + d3d9: Fix variable type in IDirect3DDevice9Impl_GetSoftwareVertexProcessing. + d3d9: Remove unneeded local variable in IDirect3DDevice9Impl_SetFVF. + include: Remove superfluous semi-colons from wine/wined3d_gl.h. + hhctl.ocx: Fix reference count leak in InPlace_OnPosRectChange. + comctl32: Fix use of arithmetic operator on Boolean type in TREEVIEW_ComputeItemInternalMetrics. + msrle32: Fix uses of arithmetic operators on Boolean types in MSRLE32_CompressRLE4Line and MSRLE32_CompressRLE8Line. + msi: Fix handle leak in ITERATE_SelfRegModules. + ole32: Fix testing of HRESULT types with not operator instead of comparing against S_OK. + oleaut32: Fix testing of HRESULT types with not operator instead of comparing against S_OK. + quartz: Fix testing of HRESULT types with not operator instead of comparing against S_OK. + shlwapi: Fix testing of HRESULT types with not operator instead of comparing against S_OK. + urlmon: Fix testing of HRESULT types with not operator instead of comparing against S_OK. + shell32: Don't assign a result from a function that returns a BOOL to an HRESULT in shellex_get_dataobj. + oleaut32: Fix buffer length passed to VARIANT_DI_tostringW in VarBstrFromCy. + hhctrl.ocx: Nul-terminate url_indicator constant in NavigateToUrl. + quartz: Use memcmp instead of strncmp in MPEGSplitter_pre_connect. + rpcrt4: Remove unreachable code in EmbeddedComplexSize. + ole32: Remove dead code in StorageImpl_LoadFileHeader. + kernel32: Fix a typo in the leadin check in WaitNamedPipeW. + rpcrt4: Test the endpoint mapper for the ncalrpc protseq as well as the ncacn_np protseq. + rpcrt4: Check for previous association being NULL in RPCRT4_ResolveBinding. + rpcrt4: Don't get or create an association for bindings with incomplete endpoints. + rpcrt4: Implement RpcBindingReset. + +Roderick Colenbrander (2): + wined3d: Fix BltOverride regression. + wined3d: Fix window rewrite regression. + +Roy Shea (24): + mstask: Implemented DllRegisterServer. + mstask: Implemented DllUnregisterServer. + mstask/test: NewWorkItem conformance test. + mstask: Task stub with AddRef, QueryInterface, and Release. + mstask: Implemented NewWorkItem. + mstask: Activate conformance test. + mstask: Stub implementation of Activate. + include: Add task scheduler specific error codes. + include: Added defines used by TASK_TRIGGER members. + mstask/test: Conformance test for (Set|Get)ApplicationName. + mstask/test: Conformance test for CreateTrigger. + mstask/tests: Conformance test for (Set|Get)Parameters. + mstask/tests: Conformance test for (Set|Get)Comment. + mstask/tests: Conformance test for (Set|Get)MaxRunTime. + mstask/tests: Basic conformance test for (Set|Get)AccountInformation. + mstask: TaskTrigger stub with AddRef, QueryInterface, and Release. + mstask/tests: Conformance test for (Set|Get)Trigger. + mstask: Implemented (Set|Get)ApplicationName. + expand: Extended expand program to accept /r argument. + mstask: Task PersistFile AddRef, QueryInterface, and Release. + mstask: Implement (Set|Get)Parameters. + mstask: Implemented (Set|Get)Comment. + mstask: Implemented (Set|Get)MaxRunTime. + mstask: Implemented partial stub for (Set|Get)AccountInformation. + +Stefan Dösinger (50): + wined3d: Do not enable GL_TEXTURE_SHADER_NV unconditionally. + wined3d: Add fog and tex types to the ffp fragment description. + wined3d: Use C bitfields to compact the ffp description. + wined3d: Use a hashmap to store the ffp shaders. + wined3d: GL_ARB_fragment_program ffp implementation. + wined3d: Initialize the texture op function properly. + wined3d: Clamp results in the arbfp pipeline replacement. + wined3d: Beware of the frontbuffer coordinate system difference. + ddraw: Set ddraw caps in wined3d. + wined3d: Only set D3D caps when GL was loaded successfully. + wined3d: Report the pitch alignment to ddraw. + wined3d: Always load glFinish and glFlush from opengl32.dll. + d3d9: Skip gracefully if A16R16G16B16 is not supported. + wined3d: Call glFlush outside the GL lock. + wined3d: Remove a glFlush. + wined3d: Move the pshader fog update to the vertex pipeline. + wined3d: Implement overlay position tracking. + wined3d: Basic overlay emulation with opengl. + wined3d: Implement overlay flipping. + wined3d: Update the surface locations in Present. + wined3d: Track overlay surfaces in the overlayed surface. + wined3d: Move some swapchain code into a base class. + wined3d: Remove unused enum entry. + wined3d: Use a swapchain for GDI surfaces. + wined3d: Support redirecting the primary context. + d3d: Remove IWineD3DDevice::SetHwnd. + wined3d: Remove the device-global fullscreen flag. + wined3d: Remove the ddraw_window device member. + wined3d: Add a swapchain method to set the dest override. + ddraw: Send the ddraw output to the clipper window, if any. + ddraw: Implement IDirectDraw7::GetFourCCCodes. + wined3d: Support YUV formats with GL_APPLE_ycbcr_422. + wined3d: Start a framework for color conversion shaders in blits. + wined3d: Test formats for surface support. + wined3d: Ask the ffp/shader/blit implementation about format support. + wined3d: Implement YUV emulation with GL_ARB_fragment_program. + ddraw: Do not set the rendertarget flag just because of the backbuffer flag. + wined3d: Keep track of the last used device. + ddraw: Set the bitdepth on YUV formats. + wined3d: Fix the unused arg marker. + wined3d: Update the overlay when the destination was drawn to. + d3d9: Test for fixed function value clamping. + winex11: Do not cap the cursor size. + wined3d: Prefer aux buffer matches over alpha matches. + wined3d: Don't enable texture dimensions with shaders. + wined3d: Don't skip applying texdims with shaders. + wined3d: Set the texture wrap default with the NP2 emulation properly. + d3d9: Make the bumpmap test less picky. + wined3d: De-pickify the texbem test. + wined3d: Filter out more spam. + +Stefan Leichter (3): + rasapi32: Fix building the tests with MSVC (based on a patch by Reece Dunn). + rasapi32: Skip RasEnumDevicesA tests on configuration problems. + rasapi: Fix test failure on platforms vista, w2k8. + +Tobias Jakobi (2): + ddraw: Fix typo in copy_mipmap_chain. + wined3d: Remove arb_tex_npot for NV FX series in fixup_extensions. + +Tony Wasserka (1): + d3dx9: Add stubs for the ID3DXSprite functions. + +Vijay Kiran Kamuju (1): + d3drm: Add minimal d3drmobj.h. + +Vincent Povirk (2): + wininet: Default to keep-alive when the server is HTTP/1.1, not when it isn't. + user32: Implement TPM_*ALIGN flags. + +Vitaliy Margolen (3): + dinput: Implement saturation property for evdev joystick driver. + dinput: Zero the out buffer. + dinput: Add mouse warp override config option. + +Vladimir Pankratov (14): + taskmgr: Update Russian translation. + shell32: Update Russian translation. + taskmgr: Remove unused code. + taskmgr: Update Russian translation. + netapi32: Add stub for NetWkstaUserEnum. + netapi32: Add stub for NetGroupEnum. + taskmgr: Converted some functions to Unicode. + winecfg: Update Russian translation. + shell32: Update Russian translation. + taskmgr: Converted some functions and variables to Unicode. + taskmgr: Converted some functions and variables to Unicode. + taskmgr: Converted some functions and variables to Unicode. + taskmgr: Converted some functions and variables to Unicode. + taskmgr: Converted some functions and variables to Unicode. + +Will Tipton (1): + comctl32: Added input validation to TOOLTIPS_GetTextW() in order to handle gracefully the case where it is called with an empty tooltip. + +Zac Brown (10): + include/winhttp.h: Add WINHTTP_TIME_FORMAT_BUFSIZE. + winhttp: Add stub implementation for WinHttpWriteData. + winhttp/tests: Add test for sending request. + winhttp: Add stub implementation for WinHttpTimeFromSystemTime. + winhttp: Add test for WinHttpTimeFromSystemTime. + winhttp: Add stub implementation for WinHttpTimeToSystemTime. + winhttp: Add test for WinHttpTimeToSystemTime. + winhttp: Add stub implementation for WinHttpQueryHeaders. + winhttp: Add stub implementation for WinHttpAddRequestHeaders. + winhttp: Add test for adding/querying headers. + +-- +Alexandre Julliard +julliard@winehq.org diff --git a/VERSION b/VERSION index 1c0a52802e1..ede4ec6e847 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Wine version 1.1.2 +Wine version 1.1.3 diff --git a/configure b/configure index 4825dfc82b1..8296c5d60f8 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for Wine 1.1.2. +# Generated by GNU Autoconf 2.61 for Wine 1.1.3. # # Report bugs to . # @@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Wine' PACKAGE_TARNAME='wine' -PACKAGE_VERSION='1.1.2' -PACKAGE_STRING='Wine 1.1.2' +PACKAGE_VERSION='1.1.3' +PACKAGE_STRING='Wine 1.1.3' PACKAGE_BUGREPORT='wine-devel@winehq.org' ac_unique_file="server/atom.c" @@ -1303,7 +1303,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Wine 1.1.2 to adapt to many kinds of systems. +\`configure' configures Wine 1.1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1372,7 +1372,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Wine 1.1.2:";; + short | recursive ) echo "Configuration of Wine 1.1.3:";; esac cat <<\_ACEOF @@ -1502,7 +1502,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Wine configure 1.1.2 +Wine configure 1.1.3 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1516,7 +1516,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Wine $as_me 1.1.2, which was +It was created by Wine $as_me 1.1.3, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -25166,7 +25166,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Wine $as_me 1.1.2, which was +This file was extended by Wine $as_me 1.1.3, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25219,7 +25219,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Wine config.status 1.1.2 +Wine config.status 1.1.3 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 45666ab9b31..d5a2c31fe80 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -1766,7 +1766,7 @@ EnumServicesStatusExA(SC_HANDLE hSCManager, SC_ENUM_TYPE InfoLevel, DWORD dwServ FIXME("%p level=%d type=%x state=%x %p %x %p %p %p %s\n", hSCManager, InfoLevel, dwServiceType, dwServiceState, lpServices, cbBufSize, pcbBytesNeeded, lpServicesReturned, lpResumeHandle, debugstr_a(pszGroupName)); - *lpServicesReturned = 0; + if (lpServicesReturned) *lpServicesReturned = 0; SetLastError (ERROR_ACCESS_DENIED); return FALSE; } diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index 829cfe7bf94..4225e350e31 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -33,6 +33,26 @@ static const CHAR spooler[] = "Spooler"; /* Should be available on all platforms */ +static BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID); +static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD, + DWORD, LPBYTE, DWORD, LPDWORD, + LPDWORD, LPDWORD, LPCSTR); +static BOOL (WINAPI *pQueryServiceConfig2A)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD); +static BOOL (WINAPI *pQueryServiceConfig2W)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD); +static BOOL (WINAPI *pQueryServiceStatusEx)(SC_HANDLE, SC_STATUS_TYPE, LPBYTE, + DWORD, LPDWORD); + +static void init_function_pointers(void) +{ + HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); + + pChangeServiceConfig2A = (void*)GetProcAddress(hadvapi32, "ChangeServiceConfig2A"); + pEnumServicesStatusExA= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExA"); + pQueryServiceConfig2A= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2A"); + pQueryServiceConfig2W= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2W"); + pQueryServiceStatusEx= (void*)GetProcAddress(hadvapi32, "QueryServiceStatusEx"); +} + static void test_open_scm(void) { SC_HANDLE scm_handle; @@ -784,6 +804,906 @@ static void test_get_servicekeyname(void) CloseServiceHandle(scm_handle); } +static void test_query_svc(void) +{ + SC_HANDLE scm_handle, svc_handle; + BOOL ret; + SERVICE_STATUS status; + SERVICE_STATUS_PROCESS *statusproc; + DWORD bufsize, needed; + + /* All NULL or wrong */ + SetLastError(0xdeadbeef); + ret = QueryServiceStatus(NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); + + /* Check if 'Spooler' exists. + * Open with not enough rights to query the status. + */ + svc_handle = OpenServiceA(scm_handle, spooler, STANDARD_RIGHTS_READ); + if (!svc_handle) + { + skip("Spooler service doesn't exist\n"); + CloseServiceHandle(scm_handle); + return; + } + + SetLastError(0xdeadbeef); + ret = QueryServiceStatus(svc_handle, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = QueryServiceStatus(svc_handle, &status); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + + /* Open the service with just enough rights. + * (Verified with 'SERVICE_ALL_ACCESS &~ SERVICE_QUERY_STATUS') + */ + CloseServiceHandle(svc_handle); + svc_handle = OpenServiceA(scm_handle, spooler, SERVICE_QUERY_STATUS); + + SetLastError(0xdeadbeef); + ret = QueryServiceStatus(svc_handle, &status); + ok(ret, "Expected success\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + + CloseServiceHandle(svc_handle); + + /* More or less the same tests for QueryServiceStatusEx */ + + /* Open service with not enough rights to query the status */ + svc_handle = OpenServiceA(scm_handle, spooler, STANDARD_RIGHTS_READ); + + /* All NULL or wrong, this proves that info level is checked first */ + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(NULL, 1, NULL, 0, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_LEVEL, + "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + + /* Passing a NULL parameter for the needed buffer size + * will crash on anything but NT4. + */ + + /* Only info level is correct. It looks like the buffer/size is checked second */ + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(NULL, 0, NULL, 0, &needed); + /* NT4 checks the handle first */ + if (GetLastError() != ERROR_INVALID_HANDLE) + { + ok(!ret, "Expected failure\n"); + ok(needed == sizeof(SERVICE_STATUS_PROCESS), + "Needed buffersize is wrong : %d\n", needed); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + } + + /* Pass a correct buffer and buffersize but a NULL handle */ + statusproc = HeapAlloc(GetProcessHeap(), 0, needed); + bufsize = needed; + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(NULL, 0, (BYTE*)statusproc, bufsize, &needed); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, statusproc); + + /* Correct handle and info level */ + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(svc_handle, 0, NULL, 0, &needed); + /* NT4 doesn't return the needed size */ + if (GetLastError() != ERROR_INVALID_PARAMETER) + { + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == sizeof(SERVICE_STATUS_PROCESS), + "Needed buffersize is wrong : %d\n", needed); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, + "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + } + } + + /* All parameters are OK but we don't have enough rights */ + statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); + bufsize = sizeof(SERVICE_STATUS_PROCESS); + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(svc_handle, 0, (BYTE*)statusproc, bufsize, &needed); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + HeapFree(GetProcessHeap(), 0, statusproc); + + /* Open the service with just enough rights. */ + CloseServiceHandle(svc_handle); + svc_handle = OpenServiceA(scm_handle, spooler, SERVICE_QUERY_STATUS); + + /* Everything should be fine now. */ + statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS)); + bufsize = sizeof(SERVICE_STATUS_PROCESS); + SetLastError(0xdeadbeef); + ret = pQueryServiceStatusEx(svc_handle, 0, (BYTE*)statusproc, bufsize, &needed); + ok(ret, "Expected success\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + if (statusproc->dwCurrentState == SERVICE_RUNNING) + ok(statusproc->dwProcessId != 0, + "Expect a process id for this running service\n"); + else + ok(statusproc->dwProcessId == 0, + "Expect no process id for this stopped service\n"); + HeapFree(GetProcessHeap(), 0, statusproc); + + CloseServiceHandle(svc_handle); + CloseServiceHandle(scm_handle); +} + +static void test_enum_svc(void) +{ + SC_HANDLE scm_handle; + BOOL ret; + DWORD bufsize, needed, returned, resume; + DWORD tempneeded, tempreturned; + DWORD drivercountactive, servicecountactive; + DWORD drivercountinactive, servicecountinactive; + ENUM_SERVICE_STATUS *services; + ENUM_SERVICE_STATUS_PROCESS *exservices; + INT i; + + /* All NULL or wrong */ + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(NULL, 1, 0, NULL, 0, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + + /* Open the service control manager with not enough rights at first */ + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); + + /* Valid handle but rest is still NULL or wrong */ + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 1, 0, NULL, 0, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* Don't specify the two required pointers */ + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, NULL, &returned, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* Don't specify the two required pointers */ + needed = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, &needed, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(needed == 0xdeadbeef, "Expected no change to the needed buffer variable\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* No valid servicetype and servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 0, 0, NULL, 0, &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicetype and servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, 0, NULL, 0, &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicetype and servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, 0, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* All parameters are correct but our access rights are wrong */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of services to be set to 0, got %d\n", returned); + } + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + + /* Open the service control manager with the needed rights */ + CloseServiceHandle(scm_handle); + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT | SC_MANAGER_ENUMERATE_SERVICE); + + /* All parameters are correct. Request the needed buffer size */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); + ok(returned == 0, "Expected no service returned, got %d\n", returned); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + + /* Store the needed bytes */ + tempneeded = needed; + + /* Allocate the correct needed bytes */ + services = HeapAlloc(GetProcessHeap(), 0, needed); + bufsize = needed; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, + services, bufsize, &needed, &returned, NULL); + todo_wine + { + ok(ret, "Expected success\n"); + ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); + ok(returned != 0xdeadbeef && returned > 0, "Expected some returned services\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, services); + + /* Store the number of returned services */ + tempreturned = returned; + + /* Allocate less then the needed bytes and don't specify a resume handle */ + services = HeapAlloc(GetProcessHeap(), 0, tempneeded - 1); + bufsize = tempneeded - 1; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, + services, bufsize, &needed, &returned, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); + ok(returned == (tempreturned - 1), "Expected one service less to be returned\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, services); + + /* Allocate less then the needed bytes, this time with a correct resume handle */ + services = HeapAlloc(GetProcessHeap(), 0, tempneeded - 1); + bufsize = tempneeded - 1; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + resume = 0; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, + services, bufsize, &needed, &returned, &resume); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size for this one service\n"); + ok(returned == (tempreturned - 1), "Expected one service less to be returned\n"); + ok(resume, "Expected a resume handle\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, services); + + /* Fetch that last service but pass a bigger buffer size */ + services = HeapAlloc(GetProcessHeap(), 0, tempneeded); + bufsize = tempneeded; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, + services, bufsize, &needed, &returned, &resume); + todo_wine + { + ok(ret, "Expected success\n"); + ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); + ok(returned == 1, "Expected only 1 service to be returned\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + } + ok(resume == 0, "Expected the resume handle to be 0\n"); + HeapFree(GetProcessHeap(), 0, services); + + /* See if things add up */ + + /* Get the number of active driver services */ + EnumServicesStatusA(scm_handle, SERVICE_DRIVER, SERVICE_ACTIVE, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_DRIVER, SERVICE_ACTIVE, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + /* Store the number of active driver services */ + drivercountactive = returned; + + /* Get the number of inactive driver services */ + EnumServicesStatusA(scm_handle, SERVICE_DRIVER, SERVICE_INACTIVE, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_DRIVER, SERVICE_INACTIVE, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + drivercountinactive = returned; + + /* Get the number of driver services */ + EnumServicesStatusA(scm_handle, SERVICE_DRIVER, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_DRIVER, SERVICE_STATE_ALL, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + /* Check if total is the same as active and inactive driver services */ + todo_wine + ok(returned == (drivercountactive + drivercountinactive), + "Something wrong in the calculation\n"); + + /* Get the number of active win32 services */ + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_ACTIVE, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_ACTIVE, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + servicecountactive = returned; + + /* Get the number of inactive win32 services */ + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_INACTIVE, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_INACTIVE, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + servicecountinactive = returned; + + /* Get the number of win32 services */ + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, services, + needed, &needed, &returned, NULL); + HeapFree(GetProcessHeap(), 0, services); + + /* Check if total is the same as active and inactive win32 services */ + todo_wine + ok(returned == (servicecountactive + servicecountinactive), + "Something wrong in the calculation\n"); + + /* Get the number of all services */ + EnumServicesStatusA(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + EnumServicesStatusA(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL, + services, needed, &needed, &returned, NULL); + + /* Check if total is the same as active and inactive win32 services */ + todo_wine + ok(returned == (servicecountactive + servicecountinactive), + "Something wrong in the calculation\n"); + + /* Get the number of all services. + * Fetch the status of the last call as failing could make the following tests crash + * on Wine (we don't return anything yet). + */ + EnumServicesStatusA(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL); + services = HeapAlloc(GetProcessHeap(), 0, needed); + ret = EnumServicesStatusA(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL, + services, needed, &needed, &returned, NULL); + + /* Check if total is the same as all those single calls */ + todo_wine + ok(returned == (drivercountactive + drivercountinactive + servicecountactive + servicecountinactive), + "Something wrong in the calculation\n"); + + /* Loop through all those returned services */ + for (i = 0; ret && i < returned; i++) + { + SERVICE_STATUS status = services[i].ServiceStatus; + + /* lpServiceName and lpDisplayName should always be filled */ + ok(lstrlenA(services[i].lpServiceName) > 0, "Expected a service name\n"); + ok(lstrlenA(services[i].lpDisplayName) > 0, "Expected a display name\n"); + + /* Decrement the counters to see if the functions calls return the same + * numbers as the contents of these structures. + */ + if (status.dwServiceType & (SERVICE_FILE_SYSTEM_DRIVER | SERVICE_KERNEL_DRIVER)) + { + /* FIXME: should be probably more then just SERVICE_RUNNING */ + if (status.dwCurrentState == SERVICE_RUNNING) + drivercountactive--; + else + drivercountinactive--; + } + + if (status.dwServiceType & (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)) + { + if (status.dwCurrentState == SERVICE_RUNNING) + servicecountactive--; + else + servicecountinactive--; + } + } + HeapFree(GetProcessHeap(), 0, services); + + todo_wine + { + ok(drivercountactive == 0, "Active driver mismatch\n"); + ok(drivercountinactive == 0, "Inactive driver mismatch\n"); + ok(servicecountactive == 0, "Active services mismatch\n"); + ok(servicecountinactive == 0, "Inactive services mismatch\n"); + } + + CloseServiceHandle(scm_handle); + + /* More or less the same for EnumServicesStatusExA */ + + /* All NULL or wrong */ + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(NULL, 1, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_LEVEL, + "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + + /* All NULL or wrong, just the info level is correct */ + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(NULL, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_HANDLE, + "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + + /* Open the service control manager with not enough rights at first */ + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT); + + /* Valid handle and info level but rest is still NULL or wrong */ + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* Don't specify the two required pointers */ + needed = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, NULL, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(needed == 0xdeadbeef, "Expected no change to the needed buffer variable\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + + /* Don't specify the two required pointers */ + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, NULL, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(returned == 0xdeadbeef, "Expected no change to the number of services variable\n"); + ok(GetLastError() == ERROR_INVALID_ADDRESS || + GetLastError() == ERROR_INVALID_PARAMETER /* NT4 */, + "Unexpected last error %d\n", GetLastError()); + } + + /* No valid servicetype and servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicestate */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, 0, NULL, 0, + &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicetype */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, SERVICE_STATE_ALL, NULL, 0, + &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* No valid servicetype and servicestate and unknown service group */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, 0, 0, NULL, 0, &needed, + &returned, NULL, "deadbeef_group"); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + + /* All parameters are correct but our access rights are wrong */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + + /* All parameters are correct, access rights are wrong but the + * group name won't be checked yet. + */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, "deadbeef_group"); + ok(!ret, "Expected failure\n"); + todo_wine + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + ok(GetLastError() == ERROR_ACCESS_DENIED, + "Expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + + /* Open the service control manager with the needed rights */ + CloseServiceHandle(scm_handle); + scm_handle = OpenSCManagerA(NULL, NULL, SC_MANAGER_CONNECT | SC_MANAGER_ENUMERATE_SERVICE); + + /* All parameters are correct and the group will be checked */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, "deadbeef_group"); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected number of service to be set to 0, got %d\n", returned); + todo_wine + { + ok(needed == 0, "Expected needed buffer size to be set to 0, got %d\n", needed); + ok(GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST, + "Expected ERROR_SERVICE_DOES_NOT_EXIST, got %d\n", GetLastError()); + } + + /* TODO: Create a test that makes sure we enumerate all services that don't + * belong to a group. (specifying ""). + */ + + /* All parameters are correct. Request the needed buffer size */ + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + ok(returned == 0, "Expected no service returned, got %d\n", returned); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + + /* Store the needed bytes */ + tempneeded = needed; + + /* Allocate the correct needed bytes */ + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + bufsize = needed; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL); + todo_wine + { + ok(ret, "Expected success\n"); + ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); + ok(returned == tempreturned, "Expected the same number of service from this function\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, exservices); + + /* Store the number of returned services */ + tempreturned = returned; + + /* Allocate less then the needed bytes and don't specify a resume handle */ + exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded - 1); + bufsize = tempneeded - 1; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); + ok(returned == (tempreturned - 1), "Expected one service less to be returned\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, exservices); + + /* Allocate less then the needed bytes, this time with a correct resume handle */ + exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded - 1); + bufsize = tempneeded - 1; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + resume = 0; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL); + ok(!ret, "Expected failure\n"); + todo_wine + { + ok(needed != 0xdeadbeef && needed > 0, "Expected the needed buffer size\n"); + ok(returned == (tempreturned - 1), "Expected one service less to be returned\n"); + ok(resume, "Expected a resume handle\n"); + ok(GetLastError() == ERROR_MORE_DATA, + "Expected ERROR_MORE_DATA, got %d\n", GetLastError()); + } + HeapFree(GetProcessHeap(), 0, exservices); + + /* Fetch that last service but pass a bigger buffer size */ + exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded); + bufsize = tempneeded; + needed = 0xdeadbeef; + returned = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL); + todo_wine + { + ok(ret, "Expected success\n"); + ok(needed == 0, "Expected needed buffer to be 0 as we are done\n"); + ok(returned == 1, "Expected only 1 service to be returned\n"); + ok(GetLastError() == ERROR_SUCCESS /* W2K3 */ || + GetLastError() == 0xdeadbeef /* NT4, XP and Vista */ || + GetLastError() == ERROR_IO_PENDING /* W2K */, + "Unexpected last error %d\n", GetLastError()); + } + ok(resume == 0, "Expected the resume handle to be 0\n"); + HeapFree(GetProcessHeap(), 0, exservices); + + /* See if things add up */ + + /* Get the number of active driver services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_DRIVER, SERVICE_ACTIVE, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_DRIVER, SERVICE_ACTIVE, + (BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + /* Store the number of active driver services */ + drivercountactive = returned; + + /* Get the number of inactive driver services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_DRIVER, SERVICE_INACTIVE, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_DRIVER, SERVICE_INACTIVE, + (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + drivercountinactive = returned; + + /* Get the number of driver services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_DRIVER, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_DRIVER, SERVICE_STATE_ALL, + (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + /* Check if total is the same as active and inactive driver services */ + ok(returned == (drivercountactive + drivercountinactive), + "Something wrong in the calculation\n"); + + /* Get the number of active win32 services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_ACTIVE, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_ACTIVE, + (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + servicecountactive = returned; + + /* Get the number of inactive win32 services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_INACTIVE, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_INACTIVE, + (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + servicecountinactive = returned; + + /* Get the number of win32 services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL, + (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + HeapFree(GetProcessHeap(), 0, exservices); + + /* Check if total is the same as active and inactive win32 services */ + ok(returned == (servicecountactive + servicecountinactive), + "Something wrong in the calculation\n"); + + /* Get the number of all services */ + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER, + SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL, NULL); + exservices = HeapAlloc(GetProcessHeap(), 0, needed); + pEnumServicesStatusExA(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER, + SERVICE_STATE_ALL, (BYTE*)exservices, needed, &needed, &returned, NULL, NULL); + + /* Check if total is the same as all those single calls */ + ok(returned == (drivercountactive + drivercountinactive + servicecountactive + servicecountinactive), + "Something wrong in the calculation\n"); + + /* Loop through all those returned services */ + for (i = 0; i < returned; i++) + { + SERVICE_STATUS_PROCESS status = exservices[i].ServiceStatusProcess; + + + /* lpServiceName and lpDisplayName should always be filled */ + ok(lstrlenA(exservices[i].lpServiceName) > 0, "Expected a service name\n"); + ok(lstrlenA(exservices[i].lpDisplayName) > 0, "Expected a display name\n"); + + /* Decrement the counters to see if the functions calls return the + * same numbers as the contents of these structures. + * Check some process id specifics. + */ + if (status.dwServiceType & (SERVICE_FILE_SYSTEM_DRIVER | SERVICE_KERNEL_DRIVER)) + { + if (status.dwCurrentState == SERVICE_RUNNING) + drivercountactive--; + else + drivercountinactive--; + + /* We shouldn't have a process id for drivers */ + ok(status.dwProcessId == 0, + "This driver shouldn't have an associated process id\n"); + } + + if (status.dwServiceType & (SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS)) + { + if (status.dwCurrentState == SERVICE_RUNNING) + { + /* We expect a process id for every running service */ + ok(status.dwProcessId > 0, "Expected a process id for this running service (%s)\n", + exservices[i].lpServiceName); + + servicecountactive--; + } + else + { + /* We shouldn't have a process id for inactive services */ + ok(status.dwProcessId == 0, "This service shouldn't have an associated process id\n"); + + servicecountinactive--; + } + } + } + HeapFree(GetProcessHeap(), 0, exservices); + + ok(drivercountactive == 0, "Active driver mismatch\n"); + ok(drivercountinactive == 0, "Inactive driver mismatch\n"); + ok(servicecountactive == 0, "Active services mismatch\n"); + ok(servicecountinactive == 0, "Inactive services mismatch\n"); + + CloseServiceHandle(scm_handle); +} + static void test_close(void) { SC_HANDLE handle; @@ -958,13 +1878,7 @@ static void test_queryconfig2(void) static const CHAR dependencies[] = "Master1\0Master2\0+MasterGroup1\0"; static const CHAR password [] = ""; static const CHAR description [] = "Description"; - HMODULE dllhandle = GetModuleHandleA("advapi32.dll"); - BOOL (WINAPI *pChangeServiceConfig2A)(SC_HANDLE,DWORD,LPVOID) - = (void*)GetProcAddress(dllhandle, "ChangeServiceConfig2A"); - BOOL (WINAPI *pQueryServiceConfig2A)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD) - = (void*)GetProcAddress(dllhandle, "QueryServiceConfig2A"); - BOOL (WINAPI *pQueryServiceConfig2W)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD) - = (void*)GetProcAddress(dllhandle, "QueryServiceConfig2W"); + if(!pQueryServiceConfig2A) { skip("function QueryServiceConfig2A not present\n"); @@ -1250,12 +2164,16 @@ START_TEST(service) } CloseServiceHandle(scm_handle); + init_function_pointers(); + /* First some parameter checking */ test_open_scm(); test_open_svc(); test_create_delete_svc(); test_get_displayname(); test_get_servicekeyname(); + test_query_svc(); + test_enum_svc(); test_close(); /* Test the creation, querying and deletion of a service */ test_sequence(); diff --git a/dlls/comctl32/comctl_Cn.rc b/dlls/comctl32/comctl_Cn.rc index a9fa9979bed..ed5e616d783 100644 --- a/dlls/comctl32/comctl_Cn.rc +++ b/dlls/comctl32/comctl_Cn.rc @@ -34,7 +34,7 @@ END IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE -CAPTION "Wizard" +CAPTION "Ïòµ¼" FONT 8, "MS Shell Dlg" BEGIN PUSHBUTTON "< ÉÏÒ»²½(&B)", IDC_BACK_BUTTON,71,138,50,14 @@ -73,8 +73,8 @@ STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE { - IDM_TODAY "Today:" - IDM_GOTODAY "Go to today" + IDM_TODAY "½ñÌì:" + IDM_GOTODAY "תµ½½ñÌì" } STRINGTABLE DISCARDABLE @@ -84,7 +84,7 @@ STRINGTABLE DISCARDABLE STRINGTABLE DISCARDABLE { - HKY_NONE "None" + HKY_NONE "ÎÞ" } #pragma code_page(default) diff --git a/dlls/comdlg32/cdlg_Cn.rc b/dlls/comdlg32/cdlg_Cn.rc index 47be682880b..f6f067ddbe9 100644 --- a/dlls/comdlg32/cdlg_Cn.rc +++ b/dlls/comdlg32/cdlg_Cn.rc @@ -85,7 +85,7 @@ FONT 8, "MS Shell Dlg" LTEXT "´òÓ¡ÖÊÁ¿(&Q):", 1092, 6, 100, 76, 9 COMBOBOX cmb1, 80, 100, 92, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP CHECKBOX "´òÓ¡µ½Îļþ(&l):", chx1, 20, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - CHECKBOX "Condensed", chx2, 160, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + CHECKBOX "ѹС", chx2, 160, 100, 50, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP } @@ -96,7 +96,7 @@ FONT 8, "MS Shell Dlg" { GROUPBOX "´òÓ¡»ú", grp1, 6, 10, 180, 65, BS_GROUPBOX RADIOBUTTON "ĬÈÏ´òÓ¡»ú(&D)", rad1, 16, 20, 80, 12 - LTEXT "[none]", 1088, 35, 35, 120, 9 + LTEXT "[ÎÞ]", 1088, 35, 35, 120, 9 RADIOBUTTON "Ö¸¶¨µÄ´òÓ¡»ú(&P)", rad2, 16, 50, 80, 12 COMBOBOX cmb1, 35, 65, 149, 68, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | WS_VSCROLL | WS_TABSTOP DEFPUSHBUTTON "È·¶¨", IDOK, 206, 6, 56, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP @@ -141,7 +141,7 @@ FONT 8, "MS Shell Dlg" CBS_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | WS_TABSTOP GROUPBOX "ʾÀý",grp2,98,72,120,36,WS_GROUP CTEXT "ÖÐÎÄ×ÖÌåAaBbYyZz",stc5,103,80,109,24,SS_NOPREFIX | NOT WS_VISIBLE - LTEXT "Scr&ipt (translate):",stc7,98,114,80,9 + LTEXT "ÓïÑÔ(&i):",stc7,98,114,80,9 COMBOBOX cmb5,98,124,120,90,CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP } @@ -247,7 +247,7 @@ FONT 8, "MS Shell Dlg" GROUPBOX "·ÝÊý", grp2, 160, 92, 120,64, WS_GROUP LTEXT "·ÝÊý(&C):",stc5,168,108,68,8 ICON "", ico3, 162,124, 76,24, WS_GROUP | SS_CENTERIMAGE - CONTROL "C&ollate", chx2,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,240,130,36,12 + CONTROL "×Ô¶¯·ÖÒ³(&o)", chx2,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,240,130,36,12 EDITTEXT edt3, 240,106, 32,12, WS_GROUP | ES_NUMBER GROUPBOX "´òÓ¡·¶Î§", grp1, 8,92, 144,64, WS_GROUP @@ -351,7 +351,7 @@ FONT 8, "MS Shell Dlg" STRINGTABLE DISCARDABLE { - IDS_ABOUTBOX "&About FolderPicker Test" + IDS_ABOUTBOX "¹ØÓÚÎļþ¼ÐÑ¡ÔñÆ÷(&A)" IDS_DOCUMENTFOLDERS "ÎĵµÄ¿Â¼" IDS_PERSONAL "ÎÒµÄÎĵµ" IDS_FAVORITES "ÊղؼÐ" @@ -388,59 +388,55 @@ STRINGTABLE DISCARDABLE { PD32_PRINT_TITLE "´òÓ¡" - PD32_VALUE_UREADABLE "Unreadable Entry" - PD32_INVALID_PAGE_RANGE "This value does not lie within the page range.\n\ -Please enter a value between %d and %d." - PD32_FROM_NOT_ABOVE_TO "The 'from' entry cannot exceed the \ -'to' entry." - PD32_MARGINS_OVERLAP "Margins overlap or fall outside \ -Paper boundaries.\nPlease reenter margins." - PD32_NR_OF_COPIES_EMPTY "The number of 'Number of copies' \ -value cannot be empty." - PD32_TOO_LARGE_COPIES "This large nmuber of copies is not \ -supported by your printer.\nPlease enter a value between 1 and %d." - PD32_PRINT_ERROR "A printer error occurred." - PD32_NO_DEFAULT_PRINTER "There is not default printer." - PD32_CANT_FIND_PRINTER "Cannot find the printer." - PD32_OUT_OF_MEMORY "Out of memory." - PD32_GENERIC_ERROR "Some error occurred." - PD32_DRIVER_UNKNOWN "Unknown printer driver." - PD32_NO_DEVICES "Before you can perform printer-related tasks \ -such as page setup or printing a document, you need to install a printer. \ -Please install one and retry." - - PD32_DEFAULT_PRINTER "Default Printer; " - PD32_NR_OF_DOCUMENTS_IN_QUEUE "There are %d documents in the queue" - PD32_MARGINS_IN_INCHES "Margins [inches]" - PD32_MARGINS_IN_MILIMETERS "Margins [mm]" - PD32_MILIMETERS "mm" - - PD32_PRINTER_STATUS_READY "Ready" - PD32_PRINTER_STATUS_PAUSED "Paused; " - PD32_PRINTER_STATUS_ERROR "Error; " - PD32_PRINTER_STATUS_PENDING_DELETION "Pending deletion; " - PD32_PRINTER_STATUS_PAPER_JAM "Paper jam; " - PD32_PRINTER_STATUS_PAPER_OUT "Out of paper; " - PD32_PRINTER_STATUS_MANUAL_FEED "Feed paper manual; " - PD32_PRINTER_STATUS_PAPER_PROBLEM "Paper problem; " - PD32_PRINTER_STATUS_OFFLINE "Printer offline; " - PD32_PRINTER_STATUS_IO_ACTIVE "I/O Active; " - PD32_PRINTER_STATUS_BUSY "Busy; " - PD32_PRINTER_STATUS_PRINTING "Printing; " - PD32_PRINTER_STATUS_OUTPUT_BIN_FULL "Output tray is full; " - PD32_PRINTER_STATUS_NOT_AVAILABLE "Not available; " - PD32_PRINTER_STATUS_WAITING "Waiting; " - PD32_PRINTER_STATUS_PROCESSING "Processing; " - PD32_PRINTER_STATUS_INITIALIZING "Initialising; " - PD32_PRINTER_STATUS_WARMING_UP "Warming up; " - PD32_PRINTER_STATUS_TONER_LOW "Toner low; " - PD32_PRINTER_STATUS_NO_TONER "No toner; " - PD32_PRINTER_STATUS_PAGE_PUNT "Page punt; " - PD32_PRINTER_STATUS_USER_INTERVENTION "Interrupted by user; " - PD32_PRINTER_STATUS_OUT_OF_MEMORY "Out of memory; " - PD32_PRINTER_STATUS_DOOR_OPEN "The printer door is open; " - PD32_PRINTER_STATUS_SERVER_UNKNOWN "Print server unknown; " - PD32_PRINTER_STATUS_POWER_SAVE "Power safe mode; " + PD32_VALUE_UREADABLE "ÊýÖµ²»¿É¶Á" + PD32_INVALID_PAGE_RANGE "Õâ¸öÖµ²»ÔÚÒ³Êý·¶Î§¡£\n \ +ÇëÊäÈëÒ»¸ö %d ºÍ %d Ö®¼äµÄÊý¡£" + PD32_FROM_NOT_ABOVE_TO "'´Ó'ÏîµÄÖµ²»ÄÜ´óÓÚ'µ½'ÏîµÄÖµ¡£" + PD32_MARGINS_OVERLAP "Ò³±ß¾àÖصü»òÂäÓÚÖ½Íâ,\nÇëÖØÐÂÊäÈëÒ³±ß¾à¡£" + PD32_NR_OF_COPIES_EMPTY "'·ÝÊý' Ïî²»ÄÜ¿Õ." + PD32_TOO_LARGE_COPIES "ÄãµÄ´òÓ¡»ú²»Ö§³ÖÕâô´óµÄ·ÝÊý¡£\n \ +ÇëÊäÈëÒ»¸ö 1 ºÍ %d Ö®¼äµÄÊý¡£" + PD32_PRINT_ERROR "´òÓ¡»ú´íÎó¡£" + PD32_NO_DEFAULT_PRINTER "ûÓÐĬÈÏ´òÓ¡»ú¡£" + PD32_CANT_FIND_PRINTER "ÕÒ²»µ½´òÓ¡»ú¡£" + PD32_OUT_OF_MEMORY "ÄÚ´æ²»¹»¡£" + PD32_GENERIC_ERROR "³öÏÖһЩ´íÎó¡£" + PD32_DRIVER_UNKNOWN "ÕÒ²»µ½´òÓ¡»úÇý¶¯Æ÷¡£" + PD32_NO_DEVICES "ÔÚʹÓÃÓë´òÓ¡»úÓйع¦ÄÜ(Ò³ÃæÉèÖÃ, ´òÓ¡Îļþ)֮ǰ, \ +Äã±ØÐëÏÈ×°´òÓ¡»ú¡£Çë×°Ò»¸ö´òÓ¡»úÔÙÊÔ¡£" + + PD32_DEFAULT_PRINTER "ĬÈÏ´òÓ¡»ú; " + PD32_NR_OF_DOCUMENTS_IN_QUEUE "ÓÐ %d ¸öÎĵµÕýÔڵȴý´òÓ¡" + PD32_MARGINS_IN_INCHES "Ò³±ß¾à [Ó¢´ç]" + PD32_MARGINS_IN_MILIMETERS "Ò³±ß¾à [ºÁÃ×]" + PD32_MILIMETERS "ºÁÃ×" + + PD32_PRINTER_STATUS_READY "´ýÃü" + PD32_PRINTER_STATUS_PAUSED "ÔÝÍ£; " + PD32_PRINTER_STATUS_ERROR "´íÎó; " + PD32_PRINTER_STATUS_PENDING_DELETION "µÈ´ýɾ³ý; " + PD32_PRINTER_STATUS_PAPER_JAM "¿¨Ö½; " + PD32_PRINTER_STATUS_PAPER_OUT "ÎÞÖ½; " + PD32_PRINTER_STATUS_MANUAL_FEED "ÊÖ¶¯½øÖ½; " + PD32_PRINTER_STATUS_PAPER_PROBLEM "Ö½µÄÎÊÌâ; " + PD32_PRINTER_STATUS_OFFLINE "´òÓ¡»úÀëÏß; " + PD32_PRINTER_STATUS_IO_ACTIVE "I/O »î¶¯; " + PD32_PRINTER_STATUS_BUSY "·±Ã¦; " + PD32_PRINTER_STATUS_PRINTING "ÕýÔÚ´òÓ¡; " + PD32_PRINTER_STATUS_OUTPUT_BIN_FULL "³öÖ½ÍÐÅÌÒÑÂú; " + PD32_PRINTER_STATUS_NOT_AVAILABLE "²»¿ÉÓÃ; " + PD32_PRINTER_STATUS_WAITING "µÈ´ý; " + PD32_PRINTER_STATUS_PROCESSING "ÕýÔÚ´¦Àí; " + PD32_PRINTER_STATUS_INITIALIZING "ÕýÔÚÆô¶¯; " + PD32_PRINTER_STATUS_WARMING_UP "Ô¤ÈÈ; " + PD32_PRINTER_STATUS_TONER_LOW "Ä«µÍ; " + PD32_PRINTER_STATUS_NO_TONER "ûī; " + PD32_PRINTER_STATUS_PAGE_PUNT "Ò³Äڴ泬֧; " + PD32_PRINTER_STATUS_USER_INTERVENTION "Óû§¸ÉÔ¤; " + PD32_PRINTER_STATUS_OUT_OF_MEMORY "ÄÚ´æ²»¹»; " + PD32_PRINTER_STATUS_DOOR_OPEN "´òÓ¡»ú¸ÇÊÇ´ò¿ªµÄ; " + PD32_PRINTER_STATUS_SERVER_UNKNOWN "ÕÒ²»µ½´òÓ¡·þÎñÆ÷; " + PD32_PRINTER_STATUS_POWER_SAVE "Ê¡µç״̬; " } #pragma code_page(default) diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c index 699779fb6e0..d574790f052 100644 --- a/dlls/crypt32/str.c +++ b/dlls/crypt32/str.c @@ -169,10 +169,8 @@ static DWORD CRYPT_AddPrefixA(LPCSTR prefix, LPSTR psz, DWORD csz) { chars = min(lstrlenA(prefix), csz); memcpy(psz, prefix, chars); - csz -= chars; *(psz + chars) = '='; chars++; - csz--; } else chars = lstrlenA(prefix) + 1; @@ -249,7 +247,6 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, chars = CRYPT_AddPrefixA(prefix, psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); ret += chars; - csz -= chars; } /* FIXME: handle quoting */ chars = CertRDNValueToStrA( @@ -277,7 +274,6 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, if (psz && csz) { *(psz + ret) = '\0'; - csz--; ret++; } else @@ -305,10 +301,8 @@ static DWORD CRYPT_AddPrefixAToW(LPCSTR prefix, LPWSTR psz, DWORD csz) chars = min(lstrlenA(prefix), csz); for (i = 0; i < chars; i++) *(psz + i) = prefix[i]; - csz -= chars; *(psz + chars) = '='; chars++; - csz--; } else chars = lstrlenA(prefix) + 1; @@ -330,10 +324,8 @@ static DWORD CRYPT_AddPrefixW(LPCWSTR prefix, LPWSTR psz, DWORD csz) { chars = min(lstrlenW(prefix), csz); memcpy(psz, prefix, chars * sizeof(WCHAR)); - csz -= chars; *(psz + chars) = '='; chars++; - csz--; } else chars = lstrlenW(prefix) + 1; @@ -406,7 +398,6 @@ DWORD WINAPI CertNameToStrW(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, chars = CRYPT_AddPrefixW(prefixW, psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); ret += chars; - csz -= chars; } else if (prefixA) { @@ -414,7 +405,6 @@ DWORD WINAPI CertNameToStrW(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, chars = CRYPT_AddPrefixAToW(prefixA, psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); ret += chars; - csz -= chars; } /* FIXME: handle quoting */ chars = CertRDNValueToStrW( @@ -442,7 +432,6 @@ DWORD WINAPI CertNameToStrW(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, if (psz && csz) { *(psz + ret) = '\0'; - csz--; ret++; } else diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index d40f1968312..c3aa5911655 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1283,43 +1283,6 @@ static void test_render_zero_triangles(void) if(d3d8) IDirect3D8_Release(d3d8); } -static void test_set_material(void) -{ - D3DPRESENT_PARAMETERS present_parameters; - IDirect3DDevice8 *device = NULL; - IDirect3D8 *d3d8; - HWND hwnd; - HRESULT hr; - - d3d8 = pDirect3DCreate8( D3D_SDK_VERSION ); - ok(d3d8 != NULL, "Failed to create IDirect3D8 object\n"); - hwnd = CreateWindow( "static", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL ); - ok(hwnd != NULL, "Failed to create window\n"); - if (!d3d8 || !hwnd) goto cleanup; - - ZeroMemory(&present_parameters, sizeof(present_parameters)); - present_parameters.Windowed = TRUE; - present_parameters.hDeviceWindow = hwnd; - present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; - - hr = IDirect3D8_CreateDevice( d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, - D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &present_parameters, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, - "IDirect3D8_CreateDevice failed with %08x\n", hr); - if(!device) - { - skip("Failed to create a d3d device\n"); - goto cleanup; - } - - hr = IDirect3DDevice8_SetMaterial(device, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %08x\n", hr); - - cleanup: - if(device) IDirect3DDevice8_Release(device); - if(d3d8) IDirect3D8_Release(d3d8); -} - START_TEST(device) { HMODULE d3d8_handle = LoadLibraryA( "d3d8.dll" ); @@ -1345,6 +1308,5 @@ START_TEST(device) test_limits(); test_lights(); test_render_zero_triangles(); - test_set_material(); } } diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 3a562981d8f..3164b811df2 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -2016,41 +2016,6 @@ static void test_display_formats() if(d3d9) IDirect3D9_Release(d3d9); } -static void test_set_material(void) -{ - D3DPRESENT_PARAMETERS present_parameters; - IDirect3DDevice9 *device = NULL; - IDirect3D9 *d3d9; - HWND hwnd; - HRESULT hr; - - d3d9 = pDirect3DCreate9( D3D_SDK_VERSION ); - ok(d3d9 != NULL, "Failed to create IDirect3D9 object\n"); - hwnd = CreateWindow( "static", "d3d9_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL ); - ok(hwnd != NULL, "Failed to create window\n"); - if (!d3d9 || !hwnd) goto cleanup; - - ZeroMemory(&present_parameters, sizeof(present_parameters)); - present_parameters.Windowed = TRUE; - present_parameters.hDeviceWindow = hwnd; - present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; - - IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, - D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &present_parameters, &device ); - if(!device) - { - skip("Failed to create a d3d device\n"); - goto cleanup; - } - - hr = IDirect3DDevice9_SetMaterial(device, NULL); - ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %08x\n", hr); - - cleanup: - if(device) IDirect3DDevice9_Release(device); - if(d3d9) IDirect3D9_Release(d3d9); -} - START_TEST(device) { HMODULE d3d9_handle = LoadLibraryA( "d3d9.dll" ); @@ -2080,6 +2045,5 @@ START_TEST(device) test_vertex_buffer_alignment(); test_lights(); test_set_stream_source(); - test_set_material(); } } diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index b154ce47b7c..edcb88f956e 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -5543,6 +5543,7 @@ IDirect3DDeviceImpl_7_SetMaterial(IDirect3DDevice7 *iface, HRESULT hr; TRACE("(%p)->(%p): Relay!\n", This, Mat); + if (!Mat) return DDERR_INVALIDPARAMS; /* Note: D3DMATERIAL7 is compatible with WINED3DMATERIAL */ EnterCriticalSection(&ddraw_cs); hr = IWineD3DDevice_SetMaterial(This->wineD3DDevice, diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 37c0a8ebe5f..221a95b322e 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -2735,6 +2735,14 @@ static void DeviceLoadTest() } } +static void SetMaterialTest(void) +{ + HRESULT rc; + + rc =IDirect3DDevice7_SetMaterial(lpD3DDevice, NULL); + ok(rc == DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, got %x\n", rc); +} + START_TEST(d3d) { init_function_pointers(); @@ -2752,6 +2760,7 @@ START_TEST(d3d) SceneTest(); LimitTest(); D3D7EnumTest(); + SetMaterialTest(); CapsTest(); VertexBufferDescTest(); D3D7_OldRenderStateTest(); diff --git a/dlls/dpnet/dpnet_private.h b/dlls/dpnet/dpnet_private.h index deaee60eeab..f75326a884c 100644 --- a/dlls/dpnet/dpnet_private.h +++ b/dlls/dpnet/dpnet_private.h @@ -35,6 +35,7 @@ typedef struct IDirectPlay8ClientImpl IDirectPlay8ClientImpl; typedef struct IDirectPlay8AddressImpl IDirectPlay8AddressImpl; typedef struct IDirectPlay8LobbiedApplicationImpl IDirectPlay8LobbiedApplicationImpl; +typedef struct IDirectPlay8PeerImpl IDirectPlay8PeerImpl; typedef struct IDirectPlay8ThreadPoolImpl IDirectPlay8ThreadPoolImpl; /* ------------------ */ @@ -81,6 +82,16 @@ struct IDirectPlay8LobbiedApplicationImpl }; /***************************************************************************** + * IDirectPlay8Peer implementation structure + */ +struct IDirectPlay8PeerImpl +{ + /* IUnknown fields */ + const IDirectPlay8PeerVtbl *lpVtbl; + LONG ref; +}; + +/***************************************************************************** * IDirectPlay8ThreadPool implementation structure */ struct IDirectPlay8ThreadPoolImpl diff --git a/dlls/dpnet/peer.c b/dlls/dpnet/peer.c index cb4b6384f6b..dbb8890100a 100644 --- a/dlls/dpnet/peer.c +++ b/dlls/dpnet/peer.c @@ -2,6 +2,7 @@ * DirectPlay8 Peer * * Copyright 2004 Raphael Junqueira + * Copyright 2008 Alexander N. Sørnes * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,6 +24,7 @@ #include +#define COBJMACROS #include "windef.h" #include "winbase.h" #include "wingdi.h" @@ -35,7 +37,329 @@ WINE_DEFAULT_DEBUG_CHANNEL(dpnet); +/* IUnknown interface follows */ + +static HRESULT WINAPI IDirectPlay8PeerImpl_QueryInterface(PDIRECTPLAY8PEER iface, REFIID riid, LPVOID* ppobj) +{ + IDirectPlay8PeerImpl* This = (IDirectPlay8PeerImpl*)iface; + + if(IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IDirectPlay8Peer)) + { + IUnknown_AddRef(iface); + *ppobj = This; + return DPN_OK; + } + + WARN("(%p)->(%s,%p): not found\n", This, debugstr_guid(riid), ppobj); + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectPlay8PeerImpl_AddRef(PDIRECTPLAY8PEER iface) +{ + IDirectPlay8PeerImpl* This = (IDirectPlay8PeerImpl*)iface; + ULONG RefCount = InterlockedIncrement(&This->ref); + + return RefCount; +} + +static ULONG WINAPI IDirectPlay8PeerImpl_Release(PDIRECTPLAY8PEER iface) +{ + IDirectPlay8PeerImpl* This = (IDirectPlay8PeerImpl*)iface; + ULONG RefCount = InterlockedDecrement(&This->ref); + + if(!RefCount) + HeapFree(GetProcessHeap(), 0, This); + + return RefCount; +} + +/* IDirectPlay8Peer interface follows */ + +static HRESULT WINAPI IDirectPlay8PeerImpl_Initialize(PDIRECTPLAY8PEER iface, PVOID CONST pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%x): stub\n", iface, pvUserContext, pfn, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_EnumServiceProviders(PDIRECTPLAY8PEER iface, CONST GUID *CONST pguidServiceProvider, CONST GUID *CONST pguidApplication, DPN_SERVICE_PROVIDER_INFO *CONST pSPInfoBuffer, DWORD *CONST pcbEnumData, DWORD *CONST pcReturned, CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%p,%p,%p,%x): stub\n", iface, pguidServiceProvider, pguidApplication, pSPInfoBuffer, pcbEnumData, pcReturned, dwFlags); + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_CancelAsyncOperation(PDIRECTPLAY8PEER iface, + CONST DPNHANDLE hAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%x): stub\n", iface, hAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_Connect(PDIRECTPLAY8PEER iface, + CONST DPN_APPLICATION_DESC* CONST pdnAppDesc, + IDirectPlay8Address *CONST pHostAddr, + IDirectPlay8Address *CONST pDeviceInfo, + CONST DPN_SECURITY_DESC *CONST pdnSecurity, + CONST DPN_SECURITY_CREDENTIALS *CONST pdnCredentials, + CONST VOID *CONST pvUserConnectData, + CONST DWORD dwUserConnectDataSize, + VOID *CONST pvPlayerContext, + VOID *CONST pvAsyncContext, + DPNHANDLE *CONST phAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%p,%p,%p,%p,%x,%p,%p,%p,%x): stub\n", iface, pdnAppDesc, pHostAddr, pDeviceInfo, pdnSecurity, pdnCredentials, pvUserConnectData, dwUserConnectDataSize, pvPlayerContext, pvAsyncContext, phAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_SendTo(PDIRECTPLAY8PEER iface, + CONST DPNID dpnId, + CONST DPN_BUFFER_DESC *pBufferDesc, + CONST DWORD cBufferDesc, + CONST DWORD dwTimeOut, + VOID *CONST pvAsyncContext, + DPNHANDLE *CONST phAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%p,%x,%x,%p,%p,%x): stub\n", iface, dpnId, pBufferDesc, cBufferDesc, dwTimeOut, pvAsyncContext, phAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_GetSendQueueInfo(PDIRECTPLAY8PEER iface, + CONST DPNID dpnid, + DWORD *CONST pdwNumMsgs, + DWORD *CONST pdwNumBytes, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface, dpnid, pdwNumMsgs, pdwNumBytes, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_Host(PDIRECTPLAY8PEER iface, + CONST DPN_APPLICATION_DESC *CONST pdnAppDesc, + IDirectPlay8Address **CONST prgpDeviceInfo, + CONST DWORD cDeviceInfo, + CONST DPN_SECURITY_DESC *CONST pdpSecurity, + CONST DPN_SECURITY_CREDENTIALS *CONST pdpCredentials, + VOID *CONST pvPlayerContext, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%x,%p,%p,%p,%x): stub\n", iface, pdnAppDesc, prgpDeviceInfo, cDeviceInfo, pdpSecurity, pdpCredentials, pvPlayerContext, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_GetApplicationDesc(PDIRECTPLAY8PEER iface, + DPN_APPLICATION_DESC *CONST pAppDescBuffer, + DWORD *CONST pcbDataSize, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%x): stub\n", iface, pAppDescBuffer, pcbDataSize, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_SetApplicationDesc(PDIRECTPLAY8PEER iface, + CONST DPN_APPLICATION_DESC *CONST pad, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%x): stub\n", iface, pad, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_CreateGroup(PDIRECTPLAY8PEER iface, + CONST DPN_GROUP_INFO *CONST pdpnGroupInfo, + VOID *CONST pvGroupContext, + VOID *CONST pvAsyncContext, + DPNHANDLE *CONST phAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%p,%p,%x): stub\n", iface, pdpnGroupInfo, pvGroupContext, pvAsyncContext, phAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_DestroyGroup(PDIRECTPLAY8PEER iface, + CONST DPNID idGroup, + PVOID CONST pvAsyncContext, + DPNHANDLE *CONST phAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface, idGroup, pvAsyncContext, phAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_AddPlayerToGroup(PDIRECTPLAY8PEER iface, + CONST DPNID idGroup, + CONST DPNID idClient, + PVOID CONST pvAsyncContext, + DPNHANDLE *CONST phAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%x,%p,%p,%x): stub\n", iface, idGroup, idClient, pvAsyncContext, phAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_RemovePlayerFromGroup(PDIRECTPLAY8PEER iface, + CONST DPNID idGroup, + CONST DPNID idClient, + PVOID CONST pvAsyncContext, + DPNHANDLE *CONST phAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%x,%p,%p,%x): stub\n", iface, idGroup, idClient, pvAsyncContext, phAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_SetGroupInfo(PDIRECTPLAY8PEER iface, + CONST DPNID dpnid, + DPN_GROUP_INFO *CONST pdpnGroupInfo, + PVOID CONST pvAsyncContext, + DPNHANDLE *CONST phAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%p,%p,%p,%x): stub\n", iface, dpnid, pdpnGroupInfo, pvAsyncContext, phAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_GetGroupInfo(PDIRECTPLAY8PEER iface, + CONST DPNID dpnid, + DPN_GROUP_INFO *CONST pdpnGroupInfo, + DWORD *CONST pdwSize, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface, dpnid, pdpnGroupInfo, pdwSize, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_EnumPlayersAndGroups(PDIRECTPLAY8PEER iface, + DPNID *CONST prgdpnid, + DWORD *CONST pcdpnid, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%x): stub\n", iface, prgdpnid, pcdpnid, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_EnumGroupMembers(PDIRECTPLAY8PEER iface, + CONST DPNID dpnid, + DPNID *CONST prgdpnid, + DWORD *CONST pcdpnid, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface, dpnid, prgdpnid, pcdpnid, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_SetPeerInfo(PDIRECTPLAY8PEER iface, + CONST DPN_PLAYER_INFO *CONST pdpnPlayerInfo, + PVOID CONST pvAsyncContext, + DPNHANDLE *CONST phAsyncHandle, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%p,%x): stub\n", iface, pdpnPlayerInfo, pvAsyncContext, phAsyncHandle, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_GetPeerInfo(PDIRECTPLAY8PEER iface, + CONST DPNID dpnid, + DPN_PLAYER_INFO *CONST pdpnPlayerInfo, + DWORD *CONST pdwSize, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%p,%p,%x): stub\n", iface, dpnid, pdpnPlayerInfo, pdwSize, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_GetPeerAddress(PDIRECTPLAY8PEER iface, + CONST DPNID dpnid, + IDirectPlay8Address **CONST pAddress, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x,%p,%x): stub\n", iface, dpnid, pAddress, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_GetLocalHostAddresses(PDIRECTPLAY8PEER iface, + IDirectPlay8Address **CONST prgpAddress, + DWORD *CONST pcAddress, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%p,%p,%x): stub\n", iface, prgpAddress, pcAddress, dwFlags); + + return DPNERR_GENERIC; +} + +static HRESULT WINAPI IDirectPlay8PeerImpl_Close(PDIRECTPLAY8PEER iface, + CONST DWORD dwFlags) +{ + FIXME("(%p)->(%x): stub\n", iface, dwFlags); + + return DPN_OK; +} + +static const IDirectPlay8PeerVtbl DirectPlay8Peer_Vtbl = +{ + IDirectPlay8PeerImpl_QueryInterface, + IDirectPlay8PeerImpl_AddRef, + IDirectPlay8PeerImpl_Release, + IDirectPlay8PeerImpl_Initialize, + IDirectPlay8PeerImpl_EnumServiceProviders, + IDirectPlay8PeerImpl_CancelAsyncOperation, + IDirectPlay8PeerImpl_Connect, + IDirectPlay8PeerImpl_SendTo, + IDirectPlay8PeerImpl_GetSendQueueInfo, + IDirectPlay8PeerImpl_Host, + IDirectPlay8PeerImpl_GetApplicationDesc, + IDirectPlay8PeerImpl_SetApplicationDesc, + IDirectPlay8PeerImpl_CreateGroup, + IDirectPlay8PeerImpl_DestroyGroup, + IDirectPlay8PeerImpl_AddPlayerToGroup, + IDirectPlay8PeerImpl_RemovePlayerFromGroup, + IDirectPlay8PeerImpl_SetGroupInfo, + IDirectPlay8PeerImpl_GetGroupInfo, + IDirectPlay8PeerImpl_EnumPlayersAndGroups, + IDirectPlay8PeerImpl_EnumGroupMembers, + IDirectPlay8PeerImpl_SetPeerInfo, + IDirectPlay8PeerImpl_GetPeerInfo, + IDirectPlay8PeerImpl_GetPeerAddress, + IDirectPlay8PeerImpl_GetLocalHostAddresses, + IDirectPlay8PeerImpl_Close +}; + HRESULT DPNET_CreateDirectPlay8Peer(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) { - WARN("(%p, %s, %p): stub.\n", punkOuter, debugstr_guid(riid), ppobj); - return CLASS_E_CLASSNOTAVAILABLE; + IDirectPlay8PeerImpl* Client; + HRESULT Ret; + + Client = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectPlay8PeerImpl)); + + if(Client == NULL) + { + *ppobj = NULL; + WARN("Not enough memory\n"); + return E_OUTOFMEMORY; + } + + Client->lpVtbl = &DirectPlay8Peer_Vtbl; + if((Ret = IDirectPlay8PeerImpl_QueryInterface((PDIRECTPLAY8PEER)Client, riid, ppobj)) != DPN_OK) + HeapFree(GetProcessHeap(), 0, Client); + + return Ret; } diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index c9444a45cc4..7cf7b83894f 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -1140,7 +1140,7 @@ IDirectSoundCaptureBufferImpl_Start( if (device->buffer) { int c; - DWORD blocksize = DSOUND_fraglen(device->pwfx->nSamplesPerSec, device->pwfx->nBlockAlign); + DWORD blocksize = 4 * DSOUND_fraglen(device->pwfx->nSamplesPerSec, device->pwfx->nBlockAlign); device->nrofpwaves = device->buflen / blocksize + !!(device->buflen % blocksize); TRACE("nrofpwaves=%d\n", device->nrofpwaves); diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index 31078cb8ddc..dddcf284a76 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -90,9 +90,9 @@ HRESULT mmErr(UINT err) /* All default settings, you most likely don't want to touch these, see wiki on UsefulRegistryKeys */ int ds_emuldriver = 0; -int ds_hel_buflen = 32768; -int ds_snd_queue_max = 10; -int ds_snd_queue_min = 6; +int ds_hel_buflen = 32768 * 2; +int ds_snd_queue_max = 20; +int ds_snd_queue_min = 14; int ds_snd_shadow_maxsize = 2; int ds_hw_accel = DS_HW_ACCEL_FULL; int ds_default_playback = 0; diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 112bb398cf9..7ad561f730a 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -46,13 +46,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound); */ DWORD DSOUND_fraglen(DWORD nSamplesPerSec, DWORD nBlockAlign) { - DWORD fraglen = 512 * nBlockAlign; + DWORD fraglen = 256 * nBlockAlign; /* Compensate for only being roughly accurate */ if (nSamplesPerSec <= 26000) fraglen /= 2; - if (nSamplesPerSec <= 12000) + if (nSamplesPerSec <= 10000) fraglen /= 2; if (nSamplesPerSec >= 80000) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index a00140fa06c..9e94d572747 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -213,8 +213,8 @@ @ stub GdipEnumerateMetafileSrcRectDestPointsI @ stub GdipEnumerateMetafileSrcRectDestRect @ stub GdipEnumerateMetafileSrcRectDestRectI -@ stub GdipFillClosedCurve2 -@ stub GdipFillClosedCurve2I +@ stdcall GdipFillClosedCurve2(ptr ptr ptr long long) +@ stdcall GdipFillClosedCurve2I(ptr ptr ptr long long) @ stub GdipFillClosedCurve @ stub GdipFillClosedCurveI @ stdcall GdipFillEllipse(ptr ptr long long long long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 3a7ffcee7d6..7bbcc747ce6 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1801,6 +1801,62 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string return Ok; } +GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics *graphics, GpBrush *brush, + GDIPCONST GpPointF *points, INT count, REAL tension, GpFillMode fill) +{ + GpPath *path; + GpStatus stat; + + if(!graphics || !brush || !points) + return InvalidParameter; + + stat = GdipCreatePath(fill, &path); + if(stat != Ok) + return stat; + + stat = GdipAddPathClosedCurve2(path, points, count, tension); + if(stat != Ok){ + GdipDeletePath(path); + return stat; + } + + stat = GdipFillPath(graphics, brush, path); + if(stat != Ok){ + GdipDeletePath(path); + return stat; + } + + GdipDeletePath(path); + + return Ok; +} + +GpStatus WINGDIPAPI GdipFillClosedCurve2I(GpGraphics *graphics, GpBrush *brush, + GDIPCONST GpPoint *points, INT count, REAL tension, GpFillMode fill) +{ + GpPointF *ptf; + GpStatus stat; + INT i; + + if(!points || count <= 0) + return InvalidParameter; + + ptf = GdipAlloc(sizeof(GpPointF)*count); + if(!ptf) + return OutOfMemory; + + for(i = 0;i < count;i++){ + ptf[i].X = (REAL)points[i].X; + ptf[i].Y = (REAL)points[i].Y; + } + + stat = GdipFillClosedCurve2(graphics, brush, ptf, count, tension, fill); + + GdipFree(ptf); + + return stat; +} + GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics *graphics, GpBrush *brush, REAL x, REAL y, REAL width, REAL height) { diff --git a/dlls/mstask/mstask_private.h b/dlls/mstask/mstask_private.h index b0892fe91d1..71a675ecabb 100644 --- a/dlls/mstask/mstask_private.h +++ b/dlls/mstask/mstask_private.h @@ -59,6 +59,10 @@ typedef struct LONG ref; LPWSTR taskName; LPWSTR applicationName; + LPWSTR parameters; + LPWSTR comment; + DWORD maxRunTime; + LPWSTR accountName; } TaskImpl; extern HRESULT TaskConstructor(LPCWSTR pwszTaskName, LPVOID *ppObj); diff --git a/dlls/mstask/task.c b/dlls/mstask/task.c index f1f542638bd..2c70ef5f8ad 100644 --- a/dlls/mstask/task.c +++ b/dlls/mstask/task.c @@ -21,9 +21,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(mstask); +static inline TaskImpl *impl_from_IPersistFile( IPersistFile *iface ) +{ + return (TaskImpl*) ((char*)(iface) - FIELD_OFFSET(TaskImpl, persistVtbl)); +} + static void TaskDestructor(TaskImpl *This) { TRACE("%p\n", This); + HeapFree(GetProcessHeap(), 0, This->accountName); + HeapFree(GetProcessHeap(), 0, This->comment); + HeapFree(GetProcessHeap(), 0, This->parameters); HeapFree(GetProcessHeap(), 0, This->taskName); HeapFree(GetProcessHeap(), 0, This); InterlockedDecrement(&dll_ref); @@ -47,6 +55,12 @@ static HRESULT WINAPI MSTASK_ITask_QueryInterface( ITask_AddRef(iface); return S_OK; } + else if (IsEqualGUID(riid, &IID_IPersistFile)) + { + *ppvObject = &This->persistVtbl; + ITask_AddRef(iface); + return S_OK; + } WARN("Unknown interface: %s\n", debugstr_guid(riid)); *ppvObject = NULL; @@ -207,16 +221,52 @@ static HRESULT WINAPI MSTASK_ITask_SetComment( ITask* iface, LPCWSTR pwszComment) { - FIXME("(%p, %s): stub\n", iface, debugstr_w(pwszComment)); - return E_NOTIMPL; + DWORD n; + TaskImpl *This = (TaskImpl *)iface; + LPWSTR tmp_comment; + + TRACE("(%p, %s)\n", iface, debugstr_w(pwszComment)); + + /* Empty comment */ + if (pwszComment[0] == 0) + { + HeapFree(GetProcessHeap(), 0, This->comment); + This->comment = NULL; + return S_OK; + } + + /* Set to pwszComment */ + n = (lstrlenW(pwszComment) + 1); + tmp_comment = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR)); + if (!tmp_comment) + return E_OUTOFMEMORY; + lstrcpyW(tmp_comment, pwszComment); + HeapFree(GetProcessHeap(), 0, This->comment); + This->comment = tmp_comment; + + return S_OK; } static HRESULT WINAPI MSTASK_ITask_GetComment( ITask* iface, LPWSTR *ppwszComment) { - FIXME("(%p, %p): stub\n", iface, ppwszComment); - return E_NOTIMPL; + DWORD n; + TaskImpl *This = (TaskImpl *)iface; + + TRACE("(%p, %p)\n", iface, ppwszComment); + + n = This->comment ? lstrlenW(This->comment) + 1 : 1; + *ppwszComment = CoTaskMemAlloc(n * sizeof(WCHAR)); + if (!*ppwszComment) + return E_OUTOFMEMORY; + + if (!This->comment) + *ppwszComment[0] = 0; + else + lstrcpyW(*ppwszComment, This->comment); + + return S_OK; } static HRESULT WINAPI MSTASK_ITask_SetCreator( @@ -306,17 +356,46 @@ static HRESULT WINAPI MSTASK_ITask_SetAccountInformation( LPCWSTR pwszAccountName, LPCWSTR pwszPassword) { - FIXME("(%p, %s, %s): stub\n", iface, debugstr_w(pwszAccountName), + DWORD n; + TaskImpl *This = (TaskImpl *)iface; + LPWSTR tmp_account_name; + + TRACE("(%p, %s, %s): partial stub\n", iface, debugstr_w(pwszAccountName), debugstr_w(pwszPassword)); - return E_NOTIMPL; + + if (pwszPassword) + FIXME("Partial stub ignores passwords\n"); + + n = (lstrlenW(pwszAccountName) + 1); + tmp_account_name = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR)); + if (!tmp_account_name) + return E_OUTOFMEMORY; + lstrcpyW(tmp_account_name, pwszAccountName); + HeapFree(GetProcessHeap(), 0, This->accountName); + This->accountName = tmp_account_name; + return S_OK; } static HRESULT WINAPI MSTASK_ITask_GetAccountInformation( ITask* iface, LPWSTR *ppwszAccountName) { - FIXME("(%p, %p): stub\n", iface, ppwszAccountName); - return E_NOTIMPL; + DWORD n; + TaskImpl *This = (TaskImpl *)iface; + + TRACE("(%p, %p): partial stub\n", iface, ppwszAccountName); + + /* This implements the WinXP behavior when accountName has not yet + * set. Win2K behaves differently, returning SCHED_E_CANNOT_OPEN_TASK */ + if (!This->accountName) + return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); + + n = (lstrlenW(This->accountName) + 1); + *ppwszAccountName = CoTaskMemAlloc(n * sizeof(WCHAR)); + if (!*ppwszAccountName) + return E_OUTOFMEMORY; + lstrcpyW(*ppwszAccountName, This->accountName); + return S_OK; } static HRESULT WINAPI MSTASK_ITask_SetApplicationName( @@ -392,16 +471,51 @@ static HRESULT WINAPI MSTASK_ITask_SetParameters( ITask* iface, LPCWSTR pwszParameters) { - FIXME("(%p, %s): stub\n", iface, debugstr_w(pwszParameters)); - return E_NOTIMPL; + DWORD n; + TaskImpl *This = (TaskImpl *)iface; + LPWSTR tmp_parameters; + + TRACE("(%p, %s)\n", iface, debugstr_w(pwszParameters)); + + /* Empty parameter list */ + if (pwszParameters[0] == 0) + { + HeapFree(GetProcessHeap(), 0, This->parameters); + This->parameters = NULL; + return S_OK; + } + + /* Set to pwszParameters */ + n = (lstrlenW(pwszParameters) + 1); + tmp_parameters = HeapAlloc(GetProcessHeap(), 0, n * sizeof(WCHAR)); + if (!tmp_parameters) + return E_OUTOFMEMORY; + lstrcpyW(tmp_parameters, pwszParameters); + HeapFree(GetProcessHeap(), 0, This->parameters); + This->parameters = tmp_parameters; + return S_OK; } static HRESULT WINAPI MSTASK_ITask_GetParameters( ITask* iface, LPWSTR *ppwszParameters) { - FIXME("(%p, %p): stub\n", iface, ppwszParameters); - return E_NOTIMPL; + DWORD n; + TaskImpl *This = (TaskImpl *)iface; + + TRACE("(%p, %p)\n", iface, ppwszParameters); + + n = This->parameters ? lstrlenW(This->parameters) + 1 : 1; + *ppwszParameters = CoTaskMemAlloc(n * sizeof(WCHAR)); + if (!*ppwszParameters) + return E_OUTOFMEMORY; + + if (!This->parameters) + *ppwszParameters[0] = 0; + else + lstrcpyW(*ppwszParameters, This->parameters); + + return S_OK; } static HRESULT WINAPI MSTASK_ITask_SetWorkingDirectory( @@ -456,16 +570,24 @@ static HRESULT WINAPI MSTASK_ITask_SetMaxRunTime( ITask* iface, DWORD dwMaxRunTime) { - FIXME("(%p, %d): stub\n", iface, dwMaxRunTime); - return E_NOTIMPL; + TaskImpl *This = (TaskImpl *)iface; + + TRACE("(%p, %d)\n", iface, dwMaxRunTime); + + This->maxRunTime = dwMaxRunTime; + return S_OK; } static HRESULT WINAPI MSTASK_ITask_GetMaxRunTime( ITask* iface, DWORD *pdwMaxRunTime) { - FIXME("(%p, %p): stub\n", iface, pdwMaxRunTime); - return E_NOTIMPL; + TaskImpl *This = (TaskImpl *)iface; + + TRACE("(%p, %p)\n", iface, pdwMaxRunTime); + + *pdwMaxRunTime = This->maxRunTime; + return S_OK; } static HRESULT WINAPI MSTASK_IPersistFile_QueryInterface( @@ -473,22 +595,31 @@ static HRESULT WINAPI MSTASK_IPersistFile_QueryInterface( REFIID riid, void **ppvObject) { - FIXME("(%p, %s, %p): stub\n", iface, debugstr_guid(riid), ppvObject); - return E_NOTIMPL; + TaskImpl *This = impl_from_IPersistFile(iface); + TRACE("(%p, %s, %p)\n", iface, debugstr_guid(riid), ppvObject); + return ITask_QueryInterface((ITask *) This, riid, ppvObject); } static ULONG WINAPI MSTASK_IPersistFile_AddRef( IPersistFile* iface) { - FIXME("(%p): stub\n", iface); - return E_NOTIMPL; + TaskImpl *This = impl_from_IPersistFile(iface); + ULONG ref; + TRACE("\n"); + ref = InterlockedIncrement(&This->ref); + return ref; } static ULONG WINAPI MSTASK_IPersistFile_Release( IPersistFile* iface) { - FIXME("(%p): stub\n", iface); - return E_NOTIMPL; + TaskImpl *This = impl_from_IPersistFile(iface); + ULONG ref; + TRACE("\n"); + ref = InterlockedDecrement(&This->ref); + if (ref == 0) + TaskDestructor(This); + return ref; } static HRESULT WINAPI MSTASK_IPersistFile_GetClassID( @@ -625,6 +756,12 @@ HRESULT TaskConstructor(LPCWSTR pwszTaskName, LPVOID *ppObj) } lstrcpyW(This->taskName, pwszTaskName); This->applicationName = NULL; + This->parameters = NULL; + This->comment = NULL; + This->accountName = NULL; + + /* Default time is 3 days = 259200000 ms */ + This->maxRunTime = 259200000; *ppObj = &This->lpVtbl; InterlockedIncrement(&dll_ref); diff --git a/dlls/mstask/tests/task.c b/dlls/mstask/tests/task.c index ff35f52ed72..9e4dfe27a09 100644 --- a/dlls/mstask/tests/task.c +++ b/dlls/mstask/tests/task.c @@ -249,49 +249,49 @@ static void test_SetParameters_GetParameters(void) /* Get parameters before setting them */ hres = ITask_GetParameters(test_task, ¶meters); - todo_wine ok(hres == S_OK, "GetParameters failed: %08x\n", hres); + ok(hres == S_OK, "GetParameters failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(parameters, empty), + ok(!lstrcmpW(parameters, empty), "Got %s, expected empty string\n", dbgstr_w(parameters)); CoTaskMemFree(parameters); } /* Set parameters to a simple string */ hres = ITask_SetParameters(test_task, parameters_a); - todo_wine ok(hres == S_OK, "Failed setting parameters %s: %08x\n", + ok(hres == S_OK, "Failed setting parameters %s: %08x\n", dbgstr_w(parameters_a), hres); hres = ITask_GetParameters(test_task, ¶meters); - todo_wine ok(hres == S_OK, "GetParameters failed: %08x\n", hres); + ok(hres == S_OK, "GetParameters failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(parameters, parameters_a), "Got %s, expected %s\n", + ok(!lstrcmpW(parameters, parameters_a), "Got %s, expected %s\n", dbgstr_w(parameters), dbgstr_w(parameters_a)); CoTaskMemFree(parameters); } /* Update parameters to a different simple string */ hres = ITask_SetParameters(test_task, parameters_b); - todo_wine ok(hres == S_OK, "Failed setting parameters %s: %08x\n", + ok(hres == S_OK, "Failed setting parameters %s: %08x\n", dbgstr_w(parameters_b), hres); hres = ITask_GetParameters(test_task, ¶meters); - todo_wine ok(hres == S_OK, "GetParameters failed: %08x\n", hres); + ok(hres == S_OK, "GetParameters failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(parameters, parameters_b), "Got %s, expected %s\n", + ok(!lstrcmpW(parameters, parameters_b), "Got %s, expected %s\n", dbgstr_w(parameters), dbgstr_w(parameters_b)); CoTaskMemFree(parameters); } /* Clear parameters */ hres = ITask_SetParameters(test_task, empty); - todo_wine ok(hres == S_OK, "Failed setting parameters %s: %08x\n", + ok(hres == S_OK, "Failed setting parameters %s: %08x\n", dbgstr_w(empty), hres); hres = ITask_GetParameters(test_task, ¶meters); - todo_wine ok(hres == S_OK, "GetParameters failed: %08x\n", hres); + ok(hres == S_OK, "GetParameters failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(parameters, empty), + ok(!lstrcmpW(parameters, empty), "Got %s, expected empty string\n", dbgstr_w(parameters)); CoTaskMemFree(parameters); } @@ -319,49 +319,49 @@ static void test_SetComment_GetComment(void) /* Get comment before setting it*/ hres = ITask_GetComment(test_task, &comment); - todo_wine ok(hres == S_OK, "GetComment failed: %08x\n", hres); + ok(hres == S_OK, "GetComment failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(comment, empty), + ok(!lstrcmpW(comment, empty), "Got %s, expected empty string\n", dbgstr_w(comment)); CoTaskMemFree(comment); } /* Set comment to a simple string */ hres = ITask_SetComment(test_task, comment_a); - todo_wine ok(hres == S_OK, "Failed setting comment %s: %08x\n", + ok(hres == S_OK, "Failed setting comment %s: %08x\n", dbgstr_w(comment_a), hres); hres = ITask_GetComment(test_task, &comment); - todo_wine ok(hres == S_OK, "GetComment failed: %08x\n", hres); + ok(hres == S_OK, "GetComment failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(comment, comment_a), "Got %s, expected %s\n", + ok(!lstrcmpW(comment, comment_a), "Got %s, expected %s\n", dbgstr_w(comment), dbgstr_w(comment_a)); CoTaskMemFree(comment); } /* Update comment to a different simple string */ hres = ITask_SetComment(test_task, comment_b); - todo_wine ok(hres == S_OK, "Failed setting comment %s: %08x\n", + ok(hres == S_OK, "Failed setting comment %s: %08x\n", dbgstr_w(comment_b), hres); hres = ITask_GetComment(test_task, &comment); - todo_wine ok(hres == S_OK, "GetComment failed: %08x\n", hres); + ok(hres == S_OK, "GetComment failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(comment, comment_b), "Got %s, expected %s\n", + ok(!lstrcmpW(comment, comment_b), "Got %s, expected %s\n", dbgstr_w(comment), dbgstr_w(comment_b)); CoTaskMemFree(comment); } /* Clear comment */ hres = ITask_SetComment(test_task, empty); - todo_wine ok(hres == S_OK, "Failed setting comment %s: %08x\n", + ok(hres == S_OK, "Failed setting comment %s: %08x\n", dbgstr_w(empty), hres); hres = ITask_GetComment(test_task, &comment); - todo_wine ok(hres == S_OK, "GetComment failed: %08x\n", hres); + ok(hres == S_OK, "GetComment failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(comment, empty), + ok(!lstrcmpW(comment, empty), "Got %s, expected empty string\n", dbgstr_w(comment)); CoTaskMemFree(comment); } @@ -388,40 +388,40 @@ static void test_SetMaxRunTime_GetMaxRunTime(void) * 3 days * 24 hours * 60 minutes * 60 seconds * 1000 ms = 259200000 */ max_run_time = 0; hres = ITask_GetMaxRunTime(test_task, &max_run_time); - todo_wine ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - todo_wine ok(max_run_time == 259200000, "Expected 259200000: %d\n", max_run_time); + ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); + ok(max_run_time == 259200000, "Expected 259200000: %d\n", max_run_time); /* Basic set test */ max_run_time = 0; hres = ITask_SetMaxRunTime(test_task, 1234); - todo_wine ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); + ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); hres = ITask_GetMaxRunTime(test_task, &max_run_time); - todo_wine ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - todo_wine ok(max_run_time == 1234, "Expected 1234: %d\n", max_run_time); + ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); + ok(max_run_time == 1234, "Expected 1234: %d\n", max_run_time); /* Verify that time can be set to zero */ max_run_time = 1; hres = ITask_SetMaxRunTime(test_task, 0); - todo_wine ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); + ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); hres = ITask_GetMaxRunTime(test_task, &max_run_time); - todo_wine ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - todo_wine ok(max_run_time == 0, "Expected 0: %d\n", max_run_time); + ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); + ok(max_run_time == 0, "Expected 0: %d\n", max_run_time); /* Check resolution by setting time to one */ max_run_time = 0; hres = ITask_SetMaxRunTime(test_task, 1); - todo_wine ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); + ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); hres = ITask_GetMaxRunTime(test_task, &max_run_time); - todo_wine ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - todo_wine ok(max_run_time == 1, "Expected 1: %d\n", max_run_time); + ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); + ok(max_run_time == 1, "Expected 1: %d\n", max_run_time); /* Verify that time can be set to INFINITE */ max_run_time = 0; hres = ITask_SetMaxRunTime(test_task, INFINITE); - todo_wine ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); + ok(hres == S_OK, "Failed to set max runtime: 0x%08x\n", hres); hres = ITask_GetMaxRunTime(test_task, &max_run_time); - todo_wine ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); - todo_wine ok(max_run_time == INFINITE, "Expected INFINITE: %d\n", max_run_time); + ok(hres == S_OK, "Failed to get max runtime: 0x%08x\n", hres); + ok(max_run_time == INFINITE, "Expected INFINITE: %d\n", max_run_time); cleanup_task(); return; @@ -434,6 +434,8 @@ static void test_SetAccountInformation_GetAccountInformation(void) LPWSTR account_name; const WCHAR dummy_account_name[] = {'N', 'o', 'S', 'u', 'c', 'h', 'A', 'c', 'c', 'o', 'u', 'n', 't', 0}; + const WCHAR dummy_account_name_b[] = {'N', 'o', 'S', 'u', 'c', 'h', + 'A', 'c', 'c', 'o', 'u', 'n', 't', 'B', 0}; setup = setup_task(); ok(setup, "Failed to setup test_task\n"); @@ -447,20 +449,20 @@ static void test_SetAccountInformation_GetAccountInformation(void) hres = ITask_GetAccountInformation(test_task, &account_name); /* WinXP returns HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND): 0x80070002 but * Win2K returns SCHED_E_CANNOT_OPEN_TASK: 0x8004130d */ - todo_wine ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || + ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hres == SCHED_E_CANNOT_OPEN_TASK, "Unset account name generated: 0x%08x\n", hres); /* Attempt to set to a dummy account without a password */ /* This test passes on WinXP but fails on Win2K */ hres = ITask_SetAccountInformation(test_task, dummy_account_name, NULL); - todo_wine ok(hres == S_OK, + ok(hres == S_OK, "Failed setting dummy account with no password: %08x\n", hres); hres = ITask_GetAccountInformation(test_task, &account_name); - todo_wine ok(hres == S_OK, "GetAccountInformation failed: %08x\n", hres); + ok(hres == S_OK, "GetAccountInformation failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(account_name, dummy_account_name), + ok(!lstrcmpW(account_name, dummy_account_name), "Got %s, expected %s\n", dbgstr_w(account_name), dbgstr_w(dummy_account_name)); CoTaskMemFree(account_name); @@ -468,28 +470,28 @@ static void test_SetAccountInformation_GetAccountInformation(void) /* Attempt to set to a dummy account with a (invalid) password */ /* This test passes on WinXP but fails on Win2K */ - hres = ITask_SetAccountInformation(test_task, dummy_account_name, - dummy_account_name); - todo_wine ok(hres == S_OK, + hres = ITask_SetAccountInformation(test_task, dummy_account_name_b, + dummy_account_name_b); + ok(hres == S_OK, "Failed setting dummy account with password: %08x\n", hres); hres = ITask_GetAccountInformation(test_task, &account_name); - todo_wine ok(hres == S_OK, "GetAccountInformation failed: %08x\n", hres); + ok(hres == S_OK, "GetAccountInformation failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(account_name, dummy_account_name), + ok(!lstrcmpW(account_name, dummy_account_name_b), "Got %s, expected %s\n", dbgstr_w(account_name), - dbgstr_w(dummy_account_name)); + dbgstr_w(dummy_account_name_b)); CoTaskMemFree(account_name); } /* Attempt to set to the local system account */ hres = ITask_SetAccountInformation(test_task, empty, NULL); - todo_wine ok(hres == S_OK, "Failed setting system account: %08x\n", hres); + ok(hres == S_OK, "Failed setting system account: %08x\n", hres); hres = ITask_GetAccountInformation(test_task, &account_name); - todo_wine ok(hres == S_OK, "GetAccountInformation failed: %08x\n", hres); + ok(hres == S_OK, "GetAccountInformation failed: %08x\n", hres); if (hres == S_OK) { - todo_wine ok(!lstrcmpW(account_name, empty), + ok(!lstrcmpW(account_name, empty), "Got %s, expected empty string\n", dbgstr_w(account_name)); CoTaskMemFree(account_name); } diff --git a/dlls/msxml3/Makefile.in b/dlls/msxml3/Makefile.in index b02253f931a..54650cda2f1 100644 --- a/dlls/msxml3/Makefile.in +++ b/dlls/msxml3/Makefile.in @@ -13,6 +13,7 @@ C_SRCS = \ bsc.c \ cdata.c \ comment.c \ + dispex.c \ docfrag.c \ domdoc.c \ domimpl.c \ diff --git a/dlls/msxml3/dispex.c b/dlls/msxml3/dispex.c new file mode 100644 index 00000000000..4156c78a4a7 --- /dev/null +++ b/dlls/msxml3/dispex.c @@ -0,0 +1,630 @@ +/* + * Copyright 2008 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "config.h" + +#include +#include +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winnls.h" +#include "ole2.h" +#include "msxml2.h" +#include "wininet.h" +#include "urlmon.h" +#include "winreg.h" +#include "shlwapi.h" + +#include "wine/debug.h" +#include "wine/list.h" +#include "wine/unicode.h" + +#include "msxml_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msxml); + +#define DISPATCHEX(x) ((IDispatchEx*) &(x)->lpIDispatchExVtbl) + +typedef struct { + DISPID id; + BSTR name; + enum tid_t tid; +} func_info_t; + +struct dispex_data_t { + DWORD func_cnt; + func_info_t *funcs; + func_info_t **name_table; + + struct list entry; +}; + +typedef struct { + VARIANT var; + LPWSTR name; +} dynamic_prop_t; + +struct dispex_dynamic_data_t { + DWORD buf_size; + DWORD prop_cnt; + dynamic_prop_t *props; +}; + +#define DISPID_DYNPROP_0 0x50000000 +#define DISPID_DYNPROP_MAX 0x5fffffff + +static struct list dispex_data_list = LIST_INIT(dispex_data_list); +static ITypeLib *typelib; +static ITypeInfo *typeinfos[LAST_tid]; + +static REFIID tid_ids[] = { + &IID_IXMLDOMAttribute, + &IID_IXMLDOMCDATASection, + &IID_IXMLDOMComment, + &IID_IXMLDOMDocument2, + &IID_IXMLDOMDocumentFragment, + &IID_IXMLDOMElement, + &IID_IXMLDOMEntityReference, + &IID_IXMLDOMImplementation, + &IID_IXMLDOMNamedNodeMap, + &IID_IXMLDOMNode, + &IID_IXMLDOMNodeList, + &IID_IXMLDOMParseError, + &IID_IXMLDOMProcessingInstruction, + &IID_IXMLDOMSchemaCollection, + &IID_IXMLDOMText, + &IID_IXMLElement, + &IID_IXMLDOMDocument, + &IID_IVBSAXAttributes, + &IID_IVBSAXContentHandler, + &IID_IVBSAXDeclHandler, + &IID_IVBSAXDTDHandler, + &IID_IVBSAXEntityResolver, + &IID_IVBSAXErrorHandler, + &IID_IVBSAXLexicalHandler, + &IID_IVBSAXLocator, + &IID_IVBSAXXMLFilter, + &IID_IVBSAXXMLReader, + &IID_IMXAttributes, + &IID_IMXReaderControl, + &IID_IMXWriter, +}; + +HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo) +{ + HRESULT hres; + + if(!typelib) { + ITypeLib *tl; + + hres = LoadRegTypeLib(&LIBID_MSXML2, 3, 0, LOCALE_SYSTEM_DEFAULT, &tl); + if(FAILED(hres)) { + ERR("LoadRegTypeLib failed: %08x\n", hres); + return hres; + } + + if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) + ITypeLib_Release(tl); + } + + if(!typeinfos[tid]) { + ITypeInfo *typeinfo; + + hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &typeinfo); + if(FAILED(hres)) { + ERR("GetTypeInfoOfGuid failed: %08x\n", hres); + return hres; + } + + if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), typeinfo, NULL)) + ITypeInfo_Release(typeinfo); + } + + *typeinfo = typeinfos[tid]; + + ITypeInfo_AddRef(typeinfos[tid]); + return S_OK; +} + +void release_typelib(void) +{ + dispex_data_t *iter; + unsigned i; + + while(!list_empty(&dispex_data_list)) { + iter = LIST_ENTRY(list_head(&dispex_data_list), dispex_data_t, entry); + list_remove(&iter->entry); + + for(i=0; i < iter->func_cnt; i++) + SysFreeString(iter->funcs[i].name); + + heap_free(iter->funcs); + heap_free(iter->name_table); + heap_free(iter); + } + + if(!typelib) + return; + + for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) + if(typeinfos[i]) + ITypeInfo_Release(typeinfos[i]); + + ITypeLib_Release(typelib); +} + +static void add_func_info(dispex_data_t *data, DWORD *size, tid_t tid, DISPID id, ITypeInfo *dti) +{ + HRESULT hres; + + if(data->func_cnt && data->funcs[data->func_cnt-1].id == id) + return; + + if(data->func_cnt == *size) + data->funcs = heap_realloc(data->funcs, (*size <<= 1)*sizeof(func_info_t)); + + hres = ITypeInfo_GetDocumentation(dti, id, &data->funcs[data->func_cnt].name, NULL, NULL, NULL); + if(FAILED(hres)) + return; + + data->funcs[data->func_cnt].id = id; + data->funcs[data->func_cnt].tid = tid; + + data->func_cnt++; +} + +static int dispid_cmp(const void *p1, const void *p2) +{ + return ((func_info_t*)p1)->id - ((func_info_t*)p2)->id; +} + +static int func_name_cmp(const void *p1, const void *p2) +{ + return strcmpiW((*(func_info_t**)p1)->name, (*(func_info_t**)p2)->name); +} + +static dispex_data_t *preprocess_dispex_data(DispatchEx *This) +{ + const tid_t *tid = This->data->iface_tids; + FUNCDESC *funcdesc; + dispex_data_t *data; + DWORD size = 16, i; + ITypeInfo *ti, *dti; + HRESULT hres; + + TRACE("(%p)\n", This); + + hres = get_typeinfo(This->data->disp_tid, &dti); + if(FAILED(hres)) { + ERR("Could not get disp type info: %08x\n", hres); + return NULL; + } + + data = heap_alloc(sizeof(dispex_data_t)); + data->func_cnt = 0; + data->funcs = heap_alloc(size*sizeof(func_info_t)); + list_add_tail(&dispex_data_list, &data->entry); + + while(*tid) { + hres = get_typeinfo(*tid, &ti); + if(FAILED(hres)) + break; + + i=0; + while(1) { + hres = ITypeInfo_GetFuncDesc(ti, i++, &funcdesc); + if(FAILED(hres)) + break; + + add_func_info(data, &size, *tid, funcdesc->memid, dti); + ITypeInfo_ReleaseFuncDesc(ti, funcdesc); + } + + ITypeInfo_Release(ti); + tid++; + } + + if(!data->func_cnt) { + heap_free(data->funcs); + data->funcs = NULL; + }else if(data->func_cnt != size) { + data->funcs = heap_realloc(data->funcs, data->func_cnt * sizeof(func_info_t)); + } + + qsort(data->funcs, data->func_cnt, sizeof(func_info_t), dispid_cmp); + + if(data->funcs) { + data->name_table = heap_alloc(data->func_cnt * sizeof(func_info_t*)); + for(i=0; i < data->func_cnt; i++) + data->name_table[i] = data->funcs+i; + qsort(data->name_table, data->func_cnt, sizeof(func_info_t*), func_name_cmp); + }else { + data->name_table = NULL; + } + + ITypeInfo_Release(dti); + return data; +} + +static CRITICAL_SECTION cs_dispex_static_data; +static CRITICAL_SECTION_DEBUG cs_dispex_static_data_dbg = +{ + 0, 0, &cs_dispex_static_data, + { &cs_dispex_static_data_dbg.ProcessLocksList, &cs_dispex_static_data_dbg.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": dispex_static_data") } +}; +static CRITICAL_SECTION cs_dispex_static_data = { &cs_dispex_static_data_dbg, -1, 0, 0, 0, 0 }; + + +static dispex_data_t *get_dispex_data(DispatchEx *This) +{ + if(This->data->data) + return This->data->data; + + EnterCriticalSection(&cs_dispex_static_data); + + if(!This->data->data) + This->data->data = preprocess_dispex_data(This); + + LeaveCriticalSection(&cs_dispex_static_data); + + return This->data->data; +} + +static inline BOOL is_custom_dispid(DISPID id) +{ + return MSXML_DISPID_CUSTOM_MIN <= id && id <= MSXML_DISPID_CUSTOM_MAX; +} + +static inline BOOL is_dynamic_dispid(DISPID id) +{ + return DISPID_DYNPROP_0 <= id && id <= DISPID_DYNPROP_MAX; +} + +static inline DispatchEx *impl_from_IDispatchEx(IDispatchEx *iface) +{ + return (DispatchEx*)((char*)iface - FIELD_OFFSET(DispatchEx, lpIDispatchExVtbl)); +} + +static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + + return IUnknown_QueryInterface(This->outer, riid, ppv); +} + +static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + + return IUnknown_AddRef(This->outer); +} + +static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + + return IUnknown_Release(This->outer); +} + +static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + + TRACE("(%p)->(%p)\n", This, pctinfo); + + *pctinfo = 1; + return S_OK; +} + +static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + + TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); + + return get_typeinfo(This->data->disp_tid, ppTInfo); +} + +static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, + LCID lcid, DISPID *rgDispId) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + UINT i; + HRESULT hres; + + TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, + lcid, rgDispId); + + for(i=0; i < cNames; i++) { + hres = IDispatchEx_GetDispID(DISPATCHEX(This), rgszNames[i], 0, rgDispId+i); + if(FAILED(hres)) + return hres; + } + + return S_OK; +} + +static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, + VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + + TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); + + return IDispatchEx_InvokeEx(DISPATCHEX(This), dispIdMember, lcid, wFlags, + pDispParams, pVarResult, pExcepInfo, NULL); +} + +static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + dispex_data_t *data; + int min, max, n, c; + + TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid); + + if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit)) + FIXME("Unsupported grfdex %x\n", grfdex); + + data = get_dispex_data(This); + if(!data) + return E_FAIL; + + min = 0; + max = data->func_cnt-1; + + while(min <= max) { + n = (min+max)/2; + + c = strcmpiW(data->name_table[n]->name, bstrName); + if(!c) { + if((grfdex & fdexNameCaseSensitive) && strcmpW(data->name_table[n]->name, bstrName)) + break; + + *pid = data->name_table[n]->id; + return S_OK; + } + + if(c > 0) + max = n-1; + else + min = n+1; + } + + if(This->dynamic_data) { + unsigned i; + + for(i=0; i < This->dynamic_data->prop_cnt; i++) { + if(!strcmpW(This->dynamic_data->props[i].name, bstrName)) { + *pid = DISPID_DYNPROP_0 + i; + return S_OK; + } + } + } + + if(This->data->vtbl && This->data->vtbl->get_dispid) { + HRESULT hres; + + hres = This->data->vtbl->get_dispid(This->outer, bstrName, grfdex, pid); + if(hres != DISP_E_UNKNOWNNAME) + return hres; + } + + if(grfdex & fdexNameEnsure) { + TRACE("creating dynamic prop %s\n", debugstr_w(bstrName)); + + if(!This->dynamic_data) { + This->dynamic_data = heap_alloc_zero(sizeof(dispex_dynamic_data_t)); + This->dynamic_data->props = heap_alloc(This->dynamic_data->buf_size = 4); + }else if(This->dynamic_data->buf_size == This->dynamic_data->prop_cnt) { + This->dynamic_data->props = heap_realloc(This->dynamic_data->props, This->dynamic_data->buf_size<<=1); + } + + This->dynamic_data->props[This->dynamic_data->prop_cnt].name = heap_strdupW(bstrName); + VariantInit(&This->dynamic_data->props[This->dynamic_data->prop_cnt].var); + *pid = DISPID_DYNPROP_0 + This->dynamic_data->prop_cnt++; + + return S_OK; + } + + TRACE("not found %s\n", debugstr_w(bstrName)); + return DISP_E_UNKNOWNNAME; +} + +static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp, + VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + IUnknown *unk; + ITypeInfo *ti; + dispex_data_t *data; + UINT argerr=0; + int min, max, n; + HRESULT hres; + + TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); + + if(is_custom_dispid(id) && This->data->vtbl && This->data->vtbl->invoke) + return This->data->vtbl->invoke(This->outer, id, lcid, wFlags, pdp, pvarRes, pei); + + if(wFlags == DISPATCH_CONSTRUCT) { + FIXME("DISPATCH_CONSTRUCT not implemented\n"); + return E_NOTIMPL; + } + + if(is_dynamic_dispid(id)) { + DWORD idx = id - DISPID_DYNPROP_0; + VARIANT *var; + + if(!This->dynamic_data || This->dynamic_data->prop_cnt <= idx) + return DISP_E_UNKNOWNNAME; + + var = &This->dynamic_data->props[idx].var; + + switch(wFlags) { + case INVOKE_PROPERTYGET: + return VariantCopy(pvarRes, var); + case INVOKE_PROPERTYPUT: + VariantClear(var); + return VariantCopy(var, pdp->rgvarg); + default: + FIXME("unhandled wFlags %x\n", wFlags); + return E_NOTIMPL; + } + } + + data = get_dispex_data(This); + if(!data) + return E_FAIL; + + min = 0; + max = data->func_cnt-1; + + while(min <= max) { + n = (min+max)/2; + + if(data->funcs[n].id == id) + break; + + if(data->funcs[n].id < id) + min = n+1; + else + max = n-1; + } + + if(min > max) { + WARN("invalid id %x\n", id); + return DISP_E_UNKNOWNNAME; + } + + hres = get_typeinfo(data->funcs[n].tid, &ti); + if(FAILED(hres)) { + ERR("Could not get type info: %08x\n", hres); + return hres; + } + + hres = IUnknown_QueryInterface(This->outer, tid_ids[data->funcs[n].tid], (void**)&unk); + if(FAILED(hres)) { + ERR("Could not get iface: %08x\n", hres); + return E_FAIL; + } + + hres = ITypeInfo_Invoke(ti, unk, id, wFlags, pdp, pvarRes, pei, &argerr); + + ITypeInfo_Release(ti); + IUnknown_Release(unk); + return hres; +} + +static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + FIXME("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex); + return S_OK; +} + +static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + FIXME("(%p)->(%x)\n", This, id); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + FIXME("(%p)->(%x %p)\n", This, id, pbstrName); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + FIXME("(%p)->(%x %x %p)\n", This, grfdex, id, pid); + return E_NOTIMPL; +} + +static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk) +{ + DispatchEx *This = impl_from_IDispatchEx(iface); + FIXME("(%p)->(%p)\n", This, ppunk); + return E_NOTIMPL; +} + +static IDispatchExVtbl DispatchExVtbl = { + DispatchEx_QueryInterface, + DispatchEx_AddRef, + DispatchEx_Release, + DispatchEx_GetTypeInfoCount, + DispatchEx_GetTypeInfo, + DispatchEx_GetIDsOfNames, + DispatchEx_Invoke, + DispatchEx_GetDispID, + DispatchEx_InvokeEx, + DispatchEx_DeleteMemberByName, + DispatchEx_DeleteMemberByDispID, + DispatchEx_GetMemberProperties, + DispatchEx_GetMemberName, + DispatchEx_GetNextDispID, + DispatchEx_GetNameSpaceParent +}; + +BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv) +{ + static const IID IID_UndocumentedScriptIface = + {0x719c3050,0xf9d3,0x11cf,{0xa4,0x93,0x00,0x40,0x05,0x23,0xa8,0xa0}}; + + if(IsEqualGUID(&IID_IDispatch, riid)) { + TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); + *ppv = DISPATCHEX(This); + }else if(IsEqualGUID(&IID_IDispatchEx, riid)) { + TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv); + *ppv = DISPATCHEX(This); + }else if(IsEqualGUID(&IID_UndocumentedScriptIface, riid)) { + TRACE("(%p)->(IID_UndocumentedScriptIface %p) returning NULL\n", This, ppv); + *ppv = NULL; + }else { + return FALSE; + } + + if(*ppv) + IUnknown_AddRef((IUnknown*)*ppv); + return TRUE; +} + +void init_dispex(DispatchEx *dispex, IUnknown *outer, dispex_static_data_t *data) +{ + dispex->lpIDispatchExVtbl = &DispatchExVtbl; + dispex->outer = outer; + dispex->data = data; +} diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c dissimilarity index 61% index 8a1496f5ea7..b301ab75239 100644 --- a/dlls/msxml3/main.c +++ b/dlls/msxml3/main.c @@ -1,204 +1,82 @@ -/* - * MSXML Class Factory - * - * Copyright 2002 Lionel Ulmer - * Copyright 2005 Mike McCormack - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "config.h" - -#define COBJMACROS - -#include -#include "windef.h" -#include "winbase.h" -#include "winuser.h" -#include "ole2.h" -#include "msxml.h" -#include "msxml2.h" - -#include "wine/debug.h" - -#include "msxml_private.h" - -#ifdef HAVE_LIBXSLT -#include -#endif - -WINE_DEFAULT_DEBUG_CHANNEL(msxml); - -static HINSTANCE hInstance; -static ITypeLib *typelib; -static ITypeInfo *typeinfos[LAST_tid]; - -static REFIID tid_ids[] = { - &IID_IXMLDOMAttribute, - &IID_IXMLDOMCDATASection, - &IID_IXMLDOMComment, - &IID_IXMLDOMDocument2, - &IID_IXMLDOMDocumentFragment, - &IID_IXMLDOMElement, - &IID_IXMLDOMEntityReference, - &IID_IXMLDOMImplementation, - &IID_IXMLDOMNamedNodeMap, - &IID_IXMLDOMNode, - &IID_IXMLDOMNodeList, - &IID_IXMLDOMParseError, - &IID_IXMLDOMProcessingInstruction, - &IID_IXMLDOMSchemaCollection, - &IID_IXMLDOMText, - &IID_IXMLElement, - &IID_IXMLDOMDocument, - &IID_IVBSAXAttributes, - &IID_IVBSAXContentHandler, - &IID_IVBSAXDeclHandler, - &IID_IVBSAXDTDHandler, - &IID_IVBSAXEntityResolver, - &IID_IVBSAXErrorHandler, - &IID_IVBSAXLexicalHandler, - &IID_IVBSAXLocator, - &IID_IVBSAXXMLFilter, - &IID_IVBSAXXMLReader, - &IID_IMXAttributes, - &IID_IMXReaderControl, - &IID_IMXWriter, -}; - -HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo) -{ - HRESULT hres; - - if(!typelib) { - ITypeLib *tl; - - hres = LoadRegTypeLib(&LIBID_MSXML2, 3, 0, LOCALE_SYSTEM_DEFAULT, &tl); - if(FAILED(hres)) { - ERR("LoadRegTypeLib failed: %08x\n", hres); - return hres; - } - - if(InterlockedCompareExchangePointer((void**)&typelib, tl, NULL)) - ITypeLib_Release(tl); - } - - if(!typeinfos[tid]) { - ITypeInfo *typeinfo; - - hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &typeinfo); - if(FAILED(hres)) { - ERR("GetTypeInfoOfGuid failed: %08x\n", hres); - return hres; - } - - if(InterlockedCompareExchangePointer((void**)(typeinfos+tid), typeinfo, NULL)) - ITypeInfo_Release(typeinfo); - } - - *typeinfo = typeinfos[tid]; - - ITypeInfo_AddRef(typeinfos[tid]); - return S_OK; -} - -static CRITICAL_SECTION MSXML3_typelib_cs; -static CRITICAL_SECTION_DEBUG MSXML3_typelib_cs_debug = -{ - 0, 0, &MSXML3_typelib_cs, - { &MSXML3_typelib_cs_debug.ProcessLocksList, - &MSXML3_typelib_cs_debug.ProcessLocksList }, - 0, 0, { (DWORD_PTR)(__FILE__ ": MSXML3_typelib_cs") } -}; -static CRITICAL_SECTION MSXML3_typelib_cs = { &MSXML3_typelib_cs_debug, -1, 0, 0, 0, 0 }; - -ITypeLib *get_msxml3_typelib( LPWSTR *path ) -{ - static WCHAR msxml3_path[MAX_PATH]; - - EnterCriticalSection( &MSXML3_typelib_cs ); - - if (!typelib) - { - TRACE("loading typelib\n"); - - if (GetModuleFileNameW( hInstance, msxml3_path, MAX_PATH )) - LoadTypeLib( msxml3_path, &typelib ); - } - - LeaveCriticalSection( &MSXML3_typelib_cs ); - - if (path) - *path = msxml3_path; - - if (typelib) - ITypeLib_AddRef( typelib ); - - return typelib; -} - -static void process_detach(void) -{ - if(typelib) { - unsigned i; - - for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) - if(typeinfos[i]) - ITypeInfo_Release(typeinfos[i]); - - ITypeLib_Release(typelib); - } -} - -HRESULT WINAPI DllCanUnloadNow(void) -{ - FIXME("\n"); - return S_FALSE; -} - -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) -{ - switch(fdwReason) - { - case DLL_PROCESS_ATTACH: -#ifdef HAVE_LIBXML2 - xmlInitParser(); - - /* Set the default indent character to a single tab. */ - xmlThrDefTreeIndentString("\t"); -#endif -#ifdef HAVE_XSLTINIT - xsltInit(); -#endif - -#ifdef HAVE_LIBXML2 - /* Set the current ident to the default */ - xmlTreeIndentString = "\t"; -#endif - hInstance = hInstDLL; - DisableThreadLibraryCalls(hInstDLL); - break; - case DLL_PROCESS_DETACH: -#ifdef HAVE_LIBXSLT - xsltCleanupGlobals(); -#endif -#ifdef HAVE_LIBXML2 - xmlCleanupParser(); -#endif - process_detach(); - break; - } - return TRUE; -} +/* + * MSXML Class Factory + * + * Copyright 2002 Lionel Ulmer + * Copyright 2005 Mike McCormack + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#define COBJMACROS + +#include +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "msxml.h" +#include "msxml2.h" + +#include "wine/debug.h" + +#include "msxml_private.h" + +#ifdef HAVE_LIBXSLT +#include +#endif + +WINE_DEFAULT_DEBUG_CHANNEL(msxml); + +HRESULT WINAPI DllCanUnloadNow(void) +{ + FIXME("\n"); + return S_FALSE; +} + +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) +{ + switch(fdwReason) + { + case DLL_PROCESS_ATTACH: +#ifdef HAVE_LIBXML2 + xmlInitParser(); + + /* Set the default indent character to a single tab. */ + xmlThrDefTreeIndentString("\t"); +#endif +#ifdef HAVE_XSLTINIT + xsltInit(); +#endif + +#ifdef HAVE_LIBXML2 + /* Set the current ident to the default */ + xmlTreeIndentString = "\t"; +#endif + DisableThreadLibraryCalls(hInstDLL); + break; + case DLL_PROCESS_DETACH: +#ifdef HAVE_LIBXSLT + xsltCleanupGlobals(); +#endif +#ifdef HAVE_LIBXML2 + xmlCleanupParser(); +#endif + release_typelib(); + break; + } + return TRUE; +} diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h index d065e3b553c..ae3a4e6cbd2 100644 --- a/dlls/msxml3/msxml_private.h +++ b/dlls/msxml3/msxml_private.h @@ -21,6 +21,10 @@ #ifndef __MSXML_PRIVATE__ #define __MSXML_PRIVATE__ +#include "dispex.h" + +#include "wine/unicode.h" + #ifndef __WINE_CONFIG_H # error You must include config.h to use this header #endif @@ -99,7 +103,7 @@ HRESULT bind_url(LPCWSTR, HRESULT (*onDataAvailable)(void*,char*,DWORD), void*, void detach_bsc(bsc_t*); /* typelibs */ -enum tid_t { +typedef enum tid_t { IXMLDOMAttribute_tid, IXMLDOMCDATASection_tid, IXMLDOMComment_tid, @@ -131,9 +135,76 @@ enum tid_t { IMXReaderControl_tid, IMXWriter_tid, LAST_tid -}; +} tid_t; + +extern HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo); +extern void release_typelib(void); + +typedef struct dispex_data_t dispex_data_t; +typedef struct dispex_dynamic_data_t dispex_dynamic_data_t; + +#define MSXML_DISPID_CUSTOM_MIN 0x60000000 +#define MSXML_DISPID_CUSTOM_MAX 0x6fffffff + +typedef struct { + HRESULT (*get_dispid)(IUnknown*,BSTR,DWORD,DISPID*); + HRESULT (*invoke)(IUnknown*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*); +} dispex_static_data_vtbl_t; + +typedef struct { + const dispex_static_data_vtbl_t *vtbl; + const tid_t disp_tid; + dispex_data_t *data; + const tid_t* const iface_tids; +} dispex_static_data_t; + +typedef struct { + const IDispatchExVtbl *lpIDispatchExVtbl; + + IUnknown *outer; + + dispex_static_data_t *data; + dispex_dynamic_data_t *dynamic_data; +} DispatchEx; + +void init_dispex(DispatchEx*,IUnknown*,dispex_static_data_t*); +BOOL dispex_query_interface(DispatchEx*,REFIID,void**); + +/* memory allocation functions */ + +static inline void *heap_alloc(size_t len) +{ + return HeapAlloc(GetProcessHeap(), 0, len); +} -extern HRESULT get_typeinfo(enum tid_t tid, ITypeInfo **typeinfo); -extern ITypeLib *get_msxml3_typelib( LPWSTR *path ); +static inline void *heap_alloc_zero(size_t len) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); +} + +static inline void *heap_realloc(void *mem, size_t len) +{ + return HeapReAlloc(GetProcessHeap(), 0, mem, len); +} + +static inline BOOL heap_free(void *mem) +{ + return HeapFree(GetProcessHeap(), 0, mem); +} + +static inline LPWSTR heap_strdupW(LPCWSTR str) +{ + LPWSTR ret = NULL; + + if(str) { + DWORD size; + + size = (strlenW(str)+1)*sizeof(WCHAR); + ret = heap_alloc(size); + memcpy(ret, str, size); + } + + return ret; +} #endif /* __MSXML_PRIVATE__ */ diff --git a/dlls/msxml3/queryresult.c b/dlls/msxml3/queryresult.c index 1b2070e89cb..8b7836279a3 100644 --- a/dlls/msxml3/queryresult.c +++ b/dlls/msxml3/queryresult.c @@ -50,10 +50,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(msxml); #include -static const struct IXMLDOMNodeListVtbl queryresult_vtbl; - typedef struct _queryresult { + DispatchEx dispex; const struct IXMLDOMNodeListVtbl *lpVtbl; LONG ref; xmlNodePtr node; @@ -66,67 +65,27 @@ static inline queryresult *impl_from_IXMLDOMNodeList( IXMLDOMNodeList *iface ) return (queryresult *)((char*)iface - FIELD_OFFSET(queryresult, lpVtbl)); } -HRESULT queryresult_create(xmlNodePtr node, LPWSTR szQuery, IXMLDOMNodeList **out) -{ - queryresult *This = CoTaskMemAlloc(sizeof(queryresult)); - xmlXPathContextPtr ctxt = xmlXPathNewContext(node->doc); - xmlChar *str = xmlChar_from_wchar(szQuery); - HRESULT hr; - - - TRACE("(%p, %s, %p)\n", node, wine_dbgstr_w(szQuery), out); - - *out = NULL; - if (This == NULL || ctxt == NULL || str == NULL) - { - hr = E_OUTOFMEMORY; - goto cleanup; - } - - This->lpVtbl = &queryresult_vtbl; - This->ref = 1; - This->resultPos = 0; - This->node = node; - xmldoc_add_ref(This->node->doc); - - ctxt->node = node; - This->result = xmlXPathEval(str, ctxt); - if (!This->result || This->result->type != XPATH_NODESET) - { - hr = E_FAIL; - goto cleanup; - } - - *out = (IXMLDOMNodeList *)This; - hr = S_OK; - TRACE("found %d matches\n", xmlXPathNodeSetGetLength(This->result->nodesetval)); - -cleanup: - if (This != NULL && FAILED(hr)) - IXMLDOMNodeList_Release( (IXMLDOMNodeList*) &This->lpVtbl ); - if (ctxt != NULL) - xmlXPathFreeContext(ctxt); - HeapFree(GetProcessHeap(), 0, str); - return hr; -} - - static HRESULT WINAPI queryresult_QueryInterface( IXMLDOMNodeList *iface, REFIID riid, void** ppvObject ) { + queryresult *This = impl_from_IXMLDOMNodeList( iface ); + TRACE("%p %s %p\n", iface, debugstr_guid(riid), ppvObject); if(!ppvObject) return E_INVALIDARG; if ( IsEqualGUID( riid, &IID_IUnknown ) || - IsEqualGUID( riid, &IID_IDispatch ) || IsEqualGUID( riid, &IID_IXMLDOMNodeList ) ) { *ppvObject = iface; } + else if(dispex_query_interface(&This->dispex, riid, ppvObject)) + { + return *ppvObject ? S_OK : E_NOINTERFACE; + } else { FIXME("interface %s not implemented\n", debugstr_guid(riid)); @@ -157,7 +116,7 @@ static ULONG WINAPI queryresult_Release( { xmlXPathFreeObject(This->result); xmldoc_release(This->node->doc); - CoTaskMemFree(This); + heap_free(This); } return ref; @@ -343,4 +302,61 @@ static const struct IXMLDOMNodeListVtbl queryresult_vtbl = queryresult__newEnum, }; +static const tid_t queryresult_iface_tids[] = { + IXMLDOMNodeList_tid, + 0 +}; +static dispex_static_data_t queryresult_dispex = { + NULL, + IXMLDOMNodeList_tid, + NULL, + queryresult_iface_tids +}; + +HRESULT queryresult_create(xmlNodePtr node, LPWSTR szQuery, IXMLDOMNodeList **out) +{ + queryresult *This = heap_alloc_zero(sizeof(queryresult)); + xmlXPathContextPtr ctxt = xmlXPathNewContext(node->doc); + xmlChar *str = xmlChar_from_wchar(szQuery); + HRESULT hr; + + + TRACE("(%p, %s, %p)\n", node, wine_dbgstr_w(szQuery), out); + + *out = NULL; + if (This == NULL || ctxt == NULL || str == NULL) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + This->lpVtbl = &queryresult_vtbl; + This->ref = 1; + This->resultPos = 0; + This->node = node; + xmldoc_add_ref(This->node->doc); + + ctxt->node = node; + This->result = xmlXPathEval(str, ctxt); + if (!This->result || This->result->type != XPATH_NODESET) + { + hr = E_FAIL; + goto cleanup; + } + + init_dispex(&This->dispex, (IUnknown*)&This->lpVtbl, &queryresult_dispex); + + *out = (IXMLDOMNodeList *) &This->lpVtbl; + hr = S_OK; + TRACE("found %d matches\n", xmlXPathNodeSetGetLength(This->result->nodesetval)); + +cleanup: + if (This != NULL && FAILED(hr)) + IXMLDOMNodeList_Release( (IXMLDOMNodeList*) &This->lpVtbl ); + if (ctxt != NULL) + xmlXPathFreeContext(ctxt); + HeapFree(GetProcessHeap(), 0, str); + return hr; +} + #endif diff --git a/dlls/msxml3/regsvr.c b/dlls/msxml3/regsvr.c index 05bf74d1d6f..320d51e280d 100644 --- a/dlls/msxml3/regsvr.c +++ b/dlls/msxml3/regsvr.c @@ -663,7 +663,7 @@ HRESULT WINAPI DllRegisterServer(void) { HRESULT hr; ITypeLib *tl; - LPWSTR path = NULL; + static const WCHAR wszMsXml3[] = {'m','s','x','m','l','3','.','d','l','l',0}; TRACE("\n"); @@ -673,14 +673,12 @@ HRESULT WINAPI DllRegisterServer(void) if (SUCCEEDED(hr)) hr = register_progids(progid_list); - tl = get_msxml3_typelib( &path ); - if (tl) - { - hr = RegisterTypeLib( tl, path, NULL ); - ITypeLib_Release( tl ); + if(SUCCEEDED(hr)) { + + hr = LoadTypeLibEx(wszMsXml3, REGKIND_REGISTER, &tl); + if(SUCCEEDED(hr)) + ITypeLib_Release(tl); } - else - hr = E_FAIL; return hr; } @@ -699,8 +697,8 @@ HRESULT WINAPI DllUnregisterServer(void) hr = unregister_interfaces(interface_list); if (SUCCEEDED(hr)) hr = unregister_progids(progid_list); - if (SUCCEEDED(hr)) - hr = UnRegisterTypeLib(&LIBID_MSXML2, 3, 0, LOCALE_SYSTEM_DEFAULT, SYS_WIN32); + if (SUCCEEDED(hr)) + hr = UnRegisterTypeLib(&LIBID_MSXML2, 3, 0, LOCALE_SYSTEM_DEFAULT, SYS_WIN32); return hr; } diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 8d64804adc7..8a48882ad4b 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -26,6 +26,7 @@ #include "ole2.h" #include "xmldom.h" #include "msxml2.h" +#include "dispex.h" #include #include @@ -1298,6 +1299,7 @@ static void test_refs(void) r = IXMLDOMElement_get_childNodes( element, &node_list ); ok( r == S_OK, "rets %08x\n", r); + ref = IXMLDOMNodeList_AddRef( node_list ); ok( ref == 2, "ref %d\n", ref ); IXMLDOMNodeList_Release( node_list ); @@ -1518,6 +1520,7 @@ static void test_getElementsByTagName(void) VARIANT_BOOL b; IXMLDOMDocument *doc; IXMLDOMNodeList *node_list; + IDispatchEx *dispex; long len; r = CoCreateInstance( &CLSID_DOMDocument, NULL, @@ -1537,6 +1540,13 @@ static void test_getElementsByTagName(void) r = IXMLDOMNodeList_get_length( node_list, &len ); ok( r == S_OK, "ret %08x\n", r ); ok( len == 6, "len %ld\n", len ); + + r = IXMLDOMNodeList_QueryInterface( node_list, &IID_IDispatchEx, (void**)&dispex ); + ok( r == S_OK, "rets %08x\n", r); + if( r == S_OK ) + IDispatchEx_Release( dispex ); + + IXMLDOMNodeList_Release( node_list ); SysFreeString( str ); diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c index 6767924ac39..d4fb6f7aa7c 100644 --- a/dlls/msxml3/tests/schema.c +++ b/dlls/msxml3/tests/schema.c @@ -26,6 +26,7 @@ #include "ole2.h" #include "xmldom.h" #include "msxml2.h" +#include "dispex.h" #include "wine/test.h" diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index 228ad1c6f65..2895408842a 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -368,6 +368,10 @@ static void test_VarFormat(void) VARFMT(VT_R8,V_R8,1.0001e-27,"##00.0000e-0",S_OK,"1000.1000e-30"); VARFMT(VT_R8,V_R8,47.11,".0000E+0",S_OK,".4711E+2"); VARFMT(VT_R8,V_R8,3.0401e-13,"#####.####e-0%",S_OK,"30401.e-15%"); + VARFMT(VT_R8,V_R8,1.57,"0.00",S_OK,"1.57"); + todo_wine { + VARFMT(VT_R8,V_R8,-1.57,"0.00",S_OK,"-1.57"); + } /* 'out' is not cleared */ diff --git a/dlls/rasapi32/tests/rasapi.c b/dlls/rasapi32/tests/rasapi.c index da733a134da..bcd43100537 100644 --- a/dlls/rasapi32/tests/rasapi.c +++ b/dlls/rasapi32/tests/rasapi.c @@ -106,8 +106,9 @@ static void test_rasenum(void) rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); cb = 0; result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(result == ERROR_BUFFER_TOO_SMALL, - "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); + ok(result == ERROR_BUFFER_TOO_SMALL || + result == ERROR_INVALID_SIZE, /* vista, 2k8 */ + "Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08d\n", result); rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); cb = bufsize -1; diff --git a/dlls/shell32/shell32_Cn.rc b/dlls/shell32/shell32_Cn.rc index 3c65a63c9c1..2e2bbf32073 100644 --- a/dlls/shell32/shell32_Cn.rc +++ b/dlls/shell32/shell32_Cn.rc @@ -26,40 +26,40 @@ MENU_SHV_FILE MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&Select" FCIDM_SHVIEW_OPEN - MENUITEM "E&xplore", FCIDM_SHVIEW_EXPLORE - MENUITEM "&Open", FCIDM_SHVIEW_OPEN + MENUITEM "Ñ¡Ôñ(&S)" FCIDM_SHVIEW_OPEN + MENUITEM "Îļþ¹ÜÀíÆ÷(&x)",FCIDM_SHVIEW_EXPLORE + MENUITEM "´ò¿ª(&O)", FCIDM_SHVIEW_OPEN MENUITEM SEPARATOR - MENUITEM "C&ut", FCIDM_SHVIEW_CUT - MENUITEM "&Copy", FCIDM_SHVIEW_COPY + MENUITEM "¼ôÇÐ(&u)", FCIDM_SHVIEW_CUT + MENUITEM "¸´ÖÆ(&C)", FCIDM_SHVIEW_COPY MENUITEM SEPARATOR - MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK - MENUITEM "&Delete", FCIDM_SHVIEW_DELETE - MENUITEM "&Rename", FCIDM_SHVIEW_RENAME + MENUITEM "Éú³ÉÁ¬½Ó(&L)", FCIDM_SHVIEW_CREATELINK + MENUITEM "ɾ³ý(&D)", FCIDM_SHVIEW_DELETE + MENUITEM "¸ÄÃû(&R)", FCIDM_SHVIEW_RENAME MENUITEM SEPARATOR - MENUITEM "&Properties", FCIDM_SHVIEW_PROPERTIES + MENUITEM "ÊôÐÔ(&P)", FCIDM_SHVIEW_PROPERTIES END END MENU_CPANEL MENU BEGIN - POPUP "&File" + POPUP "Îļþ(&F)" BEGIN MENUITEM SEPARATOR - MENUITEM "E&xit", IDM_CPANEL_EXIT + MENUITEM "Í˳ö(&x)", IDM_CPANEL_EXIT END - POPUP "&View" + POPUP "²é¿´(&V)" BEGIN - MENUITEM "Lar&ge Icons", FCIDM_SHVIEW_BIGICON - MENUITEM "S&mall Icons", FCIDM_SHVIEW_SMALLICON - MENUITEM "&List", FCIDM_SHVIEW_LISTVIEW - MENUITEM "&Details", FCIDM_SHVIEW_REPORTVIEW + MENUITEM "´óͼ±ê(&g)", FCIDM_SHVIEW_BIGICON + MENUITEM "Сͼ±ê(&m)", FCIDM_SHVIEW_SMALLICON + MENUITEM "Áбí(&L)", FCIDM_SHVIEW_LISTVIEW + MENUITEM "ÏêÇé(&D)", FCIDM_SHVIEW_REPORTVIEW END - POPUP "&Help" + POPUP "°ïÖú(&H)" BEGIN - MENUITEM "&About Control Panel...", IDM_CPANEL_ABOUT + MENUITEM "¹ØÓÚ¿ØÖÆÃæ°å(&A)...", IDM_CPANEL_ABOUT END END @@ -69,13 +69,13 @@ CAPTION " FONT 10, "MS Shell Dlg" { DEFPUSHBUTTON "È·¶¨", IDOK, 153, 133, 60, 12, WS_TABSTOP - PUSHBUTTON "Wine &license...", IDC_ABOUT_LICENSE, 153, 113, 60, 12, WS_TABSTOP + PUSHBUTTON "ʹÓÃÐí¿É(&l)...", IDC_ABOUT_LICENSE, 153, 113, 60, 12, WS_TABSTOP LISTBOX IDC_ABOUT_LISTBOX, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER ICON "", stc1, 10, 10, 30, 30 LTEXT "", IDC_ABOUT_STATIC_TEXT1, 40, 10, 170, 10 LTEXT "", IDC_ABOUT_STATIC_TEXT2, 40, 22, 170, 10 - LTEXT "Running on %s", IDC_ABOUT_STATIC_TEXT3, 42, 34, 170, 10 - LTEXT "Wine was brought to you by:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10 + LTEXT "ÔËÐÐÓÚ %s", IDC_ABOUT_STATIC_TEXT3, 42, 34, 170, 10 + LTEXT "Wine ¿ª·¢ÈËÔ±:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10 } SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95 @@ -102,12 +102,12 @@ BEGIN IDS_SHV_COLUMN5 "ÊôÐÔ" IDS_SHV_COLUMN6 "ʹÓÿռä" IDS_SHV_COLUMN7 "Ê£Óà¿Õ¼ä" - IDS_SHV_COLUMN8 "Name" /*FIXME*/ - IDS_SHV_COLUMN9 "Comments" /*FIXME*/ + IDS_SHV_COLUMN8 "Ãû³Æ" + IDS_SHV_COLUMN9 "±¸×¢" - IDS_CPANEL_TITLE "Wine Control Panel" - IDS_CPANEL_NAME "Name" - IDS_CPANEL_DESCRIPTION "Description" + IDS_CPANEL_TITLE "Wine ¿ØÖÆÃæ°å" + IDS_CPANEL_NAME "Ãû³Æ" + IDS_CPANEL_DESCRIPTION "ÃèÊö" END #pragma code_page(default) diff --git a/dlls/user32/resources/user32_Zh.rc b/dlls/user32/resources/user32_Zh.rc index 070e45d67c2..663df125fb2 100644 --- a/dlls/user32/resources/user32_Zh.rc +++ b/dlls/user32/resources/user32_Zh.rc @@ -30,7 +30,7 @@ SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE MENUITEM SEPARATOR MENUITEM "Çл»µ½(&S)...\tCtrl-Esc", 61744 MENUITEM SEPARATOR - MENUITEM "&About Wine...", 61761 + MENUITEM "¹ØÓÚWine (&A)...", 61761 } EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE @@ -60,9 +60,9 @@ BEGIN PUSHBUTTON "ºöÂÔ(&I)", 5, 208, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "ÊÇ(&Y)", 6, 256, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "·ñ(&N)", 7, 304, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Try Again", 10, 352, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "&Continue", 11, 400, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Help", 9, 448, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "ÔÙÊÔ(&T)", 10, 352, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "¼ÌÐø(&C)", 11, 400, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "°ïÖú", 9, 448, 56, 40, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END MDI_MOREWINDOWS DIALOG FIXED IMPURE 20, 20, 232, 122 @@ -77,7 +77,7 @@ END STRINGTABLE DISCARDABLE { - IDS_ERROR "Error" + IDS_ERROR "´íÎó" IDS_MDI_MOREWINDOWS "¸ü¶à´°¿Ú(&M)..." /* defined in mdi.h */ } @@ -96,7 +96,7 @@ SYSMENU MENU LOADONCALL MOVEABLE DISCARDABLE MENUITEM SEPARATOR MENUITEM "ÇГQµ½(&S)...\tCtrl-Esc", 61744 MENUITEM SEPARATOR - MENUITEM "&About Wine...", 61761 + MENUITEM "¹ØÓÚWine (&A)...", 61761 } EDITMENU MENU LOADONCALL MOVEABLE DISCARDABLE diff --git a/dlls/winealsa.drv/waveout.c b/dlls/winealsa.drv/waveout.c index 6dfb0882211..8f18d3c1660 100644 --- a/dlls/winealsa.drv/waveout.c +++ b/dlls/winealsa.drv/waveout.c @@ -571,8 +571,8 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) snd_pcm_access_t access; snd_pcm_format_t format = -1; unsigned int rate; - unsigned int buffer_time = 500000; - unsigned int period_time = 10000; + unsigned int buffer_time = 120000; + unsigned int period_time = 20000; snd_pcm_uframes_t buffer_size; snd_pcm_uframes_t period_size; snd_pcm_uframes_t boundary; diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 17d071409b1..6a05434ffb0 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -485,6 +485,13 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar TRACE("Successfully created new context %p\n", ret); + ret->fbo_color_attachments = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DSurface *) * GL_LIMITS(buffers)); + if (!ret->fbo_color_attachments) + { + ERR("Out of memory!\n"); + goto out; + } + /* Set up the context defaults */ oldCtx = pwglGetCurrentContext(); oldDrawable = pwglGetCurrentDC(); @@ -576,8 +583,11 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar } This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE); -out: return ret; + +out: + HeapFree(GetProcessHeap(), 0, ret->fbo_color_attachments); + return NULL; } /***************************************************************************** @@ -642,6 +652,20 @@ void DestroyContext(IWineD3DDeviceImpl *This, WineD3DContext *context) { last_device = NULL; } + /* FIXME: We probably need an active context to do this... */ + if (context->fbo) { + GL_EXTCALL(glDeleteFramebuffersEXT(1, &context->fbo)); + } + if (context->src_fbo) { + GL_EXTCALL(glDeleteFramebuffersEXT(1, &context->src_fbo)); + } + if (context->dst_fbo) { + GL_EXTCALL(glDeleteFramebuffersEXT(1, &context->dst_fbo)); + } + + HeapFree(GetProcessHeap(), 0, context->fbo_color_attachments); + context->fbo_color_attachments = NULL; + if(context->isPBuffer) { GL_EXTCALL(wglReleasePbufferDCARB(context->pbuffer, context->hdc)); GL_EXTCALL(wglDestroyPbufferARB(context->pbuffer)); @@ -1195,7 +1219,7 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { if (This->render_offscreen) { FIXME("Activating for CTXUSAGE_BLIT for an offscreen target with ORM_FBO. This should be avoided.\n"); - bind_fbo((IWineD3DDevice *)This, GL_FRAMEBUFFER_EXT, &This->dst_fbo); + bind_fbo((IWineD3DDevice *)This, GL_FRAMEBUFFER_EXT, &context->dst_fbo); attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, target); GL_EXTCALL(glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0)); checkGLcall("glFramebufferRenderbufferEXT"); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 2263fd88eb5..d778c98fa64 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -7,7 +7,7 @@ * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber * Copyright 2006-2008 Stefan Dösinger for CodeWeavers - * Copyright 2006-2007 Henri Verbeet + * Copyright 2006-2008 Henri Verbeet * Copyright 2007 Andrew Riedi * * This library is free software; you can redistribute it and/or @@ -163,16 +163,6 @@ static ULONG WINAPI IWineD3DDeviceImpl_Release(IWineD3DDevice *iface) { TRACE("(%p) : Releasing from %d\n", This, refCount + 1); if (!refCount) { - if (This->fbo) { - GL_EXTCALL(glDeleteFramebuffersEXT(1, &This->fbo)); - } - if (This->src_fbo) { - GL_EXTCALL(glDeleteFramebuffersEXT(1, &This->src_fbo)); - } - if (This->dst_fbo) { - GL_EXTCALL(glDeleteFramebuffersEXT(1, &This->dst_fbo)); - } - /* TODO: Clean up all the surfaces and textures! */ /* NOTE: You must release the parent if the object was created via a callback ** ***************************/ @@ -1329,8 +1319,7 @@ static void WINAPI IWineD3DDeviceImpl_SetupFullscreenWindow(IWineD3DDevice *ifac /* Inform the window about the update. */ SetWindowPos(window, HWND_TOP, 0, 0, - w, h, SWP_FRAMECHANGED); - ShowWindow(window, SW_NORMAL); + w, h, SWP_FRAMECHANGED | SWP_SHOWWINDOW); } /***************************************************************************** @@ -2091,12 +2080,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR } This->render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DSurface *) * GL_LIMITS(buffers)); - This->fbo_color_attachments = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IWineD3DSurface *) * GL_LIMITS(buffers)); This->draw_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GLenum) * GL_LIMITS(buffers)); This->NumberOfPalettes = 1; This->palettes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PALETTEENTRY*)); - if(!This->palettes || !This->render_targets || !This->fbo_color_attachments || !This->draw_buffers) { + if(!This->palettes || !This->render_targets || !This->draw_buffers) { ERR("Out of memory!\n"); goto err_out; } @@ -2242,7 +2230,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR err_out: HeapFree(GetProcessHeap(), 0, This->render_targets); - HeapFree(GetProcessHeap(), 0, This->fbo_color_attachments); HeapFree(GetProcessHeap(), 0, This->draw_buffers); HeapFree(GetProcessHeap(), 0, This->swapchains); This->NumberOfSwapChains = 0; @@ -2425,10 +2412,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface, D3DCB_D This->NumberOfPalettes = 0; HeapFree(GetProcessHeap(), 0, This->render_targets); - HeapFree(GetProcessHeap(), 0, This->fbo_color_attachments); HeapFree(GetProcessHeap(), 0, This->draw_buffers); This->render_targets = NULL; - This->fbo_color_attachments = NULL; This->draw_buffers = NULL; This->d3d_initialized = FALSE; @@ -3159,8 +3144,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetClipStatus(IWineD3DDevice *iface, static HRESULT WINAPI IWineD3DDeviceImpl_SetMaterial(IWineD3DDevice *iface, CONST WINED3DMATERIAL* pMaterial) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - if (!pMaterial) return WINED3DERR_INVALIDCALL; - This->updateStateBlock->changed.material = TRUE; This->updateStateBlock->material = *pMaterial; @@ -6217,7 +6200,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONS ActivateContext(This, This->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD); ENTER_GL(); - bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->dst_fbo); + bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->activeContext->dst_fbo); attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, 0, surface); GL_EXTCALL(glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, 0)); checkGLcall("glFramebufferRenderbufferEXT"); @@ -6249,7 +6232,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface, CONS checkGLcall("glClear"); if (This->render_offscreen) { - bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->fbo); + bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->activeContext->fbo); } else { GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)); checkGLcall("glBindFramebuffer()"); @@ -6557,13 +6540,13 @@ static void check_fbo_status(IWineD3DDevice *iface) { /* Dump the FBO attachments */ for (i = 0; i < GL_LIMITS(buffers); ++i) { - attachment = (IWineD3DSurfaceImpl *)This->fbo_color_attachments[i]; + attachment = (IWineD3DSurfaceImpl *)This->activeContext->fbo_color_attachments[i]; if (attachment) { FIXME("\tColor attachment %d: (%p) %s %ux%u\n", i, attachment, debug_d3dformat(attachment->resource.format), attachment->pow2Width, attachment->pow2Height); } } - attachment = (IWineD3DSurfaceImpl *)This->fbo_depth_attachment; + attachment = (IWineD3DSurfaceImpl *)This->activeContext->fbo_depth_attachment; if (attachment) { FIXME("\tDepth attachment: (%p) %s %ux%u\n", attachment, debug_d3dformat(attachment->resource.format), attachment->pow2Width, attachment->pow2Height); @@ -6589,22 +6572,23 @@ static BOOL depth_mismatch_fbo(IWineD3DDevice *iface) { void apply_fbo_state(IWineD3DDevice *iface) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; + WineD3DContext *context = This->activeContext; unsigned int i; if (This->render_offscreen) { - bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->fbo); + bind_fbo(iface, GL_FRAMEBUFFER_EXT, &context->fbo); /* Apply render targets */ for (i = 0; i < GL_LIMITS(buffers); ++i) { IWineD3DSurface *render_target = This->render_targets[i]; - if (This->fbo_color_attachments[i] != render_target) { + if (context->fbo_color_attachments[i] != render_target) { set_render_target_fbo(iface, i, render_target); - This->fbo_color_attachments[i] = render_target; + context->fbo_color_attachments[i] = render_target; } } /* Apply depth targets */ - if (This->fbo_depth_attachment != This->stencilBufferTarget || depth_mismatch_fbo(iface)) { + if (context->fbo_depth_attachment != This->stencilBufferTarget || depth_mismatch_fbo(iface)) { unsigned int w = ((IWineD3DSurfaceImpl *)This->render_targets[0])->pow2Width; unsigned int h = ((IWineD3DSurfaceImpl *)This->render_targets[0])->pow2Height; @@ -6612,7 +6596,7 @@ void apply_fbo_state(IWineD3DDevice *iface) { surface_set_compatible_renderbuffer(This->stencilBufferTarget, w, h); } set_depth_stencil_fbo(iface, This->stencilBufferTarget); - This->fbo_depth_attachment = This->stencilBufferTarget; + context->fbo_depth_attachment = This->stencilBufferTarget; } } else { GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)); @@ -6679,7 +6663,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED } else { TRACE("Source surface %p is offscreen\n", src_surface); ENTER_GL(); - bind_fbo(iface, GL_READ_FRAMEBUFFER_EXT, &This->src_fbo); + bind_fbo(iface, GL_READ_FRAMEBUFFER_EXT, &This->activeContext->src_fbo); attach_surface_fbo(This, GL_READ_FRAMEBUFFER_EXT, 0, src_surface); glReadBuffer(GL_COLOR_ATTACHMENT0_EXT); checkGLcall("glReadBuffer()"); @@ -6727,7 +6711,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED } ENTER_GL(); - bind_fbo(iface, GL_DRAW_FRAMEBUFFER_EXT, &This->dst_fbo); + bind_fbo(iface, GL_DRAW_FRAMEBUFFER_EXT, &This->activeContext->dst_fbo); attach_surface_fbo(This, GL_DRAW_FRAMEBUFFER_EXT, 0, dst_surface); glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT); checkGLcall("glDrawBuffer()"); @@ -6750,7 +6734,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED IWineD3DSurface_ModifyLocation(dst_surface, SFLAG_INDRAWABLE, TRUE); if (This->render_offscreen) { - bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->fbo); + bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->activeContext->fbo); } else { GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)); checkGLcall("glBindFramebuffer()"); @@ -7151,35 +7135,6 @@ static HRESULT WINAPI reset_unload_resources(IWineD3DResource *resource, void *d return S_OK; } -static void reset_fbo_state(IWineD3DDevice *iface) { - IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; - unsigned int i; - - ENTER_GL(); - GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)); - checkGLcall("glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)"); - - if (This->fbo) { - GL_EXTCALL(glDeleteFramebuffersEXT(1, &This->fbo)); - This->fbo = 0; - } - if (This->src_fbo) { - GL_EXTCALL(glDeleteFramebuffersEXT(1, &This->src_fbo)); - This->src_fbo = 0; - } - if (This->dst_fbo) { - GL_EXTCALL(glDeleteFramebuffersEXT(1, &This->dst_fbo)); - This->dst_fbo = 0; - } - checkGLcall("Tear down FBOs\n"); - LEAVE_GL(); - - for (i = 0; i < GL_LIMITS(buffers); ++i) { - This->fbo_color_attachments[i] = NULL; - } - This->fbo_depth_attachment = NULL; -} - static BOOL is_display_mode_supported(IWineD3DDeviceImpl *This, WINED3DPRESENT_PARAMETERS *pp) { UINT i, count; WINED3DDISPLAYMODE m; @@ -7212,10 +7167,6 @@ void delete_opengl_contexts(IWineD3DDevice *iface, IWineD3DSwapChain *swapchain_ UINT i; IWineD3DBaseShaderImpl *shader; - if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - reset_fbo_state((IWineD3DDevice *) This); - } - IWineD3DDevice_EnumResources(iface, reset_unload_resources, NULL); LIST_FOR_EACH_ENTRY(shader, &This->shaders, IWineD3DBaseShaderImpl, baseShader.shader_list_entry) { This->shader_backend->shader_destroy((IWineD3DBaseShader *) shader); @@ -7579,20 +7530,26 @@ static void WINAPI IWineD3DDeviceImpl_ResourceReleased(IWineD3DDevice *iface, IW } } - ENTER_GL(); for (i = 0; i < GL_LIMITS(buffers); ++i) { - if (This->fbo_color_attachments[i] == (IWineD3DSurface *)resource) { - bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->fbo); - set_render_target_fbo(iface, i, NULL); - This->fbo_color_attachments[i] = NULL; + if (This->render_targets[i] == (IWineD3DSurface *)resource) { + This->render_targets[i] = NULL; } } - if (This->fbo_depth_attachment == (IWineD3DSurface *)resource) { - bind_fbo(iface, GL_FRAMEBUFFER_EXT, &This->fbo); - set_depth_stencil_fbo(iface, NULL); - This->fbo_depth_attachment = NULL; + if (This->stencilBufferTarget == (IWineD3DSurface *)resource) { + This->stencilBufferTarget = NULL; + } + + for (i = 0; i < This->numContexts; ++i) { + int j; + for (j = 0; j < GL_LIMITS(buffers); ++j) { + if (This->contexts[i]->fbo_color_attachments[j] == (IWineD3DSurface *)resource) { + This->contexts[i]->fbo_color_attachments[j] = NULL; + } + } + if (This->contexts[i]->fbo_depth_attachment == (IWineD3DSurface *)resource) { + This->contexts[i]->fbo_depth_attachment = NULL; + } } - LEAVE_GL(); } break; diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index dd84e2bc9b1..a3a371741b6 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -5,7 +5,7 @@ * Copyright 2002-2004 Raphael Junqueira * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber - * Copyright 2006 Henri Verbeet + * Copyright 2006, 2008 Henri Verbeet * Copyright 2007-2008 Stefan Dösinger for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -936,6 +936,12 @@ void drawPrimitive(IWineD3DDevice *iface, } } + if (This->stencilBufferTarget) { + DWORD location = This->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; + surface_load_ds_location(This->stencilBufferTarget, location); + surface_modify_ds_location(This->stencilBufferTarget, location); + } + /* Signals other modules that a drawing is in progress and the stateblock finalized */ This->isInDraw = TRUE; @@ -944,12 +950,6 @@ void drawPrimitive(IWineD3DDevice *iface, ActivateContext(This, This->render_targets[0], CTXUSAGE_DRAWPRIM); ENTER_GL(); - if (This->stencilBufferTarget) { - DWORD location = This->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; - surface_load_ds_location(This->stencilBufferTarget, location); - surface_modify_ds_location(This->stencilBufferTarget, location); - } - { GLenum glPrimType; BOOL emulation = FALSE; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 3ef659f8d2f..0628e5a528d 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4027,7 +4027,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) { device->depth_blt_rb_h = This->currentDesc.Height; } - bind_fbo((IWineD3DDevice *)device, GL_FRAMEBUFFER_EXT, &device->dst_fbo); + bind_fbo((IWineD3DDevice *)device, GL_FRAMEBUFFER_EXT, &device->activeContext->dst_fbo); GL_EXTCALL(glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, device->depth_blt_rb)); checkGLcall("glFramebufferRenderbufferEXT"); attach_depth_stencil_fbo(device, GL_FRAMEBUFFER_EXT, iface, FALSE); @@ -4037,7 +4037,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) { checkGLcall("depth_blt"); if (device->render_offscreen) { - bind_fbo((IWineD3DDevice *)device, GL_FRAMEBUFFER_EXT, &device->fbo); + bind_fbo((IWineD3DDevice *)device, GL_FRAMEBUFFER_EXT, &device->activeContext->fbo); } else { GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)); checkGLcall("glBindFramebuffer()"); @@ -4059,7 +4059,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) { checkGLcall("depth_blt"); if (device->render_offscreen) { - GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, device->fbo)); + GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, device->activeContext->fbo)); checkGLcall("glBindFramebuffer()"); } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index df291ea7515..8b3be3fc931 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -5,7 +5,7 @@ * Copyright 2003-2004 Raphael Junqueira * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber - * Copyright 2006-2007 Henri Verbeet + * Copyright 2006-2008 Henri Verbeet * Copyright 2007-2008 Stefan Dösinger for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -1581,7 +1581,7 @@ hash_table_t *hash_table_create(hash_function_t *hash_function, compare_function } table->bucket_count = initial_size; - table->entries = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, table->grow_size * sizeof(hash_table_entry_t)); + table->entries = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, table->grow_size * sizeof(struct hash_table_entry_t)); if (!table->entries) { ERR("Failed to allocate table entries, returning NULL.\n"); @@ -1614,12 +1614,12 @@ void hash_table_destroy(hash_table_t *table, void (*free_value)(void *value, voi HeapFree(GetProcessHeap(), 0, table); } -static inline hash_table_entry_t *hash_table_get_by_idx(hash_table_t *table, void *key, unsigned int idx) +static inline struct hash_table_entry_t *hash_table_get_by_idx(hash_table_t *table, void *key, unsigned int idx) { - hash_table_entry_t *entry; + struct hash_table_entry_t *entry; if (table->buckets[idx].next) - LIST_FOR_EACH_ENTRY(entry, &(table->buckets[idx]), hash_table_entry_t, entry) + LIST_FOR_EACH_ENTRY(entry, &(table->buckets[idx]), struct hash_table_entry_t, entry) if (table->compare_function(entry->key, key)) return entry; return NULL; @@ -1628,7 +1628,7 @@ static inline hash_table_entry_t *hash_table_get_by_idx(hash_table_t *table, voi static BOOL hash_table_resize(hash_table_t *table, unsigned int new_bucket_count) { unsigned int new_entry_count = 0; - hash_table_entry_t *new_entries; + struct hash_table_entry_t *new_entries; struct list *new_buckets; unsigned int grow_size = new_bucket_count - (new_bucket_count >> 2); unsigned int i; @@ -1640,7 +1640,7 @@ static BOOL hash_table_resize(hash_table_t *table, unsigned int new_bucket_count return FALSE; } - new_entries = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, grow_size * sizeof(hash_table_entry_t)); + new_entries = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, grow_size * sizeof(struct hash_table_entry_t)); if (!new_entries) { ERR("Failed to allocate new entries, returning FALSE.\n"); @@ -1652,12 +1652,12 @@ static BOOL hash_table_resize(hash_table_t *table, unsigned int new_bucket_count { if (table->buckets[i].next) { - hash_table_entry_t *entry, *entry2; + struct hash_table_entry_t *entry, *entry2; - LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &table->buckets[i], hash_table_entry_t, entry) + LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &table->buckets[i], struct hash_table_entry_t, entry) { int j; - hash_table_entry_t *new_entry = new_entries + (new_entry_count++); + struct hash_table_entry_t *new_entry = new_entries + (new_entry_count++); *new_entry = *entry; j = new_entry->hash & (new_bucket_count - 1); @@ -1688,7 +1688,7 @@ void hash_table_put(hash_table_t *table, void *key, void *value) { unsigned int idx; unsigned int hash; - hash_table_entry_t *entry; + struct hash_table_entry_t *entry; hash = table->hash_function(key); idx = hash & (table->bucket_count - 1); @@ -1742,7 +1742,7 @@ void hash_table_put(hash_table_t *table, void *key, void *value) struct list *elem = list_head(&table->free_entries); list_remove(elem); - entry = LIST_ENTRY(elem, hash_table_entry_t, entry); + entry = LIST_ENTRY(elem, struct hash_table_entry_t, entry); } else { entry = table->entries + (table->entry_count++); } @@ -1765,7 +1765,7 @@ void hash_table_remove(hash_table_t *table, void *key) void *hash_table_get(hash_table_t *table, void *key) { unsigned int idx; - hash_table_entry_t *entry; + struct hash_table_entry_t *entry; idx = table->hash_function(key) & (table->bucket_count - 1); entry = hash_table_get_by_idx(table, key, idx); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 45d8ace8dc2..e67ec382711 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -47,19 +47,19 @@ typedef unsigned int (hash_function_t)(void *key); typedef BOOL (compare_function_t)(void *keya, void *keyb); -typedef struct { +struct hash_table_entry_t { void *key; void *value; unsigned int hash; struct list entry; -} hash_table_entry_t; +}; typedef struct { hash_function_t *hash_function; compare_function_t *compare_function; struct list *buckets; unsigned int bucket_count; - hash_table_entry_t *entries; + struct hash_table_entry_t *entries; unsigned int entry_count; struct list free_entries; unsigned int count; @@ -629,6 +629,13 @@ struct WineD3DContext { HPBUFFERARB pbuffer; BOOL isPBuffer; GLint aux_buffers; + + /* FBOs */ + IWineD3DSurface **fbo_color_attachments; + IWineD3DSurface *fbo_depth_attachment; + GLuint fbo; + GLuint src_fbo; + GLuint dst_fbo; }; typedef enum ContextUsage { @@ -880,9 +887,6 @@ struct IWineD3DDeviceImpl /* Render Target Support */ IWineD3DSurface **render_targets; IWineD3DSurface *auto_depth_stencil_buffer; - IWineD3DSurface **fbo_color_attachments; - IWineD3DSurface *fbo_depth_attachment; - IWineD3DSurface *stencilBufferTarget; /* Caches to avoid unneeded context changes */ @@ -897,9 +901,6 @@ struct IWineD3DDeviceImpl /* For rendering to a texture using glCopyTexImage */ BOOL render_offscreen; - GLuint fbo; - GLuint src_fbo; - GLuint dst_fbo; GLenum *draw_buffers; GLuint depth_blt_texture; GLuint depth_blt_rb; diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index ed9754287bf..c5eac719b1e 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -132,6 +132,11 @@ GpStatus WINGDIPAPI GdipDrawRectanglesI(GpGraphics*,GpPen*,GDIPCONST GpRect*,INT GpStatus WINGDIPAPI GdipDrawString(GpGraphics*,GDIPCONST WCHAR*,INT, GDIPCONST GpFont*,GDIPCONST RectF*, GDIPCONST GpStringFormat*, GDIPCONST GpBrush*); + +GpStatus WINGDIPAPI GdipFillClosedCurve2(GpGraphics*,GpBrush*,GDIPCONST GpPointF*,INT, + REAL,GpFillMode); +GpStatus WINGDIPAPI GdipFillClosedCurve2I(GpGraphics*,GpBrush*,GDIPCONST GpPoint*,INT, + REAL,GpFillMode); GpStatus WINGDIPAPI GdipFillEllipse(GpGraphics*,GpBrush*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipFillEllipseI(GpGraphics*,GpBrush*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipFillPath(GpGraphics*,GpBrush*,GpPath*); diff --git a/programs/clock/Zh.rc b/programs/clock/Zh.rc index e6e0ae8a25f..5d0d9e07d44 100644 --- a/programs/clock/Zh.rc +++ b/programs/clock/Zh.rc @@ -22,13 +22,13 @@ MAIN_MENU MENU LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED { POPUP "ÊôÐÔ£¨&P£©" { MENUITEM "Ä£ÄâʱÖÓ£¨&L£©", IDM_ANALOG - MENUITEM "Êý×éʱÖÓ£¨&T£©", IDM_DIGITAL + MENUITEM "Êý×ÖʱÖÓ£¨&T£©", IDM_DIGITAL MENUITEM SEPARATOR MENUITEM "×ÖÌ壨&F£©...", IDM_FONT MENUITEM SEPARATOR MENUITEM "ÎÞ±êÌâÀ¸£¨&W£©", IDM_NOTITLE MENUITEM SEPARATOR - MENUITEM "Ã루&£©", IDM_SECONDS + MENUITEM "Ã루&S£©", IDM_SECONDS MENUITEM "ÈÕÆÚ£¨&D£©", IDM_DATE MENUITEM SEPARATOR MENUITEM "×ÜÊÇÔÚ×îÇ°Ã棨&A£©", IDM_ONTOP diff --git a/programs/notepad/Ja.rc b/programs/notepad/Ja.rc index 25737398171..eea61fa2783 100644 --- a/programs/notepad/Ja.rc +++ b/programs/notepad/Ja.rc @@ -37,14 +37,14 @@ MAIN_MENU MENU MENUITEM "�I—¹(&x)", CMD_EXIT } POPUP "•Ò�W(&E)" { - MENUITEM "ƒAƒ“ƒhƒD(&U)\tCtrl+Z", CMD_UNDO + MENUITEM "Œ³‚É–ß‚·(&U)\tCtrl+Z", CMD_UNDO MENUITEM SEPARATOR MENUITEM "�Ø‚èŽæ‚è(&t)\tCtrl+X", CMD_CUT MENUITEM "ƒRƒs�[(&C)\tCtrl+C", CMD_COPY - MENUITEM "ƒy�[ƒXƒg(&P)\tCtrl+V", CMD_PASTE + MENUITEM "“\\‚è•t‚¯(&P)\tCtrl+V", CMD_PASTE MENUITEM "�í�œ(&D)\tDel", CMD_DELETE MENUITEM SEPARATOR - MENUITEM "‘S‚Ä‘I‘ð(&a)\tCtrl+A", CMD_SELECT_ALL + MENUITEM "‚·‚ׂđI‘ð(&a)\tCtrl+A", CMD_SELECT_ALL MENUITEM "“ú•t‚ÆŽž��(&T)\tF5", CMD_TIME_DATE MENUITEM SEPARATOR MENUITEM "’·‚¢�s‚ð�Ü‚è•Ô‚·(&W)", CMD_WRAP @@ -52,14 +52,14 @@ POPUP " } POPUP "ŒŸ�õ(&S)" { MENUITEM "ŒŸ�õ(&S)...\tCtrl+F", CMD_SEARCH - MENUITEM "ŽŸ‚ÌŒó•â‚ðŒŸ�õ(&S)\tF3", CMD_SEARCH_NEXT + MENUITEM "ŽŸ‚ðŒŸ�õ(&S)\tF3", CMD_SEARCH_NEXT } POPUP "ƒwƒ‹ƒv(&H)" { MENUITEM "–ÚŽŸ(&C)", CMD_HELP_CONTENTS MENUITEM "ŒŸ�õ(&S)...", CMD_HELP_SEARCH MENUITEM "ƒwƒ‹ƒv‚ÌŽg‚¢•û(&H)", CMD_HELP_ON_HELP MENUITEM SEPARATOR - MENUITEM "&About Notepad", CMD_HELP_ABOUT_NOTEPAD + MENUITEM "ƒ�ƒ‚’ ‚ɂ‚¢‚Ä(&A)", CMD_HELP_ABOUT_NOTEPAD } } diff --git a/programs/progman/Zh.rc b/programs/progman/Zh.rc index dfbfb260446..70535cdc413 100644 --- a/programs/progman/Zh.rc +++ b/programs/progman/Zh.rc @@ -67,7 +67,7 @@ POPUP " DIALOG_NEW DIALOG 0, 0, 170, 65 LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "New" +CAPTION "н¨" { RADIOBUTTON "", PM_NEW_GROUP, 10, 15, 10, 15 LTEXT "³ÌÐò×飨&G£©", PM_NEW_GROUP, 20, 18, 80, 15 @@ -83,7 +83,7 @@ PUSHBUTTON " DIALOG_MOVE DIALOG 0, 0, 250, 65 LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Move Program" +CAPTION "Òƶ¯³ÌÐò" { LTEXT "Òƶ¯³ÌÐò£º", IDIGNORE, 5, 5, 90, 15 LTEXT "", PM_PROGRAM, 95, 5, 90, 15 diff --git a/programs/regedit/Ja.rc b/programs/regedit/Ja.rc index 1878c06363a..c895ed46f52 100644 --- a/programs/regedit/Ja.rc +++ b/programs/regedit/Ja.rc @@ -49,7 +49,7 @@ BEGIN MENUITEM "•¶Žš—ñ(&S)", ID_EDIT_NEW_STRINGVALUE MENUITEM "ƒoƒCƒiƒŠ(&B)", ID_EDIT_NEW_BINARYVALUE MENUITEM "DWORD’l(&D)", ID_EDIT_NEW_DWORDVALUE - MENUITEM "&Multi String Value", ID_EDIT_NEW_MULTI_STRINGVALUE + MENUITEM "•¡�”�s•¶Žš—ñ’l(&M)", ID_EDIT_NEW_MULTI_STRINGVALUE END MENUITEM SEPARATOR MENUITEM "�í�œ(&D)\tDel", ID_EDIT_DELETE @@ -100,13 +100,13 @@ BEGIN MENUITEM "•¶Žš—ñ(&S)", ID_EDIT_NEW_STRINGVALUE MENUITEM "ƒoƒCƒiƒŠ(&B)", ID_EDIT_NEW_BINARYVALUE MENUITEM "DWORD’l(&D)", ID_EDIT_NEW_DWORDVALUE - MENUITEM "&Multi String Value", ID_EDIT_NEW_MULTI_STRINGVALUE + MENUITEM "•¡�”�s•¶Žš—ñ’l(&M)", ID_EDIT_NEW_MULTI_STRINGVALUE END MENUITEM SEPARATOR MENUITEM "�í�œ(&D)\tDel", ID_EDIT_DELETE MENUITEM "–¼‘O‚Ì•Ï�X(&R)\tF2", ID_EDIT_RENAME MENUITEM SEPARATOR - MENUITEM "&Export...", ID_EDIT_EXPORT + MENUITEM "ƒGƒNƒXƒ|�[ƒg(&E)...", ID_EDIT_EXPORT MENUITEM "ƒL�[–¼‚ðƒRƒs�[(&C)", ID_EDIT_COPYKEYNAME MENUITEM SEPARATOR MENUITEM "ŒŸ�õ(&F)\tCtrl+F", ID_EDIT_FIND, GRAYED @@ -218,7 +218,7 @@ BEGIN IDS_DELETE_BOX_TEXT "–{“–‚É '%s'‚ð�í�œ‚µ‚Ü‚·‚©?" IDS_NEWKEY "�V‚µ‚¢ƒL�[ #%d" IDS_NEWVALUE "�V‚µ‚¢’l #%d" - IDS_NOTFOUND "Search string '%s' not found" + IDS_NOTFOUND "ŒŸ�õ•¶Žš—ñ '%s'‚ªŒ©•t‚©‚è‚Ü‚¹‚ñ" END /*****************************************************************/ diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c index f9a5abffa11..1c26baa5ad4 100644 --- a/programs/regedit/edit.c +++ b/programs/regedit/edit.c @@ -242,33 +242,33 @@ done: return NULL; } -BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPTSTR keyName) +BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPWSTR keyName) { BOOL result = FALSE; LONG lRet = ERROR_SUCCESS; HKEY retKey = NULL; - TCHAR newKey[MAX_NEW_KEY_LEN - 4]; + WCHAR newKey[MAX_NEW_KEY_LEN - 4]; int keyNum; HKEY hKey; - lRet = RegOpenKeyEx(hKeyRoot, keyPath, 0, KEY_CREATE_SUB_KEY, &hKey); + lRet = RegOpenKeyExW(hKeyRoot, keyPath, 0, KEY_CREATE_SUB_KEY, &hKey); if (lRet != ERROR_SUCCESS) { error_code_messagebox(hwnd, lRet); goto done; } - if (!LoadString(GetModuleHandle(0), IDS_NEWKEY, newKey, COUNT_OF(newKey))) goto done; + if (!LoadStringW(GetModuleHandle(0), IDS_NEWKEY, newKey, COUNT_OF(newKey))) goto done; /* try to find out a name for the newly create key (max 100 times) */ for (keyNum = 1; keyNum < 100; keyNum++) { - wsprintf(keyName, newKey, keyNum); - lRet = RegOpenKey(hKey, keyName, &retKey); + wsprintfW(keyName, newKey, keyNum); + lRet = RegOpenKeyW(hKey, keyName, &retKey); if (lRet != ERROR_SUCCESS) break; RegCloseKey(retKey); } if (lRet == ERROR_SUCCESS) goto done; - lRet = RegCreateKey(hKey, keyName, &retKey); + lRet = RegCreateKeyW(hKey, keyName, &retKey); if (lRet != ERROR_SUCCESS) { error_code_messagebox(hwnd, lRet); goto done; diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c index 51c94cc955c..e8a6bf5edfe 100644 --- a/programs/regedit/framewnd.c +++ b/programs/regedit/framewnd.c @@ -761,10 +761,15 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; } case ID_EDIT_NEW_KEY: - if (CreateKey(hWnd, hKeyRoot, keyPath, newKey)) { - if (InsertNode(g_pChildWnd->hTreeWnd, 0, newKey)) - StartKeyRename(g_pChildWnd->hTreeWnd); - } + { + WCHAR newKeyW[MAX_NEW_KEY_LEN]; + WCHAR* keyPathW = GetWideString(keyPath); + if (CreateKey(hWnd, hKeyRoot, keyPathW, newKeyW)) { + if (InsertNode(g_pChildWnd->hTreeWnd, 0, newKeyW)) + StartKeyRename(g_pChildWnd->hTreeWnd); + } + HeapFree(GetProcessHeap(), 0, keyPathW); + } break; case ID_EDIT_NEW_STRINGVALUE: valueType = REG_SZ; diff --git a/programs/regedit/main.h b/programs/regedit/main.h index 6b5a098e203..885ab0d14f3 100644 --- a/programs/regedit/main.h +++ b/programs/regedit/main.h @@ -134,13 +134,13 @@ extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv); extern LPTSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey); extern LPWSTR GetItemPathW(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey); extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem); -extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPTSTR name); +extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name); extern HWND StartKeyRename(HWND hwndTV); extern HTREEITEM FindPathInTree(HWND hwndTV, LPCTSTR lpKeyName); extern HTREEITEM FindNext(HWND hwndTV, HTREEITEM hItem, LPCTSTR sstring, int mode, int *row); /* edit.c */ -extern BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPTSTR newKeyName); +extern BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPWSTR newKeyName); extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, DWORD valueType, LPTSTR valueName); extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName); extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath); diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c index 3261a66517c..dcfb7fa09c6 100644 --- a/programs/regedit/treeview.c +++ b/programs/regedit/treeview.c @@ -232,26 +232,30 @@ BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem) } /* Add an entry to the tree. Only give hKey for root nodes (HKEY_ constants) */ -static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPTSTR label, HKEY hKey, DWORD dwChildren) +static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPWSTR label, HKEY hKey, DWORD dwChildren) { TVINSERTSTRUCT tvins; + CHAR* labelA = GetMultiByteString(label); + HTREEITEM ret; if (hKey) { - if (RegQueryInfoKey(hKey, 0, 0, 0, &dwChildren, 0, 0, 0, 0, 0, 0, 0) != ERROR_SUCCESS) { + if (RegQueryInfoKeyW(hKey, 0, 0, 0, &dwChildren, 0, 0, 0, 0, 0, 0, 0) != ERROR_SUCCESS) { dwChildren = 0; } } tvins.u.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_CHILDREN | TVIF_PARAM; - tvins.u.item.pszText = label; - tvins.u.item.cchTextMax = lstrlen(label); + tvins.u.item.pszText = labelA; + tvins.u.item.cchTextMax = lstrlen(labelA); tvins.u.item.iImage = Image_Closed; tvins.u.item.iSelectedImage = Image_Open; tvins.u.item.cChildren = dwChildren; tvins.u.item.lParam = (LPARAM)hKey; tvins.hInsertAfter = (HTREEITEM)(hKey ? TVI_LAST : TVI_SORT); tvins.hParent = hParent; - return TreeView_InsertItem(hwndTV, &tvins); + ret = TreeView_InsertItem(hwndTV, &tvins); + HeapFree(GetProcessHeap(), 0, labelA); + return ret; } static BOOL match_string(LPCTSTR sstring1, LPCTSTR sstring2, int mode) @@ -388,20 +392,20 @@ static BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem) { HKEY hRoot, hKey, hSubKey; HTREEITEM childItem; - LPTSTR KeyPath; + LPWSTR KeyPath; DWORD dwCount, dwIndex, dwMaxSubKeyLen; - LPSTR Name; + LPWSTR Name; TVITEM tvItem; hRoot = NULL; - KeyPath = GetItemPath(hwndTV, hItem, &hRoot); + KeyPath = GetItemPathW(hwndTV, hItem, &hRoot); if (!KeyPath || !hRoot) return FALSE; if (*KeyPath) { - if (RegOpenKeyEx(hRoot, KeyPath, 0, KEY_READ, &hKey) != ERROR_SUCCESS) { - WINE_TRACE("RegOpenKeyEx failed, \"%s\" was probably removed.\n", KeyPath); + if (RegOpenKeyExW(hRoot, KeyPath, 0, KEY_READ, &hKey) != ERROR_SUCCESS) { + WINE_TRACE("RegOpenKeyEx failed, %s was probably removed.\n", wine_dbgstr_w(KeyPath)); return FALSE; } } else { @@ -409,7 +413,7 @@ static BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem) } HeapFree(GetProcessHeap(), 0, KeyPath); - if (RegQueryInfoKey(hKey, 0, 0, 0, &dwCount, &dwMaxSubKeyLen, 0, 0, 0, 0, 0, 0) != ERROR_SUCCESS) { + if (RegQueryInfoKeyW(hKey, 0, 0, 0, &dwCount, &dwMaxSubKeyLen, 0, 0, 0, 0, 0, 0) != ERROR_SUCCESS) { return FALSE; } @@ -428,7 +432,7 @@ static BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem) } dwMaxSubKeyLen++; /* account for the \0 terminator */ - if (!(Name = HeapAlloc(GetProcessHeap(), 0, dwMaxSubKeyLen * sizeof(TCHAR)))) { + if (!(Name = HeapAlloc(GetProcessHeap(), 0, dwMaxSubKeyLen * sizeof(WCHAR)))) { return FALSE; } tvItem.cchTextMax = dwMaxSubKeyLen; @@ -440,38 +444,43 @@ static BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem) for (dwIndex = 0; dwIndex < dwCount; dwIndex++) { DWORD cName = dwMaxSubKeyLen, dwSubCount; BOOL found; + CHAR* NameA; found = FALSE; - if (RegEnumKeyEx(hKey, dwIndex, Name, &cName, 0, 0, 0, NULL) != ERROR_SUCCESS) { + if (RegEnumKeyExW(hKey, dwIndex, Name, &cName, 0, 0, 0, NULL) != ERROR_SUCCESS) { continue; } /* Find the number of children of the node. */ dwSubCount = 0; - if (RegOpenKeyEx(hKey, Name, 0, KEY_QUERY_VALUE, &hSubKey) == ERROR_SUCCESS) { + if (RegOpenKeyExW(hKey, Name, 0, KEY_QUERY_VALUE, &hSubKey) == ERROR_SUCCESS) { if (RegQueryInfoKey(hSubKey, 0, 0, 0, &dwSubCount, 0, 0, 0, 0, 0, 0, 0) != ERROR_SUCCESS) { dwSubCount = 0; } RegCloseKey(hSubKey); } + NameA = GetMultiByteString(Name); + /* Check if the node is already in there. */ for (childItem = TreeView_GetChild(hwndTV, hItem); childItem; childItem = TreeView_GetNextSibling(hwndTV, childItem)) { tvItem.mask = TVIF_TEXT; tvItem.hItem = childItem; if (!TreeView_GetItem(hwndTV, &tvItem)) { + HeapFree(GetProcessHeap(), 0, NameA); return FALSE; } - if (!stricmp(tvItem.pszText, Name)) { + if (!stricmp(tvItem.pszText, NameA)) { found = TRUE; + HeapFree(GetProcessHeap(), 0, NameA); break; } } if (found == FALSE) { - WINE_TRACE("New subkey %s\n", Name); + WINE_TRACE("New subkey %s\n", NameA); AddEntryToTree(hwndTV, hItem, Name, NULL, dwSubCount); } } @@ -518,7 +527,7 @@ BOOL RefreshTreeView(HWND hwndTV) return TRUE; } -HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPTSTR name) +HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name) { TCHAR buf[MAX_NEW_KEY_LEN]; HTREEITEM hNewItem = 0; @@ -535,19 +544,21 @@ HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPTSTR name) item.cChildren = 1; if (!TreeView_SetItem(hwndTV, &item)) return FALSE; } - SendMessage(hwndTV, TVM_EXPAND, TVE_EXPAND, (LPARAM)hItem ); + SendMessageW(hwndTV, TVM_EXPAND, TVE_EXPAND, (LPARAM)hItem ); if (!hNewItem) { + char* nameA = GetMultiByteString(name); for(hNewItem = TreeView_GetChild(hwndTV, hItem); hNewItem; hNewItem = TreeView_GetNextSibling(hwndTV, hNewItem)) { item.mask = TVIF_HANDLE | TVIF_TEXT; item.hItem = hNewItem; item.pszText = buf; item.cchTextMax = COUNT_OF(buf); if (!TreeView_GetItem(hwndTV, &item)) continue; - if (lstrcmp(name, item.pszText) == 0) break; + if (lstrcmp(nameA, item.pszText) == 0) break; } + HeapFree(GetProcessHeap(), 0, nameA); } if (hNewItem) - SendMessage(hwndTV, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hNewItem); + SendMessageW(hwndTV, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hNewItem); return hNewItem; } @@ -564,7 +575,7 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPTSTR pHostName) { TVINSERTSTRUCT tvins; HTREEITEM hRoot; - static TCHAR hkcr[] = {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T',0}, + static WCHAR hkcr[] = {'H','K','E','Y','_','C','L','A','S','S','E','S','_','R','O','O','T',0}, hkcu[] = {'H','K','E','Y','_','C','U','R','R','E','N','T','_','U','S','E','R',0}, hklm[] = {'H','K','E','Y','_','L','O','C','A','L','_','M','A','C','H','I','N','E',0}, hku[] = {'H','K','E','Y','_','U','S','E','R','S',0}, @@ -642,8 +653,8 @@ BOOL UpdateExpandingTree(HWND hwndTV, HTREEITEM hItem, int state) { DWORD dwCount, dwIndex, dwMaxSubKeyLen; HKEY hRoot, hNewKey, hKey; - LPTSTR keyPath; - LPTSTR Name; + LPWSTR keyPath; + LPWSTR Name; LONG errCode; HCURSOR hcursorOld; @@ -654,32 +665,32 @@ BOOL UpdateExpandingTree(HWND hwndTV, HTREEITEM hItem, int state) } expanding = TRUE; hcursorOld = SetCursor(LoadCursor(NULL, IDC_WAIT)); - SendMessage(hwndTV, WM_SETREDRAW, FALSE, 0); + SendMessageW(hwndTV, WM_SETREDRAW, FALSE, 0); - keyPath = GetItemPath(hwndTV, hItem, &hRoot); + keyPath = GetItemPathW(hwndTV, hItem, &hRoot); if (!keyPath) goto done; if (*keyPath) { - errCode = RegOpenKeyEx(hRoot, keyPath, 0, KEY_READ, &hNewKey); + errCode = RegOpenKeyExW(hRoot, keyPath, 0, KEY_READ, &hNewKey); if (errCode != ERROR_SUCCESS) goto done; } else { hNewKey = hRoot; } - errCode = RegQueryInfoKey(hNewKey, 0, 0, 0, &dwCount, &dwMaxSubKeyLen, 0, 0, 0, 0, 0, 0); + errCode = RegQueryInfoKeyW(hNewKey, 0, 0, 0, &dwCount, &dwMaxSubKeyLen, 0, 0, 0, 0, 0, 0); if (errCode != ERROR_SUCCESS) goto done; dwMaxSubKeyLen++; /* account for the \0 terminator */ - Name = HeapAlloc(GetProcessHeap(), 0, dwMaxSubKeyLen * sizeof(TCHAR)); + Name = HeapAlloc(GetProcessHeap(), 0, dwMaxSubKeyLen * sizeof(WCHAR)); if (!Name) goto done; for (dwIndex = 0; dwIndex < dwCount; dwIndex++) { DWORD cName = dwMaxSubKeyLen, dwSubCount; - errCode = RegEnumKeyEx(hNewKey, dwIndex, Name, &cName, 0, 0, 0, 0); + errCode = RegEnumKeyExW(hNewKey, dwIndex, Name, &cName, 0, 0, 0, 0); if (errCode != ERROR_SUCCESS) continue; - errCode = RegOpenKeyEx(hNewKey, Name, 0, KEY_QUERY_VALUE, &hKey); + errCode = RegOpenKeyExW(hNewKey, Name, 0, KEY_QUERY_VALUE, &hKey); if (errCode == ERROR_SUCCESS) { - errCode = RegQueryInfoKey(hKey, 0, 0, 0, &dwSubCount, 0, 0, 0, 0, 0, 0, 0); + errCode = RegQueryInfoKeyW(hKey, 0, 0, 0, &dwSubCount, 0, 0, 0, 0, 0, 0, 0); RegCloseKey(hKey); } if (errCode != ERROR_SUCCESS) dwSubCount = 0; diff --git a/programs/winecfg/Ja.rc b/programs/winecfg/Ja.rc index ff111ee596c..8fbe6a4a849 100644 --- a/programs/winecfg/Ja.rc +++ b/programs/winecfg/Ja.rc @@ -142,7 +142,7 @@ BEGIN LTEXT "ƒ‰ƒxƒ‹‚ƃVƒŠƒAƒ‹”Ô�†",IDC_LABELSERIAL_STATIC,15,155,95,10 - PUSHBUTTON "�Ú�ׂð•\Ž¦(&S)",IDC_BUTTON_SHOW_HIDE_ADVANCED,186,136,60,13 + PUSHBUTTON "�Ú�ׂð•\\Ž¦(&S)",IDC_BUTTON_SHOW_HIDE_ADVANCED,186,136,60,13 CONTROL "ƒfƒoƒCƒX‚©‚玩“®ŒŸ�o(&F):",IDC_RADIO_AUTODETECT,"Button", BS_AUTORADIOBUTTON,15,166,93,10 EDITTEXT IDC_EDIT_DEVICE,27,176,174,13,ES_AUTOHSCROLL @@ -155,7 +155,7 @@ BEGIN LTEXT "ƒVƒŠƒAƒ‹”Ô�†(&E):",IDC_STATIC_SERIAL,33,225,29,12 EDITTEXT IDC_EDIT_SERIAL,63,221,78,13,ES_AUTOHSCROLL | WS_TABSTOP - CONTROL "dot ƒtƒ@ƒCƒ‹‚ð•\Ž¦‚·‚é",IDC_SHOW_DOT_FILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,260,230,8 + CONTROL "dot ƒtƒ@ƒCƒ‹‚ð•\\Ž¦‚·‚é",IDC_SHOW_DOT_FILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,260,230,8 END IDD_AUDIOCFG DIALOG DISCARDABLE 0, 0, 260, 250 @@ -189,14 +189,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "ƒTƒCƒY:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Item:",IDC_STATIC,15,64,112,8 + LTEXT "�€–Ú:",IDC_STATIC,15,64,112,8 COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT - LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + LTEXT "�F:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW - LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + LTEXT "ƒTƒCƒY:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 - PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED + PUSHBUTTON "ƒtƒHƒ“ƒg",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Shell Folder ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 @@ -212,10 +212,10 @@ BEGIN IDS_TAB_DRIVES "ƒhƒ‰ƒCƒu" IDS_CHOOSE_PATH "Select the unix target directory, please." IDS_HIDE_ADVANCED "�Ú�ׂð‰B‚·" - IDS_SHOW_ADVANCED "�Ú�ׂð•\Ž¦" + IDS_SHOW_ADVANCED "�Ú�ׂð•\\Ž¦" IDS_NOTHEME "(ƒe�[ƒ}–³‚µ)" IDS_TAB_GRAPHICS "‰æ–Ê" - IDS_TAB_DESKTOP_INTEGRATION "Desktop Integration" + IDS_TAB_DESKTOP_INTEGRATION "ƒfƒXƒNƒgƒbƒv“��‡" IDS_TAB_AUDIO "ƒI�[ƒfƒBƒI" IDS_TAB_ABOUT "Wine‚ɂ‚¢‚Ä" IDS_WINECFG_TITLE "Wine�Ý’è" diff --git a/programs/wineconsole/wineconsole_Zh.rc b/programs/wineconsole/wineconsole_Zh.rc index 3a717b17942..d739e33062a 100644 --- a/programs/wineconsole/wineconsole_Zh.rc +++ b/programs/wineconsole/wineconsole_Zh.rc @@ -36,8 +36,8 @@ IDS_FNT_PREVIEW_1, " IDS_FNT_PREVIEW_2, "" IDS_DLG_TIT_DEFAULT, "ÅäÖà - ĬÈÏÉèÖÃ" IDS_DLG_TIT_CURRENT, "ÅäÖà - µ±Ç°ÉèÖÃ" -IDS_DLG_TIT_ERROR, "Configuration error" -IDS_DLG_ERR_SBWINSIZE, "Screen buffer size must be greater or equal to the window's one" +IDS_DLG_TIT_ERROR, "ÅäÖôíÎó" +IDS_DLG_ERR_SBWINSIZE, "ÆÁÄ»»º´æ´óС±ØÐë´óÓÚ»òµÈÓÚÊÓ´°»º´æ" END IDD_OPTION DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 140, 105 diff --git a/programs/winefile/Zh.rc b/programs/winefile/Zh.rc index 39851c89be8..76fa36051b5 100644 --- a/programs/winefile/Zh.rc +++ b/programs/winefile/Zh.rc @@ -110,8 +110,8 @@ IDM_WINEFILE MENU FIXED IMPURE MENUITEM "È«ÆÁ£¨&U£©\tCtrl+Shift+S", ID_VIEW_FULLSCREEN #endif MENUITEM SEPARATOR - MENUITEM "&Minimize on run", 504 - MENUITEM "&Save settings on exit", 511 + MENUITEM "Æô¶¯ºó×îС»¯£¨&M£©", 504 + MENUITEM "Í˳öʱ±£´æÉèÖã¨&S£©", 511 } diff --git a/programs/winhlp32/No.rc b/programs/winhlp32/No.rc index 1632da6d427..5f3e3101c46 100644 --- a/programs/winhlp32/No.rc +++ b/programs/winhlp32/No.rc @@ -73,6 +73,14 @@ CAPTION "Innhold" LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_BORDER } +IDD_SEARCH DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL +STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +FONT 8, "MS Shell Dlg" +CAPTION "Søk" +{ + LTEXT "Ikke laget ennå", -1, 10, 10, 180, 150 +} + /* Strings */ STRINGTABLE DISCARDABLE LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL { diff --git a/programs/winhlp32/Zh.rc b/programs/winhlp32/Zh.rc index 41f9056d196..7f69ec25744 100644 --- a/programs/winhlp32/Zh.rc +++ b/programs/winhlp32/Zh.rc @@ -39,21 +39,21 @@ MAIN_MENU MENU LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED POPUP "ÊéÇ©£¨&B£©" { MENUITEM "¶¨Ò壨&D£©...", MNID_BKMK_DEFINE } - POPUP "&Options" { - POPUP "Help always visible" + POPUP "Ñ¡Ï&O£©" { + POPUP "ÏÔʾ°ïÖú" BEGIN - MENUITEM "Default", MNID_OPTS_HELP_DEFAULT - MENUITEM "Visible", MNID_OPTS_HELP_VISIBLE - MENUITEM "Non visible", MNID_OPTS_HELP_NONVISIBLE + MENUITEM "ĬÈÏ", MNID_OPTS_HELP_DEFAULT + MENUITEM "ÏÔʾ", MNID_OPTS_HELP_VISIBLE + MENUITEM "²»ÏÔʾ", MNID_OPTS_HELP_NONVISIBLE END - MENUITEM "History", MNID_OPTS_HISTORY - POPUP "Fonts" + MENUITEM "ÀúÊ·", MNID_OPTS_HISTORY + POPUP "×ÖÌå" BEGIN - MENUITEM "Small", MNID_OPTS_FONTS_SMALL - MENUITEM "Normal", MNID_OPTS_FONTS_NORMAL - MENUITEM "Large", MNID_OPTS_FONTS_LARGE + MENUITEM "СºÅ", MNID_OPTS_FONTS_SMALL + MENUITEM "ÖкÅ", MNID_OPTS_FONTS_NORMAL + MENUITEM "´óºÅ", MNID_OPTS_FONTS_LARGE END - MENUITEM "Use system colors", MNID_OPTS_SYSTEM_COLORS + MENUITEM "ʹÓÃϵͳÑÕÉ«", MNID_OPTS_SYSTEM_COLORS } POPUP "°ïÖú£¨&H£©" { MENUITEM "ÈçºÎʹÓðïÖú£¨&O£©", MNID_HELP_HELPON @@ -76,11 +76,11 @@ STID_INFO, " STID_NOT_IMPLEMENTED, "δʵÏÖ" STID_HLPFILE_ERROR_s, "¶ÁÈë°ïÖúÎļþ ¡®%s¡¯ ʱ·¢Éú´íÎó" STID_INDEX, "ÄÚÈÝ£¨&C£©" -STID_CONTENTS, "Summary" +STID_CONTENTS, "¸ÅÒª" STID_BACK, "·µ»Ø£¨&B£©" STID_ALL_FILES, "ËùÓÐÎļþ (*.*)" STID_HELP_FILES_HLP, "°ïÖúÎļþ (*.hlp)" -STID_FILE_NOT_FOUND_s "Cannot find '%s'. Do you want to find this file yourself?" -STID_NO_RICHEDIT "Cannot find a richedit implementation... Aborting" -STID_PSH_INDEX, "Help topics: " +STID_FILE_NOT_FOUND_s "²»ÄÜ´ò¿ªÎļþ '%s'. ÄãÏëÒª×Ô¼ºÕÒÕâ¸öÎļþÂð?" +STID_NO_RICHEDIT "ÕÒ²»µ½ richedit ... ÖÕÖ¹" +STID_PSH_INDEX, "°ïÖúÄÚÈÝ: " } -- 2.11.4.GIT