Compare commits

..

352 Commits

Author SHA1 Message Date
Michael Stefaniuc 270803bad7 Release 6.0.4.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 20:36:27 +02:00
Matteo Bruni ce5477ef02 combase: Add RoSetErrorReportingFlags() stub.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 430583893e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-31 23:44:08 +02:00
Nikolay Sivov 9002eae344 comctl32/listview: Initialize subitem text buffer before drawing each subitem.
Notification handler for LVN_GETDISPINFO is not guaranteed to touch text buffer.
When it doesn't, it can lead to already queried text to be reused for subitems.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52583
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4f1853c576)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-31 23:31:29 +02:00
Alex Henrie c7ae2d5d22 explorer: Only try to destroy the IShellWindows object if it exists.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52494
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit adda27cdb8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-31 22:32:25 +02:00
Piotr Caban 9c0dfffe3f ucrtbase: Add support for r-value demangling in unDName.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44202
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a656a8b644)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-31 21:59:10 +02:00
Alexandre Julliard dadacb9fb8 user.exe: Make sure that the thunk selector doesn't get freed.
Spotted by Fabian Maurer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=12732
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 879ccd3357)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-31 21:41:45 +02:00
Louis Lenders 1a508ae2bf ole32: Add stub for OleConvertIStorageToOLESTREAMEx.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52298
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 18e331fd63)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-31 00:05:53 +02:00
Ismael Luceno 4517c49ade server: Fix missing include for uid_t.
Explicitly include <sys/types.h> to make uid_t available to users of
server/security.h.

This is a problem on musl, and possibly other non-glibc systems.

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c35df50c30)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-30 23:43:53 +02:00
Louis Lenders 188c86e5f3 wbemprox: Add some properties of SoftwareLicensingProduct class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51163
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a9826b48e4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-30 23:33:50 +02:00
Gabriel Ivăncescu 2aa94c0beb ddraw: Use WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES only if window is not in foreground.
Fixes a regression introduced by f90d607c67.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50370
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a384da8865)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-30 23:28:21 +02:00
Nikolay Sivov 461abf501a include: Add WbemErrorEnum error codes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52378
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9dd1654c84)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 23:36:26 +01:00
Olivier F. R. Dierick 134789d517 taskschd: Set count to zero in regtasks_get_Count stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52349
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bbd9b9bfee)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 23:34:51 +01:00
Huw Davies 149284628d user32: Set WM_CONTEXTMENU's wparam to the child window's handle.
DefWindowProc() does not propagate the wparam; it updates it instead.
Spotted by YAL.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52327
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3af8415ca9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 23:31:28 +01:00
Nikolay Sivov 3ce2336788 d3d11: Always initialize out view pointer in CreateRenderTargetView().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51195
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit df8ef3a54f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 23:28:16 +01:00
Jacek Konieczny c03499e8ec winealsa.drv: Use separate port for each output device.
This fixes use of multiple MIDI outputs while keeping the flexibility of
proper ALSA sequencer port subscriptions.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52220
Signed-off-by: Jacek Konieczny <jajcus@jajcus.net>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 240f2f3963)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 23:02:12 +01:00
Jacek Caban 2b48e780fe ntdll: Fix handling \\.\CON path in RtlDosPathNameToNtPathName.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=32183
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 32b81bfaff)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 22:58:43 +01:00
Zebediah Figura bd444692a9 ntdll/tests: Add more tests for RtlDosPathNameToNtPathName_U().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f2f69a8799)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 22:58:30 +01:00
Bernhard Übelacker 749d5efa7e inetmib1: Fix endianess issue with dwLocalAddr and dwLocalPort.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52224
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9145b551b2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 22:50:22 +01:00
Akihiro Sagawa 4642de1d6c quartz: Fix a race in IMediaFilter::Pause().
Before finishing async run, graph->stream_start isn't stable.
This will cause graph->current_pos to be out of playback duration.
Since graph->current_pos is out of the range, the playback will
be stopped.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52200
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bbdb658402)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 22:48:56 +01:00
Eric Pouech 3bff9ccfa4 cmd: Don't crash on 'if exist' without parameter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51598
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 535da77552)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 22:47:28 +01:00
Connor McAdams 19de448df6 winex11.drv: Add mutable pixel format awareness.
Add the ability to check if the pixel format on the current window was
previously set by wglSetPixelFormatWine(), and if was, allow the
application to change it with a regular wglSetPixelFormat call.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6d04e6c3a9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 22:45:20 +01:00
Bernhard Übelacker 6766fb687f hhctrl.ocx: Handle only the number of bytes given in html_fragment_len.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39699
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e3b2863148)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 22:40:28 +01:00
Alexandre Julliard 2e51da6f16 krnl386.exe: Page-align the GlobalAlloc() size when the selector limit is in pages.
GlobalSize() uses the selector limit and that needs to match the
allocated size.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52082
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1c5e4d066f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-16 22:33:00 +01:00
Rémi Bernon 6d98de6889 ntdll: Use the unrolled memset from msvcrt.
Although less frequently used, heap allocations are zeroed out with
ntdll memset and they don't benefit from the msvcrt memset optimisation.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a602bdd326)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:25:50 +01:00
Hugh McMaster 6e7f753c15 conhost: Process Ctrl-M key input.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50526
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 12cf3459b5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:23:53 +01:00
Christian Costa 19acdd0c35 d3dx9: Also check for a valid alpha channel for TGA images.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48631
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 46f08b169b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:22:29 +01:00
Louis Lenders ce23d7aa44 wsdapi: Add stub for WSDCreateDiscoveryProvider.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52173
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 03f0659805)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:18:19 +01:00
Alexandre Julliard 795035c0ec configure: Fix the netapi check.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 13a3340bc2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:16:07 +01:00
Gerald Pfeifer 71dc3ca16e configure: Diagnose if NetAPI is not present.
For most other configure options we are warning when some dependency
is not present, in particular when it's been explicitly requested.
Also do this for Samba NetAPI now.

Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 07c9dd9bdf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:15:40 +01:00
Zhiyi Zhang d0b9ab2b91 comctl32/button: Support image list margin for buttons with BS_CENTER or BS_VCENTER.
WinSCP uses image list margin to adjust image position on a button when theming is on.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52076
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit feb0b73a3c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:09:34 +01:00
Nick Fox c133264b69 ntdll: Fix LdrGetDllPath with LOAD_WITH_ALTERED_SEARCH_PATH without a path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26350
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51821
Signed-off-by: Nick Fox <nick@foxsec.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ef26f7bd5c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:06:59 +01:00
Nick Fox 9288f9e22a kernel32: Add tests for LdrGetDllPath with LOAD_WITH_ALTERED_SEARCH_PATH.
Signed-off-by: Nick Fox <nick@foxsec.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 85723b9208)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:06:44 +01:00
Piotr Caban c2efc7ed8a vcruntime140_1: Add support for exception separated code segments.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51396
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9ccd84b945)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 23:02:26 +01:00
Derek Lesho 6dfcf590e1 kernelbase: Fix parameter order of FindResourceExW call for non-localized path.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 472763c523)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 22:59:51 +01:00
Alex Henrie 05bcb3cde0 krnl386: Add GetLPErrMode stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52102
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 819d049f12)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 22:42:45 +01:00
Piotr Caban 4c16e0f20b msvcrt: Don't use GetDaylightFlag function in _ftime64.
The function is not available on current Windows releases.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51959
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 00824a94f0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 22:31:51 +01:00
Thomas Faber d1833f8ea6 msvcrt/tests: Show that spawn does not require locking of fds.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit be0684dad5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 22:23:56 +01:00
Doug Lyons 5be7fa7879 msvcrt: Do not acquire fd lock in msvcrt_create_io_inherit_block.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51647
Signed-off-by: Doug Lyons <douglyons@douglyons.com>
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5a514d3f45)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 22:23:00 +01:00
Piotr Caban b45ad23033 oleacc: Add AccessibleObjectFromPoint implementation.
Based on a patch by Alex Henrie.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 92f4f4a4c1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 22:17:02 +01:00
Connor McAdams 4ed070302f oleacc: Implement AccessibleObjectFromEvent.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 602a36a253)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-03-15 22:13:22 +01:00
Louis Lenders ef27e2b503 combase: Add stub for RoOriginateError.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51983
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6b59b26fff)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-26 00:22:49 +01:00
Piotr Caban fb168121b2 msvcp100: Export ctype<char>::table function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51978
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0c42b9e111)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-26 00:20:39 +01:00
Loïc Rebmeister 0b26e88937 loader: Create performance\winsat\datastore on prefix creation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51968
Signed-off-by: Loïc Rebmeister <fox2code@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2173d2dcc8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-26 00:17:17 +01:00
Louis Lenders b48ce9212e wbemprox: Add empty DNSDomain to Win32_NetworkAdapterConfiguration.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51938
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d68ea16266)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-26 00:09:20 +01:00
Bernhard Kölbl 4bde9d09a3 oleaut32: Allow the registration of 64bit typelibs from a 32bit context.
Windows allows the registration of 64bit typelibs from 32bit programs
even on a pure Win32 install.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51864
Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c159f5438a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-26 00:07:31 +01:00
Eric Pouech b00bd9b9ee winedbg: Fix command line arguments parsing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42030
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9808c1d8a3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-25 23:51:50 +01:00
Gabriel Ivăncescu ad7c5e9ced user32: Redraw children when the combo box is dropped down.
Some applications subclass the combo box and handle WM_ERASEBKGND themselves,
without using WS_CLIPCHILDREN. This causes them to erase over the editbox
child, so it requires a refresh as well.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0d4392077e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-25 23:45:17 +01:00
Gabriel Ivăncescu 9edeb764da comctl32: Redraw children when the combo box is dropped down.
Some applications subclass the combo box and handle WM_ERASEBKGND themselves,
without using WS_CLIPCHILDREN. This causes them to erase over the editbox
child, so it requires a refresh as well.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c82d6ee4a7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-25 23:45:04 +01:00
Robert Wilhelm d4024e428b vbscript: Support VT_BSTR in stack_pop_bool.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51911
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b9e38a41ea)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-25 20:39:20 +01:00
Michael Stefaniuc f560fad07d Release 6.0.3.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-25 14:28:42 +01:00
Alexandre Julliard 8d00191097 wininet/tests: Mark a failing test as todo.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 13966ac997)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Jefferson Carpenter 98a3f0376b msxml3/saxreader: Handle null url in parseURL().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51267
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b7386cec71)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker b296253f79 wbemprox: Add __DERIVATION to the list of system properties.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8b6565a61f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker b5eebf644a wbemprox: Return an empty array for __DERIVATION.
Based on a patch by Louis Lenders.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51871
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2243229043)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Piotr Caban 56b6abd5ea ucrtbase: Fix fopen x mode test failures.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51894
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6584733327)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Ted Lyngmo b690f67231 ucrtbase: Add support for x mode in fopen.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51846
Signed-off-by: Ted Lyngmo <ted@lyncon.se>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 51b9f4cd2b)
Conflicts:
	dlls/ucrtbase/tests/misc.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Piotr Caban efdd2b8a57 msvcrt: Support z length modifier in scanf.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5d5f11c002)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Alistair Leslie-Hughes b56d5b9a47 wininet: Allow up to 4K for response headers.
LevelHead includes a Header value that is > 3K in length which
causes a crash after linking your account.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47505
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 42920ad653)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Alistair Leslie-Hughes a6af1e31dd wininet: Reset context length for http status 304.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8825ed72d7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Fabian Maurer 3bf9bae9bf msi: Set dialog as parent in subsequent dialog.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51576
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4b88e29052)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Robert Wilhelm e08b8f0f86 vbscript: Support date and time literals.
Date literals, which are enclosed in number signs in vbscript,
will be lexed, pushed throught parser and compiler and
finally converted to VT_Date Variant in interpreter.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51503
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bf5f7a7b7b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker fe6c5b9305 winhttp/tests: Add redirect tests.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ca5850d920)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker 1d57f812c0 winhttp: Don't remove content-type/length headers in handle_redirect().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50272
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit badc64b42c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker 73e998ab02 winhttp: Fix return value for relative redirects.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ec46607ee0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker ddd57141e1 winhttp: Call drain_content() before clear_response_headers().
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5da1d59241)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker 90661a5d93 winhttp: Call read_data() at least once in drain_content().
This ensures that response headers are processed even if there's no data to read.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50244
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 239964ce86)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker 5e855f33f5 winhttp: Read any data left in the request buffer for websocket connections.
Fixes the case where a websocket server sends an unsolicited frame with the upgrade response.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f738af16fb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Hans Leidekker af1b70b7bb winhttp: Pass a socket pointer to send_bytes() and receive_bytes().
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 54742a9001)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2022-02-06 14:56:33 +01:00
Bernhard Übelacker d2392af664 attrib: Avoid crash when called without parameter.
If attrib is called without any parameter the variable originalname
is used uninitialized.

Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5ec1524326)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-24 00:34:41 +01:00
Jan Sikorski cb8fde193b winemac.drv: Omit WM_ENTER/EXITSIZEMOVE on non-interactive window changes.
The motivating example is when a newly created window gets moved off the system
menu bar. A program might not be prepared to handle these messages yet.

Fixes a crash in Lord of the Rings online.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0d22e8455a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-24 00:33:47 +01:00
Francois Gouget 7a9898344d gdiplus: GdipGetFamilyName() should not crash when given a NULL name.
It used to crash on Windows XP and Vista but does not since Windows 7.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ad663360fa)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-24 00:28:23 +01:00
Giovanni Mascellani 8506b2ae18 kernelbase: Fix an incorrect allocation size.
Variable nt_privs has type TOKEN_PRIVILEGES*, not TOKEN_GROUPS*.

This fixes a crash in the Cyberpunk 2077 launcher.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1ca54db1bf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-24 00:26:02 +01:00
Paul Gofman f9f4e8f692 kernelbase: Fix copy size for delete_privs in CreateRestrictedToken().
Fixes 3D Aim Trainer crash on start.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d63e0b7084)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-24 00:25:22 +01:00
Zebediah Figura 83923e43d5 server: Return STATUS_KEY_DELETED when trying to retrieve the full name of a deleted key.
This fixes a server crash that can be triggered by deleting a key and then
trying to retrieve its name. In that case key->parent is NULL.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 089b2528c2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-24 00:23:43 +01:00
Alexandre Julliard a59337fb7e ntdll: Avoid crash on shutting down partially initialized thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 364099f528)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-24 00:22:30 +01:00
Jacek Caban d1d979bf91 include: Use __builtin_offsetof on Clang.
Fixes a number of warning on MSVC target.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit de9982f069)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-24 00:00:34 +01:00
Zebediah Figura 2a51b72ec3 quartz: Do not print an incorrect state warning in MediaFilter_GetState() if a filter has been run asynchronously.
This is a valid case in which the filter state may or may not match the graph
state.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7f1623bc62)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-23 23:48:36 +01:00
Gijs Vermeulen 08a3472c54 ntdll: Avoid declaration-after-statement warning.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 836ec1d7ed)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-23 23:43:48 +01:00
Andrew Eikum dd412ae81c comctl32: Avoid gcc 11 maybe-uninitialized warning.
dlls/comctl32/monthcal.c:1783:19: warning: ‘htinfo.uHit’ may be used uninitialized [-Wmaybe-uninitialized]

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ce8f724740)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-23 23:40:57 +01:00
Gerald Pfeifer b363adda05 ntdll: Only use sysinfo function when present.
On some systems <sys/sysinfo.h> may be present while the sysinfo
function may not, or at least not as part of standard libraries,
so check whether the function is actually available before using
it.

This fixes builds on FreeBSD with the devel/libsysinfo present.

Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 59da79021a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-23 00:09:17 +01:00
Dmitry Timoshkov 97bbaf5285 vcruntime140_1: Fix compilation with clang.
clang -c -o dlls/vcruntime140_1/except_x86_64.cross.o ../wine.src/dlls/vcruntime140_1/except_x86_64.c -Idlls/vcruntime140_1 \
  -I../wine.src/dlls/vcruntime140_1 -Iinclude -I../wine.src/include -I../wine.src/include/msvcrt \
  -D__WINESRC__ -D_UCRT -DWINE_CROSS_PE -Wall -target x86_64-windows -fno-strict-aliasing \
  -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self -Wno-pragma-pack \
  -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings -Wpointer-arith -Wabsolute-value \
  -Wno-format -Wnonnull -mcx16 -gdwarf-2 -gstrict-dwarf -g -O2
In file included from ../wine.src/dlls/vcruntime140_1/except_x86_64.c:25:
In file included from ../wine.src/include/wine/exception.h:25:
../wine.src/include/winternl.h:4239:82: error: unknown type name 'va_list'
NTSYSAPI NTSTATUS  WINAPI RtlFormatMessage(LPCWSTR,ULONG,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG,ULONG*);

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b0a61ee8b0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 23:36:26 +01:00
Andrew Boyarshin 3c83603c8c include: Fix IRequestDictionary IID.
IRequestDictionary had the wrong UUID specified (IResponse one).
Found by using MIDL instead of WIDL to compile Wine headers:
duplicated IID caused compilation error in MIDL.

Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 32ec7d7b94)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 23:35:03 +01:00
Paul Gofman 7ad7ceb1a2 wined3d: Add GPU information for AMD VANGOGH.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6b724c3dd8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 23:33:45 +01:00
Fabian Maurer d2437cbdce mpr: Fix copy paste error when converting hex char to int.
Spotted by Robert Naumann.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51728
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 63737942a0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 23:25:22 +01:00
Eric Pouech 26c739a4fe winedbg: Fix crash when no process attached in 'info wnd' command.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49625
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5d8bad570d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 23:11:51 +01:00
Zhiyi Zhang f0143c1bc9 uxtheme: Get and set system metrics in 96 DPI.
Fix a bug that font size may be smaller than normal after toggling theming.

For example, the following steps will change the system metrics to incorrect values.
1. Open winecfg, and set DPI to 192. Do not restart winecfg.
2. Change the theme to Light. UXTHEME_BackupSystemMetrics() backs up system metrics in 96 DPI
because the current DPI is still 96.
3. Restart winecfg and turn off theming. UXTHEME_RestoreSystemMetrics() restores system metrics in
192 DPI because the current DPI is 192. So system metrics will be scaled to 1/2 of the original size.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37592
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7290db3e7a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 23:09:53 +01:00
Alistair Leslie-Hughes db98059c71 ntoskrnl.exe: Implement PsGetCurrentProcessSessionId.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36887
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5aec01a7af)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 23:02:18 +01:00
Fabian Maurer f776c46642 configure: Improve resolv lib test for glibc 2.34.
res_init and res_query don't need lresolv on glibc 2.34.
Added another test for ns_initparse and friends.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51635
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a3bbf51377)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 22:42:36 +01:00
Zhiyi Zhang 493a7f4daa user32: Report a fake monitor when running on an invisible window station.
The visible window station check was accidentally deleted in 95be042.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51590
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f8ce819ab5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 22:40:18 +01:00
Zhiyi Zhang 7398ed2977 uxtheme: Use TransparentBlt() for bitmaps with all alpha values being 0xff.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51553
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 96b7a8a317)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 22:34:25 +01:00
Nikolay Sivov f1589ee006 d3dx9/effect: Reset output handle for next after last technique in FindNextValidTechnique().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 60a3e01062)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 22:21:05 +01:00
Alistair Leslie-Hughes a941df5c12 dpnet: Implement IDirectPlay8Server EnumServiceProviders.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d4565f1541)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 22:19:12 +01:00
Alistair Leslie-Hughes 675908b29c services: Check correct permission for QueryServiceConfig2W.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50412
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4a18232e45)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-11-22 22:15:02 +01:00
Akihiro Sagawa 904ad1e120 user32/listbox: Fix redraw after LB_SETCOUNT message.
3ef790b968 accidentally dropped updating
LBS_DISPLAYCHANGED flag that had been done in LISTBOX_InvalidateItems()
if the count value was changed.
In fact, the newly added test shows LB_SETCOUNT message always causes
WM_DRAWITEM requests regardless of the count value.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51591
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 247185ba78)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Akihiro Sagawa b823fa1a3a user32/tests: Test pending redraw state with owner-drawn list box.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a70ed810d5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Austin English 7409b10902 virtdisk: Add DetachVirtualDisk stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51535
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ccbb0eef7b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget bc3524e8e5 oleaut32: Add support for longer currency symbols.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fc5e603cd3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget e3aa6390dc oleaut32: Fix VarParseNumFromStr()'s handling of currency thousands separators.
They are have no default, are not allowed before the first digit, are
unaffected by the presence / absence of a currency symbol, can be mixed
with regular digit separators, are incompatible with hexadecimal and
octal numbers (as are regular digit separators), and mask trailing
spaces.
Also they don't match regular spaces when set to a non-breaking space.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9e4524ffb0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget 617015e11a oleaut32: Remove caching from VARIANT_GetLocalisedNumberChars().
GetLocaleInfoW() already caches the registry information and is fast
enough. This also avoids using out-of-date information after a
SetLocaleInfoW() call.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d8656b4767)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget f82b97c778 oleaut32/tests: Add more VarParseNumFromStr() hexadecimal/octal tests.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a74e2871ab)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget 93971ce383 oleaut32/tests: Test VarParseNumFromStr()'s handling of LOCALE_SMON*.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fd0a55ce46)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget c8dc029d41 oleaut32: Fix VarParseNumFromStr()'s support for trailing thousands separator spaces.
If a trailing character is a thousands separator, VarParseNumFromStr()
only processes it if NUMPRS_THOUSANDS was specified; even if that
character is also a space and NUMPRS_TRAILING_WHITE was specified.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c2aeb915f4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget 014c114a28 oleaut32: VarParseNumFromStr() does not allow leading thousands separators.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit de70f7289e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget 806b738a11 oleaut32/tests: Fix the Swiss franc and Moroccan dirham tests.
Windows <= 8.1 uses an obsolete currency symbol for the Swiss Franc and
Windows 8.1 incorrectly doubled the right-to-left mark in the Moroccan
dirham.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5c86b4d201)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget 3b17256786 oleaut32: Fix a trace containing a null character.
printf("%c Hello\n", 0) works but not TRACE("%c Hello\n", 0) because the
string is formatted before printing.
Work around the issue with wine_dbgstr_w().

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6763ed84cf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Damjan Jovanovic 2240ac5e27 msxml3: Use XSD regex quantifier format S{0, m} instead of S{, m}.
S{,m} is invalid in libxml2 2.9.11 and later, and was never valid
in the XSD specification or any XML implementation tested. We
should only use S{0,m} for our internal XSD schema used in XDR validation.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51358
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 53f3cad7fb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Damjan Jovanovic 9ece53ed3a msxml3/tests: Add some regex tests.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b5f3b8d07f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Alex Henrie 60284543da rasapi32: Add RasSetCredentialsA/W stubs.
Based on a patch by Oleg Dubinskiy.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49726
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 84d85a3d72)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Oleg Dubinskiy 10646cd4e0 include: Add RASCREDENTIALSA/W structures.
Signed-off-by: Oleg Dubinskiy <oleg.dubinskij2013@yandex.ua>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2d8fa6b4d1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Alex Henrie dfe1fa9abc ntoskrnl: Add MmGetPhysicalAddress semi-stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47047
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c5c9c58974)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Zhiyi Zhang 72a7c1991c uxtheme: Fix incorrect part IDs in button class map.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51506
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ec82a0ebe6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Akihiro Sagawa c55a6b6407 midimap: Introduce XP form and prefer it.
Since XP form doesn't support channel mappings, old form is
remained for compatiblity.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51505
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit dbf3b3b6bf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Jacek Caban 8cc412b90c advapi32: Link to msvcrt.dll.
Some applications expect msvcrt.dll to be pulled by system DLLs. On
Windows, loading advapi32 causes msvcrt.dll to be loaded.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51465
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2b3a300cbf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget bb652772af oleaut32: Setting sThousand to a non-breaking space also matches regular spaces.
As the test_VarParseNumFromStrMisc() tests show the converse is not
true.
Note also that the " 1 000" test was failing as expected because in
the French locale Wine was not recognizing regular spaces as thousands
separators. Now it does and Wine incorrectly allows them before the
first digit, just like it does for the English tests.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51450
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c50dff867d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget bf217a1a47 oleaut32: VarParseNumFromStr() accepts trailing currency symbols.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51450
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e02a7e579c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget e4ea517b6c oleaut32: Fix VarParseNumFromStr()'s support for two-character currencies.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51452
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4e34e7513d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget dffceba799 oleaut32/tests: Add more VarParseNumFromStr() tests.
Check how it handles currency signs and spaces before and after the
digits.
Check the combination of thousands separators, spaces and commas. Check
handling of regular vs. non-breaking spaces since the latter are often
used in some locales.
And check what happens in the French locale where spaces and thousands
separators are identical and the currency sign comes after the digits
and, quite often, a space.
Check handling of multi-character currency symbols.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 54ee0e9bfd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget 76d30e2d51 oleaut32/tests: Allow testing VarParseNumFromStr() using Unicode strings.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 627988565b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Piotr Caban 2253901ccf msvcrt: Update round_limb on first limb length change in printf.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51435
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2ffcf44021)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Jactry Zeng 89926751ff gdi32: Fix a typo in unix_face_create().
This also fixes test failures in test_lang_names() when on Japanese system.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51382
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit aee7d560ae)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Zhiyi Zhang 46390286f0 uxtheme: Send WM_THEMECHANGED instead of posting it in SetWindowTheme().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51348
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fe257dde58)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Zhiyi Zhang 6b501df752 uxtheme/tests: Test that SetWindowTheme() should send WM_THEMECHANGED instead of posting it.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 064dad2342)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Henri Verbeet b96d75db4d dxgi: Implement d3d11_swapchain_GetLastPresentCount().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6f674ef6f1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Henri Verbeet f8d613fdc5 dxgi/tests: Add a test for swapchain present counts.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7eadbae52c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Francois Gouget 4b3ca9abee ntdll: Fix the spelling of a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 167c7a524f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Akihiro Sagawa d3ffdb1740 ntdll: Fix null pointer dereference in RtlDosPathNameToNtPathName_U_WithStatus.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c94ac2e061)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-30 18:05:13 +02:00
Akihiro Sagawa a917d758b3 ntdll: Validate directory path when the path name ends with a dos device name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51291
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0acd98f135)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Akihiro Sagawa b301e0285e ntdll/tests: Expand path name tests with path + device name.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 64c4582a40)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Brendan McGrath 9de7231fea kernelbase: Don't pass StdHandles with CREATE_NEW_CONSOLE.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51264
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7539dd607b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Andrey Gusev 7a6b76f28a msvcr120: Add version.rc file.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51244
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7722915395)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Roman Pišl 3ba8d6ea05 ntdll: Don't pretend that the whole address space is reserved on non-i386.
This is analogous to 61dcca5dbf.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50735
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0ec555e58e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Damjan Jovanovic 66fe6841b8 msxml3: Return S_FALSE from IXMLDOMNamedNodeMap::nextNode() when there are no attributes.
Currently Wine return S_FALSE when IXMLDOMNamedNodeMap::nextNode()
has run out of attributes to return, but when an XML node has no
attributes at all, it returns S_OK despite setting the nextNode
output parameter to NULL, causing the caller to crash when it
accesses this pointer. Return S_FALSE in this case instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50603
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 06cd8d3d2e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Zhiyi Zhang c7436090e4 uxtheme: Fall back to default class if the specified subclass is not found.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50113
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3e9fbda43c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Zhiyi Zhang e049b275c5 uxtheme/tests: Test SetWindowTheme() with a non-existent subclass.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 59f3758ecb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Florian Eder bc6346ba85 cmd: Do not change errorlevel when setting environment variables.
Changes CMD to set its errorlevel to 0 only when the value of an environment variable
is set in in non-interactive / batch mode, retains the previous value otherwise.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47791
Signed-off-by: Florian Eder <others.meder@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 617d14bc12)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Nikolay Sivov f2a45ae5c4 oleaut32: Added ICreateTypeInfo2::DeleteFuncDesc().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e3ef9b5426)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Vijay Kiran Kamuju 4eea9e383a msdrm: Add stub DRMRegisterContent function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50595
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit afd5550b07)
Conflicts:
	dlls/msdrm/Makefile.in
	dlls/msdrm/main.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Gijs Vermeulen 718699df40 vcomp: Implement omp_get_num_procs().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50041
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 616e2284e0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Damjan Jovanovic 4fddab4813 server: The owner of a securable object should have all the standard access rights.
Cygwin fork() fails in NtCreateSymbolicLinkObject(). We successfully
create the link but then fail to alloc_handle() with STATUS_ACCESS_DENIED,
because the requested access rights exceed what the owner is allowed.
Allow it more.

Thank you to Dmitry Timoshkov for debugging the security details from
alloc_handle() onwards.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48891
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 31e984a09d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Hiroki Awata 1ecb100289 dsound: Notify DSBPN_OFFSETSTOP earlier.
Some games may not receive the DSBPN_OFFSETSTOP event and get stuck if
CloseHandle is called immediately after IDirectSoundBuffer::Stop.  To
solve this problem, IDirectSoundBuffer::Stop will immediately notify
the DSBPN_OFFSETSTOP event.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41292
Signed-off-by: Hiroki Awata <castaneai@by.black>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8116d4e11c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Kalen Alwardt 3e134c2b5c ntdll: Export ZwFilterToken().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39142
Signed-off-by: Kalen Alwardt <kalenalwardt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 29e1494c72)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Rémi Bernon f9bca7ed42 dssenh: Only fill hash buffer when it's provided.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30244
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9b19a110ea)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Rémi Bernon e83cd0e70f dssenh: Return NTE_BAD_KEYSET when key cannot be opened.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30244
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit cf770571bf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Rémi Bernon 239bb6cc55 dssenh/tests: Add CryptAcquireContextA last error check.
When container key doesn't exist yet.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30244
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c5bdc2408f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Rémi Bernon 9ef3ca8b2d msvcrt: Set next_token when str is empty in wcstok_s.
Otherwise, when str is empty, an invalid parameter exception is raised.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30244
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 32bbef5d3e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:40:02 +02:00
Hans Leidekker 7f1d6a8ee2 wldap32: Rename ldap_connect() to avoid a name conflict.
Fixes the build against OpenLDAP 2.5.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51129
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-27 21:36:32 +02:00
Michael Stefaniuc 3c9afe8f87 Release 6.0.2.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-26 16:38:44 +02:00
Alexandre Julliard 4f158c1ca6 gdiplus/tests: Regenerate ttf files with the official fontforge version.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0ec38429f3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-18 20:32:59 +02:00
Alexandre Julliard 1c9679a35f gdi32/tests: Regenerate ttf files with the official fontforge version.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8d373a67e1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-18 20:32:59 +02:00
Gijs Vermeulen 4a0a4d150d secur32: Default to building with GnuTLS support on macOS, if present.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4940d2ada2)
Conflicts:
	dlls/secur32/schannel_gnutls.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-18 20:32:59 +02:00
Gijs Vermeulen e2e053ea57 winecfg: Disable virtual desktop when using macdrv.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e2db7ef7f4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-18 20:32:59 +02:00
Alexandre Julliard 4f9701317b explorer: Store the graphics driver basename instead of the full path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d47be63fae)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-18 20:32:59 +02:00
Hans Leidekker 2ed9701ab9 winhttp: Use ws.ifelse.io for websocket tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51631
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9f6e39e8b9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-05 21:55:43 +02:00
Zebediah Figura f61a3b7d15 wine.inf: Install the protocol database at etc\protocol.
Unlike Unix, on Windows the file name is not plural.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 03dcb36979)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 23:03:13 +02:00
Francois Gouget cd5311958c make_unicode: Add support for the 720 codepage (Arabic, Farsi and Urdu).
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a1bae9f288)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 22:53:32 +02:00
Anton Baskanov 40b962f9ef fonts: Fix dotaccent glyph position in Small Fonts.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 80ef009fc1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 22:47:59 +02:00
Anton Baskanov 7347cbd07a fonts: Fix breve glyph position in 16px MS Sans Serif.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9ecca23a32)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 22:46:31 +02:00
Haidong Yu bd11172b7a shell32: Fix a memory leak.
Signed-off-by: Haidong Yu <yuhaidong@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 56976159ab)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 20:55:40 +02:00
Haidong Yu ef54f3c227 shell32: Fix a memory leak.
Signed-off-by: Haidong Yu <yuhaidong@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 479b659463)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 20:54:49 +02:00
Rémi Bernon 531247b84e dinput: Prevent a device interface leak when enumerating.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=36263
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 52aacd2377)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 20:53:32 +02:00
Damjan Jovanovic e35da6ed01 shell32: Fix a lock leak.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 401de24b89)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 20:52:56 +02:00
Torge Matthies 96a1855bb9 winex11.drv: Avoid race condition in X11 error handling.
The err_callback* globals need to be protected from being overwritten
before X11DRV_check_error is called, otherwise no or the wrong error
handler might be called.

Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2e4bfa642e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 20:43:32 +02:00
Piotr Caban 3b224895b0 winemac.drv: Don't filter non active displays out.
On Windows 10 the DISPLAY_DEVICE_ACTIVE flag is set even if monitor is
in power
saving mode or switched off. Monitors without DISPLAY_DEVICE_ACTIVE are
only reported when display is disabled. This doesn't match with
CGDisplayIsActive function.

Current code causes rendering problems when native .NET is used. When
monitors are updated when in power saving mode (e.g. due to race on
machine wake-up) we might end up with no monitors being enumerated by
EnumDisplayMonitors.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5400db15ca)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-10-03 20:41:46 +02:00
Brendan Shanks d7e26f2f7b configure: Work around Xcode 12's ld assuming 16KB page sizes.
Starting in Xcode 12, ld rounds page sizes and alignments up to 16KB
for all architectures. Passing '-segalign 0x1000' resets this back to
4KB.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 11fd7e8394)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-27 00:16:47 +02:00
Matteo Bruni 9af691e74a wined3d: Don't skip FFP vertex pipeline state handlers when STATE_VDECL is dirty.
This fixes the non-default ARB shader backend, broken since
2ddb6b66a7, although the
fundamental issue was there long before that.

Originally the STATE_VDECL handler did some bookkeeping (basically,
computing what is now the stream info data) that's a prerequisite for
running other state handlers. For this reason a somewhat complicated
dance was put in place, with the dependent handlers returning right
away until the STATE_VDECL handler could prepare everything up and the
STATE_VDECL handler in turn explicitly calling these "downstream"
handlers so that they could do their job. With the commit mentioned
above the state dirty flags are cleared after the corresponding
handlers are executed, which means that the relevant handlers are
skipped twice and some stuff is never set up properly.

Stream info is computed by context_apply_draw_state() before going
through the state handler table for a long time now, getting rid of
this obscure handler interdependency. So let's just get rid of the
skipping altogether.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e106bbdd39)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-27 00:10:36 +02:00
Austin English 44da7b267a readme: Document Libera Chat migration.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d9a8be2a46)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-27 00:08:13 +02:00
Haoyang Chen 328d834ad9 gdi32: Fix a memory leak.
Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4b9c4e4201)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-26 22:32:41 +02:00
Owen Rudge fb53228568 winspool: Filter invalid characters when creating the PPD filename.
Fixes potential crash when trying to print if a CUPS printer name
contains an asterisk.

Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6b906e8237)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-15 00:57:39 +02:00
Paul Gofman 5cf41e251d vcruntime140_1: Support two continuation addresses for catchblock.
MSVC generates that sometimes when there is a goto from catch block.

Fixes a crash in Company of Heroes 2.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 049bd08d8b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-15 00:54:53 +02:00
Zhiyi Zhang d7f35aacea ntoskrnl.exe: Exclude large integer APIs from relay tracing.
Similar to 8d7ec7968d

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d7a4d757ce)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-14 23:50:23 +02:00
Dmitry Timoshkov 8c985b2b66 ntdll: Exclude large integer APIs from relay tracing.
These builtin functions use stdcall calling convention, but compilers
reference them without stdcall declarations.

Otherwise ucrtbase initialization code crashes with +relay enabled when
compiled with clang as a PE build.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8d7ec7968d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-14 23:43:07 +02:00
Arkadiusz Hiler f6144283a6 kernelbase: Fix GetFileVersionInfo*() crashes with malformed resources.
Some Unity games ship with an encrypted Assembly-CSharp.dll, including
the resources directory, yet the engine still calls GetFileVersionInfoSizeW()
on those files. This may results in a page fault when trying to find the
version resource and takes the whole process down.

The change fixes crashes when launching Home Behind 2 and Crown Trick.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50075
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e51ae86937)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-14 22:58:02 +02:00
Andrew Eikum fbe42005a5 windowscodecs: Avoid types deprecated in libtiff 4.3.
dlls/windowscodecs/libtiff.c:256:5: warning: ‘uint16’ is deprecated [-Wdeprecated-declarations]

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5e3758a70f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-14 22:54:26 +02:00
Jacek Caban f2dad112ac msvcrt: Add sincos to importlib.
Fixes cross compilation with GCC 11, which may optimize a pair of sin(),
cos() calls to a single sincos() call, which is not exported by any
msvcrt version.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f013127647)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-13 23:18:53 +02:00
Nguyễn Chính Hữu 08d4d30a12 wined3d: Add GPU information for NVIDIA GT 1030.
Signed-off-by: Nguyễn Chính Hữu <huupoke12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8854fd2b07)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-13 23:10:05 +02:00
Brendan Shanks 3ff3988763 wined3d: Add GPU information for Intel UHD Graphics 630.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f074862504)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-13 23:09:08 +02:00
Alistair Leslie-Hughes 2f06215a8e gdi32: Don't override FontSubstitutes on a DPI only change.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36010
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7763efa347)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-12 22:33:14 +02:00
Nikolay Sivov c8d12b4e05 shcore/stream: Implement generic CopyTo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e7f60e39f6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-10 00:48:49 +02:00
Piotr Caban cdab0e40b9 msvcrt: Improve memmove performance on i386 and x86_64 architectures.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49663
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 38c4904960)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-10 00:35:32 +02:00
Esme Povirk a0b7fb69e7 gdiplus: Implement reference counting for private font families.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50896
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a554079860)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-10 00:11:39 +02:00
Haoyang Chen bf92d6bedf gdiplus: Avoid filtering of special characters.
Symbols such as ←  should also be displayed.

Signed-off-by: Haoyang Chen <chenhaoyang@uniontech.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 43e2563f44)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-10 00:11:26 +02:00
Gijs Vermeulen ee79875f34 amstream: Handle AMMSF_RENDERALLSTREAMS in IAMMultiMediaStream::OpenFile().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3319526fda)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 22:24:16 +02:00
Zebediah Figura 57ed063ec0 wtsapi32: Implement WTSEnumerateProcessesW().
Based on a patch by Sebastian Lackner.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29903
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5f8c7c2563)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 22:22:19 +02:00
Zebediah Figura ea49fd72f0 include: Introduce winetest_push_context() and winetest_pop_context().
Based on vkd3d's vkd3d_test_set_context(), but adding support for a stack of
context prefixes, to more easily accomodate tests with nested loops.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit af39a1b0bc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 22:19:59 +02:00
Zebediah Figura f78df1dd43 include: Factor out winetest_printf().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2cdf6f0f30)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 22:19:12 +02:00
Francois Gouget 598a21be9c tests: Add ignore_exceptions().
This lets tests signal that for a while exceptions are expected and
should not be counted as test failures.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4ac37c4e24)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 22:16:51 +02:00
Francois Gouget 0aabd08c53 tests: Trace the filename in winetest_wait_child_process().
We want the filename next to the line number, just like in every other
trace.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 092130e2aa)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 22:15:59 +02:00
Louis Lenders 360ce18577 kernel32: Remove entry for BasepDebugDump.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51117
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7aba0e541e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 21:47:25 +02:00
Louis Lenders 1b64d29849 advapi32: Add stub for LsaEnumerateAccounts.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50830
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c74508d225)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 21:37:28 +02:00
Sebastian Lackner 717e8d5366 ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 43de1407e9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-09 21:36:33 +02:00
Qian Hong 1abbaaa221 atl: Implement AtlAxDialogBox().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=32749
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f987d8ac3b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 21:14:56 +02:00
Piotr Caban 1d23985d64 msvcrt: Fix _unDName crash when demangling class function pointer.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7a1e7cbeee)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:46:09 +02:00
Piotr Caban 737adb2684 msvcrt/tests: Cleanup datatype demangle tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d91160835a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:45:56 +02:00
Piotr Caban 53ee588abb msvcrt/tests: Link to malloc/free functions in cpp tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d7cc3d6583)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:45:42 +02:00
Nikolay Sivov 499448fb21 gdi32: Enumerate scalable fonts with zero charset mask as OEM.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51041
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8241d21ae0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:43:09 +02:00
Paul Gofman d312b7ac50 ddraw/tests: Also test RT caps for software device.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6991d7befa)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:35:56 +02:00
Damjan Jovanovic 94254f4a14 shell32/tests: Fix test failures from ad412b11a7.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a3295e3831)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:31:49 +02:00
Damjan Jovanovic 26c1f7c83b shell32: Implement IID_IContextMenu in CreateViewObject() methods for shell folders that support it.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39841
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ad412b11a7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:30:00 +02:00
Zebediah Figura 5703c14110 msi: Check for a NULL return from deformat_string() when checking for failure.
An empty string is valid, and can occur if e.g. a nonexistent property is
expanded.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51091
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 814f18ab75)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:18:00 +02:00
Damjan Jovanovic df085a31ff shell32: Use a smaller range of shellview menu IDs in our IContextMenu functions.
The shellview menu IDs are very large, eg. FCIDM_SHVIEW_OPEN is 0x7102,
while applications want menu IDs to fit into a small range, eg. 1-1000 for
Explorer++. This causes our IContextMenu_QueryContextMenu() functions to
leave out most menu options. We should rebase our shellview menu ids
by -0x7000 so they occupy a smaller range.

This gets both Explorer++ and Double Commander to show the correct
right-click menus.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=24893
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2b6458b757)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Damjan Jovanovic 3b90fc2314 shell32: The menu wIDs in hmenu were rebased by idCmdFirst.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 91a8b4819e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Damjan Jovanovic 46df61a087 comctl32: Send DTN_DATETIMECHANGE when the checkbox changes too.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=19756
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9b61a64601)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Gijs Vermeulen ebaafad23e ntdll: Don't fail when trying to remove the value of a non-existant variable in RtlSetEnvironmentVariable().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51035
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2f2cdc8bb1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Gijs Vermeulen 43120ef411 ntdll/tests: Refactor RtlSetEnvironmentVariable() tests.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 09879590cb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Michele Dionisio 5aeb6c71d0 msvcrt: Add __stdio_common_vfprintf_p and __stdio_common_vfwprintf_p.
Signed-off-by: Michele Dionisio <michele.dionisio@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8ea43f388f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
David Torok 758ecd13ab ntdll: Add NtCreateThread stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50952
Signed-off-by: David Torok <dt@zeroitlab.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 11ae0ade89)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Dmitry Timoshkov d54b02e281 crypt32: Add support for importing RSA public keys with BCrypt.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50925
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9d1ae850df)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Dmitry Timoshkov fa4714e604 crypt32: Implement CryptImportPublicKeyInfoEx2.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c2c7946680)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Gijs Vermeulen fe998fb2d3 dbghelp: Implement SymFromNameW().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50829
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8d260b40fc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Gijs Vermeulen 74d7bd0fdf ntdll: Return STATUS_INFO_LENGTH_MISMATCH when len is too small in NtQueryObject(ObjectBasicInformation).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50791
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 749f8c25e2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Anton Baskanov a0711d16fa amstream: Support the event parameter in IDirectDrawStreamSample::Update.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50628
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b8a646f499)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Anton Baskanov f16cda7e63 amstream/tests: Add a test for event parameter of IDirectDrawStreamSample::Update.
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3088ce35cb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Alexandre Julliard 910d7e52e5 wine.inf: Fix the Tcpip database path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50318
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a7a1e2643a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Andrey Turkin 1edb71ad07 ieframe: Implement IWebBrowser2::get_LocationName().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=12457
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 92713253ab)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Alexandre Julliard 6622aed36e ws2_32: Install network database files.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=12076
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 50c40b913a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Vijay Kiran Kamuju f636870dd8 dhtmled.ocx: Fake success in IDHTMLEdit::NewDocument.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b87f938c4d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Vijay Kiran Kamuju b973686abc dhtmled.ocx: Add stub IOleControl interface.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50916
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 95538bb5d3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Lauri Kenttä ae66cb71b4 msvcrt: Handle negative zero, infinity and nan in _ecvt and others.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50885
Signed-off-by: Lauri Kenttä <lauri.kentta@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 97b420224e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Piotr Caban 7dfaf25939 msvcrt: Cleanup _ecvt tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0f7ed56852)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Louis Lenders 23ac462cff advapi32: Update version resource.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50854
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 145210af9f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Jacek Caban adc1b84adb jscript: Use quiet NaNs in jsval.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50845
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d9a4392d6b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Akihiro Sagawa 08397d2346 gdi32: Fix text metrics used in EnumFonts families.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50818
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 837c4f4b87)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:04:23 +02:00
Akihiro Sagawa bc76df8934 gdi32: Move otmEMSquare initialization to freetype_load_font.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8f6f1c8f7a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-07-08 00:03:31 +02:00
Austin English bdf3307a15 tdh: Add TdhLoadManifestFromBinary stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50725
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a9bab3601e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 22:26:31 +02:00
Vijay Kiran Kamuju 4705790ee3 dhtmled.ocx: Implement IOleObject::SetExtent and IOleObject::GetExtent functions.
This time without tests as the ocx file is not available from windows 7 &
IE 8

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50697
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6ca1a92684)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 22:23:45 +02:00
Rémi Bernon 4dc5606c35 dinput: Wait for the hook thread to exit when stopping it.
FlatOut2 demo calls FreeLibrary on the dinput8 module more times than
it has loaded it, and the module reference that the internal thread has
is getting decremented before its exit.

Having an internal window to destroy also makes it more likely to crash
as it takes more time to exit calls the window procedure function.

Waiting for the thread to complete when all the dinput instances are
destroyed ensures that the thread isn't alive when the game frees the
DLL, and prevents the thread from crashing.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50673
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b71cea76ed)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 22:19:32 +02:00
Jacek Caban 158c49ca48 mshtml: Support DispHTMLHeadElement interface.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50492
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4efad17a9f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 22:15:20 +02:00
Alexandre Julliard 5d5d7f41f5 configure: Fix package name for FAudio.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50436
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f126809ec0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 22:11:29 +02:00
Arkadiusz Hiler 8180241f02 msvcp140_1: Implement the DLL.
This backs C++17's std::pmr implementation.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49954
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9cbff7e68c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 22:09:41 +02:00
Arkadiusz Hiler 95154afde7 msvcp90: Add helpers for creating base class RTTI.
Suggested by Piotr Caban.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f3f948a5a3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 22:09:18 +02:00
Piotr Caban 1a38fd0a54 msvcp90: Add macro that define type_info vtable.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6568a8cb62)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 22:08:49 +02:00
Jan Sikorski cfec1ccd0d wined3d: Handle different slice pitches in uncompressed texture updates.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fc29f2a676)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 21:50:04 +02:00
David White d7827c6745 urlmon: Implement IMoniker_ComposeWith() for url monikers.
Signed-off-by: David White <dwhite@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 67e7f6cd56)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 21:47:03 +02:00
Dmitry Kislyuk 506a20a1da mshtml: Fix NULL offset parent handling in IHTMLElement::get_offsetParent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50875
Signed-off-by: Dmitry Kislyuk <dimaki@rocketmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 35d0fda0f0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 21:37:35 +02:00
Hans Leidekker 60fcda90f4 msi: Fix building the fusion filename.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50809
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 46424c6196)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 01:38:59 +02:00
Louis Lenders 81f705ee5b wbemprox: Add ProductType to win32_operatingsystem class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50805
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 733dc15bae)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 01:37:56 +02:00
Roman Pišl ef574b5e0c kernelbase: Convert DOS to NT path for FileRenameInfo in SetFileInformationByHandle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50756
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 33c6a6cb28)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 01:03:34 +02:00
Roman Pišl 6260a41277 kernel32/tests: Add test for FileRenameInfo in SetFileInformationByHandle.
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0f84d30753)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 01:03:15 +02:00
Gijs Vermeulen c130d3ad74 kernelbase: Support FileRenameInfo in SetFileInformationByHandle.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50756
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5c86b9f1dc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 01:03:02 +02:00
John Zourlios 678d118c42 kernelbase: Accept LINGUISTIC_IGNOREDIACRITIC & SORT_DIGITSASNUMBERS in CompareStringEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50362
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0a366f7e4a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 00:10:56 +02:00
Gijs Vermeulen 1d3156843b kernelbase: Reject SORT_DIGITSASNUMBERS in CompareStringA().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ed61ff43f4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 00:10:31 +02:00
Hans Leidekker 0b33385f11 ntdll: Fall back to reading /dev/urandom if getrandom() is not supported.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50168
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e6407c39ba)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-30 00:08:17 +02:00
Matteo Bruni b9eb1a9327 wined3d: Handle blits to Vulkan swapchains not matching the D3D swapchain.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50119
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit cb45e91b24)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-29 23:51:07 +02:00
Louis Lenders c3a9607a3b wtsapi32: Implement WTSQuerySessionInformation(WTSDomainName).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47310
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c6f133f635)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-29 23:46:54 +02:00
Gijs Vermeulen 5920a034b8 wtsapi32/tests: Test returned username for WTSQuerySessionInformation(WTSUserName).
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e07c658faf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-29 23:46:36 +02:00
Gijs Vermeulen d2d42b9cc5 wtsapi32: Avoid calling GetUserNameW() twice in WTSQuerySessionInformationW(WTSUserName).
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6a822d4708)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-29 23:46:23 +02:00
Rémi Bernon fa78f4a2da d3d11: Add initial implementation of CreateDeviceContextState.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 846276f3ca)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-29 23:42:27 +02:00
Alexandre Julliard 1552a865a3 makefiles: Only allow includes and defines in pkg-config flags.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50811
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4f04994ef4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-06-08 21:43:20 +02:00
Michael Stefaniuc 46e876377f Release 6.0.1.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-07 22:00:25 +02:00
Martin Storsjo be1c8a56a3 msvcrt: Fix reading BOM-less files opened with ccs=unicode.
This fixes a regression in running MSVC 2010 in wine, when reading
.def files (regressed in b0ab1b7602).

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fb0fa9aacf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-29 11:27:42 +02:00
Brendan Shanks 5faad354d8 winemac.drv: Handle non-PCI GPUs correctly.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5fbd40520d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-24 21:55:07 +02:00
Brendan Shanks cb9b17fa85 winemac.drv: Fix crash when building against Metal-capable SDK but running on older OS X.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50790
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d52c4eb00c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-24 21:55:07 +02:00
Brendan Shanks aa83195f1a winemac.drv: Use Metal to get a display's GPU info if possible.
Fixes an Apple Silicon issue where CGDisplayIOServicePort() returns
a fake AMD GPU "compatibility" node rather than the real GPU node.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ae319caa3b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-24 21:55:07 +02:00
Jan Sikorski 52f5e431ed winemac.drv: Include depth32+stencil pixel formats in enumeration.
This is especially important for M1 GPUs as they don't support the 24/8 format.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 88220e0ee4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-24 21:55:07 +02:00
Michael Stefaniuc 8d5c8f775e tools: Get the ANNOUNCE bug list from the stable-notes git notes.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-19 22:49:44 +02:00
Zhiyi Zhang f8784c6eb0 user32/tests: Do not change adapters to every available modes.
This reduce the time to run the monitor test from 6 minutes to 25 seconds.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50086
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit cad102465d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-19 22:40:59 +02:00
Alexandre Julliard c62e10c0e6 user32/tests: Remove todo from a test that seems to succeed reliably now.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0d017b12cf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-19 22:38:30 +02:00
Zhiyi Zhang 91fff979c6 user32/tests: Add optional messages to test sequences.
Fix a possible test failure on Win10 2009.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a11ffeec96)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-19 22:36:08 +02:00
Matteo Bruni 6cc4bd4c28 wined3d: Correctly handle modifiers on instructions with multiple destination registers.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 65b3279bae)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 21:08:18 +02:00
Floris Renaud af9312c574 po: Update Dutch translation.
Signed-off-by: Floris Renaud <jkfloris@dds.nl>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 24e41be136)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Floris Renaud 9bc7bbfe6b po: Update Dutch translation.
Signed-off-by: Floris Renaud <jkfloris@dds.nl>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 717dd6cee4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Byeongsik Jeon 5cbb615f22 po: Update Korean translation.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4d483cd855)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Floris Renaud f39c602aa9 po: Fix Dutch spelling errors.
Signed-off-by: Floris Renaud <jkfloris@dds.nl>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b36f626e4c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Floris Renaud 114a580b2e po: Update Dutch translation.
Signed-off-by: Floris Renaud <jkfloris@dds.nl>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0174f7072e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Alexandre Julliard 6cc71f92a3 make_unicode: Use codepage 949 to add default mappings to codepage 20949.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6f68543692)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Sanghoon Park dbd00086d5 make_unicode: Add support for codepage 20949 (Korean Wansung).
Signed-off-by: Sanghoon Park <esifea1908@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fd3a640206)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Floris Renaud 71902db007 documentation: Add Dutch README translation.
Signed-off-by: Floris Renaud <jkfloris@dds.nl>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f72ef20e88)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Floris Renaud 27fc09f67c documentation: Change obsolete Debian and Red Hat packages.
xlib6g-dev on Debian and XFree86-devel on Red Hat no longer exist.
Replaced with: xorg-dev (Debian) and libX11-devel (Red Hat)

Signed-off-by: Floris Renaud <jkfloris@dds.nl>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8c65205d22)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Brendan Shanks f1a7cae5cb loader: On Mac, reserve an area starting at 4GB to force Rosetta's allocations higher.
On Apple Silicon, Rosetta allocates memory starting at 0x100000000
(the 4GB line) before the preloader runs.
The .NET 3.5 installer and DirectX Jun2010 redistributable both contain
non-relocatable EXEs with that base address, which fail to run.

The workaround is to create an empty linker section at that address,
which is mapped by the kernel before Rosetta runs and forces Rosetta's
allocations higher in memory.
The linker section runs from 0x100000000-0x114000000.
Rosetta's allocations are ~132MB, and should end below 0x120000000.

This is not an exact science: a non-relocatable EXE with base address
between 0x114000000-0x120000000 will fail to run. If one is discovered,
the section size will need to be changed.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 307f5d00f1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Brendan Shanks 497025d144 loader: On Mac, move the top-down allocations area down to avoid Rosetta regions.
On Apple Silicon, Rosetta's shared cache starts at 0x7ffe00000000 and
the runtime is mapped below that.
Put the top-down allocation area below the runtime with plenty of room
to spare.

Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 720611e28e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Alexandre Julliard ea2a235727 start: Avoid duplicate backslashes in command line.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1b4b4a9bb5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Rémi Bernon 7515889470 winedbg: Don't dereference possibly NULL thread pointer.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6eff0342ad)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Chao Long 8d2e4ee83a wmic: Add missing aliases.
Signed-off-by: Chao Long <longchao@uniontech.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7dba53a0f2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Rémi Bernon 196f033dec plugplay: Broadcast WM_DEVICECHANGE message asynchronously.
It may otherwise trigger a nasty race condition, where:

1) For explorer.exe to register the CLSID_ShellWindows classes, it
   needs RpcSS service to be started,

2) services.exe may start WinePlugPlay service group first, waiting for
   its startup to complete,

3) during startup and early device enumeration, hidclass.sys may call
   IoSetDeviceInterfaceState, which calls plugplay_send_event [1],

4) plugplay_send_event tries to broadcast a WM_DEVICECHANGE message with
   BSF_QUERY, waiting for the individual threads to reply,

5) which times-out because window threads are waiting on explorer.exe
   to create its desktop window and reply to the WM_NULL SendMessage.

This happens more likely as there is threads with message queues
being started, each waiting on the desktop window to reply. Usually
explorer.exe is able to reply to some messages with the implicit
message processing while creating its window, but not all of them.

[1] Not completely sure how, it looks like some RPC too, but before
    RpcSs is started?

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f5ca06016d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Andrew Sheldon bd7041e39f wined3d: Add GPU information for Radeon RX 6800(XT) / 6900 XT.
Signed-off-by: Andrew Sheldon <asheldon55@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d1b2eea421)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Zebediah Figura 4f24daba64 explorer: Send systray messages with SendNotifyMessage().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50441
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7eca09d7e0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Nikolay Sivov 9433c600f9 sc: Fix typos in CLI arguments parsing.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d3ddc11864)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Giovanni Mascellani 4b774ec357 dwrite: Do not segfault when there are no typographic features to return.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 65f5033702)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Damjan Jovanovic 087637e861 mmsystem: Win16 DllEntryPoint uses HINSTANCE16, not HINSTANCE.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7464d1042a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Martin Storsjo 0d89678307 include: Don't use __attribute__((pcs("aapcs-vfp"))) when building in PE mode.
Clang doesn't support this attribute for windows targets right now;
the attribute is only needed for selecting a potentially non-default
calling convention on e.g. linux.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 52398912f9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Paul Gofman 3fab693d00 dbghelp: Fix unwind opcodes on x64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6bcde00566)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Andrey Gusev 1256e6226f wined3d: Add AMD Radeon RX 5500M.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c66e0e5723)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Dmitry Kislyuk d94b4a494b msctf: Quiet a spammy fixme in InputProcessorProfileMgr_GetActiveProfile.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50744
Signed-off-by: Dmitry Kislyuk <dimaki@rocketmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0712b6b1a0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Gijs Vermeulen c4cf95c6f9 wmvcore: Upgrade to IWMSyncReader2.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50740
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7fa74fa78e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Dmitry Timoshkov b66571e730 server: Set error to STATUS_UNSUCCESSFUL when the server fails to queue APC for a thread.
I've left another case of returning STATUS_PROCESS_IS_TERMINATING since
that's not covered by the tests.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50704
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 050dc49b38)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Dmitry Timoshkov 015f3167d8 kernel32/tests: Add a test for calling QueueUserAPC() on a terminated thread.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 816b588e04)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Bernhard Kölbl 3224e39044 msvcrt: Update source pointer in wcsrtombs in C locale.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50698
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3dca00f1dd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Roman Pišl 780b202907 cmd: Fix handling of brackets in if-set expressions on a single line.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50642
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2d6b0b67d9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Roman Pišl 907c5a2135 cmd: Fix handling of nested if-for expressions on a single line.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50641
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6809e0599e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Henri Verbeet d0a38a32c7 wined3d: Set the "compareEnable" field of struct VkSamplerCreateInfo to either 0 or 1.
VkBool32 is (unfortunately) specified as 0/1, instead of zero/non-zero. Found
by the validation layers.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f969570c22)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Matteo Bruni 43e4f4b81e wined3d: Use VK_FORMAT_D24_UNORM_S8_UINT when available.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50123
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e4bc4df09f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Bernhard Kölbl 597a3b414e netprofm: Set correct GUIDs for network connections.
Retrieve the network connection's GUID from the interface index.

Signed-off-by: Bernhard Kölbl <besentv@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4393438ab3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Alistair Leslie-Hughes 3d74e4b563 msado15: Implement Dispatch functions in _Connection.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=16676
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 079a963a27)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Alexandre Julliard aff5e8fb75 ntdll: Avoid sign conversion warnings in Thumb-2 relocation processing.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d89b304eb7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Jacek Caban 3591388c75 oleaut32: Use C locale in VARIANT_BstrFromReal.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50672
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 22a1485c08)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Roman Pišl 1f09409052 ntdll: Don't set error status if volume serial number is missing.
Fixes regression from b14eee69c7.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50781
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit dabba3cc86)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Vijay Kiran Kamuju b403116243 dhtmled.ocx: Implement IOleObject::GetMiscStatus function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50620
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d2c2987bce)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Jacek Caban a4ac7faab9 conhost: Avoid assumption about the exact Unix cursor position after writing to the last column.
Spotted by Roman Pišl.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50581
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9e97f3513e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Alistair Leslie-Hughes f4d30930a6 odbccp32: Implement SQLWriteDSNToIni/W.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50150
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ea3096bdab)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Henri Verbeet e6fab0bcba wined3d: Introduce a backup path for swapchain presents using GDI.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 70418f69dd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Zhiyi Zhang 1fdf148c58 user32: Send a WM_ACTIVATE message after restoring a minimized top level window.
The WmShowRestoreMinimizedOverlappedSeq message sequence in tests
clearly show that there is a WM_ACTIVATE message at the end of
ShowWindow() calls after restoring a minimized window, and it's
not from SetFocus().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47507
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3898ad408b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Akihiro Sagawa 0dc595d4e1 krnl386.exe: Cap GetFreeSpace value to 2GB.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46962
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit eca2bfd071)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:26 +02:00
Michael Müller dc85e95017 ntdll: Implement NtQuerySystemInformation(SystemExtendedHandleInformation).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 835f5fff71)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Gijs Vermeulen c3674b30f2 msvcirt: Implement remainder of fstream class.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4981785f0f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Bernhard Reiter f40379a9d1 imagehlp: Partially implement BindImageEx().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=3591
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d129a89d22)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Zebediah Figura fd59214adf imagehlp/tests: Rewrite test_bind_image_ex() using a DLL resource.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4782b08f31)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Zebediah Figura a0452ee0bc imagehlp/tests: Link directly to imagehlp and psapi.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 670913af21)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Hans Leidekker f7c5cb04ba wbemprox: Fix Windows 8/8.1 caption.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50610
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bdba6037d0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Roman Pišl 88a189f964 conhost: Improve notification when resizing window.
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2ca86d3b59)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Roman Pišl 9dff1027d5 conhost: Fix copy-paste error when setting windows size.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50602
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 361b4c381e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Austin English d81c2f2fa7 ntoskrnl.exe: Add KdDisableDebugger/KdEnableDebugger stubs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50599
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e8cb99466b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Hans Leidekker 18ab8254e9 wbemprox: Report the real OS version.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50580
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ba06f7a541)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Henri Verbeet dff027f211 wined3d: Allow resource copies between block-compatible formats.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 02385a4042)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Henri Verbeet c760f6b9de d3d11/tests: Add format compatibility tests for DXGI_FORMAT_R9G9B9E5_SHAREDEXP.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 70c09cd89d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Henri Verbeet 1eead2aaca wined3d: Create the backbuffer rendertarget view only after calling adapter_init_3d().
Otherwise we may not be able to acquire a context to create the view. In
practice, this is only an issue for d3d9 and earlier in combination with the
Vulkan backend.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b9a440d15d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Zebediah Figura 02850d83bf winex11: Send systray messages with SendNotifyMessage().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50441
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5c09d815f8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Zebediah Figura 2e1ba07a11 winemac: Send systray messages with SendNotifyMessage().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50441
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 46c4facab7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Piotr Caban ec8c5545c3 concrt140: Add arm exports.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2201ca08fb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Piotr Caban b1b8412f96 msvcr110: Copy utf16 strings in _Gettnames.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50409
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b3fcb0f2c8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Piotr Caban 66e06267c0 ucrtbase: Fix _Syserror_map behavior on unknown error.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50407
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b54ab691a7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Piotr Caban dcecdf6a46 msvcp90: Add _Wcsxfrm implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50401
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3657c8b829)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Alexandre Julliard 600f8462ac msvcp: Fix some spec file discrepancies.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2012d7ab6a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Christian Costa e4976c0c98 d3dx9: Return D3DFMT_A8R8G8B8 in D3DXGetImageInfoFromFileInMemory for 32 bpp BMP with alpha.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48563
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8f6c832b31)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Nikolay Sivov 00fb915af4 oleaut32: Handle preformatted strings in VarFormatCurrency().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46709
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e26d6da8a9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Nikolay Sivov 70a22fcb6e oleaut32/tests: Remove workarounds in VarFormat* tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f1abfc6933)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Jacek Caban e34899aea3 kernelbase: Support FileEndOfFileInfo in SetFileInformationByHandle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1d36532d22)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Jan Sikorski 6f3608d81a wined3d: Align vertex attribute offsets to their size, if smaller than 4.
This should not change behaviour for d3d9 and earlier, where all formats
have sizes that are multiples of 4.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43422
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 81dfece45c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Nikolay Sivov 1b44efb59e explorerframe: Do not block clicks on the item button.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28786
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7ac196aa0c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Zebediah Figura 82b079cae4 ntdll: Treat '>' the same as '?' in match_filename().
They differ in strange ways, as the tests show, but the basic behaviour of '>' is similar to '?'.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22635
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 690a069918)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Akihiro Sagawa e6819b0f43 winmm: Get rid of TIME_MS format support in waveOutGetPosition().
SofTalk (Japanese text-to-speech software) depends on this.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50515
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 37f3a07831)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Akihiro Sagawa c84fb8ad77 winmm/tests: Expect TIME_BYTES format for TIME_MS request.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit aa56ee08f6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Vijay Kiran Kamuju dd026b0775 uiautomationcore: Add stub UiaRegisterProviderCallback function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50508
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8f0349f25b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Nikolay Sivov 783e043e78 d2d1: Pass zeros as text layout size for inverted rectangles in DrawText().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9521c6a1eb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Haoyang Chen 8f6c45192d d2d1: Fix text position in DrawText().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f37c83452e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Zebediah Figura ae93bdd8fa gdi32: Do not compare face file names in insert_face_in_family_list() if either is NULL.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50486
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 96fdbabc72)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Henri Verbeet dbfed2e2f6 wined3d: Use glFinish() for synchronisation when cleaning up a destroyed context in wined3d_context_gl_cleanup().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50485
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3cc8147594)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Nikolay Sivov da2955cdb7 dcomp: Add DCompositionCreateDevice() stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50459
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8eabf58dee)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:25 +02:00
Henri Verbeet 198c0579be wined3d: Always include any depth/stencil attachment in the Vulkan framebuffer.
Analogous to the GL backend. The alternative would be to potentially
invalidate STATE_FRAMEBUFFER when changing the depth/stencil state object,
which doesn't seem worth it.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a3f829bbb8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:24 +02:00
Henri Verbeet 53bbcc789e wined3d: Implement NULL constant buffer views for the Vulkan backend.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 50a90dcb32)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:24 +02:00
Henri Verbeet 129baec9ba wined3d: Add some barriers between resource usage on different bind points.
A typical case would be between using a texture as render target and using it
as a shader resource.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 82a9e80063)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:24 +02:00
Henri Verbeet 84d4d9195d wined3d: Properly convert Vulkan sample count format information.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e796da7a5e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:24 +02:00
Hans Leidekker 74d58e6e27 wbemprox: Implement Win32_NetworkAdapter.ServiceName.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50256
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4c5dee872b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:24 +02:00
Hans Leidekker feed1f0efb wbemprox: Handle escaped backslashes in LIKE queries.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50256
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d4032d69f6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-05-18 00:24:24 +02:00
Hans Leidekker 11b0d87c17 wbemprox/tests: Add tests for Win32_NetworkAdapter/Configuration.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e8aa254f34)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-04-07 20:08:38 +02:00
Hans Leidekker a06928cfdd wbemprox: Implement Win32_NetworkAdapter.GUID.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50256
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ebff7de0c9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-04-07 20:07:27 +02:00
Nikolay Sivov d104f03785 dcomp: Add DCompositionCreateDevice2().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50357
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c9a0006e4f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-04-06 22:49:47 +02:00
Henri Verbeet c13940de05 ddraw: Use BitBlt() for exclusive mode frontbuffer updates if the swapchain window is not in the foreground.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4ce1d7f93a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-04-06 21:38:06 +02:00
Dmitry Timoshkov 5bb151ebab wbemprox: Flesh out a bit SystemRestore::Enable() implementation.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d2baf148a1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-04-06 20:25:11 +02:00
Dmitry Timoshkov 35fb240695 wbemprox: Add class SystemRestore stub implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50033
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e0cb4d5093)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-04-06 20:24:48 +02:00
Hans Leidekker dd59c1a45b winhttp: Avoid a crash when the connection is closed while handling a redirect.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48870
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 83afd177b3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-04-06 20:20:36 +02:00
Henri Verbeet 15f4d9c60e wined3d: Implement the "precise" flag in the GLSL shader backend.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7a54209d4b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-04-06 20:18:02 +02:00
Alistair Leslie-Hughes 50fdd5e2b5 dsound: IDirectSoundBuffer8 GetStatus return DSBSTATUS_LOCSOFTWARE for deferred buffers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=21014
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2e8bd2682a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2021-03-23 21:42:21 +01:00
6275 changed files with 584600 additions and 1438880 deletions

View File

@ -15,7 +15,6 @@ Byeong-Sik Jeon <bsjeon@hanmail.net>
Carlos Lozano <clozano@andago.com>
Caron Wills <caron@codeweavers.com>
Charles Davis <cdavis@codeweavers.com>
Charles Davis <cdavis5x@gmail.com>
Christopher Gautier <krys@via.ecp.fr>
David A. Cuthbert <dacut@ece.cmu.edu>
David Heidelberger <david@ixit.cz>
@ -91,7 +90,6 @@ Luis Carlos Busquets Pérez <luiscar2001@yahoo.es>
Mariusz Pluciński <vshader@gmail.com>
Mark G. Adams <mark@transgaming.com>
Markus Gömmel <m.goemmel@compulab.de>
Martin Storsjö <martin@martin.st>
Matej Špindler <matej.spindler@gmail.com>
Matej Špindler <spindler.matej@gmail.com>
Matthew Finnicum <mattfinn@gmail.com>

540
ANNOUNCE
View File

@ -1,14 +1,12 @@
The Wine development release 7.9 is now available.
The Wine maintenance release 6.0.4 is now available.
What's new in this release:
- Preliminary work towards PE conversion of macOS driver.
- A number of fixes for test failures on Windows.
- Various bug fixes.
- Various bug fixes
The source is available from the following locations:
https://dl.winehq.org/wine/source/7.x/wine-7.9.tar.xz
http://mirrors.ibiblio.org/wine/source/7.x/wine-7.9.tar.xz
https://dl.winehq.org/wine/source/6.0/wine-6.0.4.tar.xz
http://mirrors.ibiblio.org/wine/source/6.0/wine-6.0.4.tar.xz
Binary packages for various distributions will be available from:
@ -24,453 +22,161 @@ AUTHORS in the distribution for the complete list.
----------------------------------------------------------------
Bugs fixed in 7.9 (total 35):
Bugs fixed in 6.0.4 (total 42):
14841 ntdll:file tests are flaky
19183 "make test" still fails on d3d9/tests/visual.c
28220 kernel32/process.ok: test fails when redirected
28508 user32:monitor tests fail occasionally
34782 crypt32/chain tests crash with gcc-4.8.1 (win64)
39346 Lego Rock Raiders crashes on startup (d3drm_device_init doesn't handle device version 3 case)
45959 Editpad Lite 7 GUI not rendered correctly
45960 Editpad Lite 7 displays empty boxes instead of text in some menus
49285 PNotesPortable crashes inside WritePrivateProfileStructW
50462 Ulead Photo Explorer 8.5 crashes on startup (needs {4a2286e0-7bef-11ce-9bd9-0000e202599c} CLSID_CMpegAudioCodec)
51104 mf:mf crashes on Windows + AMD/NVidia
51283 d3d8:device breaks evr:evr on w7u-2qxl
51297 d3d8:visual & d3d9:visual, test_sample_mask() fails on Nvidia (cw-gtx560)
51298 d3d8:visual: lighting_test() fails on Windows 10 >= 2004
51376 Wine causes PC to lock or crash wine when loading more than 1 VST addon into WaveLab 6
51612 Stellaris launcher (Paradox) does not launch
51680 nsi:nsi test_ip_neighbour() fails on unreachable link local entry
51783 The ieframe:webbrowser output is too big in Wine
51827 d3dx10_34:d3dx10 crashes on all versions of Windows
52686 DateAdd not implemented
52751 `winetricks nocrashdialog` no longer works properly with Wine 7.5(but works with 7.4)
52761 mscoree:mscoree test fails without a display or console
52821 Cxbx Reloaded needs unimplemented function msvcp140_atomic_wait.dll.__std_atomic_wait_direct
52848 Mavis Beacon Teaches Typing 15: Typed characters not spaced correctly
52874 win32u change prevents chromium from starting
52892 The 64-bit ntdll:thread fails on w7pro64 and w864
52908 mf:mf - The 64-bit test_wma_decoder() fails on 64-bit Debian 11 + Intel
52914 mf:mf - The 64-bit test_h264_decoder() fails on 64-bit Debian 11 + Intel GPU
52937 msvcr110:msvcr110 fails on Windows with the UTF-8 codepage
52961 crypt32:str - test_CertGetNameString() fails on Windows 7
52969 mshtml:script fails on up-to-date Windows 8.1 machines
52970 kernelbase:process breaks lz32:lzexpand_main on Windows 1809+
52975 VTFEdit fails to start: err:module:LdrInitializeThunk "MSVCP80.dll" failed to initialize, aborting
53004 63ce060 causes a white border line in winecfg
53015 winscp bookmark adding error
12732 Nota Bene crashes on install
26350 Dungeons demo (OGRE) fails to load its plugins (LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH and relative path)
32183 Cannot open console device read only, then read from it to get input
39699 EDT for Windows installer crashes inside wine`s hhctrl.ocx
41098 Descent 3 (GOG version) has problem when running with OpenGL renderer (Nvidia proprietary drivers)
42030 winedbg: Internal crash at 0x9f58fd40
44202 undname.c fails to parse symbols with rvalue-reference semantics '&&'
47287 Accessible Event Watcher Tool 'accevent.exe' from Windows 10 SDK (10.0.17763.x) crashes on unimplemented function oleacc.dll.AccessibleObjectFromEvent
48631 Multiple games display text as squares (Death to Spies: Moment of Truth, Shadow Warrior, Resident Evil 4 HD)
48950 NVDA needs oleacc.AccessibleObjectFromPoint implementation for mouse tracking
50370 Gothic 1 doesn't start correctly when screen resolution of the game matches display resolution
50526 ConEmu wineconsole Ctrl+m has different behavior
50714 YooSee CMS client 10.0.0.53 crashes after login since Wine 5.12 (ntdll built as PE)
51163 WinOffice Pro 5.3 stops after splashscreen, needs WMI class SoftwareLicensingProduct
51195 Lara Croft and the Temple of Osiris doesn't launch
51220 version:info - In Wine the GetFileVersionInfoEx() checks fail in non-English locales
51396 cl.exe 64bit fails with internal compiler error, needs support for separated code segments in vcruntime140_1
51598 cmd.exe crashes on "if exist" without arguments
51821 EVE Online Client Crashes Due to differences in how Wine and Windows handle LdrGetDllPath with dwFlags 0x8 and relative path
51860 Missing include for uid_t on musl-based systems
51864 VeraCrypt Installer for 1.24-Update7 (Win8+) fails with HRESULT 0x800288BD
51911 vbscript does not handle strings in if clauses
51938 Safe Exam Browser needs "DNSDomain" from Win32_NetworkAdapterConfiguration
51959 Missing procedure GetDayLightFlag
51968 Winaero WEI Tool: Crash due to C:\windows\performance\winsat\datastore missing
51978 Autodesk Fusion 360 crashes on unimplemented function msvcp140.dll.?table@?$ctype@D@std@@QEBAPEBFXZ
51983 foobar2000 v1.5.1+ crashes on startup with Wine v6.6+ with Windows version set to "Windows 10"
52076 Wrong icons placement when using a theme
52082 Ace Ventura (CD-ROM) crashes on start
52102 outSPOKEN 3.0 demo crashes on unimplemented function krnl386.exe16.GetLPErrMode
52141 NetAPI detection in configure is broken
52173 Kodi crashes on unimplemented function wsdapi.dll.WSDCreateDiscoveryProvider
52200 Yamizome Liberator (demo): In-game video isn't played.
52220 TMIDI Player, Cherry: Playback with multiple MIDI ports is broken
52224 inetmib1:main test times out in linux
52298 Opening PPT with Freeoffice Presentations crashes on unimplemented function ole32.dll.OleConvertIStorageToOLESTREAMEx
52327 Wrong WM_CONTEXTMENU message default processing
52349 Vortex Mod Manager Starts but Infinitely Loads
52378 Python WMI module: AttributeError: wbemErrInvalidQuery
52494 shell32 progman_dde tests crash if run immediately after prefix creation
52583 ApiSetView does not display export ordinals correctly
52626 MahjongSoul needs unimplemented function combase.dll.RoSetErrorReportingFlags
----------------------------------------------------------------
Changes since 7.8:
Changes since 6.0.3:
Alexandre Julliard (2):
kernelbase: Move get_language_sort() to avoid forward declarations.
kernelbase: Cache the sortid for each locale.
Akihiro Sagawa (1):
quartz: Fix a race in IMediaFilter::Pause().
Alistair Leslie-Hughes (7):
d3drm: Support IDirect3D3 when creating device.
include: Add TF_TMF/TMAW defines.
dwmapi: Clear DWM_TIMING_INFO structure before returning.
d3drm: IDirect3DRMMeshBuilder2 Get/SetQuality.
d3drm: IDirect3DRMTexture3 Get/SetDecalOrigin.
d3drm: IDirect3DRMTexture3 Get/SetColors.
d3drm: IDirect3DRMTexture3 Get/SetShades.
Alex Henrie (2):
krnl386: Add GetLPErrMode stub.
explorer: Only try to destroy the IShellWindows object if it exists.
Andrew Eikum (5):
mfplat: Allow NULL length pointer in IMFAttributes::GetAllocatedString.
mfplat: Consolidate stream and file IMFByteStream vtables.
mfplat: Simplify IMFByteStream async Read/Write methods.
mfplat: Consolidate stream and file IMFByteStream Read/Write callback vtables.
mfplat/tests: Add tests for IMFByteStream position.
Alexandre Julliard (3):
configure: Fix the netapi check.
krnl386.exe: Page-align the GlobalAlloc() size when the selector limit is in pages.
user.exe: Make sure that the thunk selector doesn't get freed.
Anton Baskanov (5):
include: Add IMpegAudioDecoder definition.
winegstreamer: Add IMpegAudioDecoder stub to MPEG audio decoder.
winegstreamer: Register MPEG audio decoder.
quartz/tests: Add tests for MPEG audio decoder sample timestamps.
winegstreamer: Set sample timestamps in MPEG audio decoder.
Bernhard Kölbl (1):
oleaut32: Allow the registration of 64bit typelibs from a 32bit context.
Bernhard Kölbl (11):
windows.media.speech: Add a missing trace to async_operation_create.
windows.media.speech/tests: Make the IAsyncInfo_Close block test more consistent.
windows.media.speech/tests: Remove some unreliable ref checks.
windows.media.speech/tests: Add a test for IAsyncOperation_get_Completed.
windows.media.speech: Rename async_operation to async_inspectable.
windows.media.speech/tests: Remove a inconsistent ref check.
windows.media.speech: Rename impl_from_IAsyncInfo to async_inspectable_impl_from_IAsyncInfo.
windows.media.speech/tests: Retype AsyncOperationCompletedHandler to IInspectable.
windows.media.speech/tests: Add await helper for IAsyncOperation.
windows.media.speech/tests: Make use of a helper function for IAsyncInfo checking.
windows.media.speech/tests: Add some recognition tests.
Bernhard Übelacker (2):
hhctrl.ocx: Handle only the number of bytes given in html_fragment_len.
inetmib1: Fix endianess issue with dwLocalAddr and dwLocalPort.
Brendan Shanks (10):
ntdll/tests: Fix thread test failure on Windows.
include: Add WINE_ALLOC_SIZE attribute to CoTaskMemRealloc().
include: Add WINE_ALLOC_SIZE attribute to RtlReAllocateHeap().
include: Add WINE_ALLOC_SIZE attribute to ExAllocatePool functions.
include: Add WINE_ALLOC_SIZE attribute to MmAllocate functions.
include: Add __WINE_MALLOC attribute and use it for allocation functions.
include: Add __WINE_DEALLOC attribute and use it for allocation functions.
crypt32/tests: Fix mismatched deallocation function.
ntdll: Use 32-bit stack in alloc_fs_sel().
ntdll: Avoid truncating pointer to 32-bits in get_cpu_area().
Charles Davis (6):
configure: Check for struct icmpstat.
nsiproxy.sys: Implement IPv6 icmpstats get_all_parameters on Mac OS and BSD.
nsiproxy.sys: Implement IPv6 ipstats get_all_parameters on Mac OS and BSD.
d3d11/tests: Test logic op.
d3d11: Implement ID3D11Device1::CreateBlendState1().
ntdll: Implement idle time query for Mac OS.
Christian Costa (1):
d3dx9: Also check for a valid alpha channel for TGA images.
Connor McAdams (2):
oleacc/tests: Add tests for retrieving an IAccessible contained within a Dynamic Annotation wrapper.
oleacc: Add support for retrieving an HWND from accNavigate to WindowFromAccessibleObject.
oleacc: Implement AccessibleObjectFromEvent.
winex11.drv: Add mutable pixel format awareness.
Dmitry Timoshkov (2):
d2d1: Implement ID2D1DeviceContext::CreateImageBrush().
d2d1/tests: Add some tests for ID2D1DeviceContext::CreateImageBrush().
Derek Lesho (1):
kernelbase: Fix parameter order of FindResourceExW call for non-localized path.
Drew Ronneberg (1):
ole32: Remove obsolete -D_OLE32_ from Makefile.in.
Doug Lyons (1):
msvcrt: Do not acquire fd lock in msvcrt_create_io_inherit_block.
Eric Pouech (12):
winepulse.drv: Use correct integral type.
winepulse.drv: Enable compilation with long types.
winecoreaudio: Enable compilation with long types.
capi2032: Enable compilation with long types.
winspool: Enable compilation with long types.
winevulkan: Enable compilation with long types.
winedbg: Introduce struct data_model to describe the various models for base types.
winedbg: Add 'set' command to change data model.
dbghelp: Let symt_basic be trans-module and nameless.
dbghelp: Fix conversion of dwarf's basic types into dbghelp's basic types.
dbghelp: Set correct basic types definition.
include: Use Mingw64's __uuidof when present.
Eric Pouech (2):
winedbg: Fix command line arguments parsing.
cmd: Don't crash on 'if exist' without parameter.
Fabian Maurer (1):
kernel32: Prevent null pointer dereference in WritePrivateProfileStructW.
Gabriel Ivăncescu (3):
comctl32: Redraw children when the combo box is dropped down.
user32: Redraw children when the combo box is dropped down.
ddraw: Use WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES only if window is not in foreground.
François Gouget (4):
shell32: Shelllink: Make the create_lnk() failure messages unique.
comctl32/tests: Use winetest_push_context() in tooltip:test_customdraw().
mstask/tests: Ignore the compare_trigger_state() return value.
mstask/tests: Fix the compare_trigger_state() failure lines.
Gerald Pfeifer (1):
configure: Diagnose if NetAPI is not present.
Gabriel Ivăncescu (8):
mshtml/tests: Fix Number toLocaleString test on updated Win 8.1.
jscript: Handle detached scope objects 'this' in all calls.
jscript: Pass undefined 'this' instead of null in ES5 mode.
mshtml: Expose IHTMLDOMImplementation2 members in IE9+ modes.
mshtml: Implement HTMLDOMAttribute2's name property.
mshtml: Implement window.cancelAnimationFrame.
mshtml/tests: Add test for clearing timers with id zero.
mshtml: Convert varAsync to bool if needed.
Georg Lehmann (3):
winevulkan: Prevent infinite recursion in make_vulkan.
winevulkan: Update to VK spec version 1.3.213.
winevulkan: Update to VK spec version 1.3.214.
Gijs Vermeulen (1):
shell32/tests: Use 'shellpath' as tmpfile name in PathResolve tests.
Hans Leidekker (1):
msi/tests: Fix an intermittent test failure.
Henri Verbeet (2):
maintainers: Update the Direct3D section.
maintainers: Update the Direct2D section.
Hugh McMaster (1):
conhost: Process Ctrl-M key input.
Huw D. M. Davies (1):
winecoreaudio: Remove DWORDs from the midi syscall interface.
user32: Set WM_CONTEXTMENU's wparam to the child window's handle.
Jacek Caban (35):
win32u: Move default WM_GETICON implementation from user32.
win32u: Move default WM_PAINT implementation from user32.
win32u: Move more default window commands from user32.
win32u: Move default WM_ERASEBKGND implementation from user32.
win32u: Move default WM_WINDOWPOSCHANGING implementation from user32.
win32u: Handle sys color brushes in fill_rect.
user32: Remove no longer used WINPOS_WindowFromPoint.
winemac: Directly use ntdll in setup_options.
winemac: Directly use ntdll for querying display settings.
winemac: Directly use ntdll to write display settings.
winemac: Directly use ntdll for display device mutex.
winemac: Directly use ntdll in get_display_device_reg_key.
winemac: Directly use ntdll for registry access in init_original_display_mode.
winemac: Directly use ntdll for registry access in write_display_settings.
winemac: Directly use ntdll for registry access in create_original_display_mode_descriptor.
winemac: Directly use ntdll for registry access in copy_system_cursor_name.
winemac: Use pthread for display locking.
winemac: Use pthread for GDI device locking.
winemac: Use pthread for keyboard list locking.
winemac: Use pthread for cursor cache locking.
winemac: Use pthread for synchronization in opengl.c.
winemac: Use pthread for window data locking.
winemac: Use pthread_once for wine_vk_init.
win32u: Move NtUserSetWindowPlacement implementation from user32.
win32u: Move NtUserSetInternalWindowPos implementation from user32.
win32u: Export NtUserGetWindowPlacement.
win32u: Move desktop window proc implementation from user32.
win32u: Introduce DesktopWindowProc driver entry point.
winex11: Implement DesktopWindowProc driver entry point.
winemac: Implement DesktopWindowProc driver entry point.
winemac: Directly use win32u for GDI functions in image.c.
winemac: Directly use win32u for GDI functions in mouse.c.
winemac: Directly use win32u for GDI functions in opengl.c.
winemac: Directly use win32u for GDI functions in surface.c.
winemac: Directly use win32u for GDI functions in window.c.
Ismael Luceno (1):
server: Fix missing include for uid_t.
Jactry Zeng (4):
include: Add MIL/DWM HRESULT codes.
dbghelp: Use RtlGetVersion() for system version detection instead.
dwmapi: Use RtlGetVersion() for system version detection instead.
dwmapi: Partially implement DwmGetCompositionTimingInfo().
Jacek Caban (1):
ntdll: Fix handling \\.\CON path in RtlDosPathNameToNtPathName.
James McDonnell (2):
include: Add ID2D1PathGeometry1 definition.
d2d1: Add a stub for ID2D1PathGeometry1.
Jacek Konieczny (1):
winealsa.drv: Use separate port for each output device.
Jan Sikorski (2):
wined3d: Reduce the size of staging BO's for texture uploads.
wined3d: Don't do a full cleanup when waiting for a command buffer.
Louis Lenders (5):
wbemprox: Add empty DNSDomain to Win32_NetworkAdapterConfiguration.
combase: Add stub for RoOriginateError.
wsdapi: Add stub for WSDCreateDiscoveryProvider.
wbemprox: Add some properties of SoftwareLicensingProduct class.
ole32: Add stub for OleConvertIStorageToOLESTREAMEx.
Jinoh Kang (1):
wineusb.sys: Remove erroneous call to LeaveCriticalSection() in add_usb_device.
Loïc Rebmeister (1):
loader: Create performance\winsat\datastore on prefix creation.
Julian Klemann (1):
ws2_32: Add stub for SIO_ENABLE_CIRCULAR_QUEUEING in WSAIoctl().
Matteo Bruni (1):
combase: Add RoSetErrorReportingFlags() stub.
Louis Lenders (1):
msvcr80: Update manifest resource.
Nick Fox (2):
kernel32: Add tests for LdrGetDllPath with LOAD_WITH_ALTERED_SEARCH_PATH.
ntdll: Fix LdrGetDllPath with LOAD_WITH_ALTERED_SEARCH_PATH without a path.
Martin Storsjö (3):
ntdll: Fix a typo in a log message for arm unwind data.
ntdll: Fix accidentally used 64 bit types in signal_arm.c.
msvcrt: Hook up __C_specific_handler and __jump_unwind for arm.
Nikolay Sivov (3):
d3d11: Always initialize out view pointer in CreateRenderTargetView().
include: Add WbemErrorEnum error codes.
comctl32/listview: Initialize subitem text buffer before drawing each subitem.
Matteo Bruni (7):
d3dx9/tests: Test D3DXAssembleShader() with both terminated and not terminated include data.
d3dcompiler/asm: Parse negative numbers with a whitespace after the sign.
d3dx9/mesh: Make use of more proper types.
d3dx9/mesh: Split skin header and weights parse functions.
d3dx9/shader: Use more proper integer types.
d3dx9/xfile: Don't unnecessarily use long integer type.
d3dx9: Build without -DWINE_NO_LONG_TYPES.
Nikolay Sivov (26):
mf/session: Do not request more samples when SA sample becomes available.
mfplat/sample: Fix use-after-free of a critical section.
evr/sample: Avoid a race condition when releasing a tracked sample.
evr/sample: Use explicit critical section for release handling.
kernelbase/tests: Close mapping in MapViewOfFile3 test.
mfplat: Allow NULL size pointer in IMFAttributes::GetAllocatedBlob().
d3drm/tests: Build without -DWINE_NO_LONG_TYPES.
mfreadwrite/reader: Allocate output samples on read requests.
vbscript: Implement DateSerial().
mfreadwrite/reader: Propagate resource sharing mode to the sample allocator.
include: Move minidump types to a separate header.
winedump: Output minidump streams in order they appear in the file.
winedump: Cleanup minidump output helpers.
winedump: Add support for dumping handle data stream from minidumps.
winedump: Add support for ThreadInfoListStream stream.
vbscript: Implement DateAdd().
winedump: Add support for dumping UnloadedModuleListStream.
vbscript: Implement Weekday().
vbscript: Handle null arguments in DateSerial().
dwrite/opentype: Fix GPOS PairSet array offset.
ntdll/tests: Add a bit more tests for VM functions.
kernel32/tests: Extend VirtualAllocEx() tests.
kernelbase/tests: Add some VirtualAlloc2() tests.
kernelbase: Fix VirtualAlloc2() when called with NULL process handle.
ntdll/tests: Add a basic test for MEM_RESERVE_PLACEHOLDER.
kernelbase: Add SetThreadInformation().
Paul Gofman (18):
crypt32/tests: Handle CERT_NAME_SEARCH_ALL_NAMES_FLAG being unsupported before Win8.
ntdll: Fix allocation size in grow_logical_proc_ex_buf().
ntdll: Move init_cpu_info() below create_logical_proc_info().
ntdll: Refactor logical processor info manipulation functions.
ntdll: Collect logical processor info at process start.
rsaenh: Use CRT memory allocators.
rsaenh: Handle uneven hash data updates sizes for CALG_MAC.
rsaenh: Factor out block_encrypt() function.
rsaenh: Store key state in hash data for _MAC hash algorithm.
rsaenh: Factor out alloc_key() function.
rsaenh: Allow importing bigger RC2 keys.
rsaenh: Output FIXME when HMAC hash algorithm is not found.
nsiproxy.sys: Update interface table only if find_entry_from_{luid|index} fails.
nsiproxy.sys: Finish search once found in convert_luid_to_unix_name().
nsiproxy.sys: Update interface table only if LUID is not found in convert_luid_to_unix_name().
nsiproxy.sys: Update interface table only if LUID is not found in convert_unix_name_to_luid().
nsi: Allocate a small buffer at once in NsiAllocateAndGetTable().
iphlpapi: Don't request unused dynamic interface data.
Pedro Perdigão (2):
user32/tests: Test an out-of-order RECT in RedrawWindow().
win32u: Allow an out-of-order RECT in RedrawWindow().
Philip Allison (1):
uiautomationcore: Fix header compatibility with C++.
Olivier F. R. Dierick (1):
taskschd: Set count to zero in regtasks_get_Count stub.
Piotr Caban (5):
msvcr110/tests: Fix setlocale test failure on systems with UTF-8 locales enabled.
msvcrt: Reject UTF-8 locales in setlocale function.
oleacc: Store test IAccessible data in structure.
oleacc: Add IAccessible refcount tests.
msvcr120: Add missing _StructuredTaskCollection destructor spec file entry.
msvcp100: Export ctype<char>::table function.
oleacc: Add AccessibleObjectFromPoint implementation.
msvcrt: Don't use GetDaylightFlag function in _ftime64.
vcruntime140_1: Add support for exception separated code segments.
ucrtbase: Add support for r-value demangling in unDName.
Robert Wilhelm (1):
vbscript: Implement CDate().
vbscript: Support VT_BSTR in stack_pop_bool.
Rémi Bernon (83):
winegstreamer: Move MFT registration list out of static scope.
winegstreamer: Register the video processor transform.
mf/tests: Tweak topology loader tests results based on the video processor presence.
mf/tests: Update a broken IMFMediaSink_AddStreamSink result check.
dinput/tests: Wait for the expected report to actually be pending.
windows.gaming.input: AddRef on the returned async handler in get_Completed.
windows.gaming.input: Reset spare CS pointer before deleting it.
windows.gaming.input: Use case insensitive compare when looking for devices.
windows.gaming.input: Register Windows.Gaming.Input.ForceFeedback classes.
windows.gaming.input: Implement stub ConstantForceEffect runtimeclass factory.
ntdll: Lock heap critical section outside of HEAP_IsRealArena.
ntdll: Split HEAP_IsRealArena to heap_validate and heap_validate_ptr.
ntdll: Split RtlAllocateHeap to a separate heap_allocate helper.
ntdll: Split RtlFreeHeap to a separate heap_free helper.
ntdll: Split RtlReAllocateHeap to a separate heap_reallocate helper.
ntdll: Split RtlSizeHeap to a separate heap_size helper.
ntdll: Introduce new block metadata access helpers.
ntdll: Use block size helpers in heap_size.
ntdll: Cleanup HEAP_FindSubHeap and rename it to find_subheap.
ntdll: Check subheap sizes for consistency before using them.
ntdll: Rewrite RtlWalkHeap and enumerate large blocks.
dinput/tests: Increase async bool handler wait timeout.
windows.gaming.input: Implement and instantiate ConstantForceEffect runtimeclass stubs.
windows.gaming.input: Implement IForceFeedbackEffect interface for ConstantForceEffect.
windows.gaming.input: Add a type parameter to force_feedback_effect_create.
windows.gaming.input: Implement IForceFeedbackMotor_LoadEffectAsync.
windows.gaming.input: Implement IForceFeedbackMotor_TryUnloadEffectAsync.
ntdll: Use heap_validate_ptr in validate_block_pointer.
ntdll: Simplify validate_block_pointer.
ntdll: Simplify validate_large_arena.
ntdll: Simplify validate_used_block.
ntdll: Simplify validate_free_block.
hidclass.sys: Clear the buffer passed to IOCTL_HID_GET_DEVICE_DESCRIPTOR.
winexinput.sys: Clear the buffer passed to IOCTL_HID_GET_DEVICE_DESCRIPTOR.
dinput: Store the user_format field inline in struct dinput_device.
dinput: Return an HRESULT from hid_joystick_device_try_open.
dinput: Rename This to device in dinput_device_alloc.
ntdll: Remove unused QUIET/NOISY constants and parameters.
ntdll: Use block helpers to iterate blocks in heap_validate.
ntdll: Use next_block helper to iterate in heap_set_debug_flags.
ntdll: Check that ptr is in committed blocks in find_subheap.
ntdll: Use next_block helper in heap_reallocate.
dinput/tests: Add some Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect tests.
dinput/tests: Add some Windows.Gaming.Input.ForceFeedback.RampForceEffect tests.
dinput/tests: Add some Windows.Gaming.Input.ForceFeedback.ConditionForceEffect tests.
windows.gaming.input: Implement Windows.Gaming.Input.RampForceEffect runtimeclass.
windows.gaming.input: Implement Windows.Gaming.Input.PeriodicForceEffect runtimeclass.
windows.gaming.input: Implement Windows.Gaming.Input.ConditionForceEffect runtimeclass.
mf/tests: Move WMA decoder aggregation tests from wmadmod.
wmadmod: Remove unnecessary DLL.
ntdll: Increase heap large block min size for sizeof(void *) == 8.
ntdll: Fail to allocate large blocks if heap isn't growable.
ntdll: Simplify the fallback case in heap_reallocate.
ntdll: Create free block after updating the size in HEAP_ShrinkBlock.
ntdll: Cleanup HEAP_ShrinkBlock and rename it to shrink_used_block.
ntdll: Update block unused_bytes in shrink_used_block.
dinput/tests: Remove IAsyncOperation reference count checks.
windows.gaming.input: Always assume at least two force feedback axes.
windows.gaming.input: Implement IForceFeedbackEffect_(get|put)_Gain.
windows.gaming.input: Implement IConstantForceEffect_SetParameters(WithEnvelope).
windows.gaming.input: Implement IRampForceEffect_SetParameters(WithEnvelope).
windows.gaming.input: Implement IPeriodicForceEffect_SetParameters(WithEnvelope).
windows.gaming.input: Implement IConditionForceEffect_SetParameters.
dinput: Make sure converted direction values are always positive.
ntdll: Ignore back pointer when validating free block pattern.
ntdll: Use block helpers in subheap_notify_free_all.
ntdll: Rename local variables in heap_reallocate.
ntdll: Rename local variables in heap_allocate.
ntdll: Rename HEAP_FindFreeBlock size parameter.
ntdll: Use block size helpers in heap_reallocate.
winebus.sys: Add support for PID effect gain.
windows.gaming.input: Implement IForceFeedbackEffect_(Start|Stop).
windows.gaming.input: Implement IForceFeedbackEffect_get_State.
windows.gaming.input: Ignore IDirectInputDevice8_GetDeviceState failures.
kernel32/tests: Mark activatableClass wrong xmlns test as broken on w1064v1909.
combase: Use CRT memory allocation functions.
combase: Lookup activatable class library in the activation context.
ntdll: Mask block flags when computing HEAP_InsertFreeBlock size.
ntdll: Set ARENA_FLAG_FREE flag in HEAP_CreateFreeBlock.
ntdll: Move the main subheap after the free lists.
ntdll: Return an entry pointer when looking for a free list.
ntdll: Remove entries from the free list in HEAP_FindFreeBlock.
ntdll: Cleanup HEAP_FindFreeBlock and rename it to find_free_block.
Rémi Bernon (1):
ntdll: Use the unrolled memset from msvcrt.
Stefan Dösinger (7):
wined3d: Move clear box clipping to cpu_blitter_clear.
wined3d: Separate mapping from data writing in surface_cpu_blt_colour_fill.
wined3d: Prepare wined3d_format_convert_from_float for > 32bpp formats.
wined3d: Add support for sysmem-clearing float32 formats.
wined3d: Support CPU clear of float16 formats.
wined3d: Mark some d3d9 formats as normalized formats.
wined3d: Make normalized format handling more generic in wined3d_format_convert_from_float.
Thomas Faber (1):
msvcrt/tests: Show that spawn does not require locking of fds.
Sven Baars (1):
d3dx10/tests: Disable a PreloadGlyphs test for d3dx10_34.
Zebediah Figura (1):
ntdll/tests: Add more tests for RtlDosPathNameToNtPathName_U().
Torge Matthies (5):
ntdll: Use correct output buffer size in RtlpNtEnumerateSubKey.
ntdll: Calculate buffer sizes from registry structs correctly.
win32u: Calculate buffer sizes from registry structs correctly.
win32u: Query basic instead of full key information to get the LastWriteTime.
msvcr120: Add tests for _StructuredTaskCollection.
Zebediah Figura (18):
xslt: Use win32config.h from the correct directory.
wineusb.sys: Mark transfer_cb() as LIBUSB_CALL.
wineusb.sys: Avoid hard-coding ID string lengths.
wineusb.sys: Trace the type in query_id().
wineusb.sys: Expose composite device interfaces.
wined3d: Trace bind flags in wined3d_texture_init().
include: Constify the RAWINPUTDEVICE pointer parameter to RegisterRawInputDevices().
shlwapi/tests: Fix a test failure with the UTF-8 code page.
dinput: Store the device_format field inline in struct dinput_device.
dinput: Factor out the dinput_device_init() call into dinput7_CreateDeviceEx().
dinput: Rename dinput_device_init() to dinput_device_init_device_format().
dinput: Return E_OUTOFMEMORY on allocation failure in hid_joystick_create_device().
dinput: Allocate the dinput_device structure in the caller to dinput_device_alloc().
dinput: Pass a single GUID pointer to hid_joystick_device_open().
dinput: Pass the device instance directly to hid_joystick_device_(try_)open.
quartz/systemclock: Use timeGetTime() to retrieve the current time.
maintainers: Add a GStreamer section.
maintainers: Add a Windows Media Format section.
Zhiyi Zhang (10):
maintainers: Add myself to some sections.
win32u: Fix a memory leak.
include: Add D3DKMTQueryVideoMemoryInfo() definition.
gdi32/tests: Add D3DKMTQueryVideoMemoryInfo() tests.
winex11.drv: Open a Vulkan device for D3DKMTOpenAdapterFromLuid().
gdi32: Implement D3DKMTQueryVideoMemoryInfo().
wined3d: Move kernel mode adapter handle from wined3d_output to wined3d_adapter.
dxgi: Implement dxgi_adapter_QueryVideoMemoryInfo() with D3DKMTQueryVideoMemoryInfo().
wined3d: Fill fake adapter video memory usage.
dxgi/tests: Test adapter video memory budget notification.
Ziqing Hui (6):
d2d1: Add stubs for ID2D1EffectContext.
d2d1: Implement ID2D1EffectContext_GetDpi().
d2d1: Implement LoadVertexShader().
include: Add defines for D2D1_PROPERTY_BINDING.
d2d1/tests: Introduce create_factory().
uuid: Add d2d1effectauthor.h.
Zhiyi Zhang (1):
comctl32/button: Support image list margin for buttons with BS_CENTER or BS_VCENTER.
--
Alexandre Julliard
julliard@winehq.org
Michael Stefaniuc
mstefani@winehq.org

46
AUTHORS
View File

@ -14,7 +14,6 @@ A C Hurst
Adam Bolte
Adam Buchbinder
Adam D. Moss
Adam Gashlin
Adam Gundy
Adam Martinson
Adam Petaccia
@ -23,7 +22,6 @@ Adam Stachowicz
Adam Stoelting
Adrian Bunk
Adrian Harvey
Adrian Thiele
Adrian Thurston
Aidan Thornton
Akihiro Sagawa
@ -47,7 +45,6 @@ Alexander Coffin
Alexander Dorofeyev
Alexander E. Patrakov
Alexander Farber
Alexander Fischer
Alexander Frink
Alexander Gottwald
Alexander Kanavin
@ -67,7 +64,6 @@ Alexandre Bique
Alexandre Goujon
Alexandre Julliard
Alexandre Rostovtsev
Alexandros Frantzis
Alexandru Balut
Alex Arazi
Alex Busenius
@ -107,6 +103,7 @@ Andreas Mohr
Andreas Pflug
Andreas Rosenberg
Andre Heider
André Hentschel
Andrei Derevyanko
Andrei Slăvoiu
André Johansen
@ -144,14 +141,12 @@ Andrey Panov
Andrey Semakin
Andrey Turkin
Andrey Zhezherun
André Zwing
Andriy Palamarchuk
Andrzej Popowski
Andy Clayton
Andy Norris
Andy Rysin
Aneurin Price
Angelo Haller
Anish Mistry
Anssi Hannula
Anthony Fok
@ -170,7 +165,6 @@ Arno Teigseth
Artem Reznikov
Artur Szymiec
Augusto Arcoverde da Rocha
Aurélien Inacio
Aurimas Fischer
Aurimas Fišeras
Austin English
@ -181,7 +175,6 @@ Axel Schmidt
Bang Jun-Young
Bart Van Assche
Baruch Rutman
Bastien Orivel
Bas Weelinck
Béla Gyebrószki
Benedikt Bär
@ -193,7 +186,6 @@ Benjamin Kramer
Ben Klein
Ben Mayhew
Ben Peddell
Ben Shefte
Ben Taylor
Beren Minor
Bernard Ladenthin
@ -285,7 +277,6 @@ Charles Welton
Cheer Xiao
Chen Yuan
Chia-I Wu
Chilung Chan
Choe Hwanjin
Chris Faherty
Chris Green
@ -307,7 +298,6 @@ Christian Schlaile
Christoph Brill
Christoph Bumiller
Christopher Berner
Christopher Egert
Christopher Gautier
Christopher Harvey
Christopher Thielen
@ -326,7 +316,6 @@ Colin Finck
Colin Fletcher
Colin Fowler
Colin Pitrat
Connor Abbott
Connor McAdams
Conor McCarthy
Constantine Sapuntzakis
@ -390,10 +379,8 @@ David Hedberg
David Heidelberger
David Hemmo
David Howells
David Kahurani
David Keijser
David Kiefer
David Koolhoven
David Korth
David Kredba
David Lassonde
@ -437,11 +424,9 @@ Dmitry Potapov
Dmitry Timoshkov
Dominik Strasser
Donat Enikeev
Dongwan Kim
Don Kelly
Donna Whisnant
Donn Miller
Doug Kingston
Douglas Ridgway
Doug Lyons
Doug Paul
@ -462,7 +447,6 @@ Eddie Leung
Edgar Hucek
Ed Snow
Eduardo García
Eduard Permyakov
EG Galano
Elias Benali
Elias Ross
@ -493,7 +477,6 @@ Eriks Dobelis
Erik Svendsen
Erwin Wolff
Eryk Wieliczko
Esdras Tarsis
Esme Povirk
Ethan Chen
Ethan Lee
@ -537,7 +520,6 @@ Fons Botman
Francesco Di Punzio
Francesco Noferi
Francis Beaudet
Francisco Casas
Francois Boisvert
François Dorin
François Gouget
@ -693,7 +675,6 @@ Iván Matellanes
Ivan Sinitsin
Ivan Vojtko
Ivan Wong
Ivo Ivanov
Jacek Bator
Jacek Caban
Jacek Konieczny
@ -717,7 +698,6 @@ James Helferty
James Juran
James Larrowe
James Liggett
James McDonnell
James McKenzie
James Moody
James Perry
@ -811,7 +791,6 @@ Jimmy Rentz
Jimmy Tirtawangsa
Jim Peterson
Jinhui Chen
Jinoh Kang
Jiuming Luo
Joachim Priesner
João Diogo Ferreira
@ -850,7 +829,6 @@ John Reiser
John Richardson
John R. Sheets
John Sheu
John Sullivan
John Thomson
John Voltz
John Zero
@ -900,11 +878,9 @@ Juergen Schmied
Jukka Heinonen
Jukka Kangas
Jukka-Pekka Iivonen
Julian Klemann
Julian Rüger
Julien Cegarra
Julien D'ascenzio
Julien Loir
Julien Muchembled
Julio César Gázquez
Julio E. Gonzalez P
@ -983,7 +959,6 @@ Konrad Wartke
Konstantin Kondratyuk
Konstantin L. Metlov
Konstantin Petrov
Konstantin Romanov
Kostya Ivanov
Kouji Sasaki
Krishna Murthy
@ -1021,7 +996,6 @@ Leonid Lobachev
Leo van den Berg
Leslie Choong
Liam Middlebrook
Liam Murphy
Li Keqing
Lilia Roumiantseva
Linus Torvalds
@ -1049,7 +1023,6 @@ Lukáš Krejčí
Łukasz Wojniłowicz
Luke Benstead
Luke Bratch
Luke Deller
Maarten Lankhorst
Maciej Borsz
Maciek Kaliszewski
@ -1108,7 +1081,7 @@ Martin Payne
Martin Petricek
Martin Pilka
Martin Profittlich
Martin Storsjö
Martin Storsjo
Martin von Loewis
Martin Walker
Martin Wilck
@ -1213,7 +1186,6 @@ Milan Ševčík
Milko Krachounov
Mingcong Bai
Misha Koshelev
Mohamad Al-Jaf
Mohamed Mediouni
Molle Bestefich
Morten Eriksen
@ -1239,7 +1211,6 @@ Neil Skrypuch
Nemeth Peter
Nerijus Baliunas
Nguyễn Chính Hữu
Nicholas Fraser
Nicholas Niro
Nick Bowler
Nick Burns
@ -1300,7 +1271,6 @@ Pablo Spallanzani
Panagiotis Christeas
Pascal Cuoq
Pascal Lessard
Pat Leamon
Patrick Ammann
Patrick Armstrong
Patrick Gauthier
@ -1335,7 +1305,6 @@ Pavel Semerad
Pavel Troller
Pedro Araujo Chaves Jr
Pedro Maia
Pedro Perdigão
Pengpeng Dong
Per Ångström
Per Johansson
@ -1379,7 +1348,6 @@ Petr Tomasek
Petter Reinholdtsen
Phil Cole
Phil Costin
Philip Allison
Philip Brown
Philip Mason
Philip Nilsson
@ -1401,7 +1369,6 @@ Pierre Schweitzer
Pim Bollen
Piotr Caban
Piotr Chruściel
Piotr Kleski
Piotr Pawłow
Porot Mo
Przemysław Białek
@ -1475,7 +1442,6 @@ Robert Wilhelm
Robert Xiao
Rob Farnum
Rob Hughes
Robin Ebert
Robin Kertels
Rob McClinton
Rob Walker
@ -1523,7 +1489,6 @@ Samuel Lidén Borell
Sander van Leeuwen
Sandijs Ribaks
Sanghoon Park
Santino Mazza
Santosh Siddheshwar
Sasha Slijepcevic
Sato Kazuyuki
@ -1568,7 +1533,6 @@ Simeon Pilgrim
Simon Britnell
Simon C. Ion
Simon Kissane
Simon McVittie
Simon Richter
Simon Walton
Sin-ta Hsiea
@ -1628,7 +1592,6 @@ Sylvain Bouchard
Sylvain Petreolle
Sylvain St-Germain
Tapio Kautto
Tatsuyuki Ishi
Tatyana Fokina
Ted Lyngmo
Ted Percival
@ -1657,14 +1620,11 @@ Tijl Coosemans
Tijs van Bakel
Tillmann Werner
Tim Cadogan-Cowper
Tim Clem
Tim Ferguson
Tim Hentenaar
Tim Newsome
Timo Kreuzer
Timo Teräs
Timothy Pearson
Timo Zuccarello
Tim Schumacher
Tim Schwartz
Tim Segall
@ -1717,7 +1677,6 @@ Valery Kartel
Vasily I. Volchenko
Vasudev Mulchandani
Vedran Rodic
Victor Hermann Chiletto
Victor Martinez Calvo
Victor Pelt
Victor Schneider
@ -1782,7 +1741,6 @@ Xiaoshan Sun
XueFeng Chang
Yann Droneaud
Yaron Shahrabani
Yeshun Ye
Yifu Wang
Yngvi Sigurjonsson
Yong Chi

View File

@ -1,4 +1,4 @@
Copyright (c) 1993-2022 the Wine project authors (see the file AUTHORS
Copyright (c) 1993-2021 the Wine project authors (see the file AUTHORS
for a complete list)
Wine is free software; you can redistribute it and/or modify it under

View File

@ -29,7 +29,7 @@ Maintainers List
-----------------------------------
ARM, ARM64
M: André Zwing <nerv@dawncrow.de>
M: André Hentschel <nerv@dawncrow.de>
F: dlls/dbghelp/cpu_arm*
F: dlls/msvcrt/except_arm.c
F: dlls/ntdll/signal_arm*
@ -50,23 +50,19 @@ F: dlls/xaudio*/
Common Controls Library
P: Nikolay Sivov <nsivov@codeweavers.com>
P: Zhiyi Zhang <zzhang@codeweavers.com>
F: dlls/comctl32/
Common Item Dialog
P: Esme Povirk <esme@codeweavers.com>
P: Esme Povirk <vincent@codeweavers.com>
F: dlls/comdlg32/itemdlg.c
F: dlls/comdlg32/tests/itemdlg.c
Direct2D
M: Nikolay Sivov <nsivov@codeweavers.com>
P: Henri Verbeet <hverbeet@codeweavers.com>
M: Henri Verbeet <hverbeet@codeweavers.com>
F: dlls/d2d*/
Direct3D
M: Zebediah Figura <z.figura12@gmail.com>
M: Jan Sikorski <jsikorski@codeweavers.com>
P: Henri Verbeet <hverbeet@codeweavers.com>
M: Henri Verbeet <hverbeet@codeweavers.com>
P: Stefan Dösinger <stefan@codeweavers.com>
P: Matteo Bruni <mbruni@codeweavers.com>
F: dlls/d3d10core/
@ -91,6 +87,10 @@ F: dlls/d3dx11*/
F: dlls/d3dx9*/
F: dlls/d3dxof/
DirectInput
P: Andrew Eikum <aeikum@codeweavers.com>
F: dlls/dinput/
DirectMusic
M: Michael Stefaniuc <mstefani@winehq.org>
F: dlls/dm*/
@ -113,58 +113,34 @@ F: dlls/qcap/
F: dlls/qdvd/
F: dlls/qedit/
F: dlls/quartz/
F: libs/strmbase/
F: dlls/strmbase/
F: dlls/winegstreamer/gstdemux.c
F: dlls/wineqtdecoder/
DirectWrite
M: Nikolay Sivov <nsivov@codeweavers.com>
F: dlls/dwrite/
DotNet Runtime
M: Esme Povirk <esme@codeweavers.com>
M: Esme Povirk <vincent@codeweavers.com>
F: dlls/mscoree/
GDI
M: Huw Davies <huw@codeweavers.com>
F: dlls/gdi32/
F: dlls/win32u/bitblt.c
F: dlls/win32u/bitmap.c
F: dlls/win32u/brush.c
F: dlls/win32u/clipping.c
F: dlls/win32u/dc.c
F: dlls/win32u/dib.c
F: dlls/win32u/dibdrv/
F: dlls/win32u/driver.c
F: dlls/win32u/emfdrv.c
F: dlls/win32u/font.c
F: dlls/win32u/freetype.c
F: dlls/win32u/gdiobj.c
F: dlls/win32u/mapping.c
F: dlls/win32u/opentype.c
F: dlls/win32u/painting.c
F: dlls/win32u/palette.c
F: dlls/win32u/path.c
F: dlls/win32u/pen.c
F: dlls/win32u/printdrv.c
F: dlls/win32u/region.c
GDIPlus
M: Esme Povirk <esme@codeweavers.com>
M: Esme Povirk <vincent@codeweavers.com>
F: dlls/gdiplus/
GPhoto Driver
M: Marcus Meissner <marcus@jet.franken.de>
F: dlls/gphoto2.ds/
GStreamer multimedia backend
M: Zebediah Figura <z.figura12@gmail.com>
F: dlls/winegstreamer/
HID support
M: Aric Stewart <aric@codeweavers.com>
P: Rémi Bernon <rbernon@codeweavers.com>
F: dlls/hid/
F: dlls/hidclass.sys/
F: dlls/hidparse.sys/
F: dlls/winehid.sys/
HTTP server
@ -172,12 +148,6 @@ M: Zebediah Figura <z.figura12@gmail.com>
F: dlls/httpapi/
F: dlls/http.sys/
Input events
P: Rémi Bernon <rbernon@codeweavers.com>
F: dlls/user32/input.c
F: dlls/user32/rawinput.c
F: server/queue.c
Input methods
M: Aric Stewart <aric@codeweavers.com>
F: dlls/imm32/
@ -186,14 +156,9 @@ JavaScript
M: Jacek Caban <jacek@codeweavers.com>
F: dlls/jscript/
Joystick input
M: Rémi Bernon <rbernon@codeweavers.com>
P: Andrew Eikum <aeikum@codeweavers.com>
F: dlls/dinput*/
F: dlls/windows.gaming.input/
F: dlls/winebus.sys/
F: dlls/winexinput.sys/
F: dlls/xinput*/
Mac OS X graphics driver
M: Ken Thomases <ken@codeweavers.com>
F: dlls/winemac.drv/
Media format conversion
M: Andrew Eikum <aeikum@codeweavers.com>
@ -210,20 +175,14 @@ P: Zebediah Figura <z.figura12@gmail.com>
F: dlls/msi/
Netstat
M: André Zwing <nerv@dawncrow.de>
M: André Hentschel <nerv@dawncrow.de>
F: programs/netstat/
Network
P: Bruno Jesus <00cpxxx@gmail.com>
P: Erich E. Hoover <erich.e.hoover@wine-staging.com>
F: dlls/ws2_32/
Network Store Interface
M: Huw Davies <huw@codeweavers.com>
F: dlls/iphlpapi/
F: dlls/nsi/
F: dlls/nsiproxy.sys/
F: include/wine/nsi.h
F: dlls/ws2_32/
OLE Embedding
M: Huw Davies <huw@codeweavers.com>
@ -240,10 +199,9 @@ F: dlls/combase/
F: dlls/ole32/compobj.c
F: dlls/ole32/marshal.c
F: dlls/ole32/usrmarshal.c
F: programs/dllhost/
OLE Storage
M: Esme Povirk <esme@codeweavers.com>
M: Esme Povirk <vincent@codeweavers.com>
F: dlls/ole32/filelockbytes.c
F: dlls/ole32/memlockbytes.c
F: dlls/ole32/stg_stream.c
@ -281,14 +239,10 @@ RPC Runtime
P: Huw Davies <huw@codeweavers.com>
P: Zebediah Figura <z.figura12@gmail.com>
F: dlls/rpcrt4
Theming
M: Zhiyi Zhang <zzhang@codeweavers.com>
F: dlls/light.msstyles/
F: dlls/uxtheme/
F: tools/widl
TWAIN
P: Esme Povirk <esme@codeweavers.com>
P: Esme Povirk <vincent@codeweavers.com>
F: dlls/twain_32/
F: dlls/sane.ds/
F: dlls/gphoto2.ds/
@ -315,17 +269,10 @@ F: dlls/ieframe/
F: dlls/mshtml/
F: dlls/shdocvw/
WIDL
P: Huw Davies <huw@codeweavers.com>
P: Rémi Bernon <rbernon@codeweavers.com>
P: Zebediah Figura <z.figura12@gmail.com>
F: tools/widl
Windows Imaging Component
M: Esme Povirk <esme@codeweavers.com>
M: Esme Povirk <vincent@codeweavers.com>
F: dlls/windowscodecs/
F: dlls/windowscodecsext/
F: dlls/wmphoto/
Windows Management Instrumentation
M: Hans Leidekker <hans@codeweavers.com>
@ -333,11 +280,6 @@ F: dlls/wbemdisp/
F: dlls/wbemprox/
F: dlls/wmiutils/
Windows Media Format
M: Zebediah Figura <z.figura12@gmail.com>
F: dlls/wmp/
F: dlls/wmvcore/
Windows Media Foundation
M: Nikolay Sivov <nsivov@codeweavers.com>
F: dlls/mf/
@ -349,17 +291,13 @@ F: dlls/mfreadwrite/
F: dlls/mfuuid/
F: dlls/rtworkq/
Wine debugger (GDB backend)
P: Rémi Bernon <rbernon@codeweavers.com>
F: programs/winedbg/gdbproxy.c
Wine server, IPC
M: Alexandre Julliard <julliard@winehq.org>
P: Erich E. Hoover <erich.e.hoover@wine-staging.com>
F: server/
Winemaker
M: André Zwing <nerv@dawncrow.de>
M: André Hentschel <nerv@dawncrow.de>
F: tools/winemaker/
WinHTTP
@ -371,13 +309,11 @@ P: Jacek Caban <jacek@codeweavers.com>
F: dlls/wininet/
WPcap
M: André Zwing <nerv@dawncrow.de>
M: André Hentschel <nerv@dawncrow.de>
F: dlls/wpcap/
X11 Driver
M: Alexandre Julliard <julliard@winehq.org>
P: Rémi Bernon <rbernon@codeweavers.com>
P: Zhiyi Zhang <zzhang@codeweavers.com>
F: dlls/winex11.drv/
XML parsing
@ -391,7 +327,7 @@ P: Alex Henrie <alexhenrie24@gmail.com>
P: Andrew Eikum <aeikum@codeweavers.com>
P: Huw Davies <huw@codeweavers.com>
P: Jacek Caban <jacek@codeweavers.com>
P: Esme Povirk <esme@codeweavers.com>
P: Esme Povirk <vincent@codeweavers.com>
P: Erich E. Hoover <erich.e.hoover@wine-staging.com>
F: *
F: */

141
Makefile.in Normal file
View File

@ -0,0 +1,141 @@
# This Makefile understands the following targets:
#
# all (default): build wine
# clean: remove all intermediate files
# distclean: also remove all files created by configure
# test: run tests
# testclean: clean test results to force running all tests again
# install-lib: install libraries needed to run applications
# install-dev: install development environment
# install: install everything
# uninstall: uninstall everything
# depend: create the dependencies
# ctags: create a tags file for vim and others.
# etags: create a TAGS file for Emacs.
# manpages: compile manpages for Wine API
# htmlpages: compile html pages for Wine API
# sgmlpages: compile sgml source for the Wine API Guide
# xmlpages: compile xml source for the Wine API Guide
# The following variable definitions are copied into all makefiles
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
includedir = @includedir@
fontdir = ${datadir}/wine/fonts
nlsdir = ${datadir}/wine/nls
dlldir = ${libdir}/wine
srcdir = @srcdir@
SHELL = /bin/sh
CC = @CC@
CXX = @CXX@
CPPBIN = @CPPBIN@
CROSSCC = @CROSSCC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CROSSCFLAGS = @CROSSCFLAGS@
CROSSLDFLAGS = @CROSSLDFLAGS@
EXTRACFLAGS = @EXTRACFLAGS@
EXTRACROSSCFLAGS= @EXTRACROSSCFLAGS@
MSVCRTFLAGS = @MSVCRTFLAGS@
TARGETFLAGS = @TARGETFLAGS@
LDDLLFLAGS = @LDDLLFLAGS@
LDEXECFLAGS = @LDEXECFLAGS@
LIBS = @LIBS@
BISON = @BISON@
FLEX = @FLEX@
EXEEXT = @EXEEXT@
TOOLSEXT = @TOOLSEXT@
DLLTOOL = @DLLTOOL@
AR = @AR@
RANLIB = @RANLIB@
STRIP = @STRIP@
LN_S = @LN_S@
TOOLSDIR = @TOOLSDIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
DLLFLAGS = @DLLFLAGS@
PRELINK = @PRELINK@
FONTFORGE = @FONTFORGE@
RSVG = @RSVG@
CONVERT = @CONVERT@
ICOTOOL = @ICOTOOL@
MSGFMT = @MSGFMT@
CROSSTARGET = @CROSSTARGET@
CROSSDEBUG = @CROSSDEBUG@
SUBDIRS = @SUBDIRS@
RUNTESTFLAGS = -q -P wine
MAKEDEP = $(TOOLSDIR)/tools/makedep$(TOOLSEXT)
DELAYLOADFLAG = @DELAYLOADFLAG@
PACKAGE_VERSION = @PACKAGE_VERSION@
SED_CMD = LC_ALL=C sed -e 's,@bindir\@,${bindir},g' -e 's,@dlldir\@,${dlldir},g' -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' -e 's,@PACKAGE_VERSION\@,@PACKAGE_VERSION@,g'
api_manext = 3w
WINELOADER_PROGRAMS = @WINELOADER_PROGRAMS@
WINELOADER_DEPENDS = @WINELOADER_DEPENDS@
WINELOADER_LDFLAGS = @WINELOADER_LDFLAGS@
WINEPRELOADER_LDFLAGS = @WINEPRELOADER_LDFLAGS@
LIBWINE_SHAREDLIB = @LIBWINE_SHAREDLIB@
LIBWINE_LDFLAGS = @LIBWINE_LDFLAGS@
LIBWINE_DEPENDS = @LIBWINE_DEPENDS@
DISABLED_SUBDIRS = @DISABLED_SUBDIRS@
CONFIGURE_TARGETS = @CONFIGURE_TARGETS@
TOP_INSTALL_LIB = @TOP_INSTALL_LIB@
TOP_INSTALL_DEV = @TOP_INSTALL_DEV@
@ALL_VARS_RULES@
@SET_MAKE@
all: wine
@echo "Wine build complete."
# Rules for re-running configure
config.status: $(srcdir)/configure
@./config.status --recheck
include/config.h: include/stamp-h
include/stamp-h: $(srcdir)/include/config.h.in config.status
@./config.status include/config.h include/stamp-h
# Rules for cleaning
distclean:: clean
rm -rf autom4te.cache documentation/html documentation/api-guide documentation/api-guide-xml documentation/man$(api_manext)
# Rules for API documentation
install-manpages:: manpages
for i in documentation/man$(api_manext)/*.$(api_manext); do $(srcdir)/tools/install-sh -m 644 $(INSTALL_DATA_FLAGS) $$i $(DESTDIR)$(mandir)/$$i; done
.PHONY: install-manpages
# Rules for generated source files
dlls/ntdll/unix/version.c: dummy
@version=`(GIT_DIR=$(srcdir)/.git git describe HEAD 2>/dev/null || echo "wine-$(PACKAGE_VERSION)") | sed -n -e '$$s/\(.*\)/const char wine_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1)
programs/winetest/build.rc: dummy
@build="STRINGTABLE { 1 \"`GIT_DIR=$(srcdir)/.git git rev-parse HEAD 2>/dev/null`\" }" && (echo $$build | cmp -s - $@) || echo $$build >$@ || (rm -f $@ && exit 1)
programs/winetest/build.nfo:
@-$(CC) -v 2>$@
dlls/wineandroid.drv/wine-debug.apk: dlls/wineandroid.drv/build.gradle $(srcdir)/dlls/wineandroid.drv/AndroidManifest.xml $(srcdir)/dlls/wineandroid.drv/WineActivity.java $(srcdir)/dlls/wineandroid.drv/wine.svg
cd dlls/wineandroid.drv && gradle -q -Psrcdir=$(srcdir) assembleDebug
mv dlls/wineandroid.drv/build/outputs/apk/wine-debug.apk $@
# Misc rules
TAGSFLAGS = --langmap='c:+.idl.l.rh,make:(Make*.in)'
TAGS etags:
rm -f TAGS
(test -d .git && git ls-files || find -L $(srcdir) -name '*.[ch]' -print) | xargs etags -a $(TAGSFLAGS)
tags ctags:
rm -f tags
(test -d .git && git ls-files || find -L $(srcdir) -name '*.[ch]' -print) | xargs ctags -a $(TAGSFLAGS)

View File

@ -1 +1 @@
Wine version 7.9
Wine version 6.0.4

100
aclocal.m4 vendored
View File

@ -64,15 +64,6 @@ AC_CHECK_TOOL(READELF,[readelf],true)])
AC_DEFUN([WINE_PATH_PKG_CONFIG],
[WINE_CHECK_HOST_TOOL(PKG_CONFIG,[pkg-config])])
AC_DEFUN([WINE_PATH_MINGW_PKG_CONFIG],
[case "$host_cpu" in
i[[3456789]]86*)
ac_prefix_list="m4_foreach([ac_wine_cpu],[i686,i586,i486,i386],[ac_wine_cpu-w64-mingw32-pkg-config ])" ;;
*)
ac_prefix_list="$host_cpu-w64-mingw32-pkg-config" ;;
esac
AC_CHECK_PROGS(MINGW_PKG_CONFIG,[$ac_prefix_list],false)])
dnl **** Extract the soname of a library ****
dnl
dnl Usage: WINE_CHECK_SONAME(library, function, [action-if-found, [action-if-not-found, [other_libraries, [pattern]]]])
@ -133,46 +124,6 @@ CPPFLAGS=$ac_save_CPPFLAGS
AS_VAR_POPDEF([ac_libs])dnl
AS_VAR_POPDEF([ac_cflags])])dnl
dnl **** Get flags from MinGW pkg-config or alternate xxx-config program ****
dnl
dnl Usage: WINE_MINGW_PACKAGE_FLAGS(var,pkg-name,[default-lib,[checks]])
dnl
AC_DEFUN([WINE_MINGW_PACKAGE_FLAGS],
[AC_REQUIRE([WINE_PATH_MINGW_PKG_CONFIG])dnl
AS_VAR_PUSHDEF([ac_cflags],[[$1]_PE_CFLAGS])dnl
AS_VAR_PUSHDEF([ac_libs],[[$1]_PE_LIBS])dnl
AS_VAR_IF([ac_cflags],[],
[AS_VAR_SET_IF([MINGW_PKG_CONFIG],
[ac_cflags=`$MINGW_PKG_CONFIG --cflags [$2] 2>/dev/null`])])
AS_VAR_IF([ac_libs],[],
[AS_VAR_SET_IF([MINGW_PKG_CONFIG],
[ac_libs=`$MINGW_PKG_CONFIG --libs [$2] 2>/dev/null`])])
m4_ifval([$3],[ac_libs=[$]{ac_libs:-"$3"}])
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $ac_cflags"
$4
CPPFLAGS=$ac_save_CPPFLAGS
AS_VAR_POPDEF([ac_libs])dnl
AS_VAR_POPDEF([ac_cflags])])dnl
dnl **** Get flags for an external lib program ****
dnl
dnl Usage: WINE_EXTLIB_FLAGS(var,pkg-name,default-libs,default-cflags)
dnl
AC_DEFUN([WINE_EXTLIB_FLAGS],
[AS_VAR_PUSHDEF([ac_cflags],[[$1]_PE_CFLAGS])dnl
AS_VAR_PUSHDEF([ac_libs],[[$1]_PE_LIBS])dnl
AC_ARG_VAR(ac_cflags, [C compiler flags for the PE $2, overriding the bundled version])dnl
AC_ARG_VAR(ac_libs, [Linker flags for the PE $2, overriding the bundled version])dnl
AS_VAR_IF([ac_libs],[],
[ac_libs=$3
AS_VAR_IF([ac_cflags],[],[ac_cflags=$4],[enable_$2=no])],
[enable_$2=no])
AS_ECHO(["$as_me:${as_lineno-$LINENO}: $2 cflags: $ac_cflags"]) >&AS_MESSAGE_LOG_FD
AS_ECHO(["$as_me:${as_lineno-$LINENO}: $2 libs: $ac_libs"]) >&AS_MESSAGE_LOG_FD
AS_VAR_POPDEF([ac_libs])dnl
AS_VAR_POPDEF([ac_cflags])])dnl
dnl **** Link C code with an assembly file ****
dnl
dnl Usage: WINE_TRY_ASM_LINK(asm-code,includes,function,[action-if-found,[action-if-not-found]])
@ -220,44 +171,6 @@ ac_exeext=$ac_wine_try_cflags_saved_exeext])
AS_VAR_IF([ac_var],[yes],[m4_default([$2], [EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS $1"])], [$3])dnl
AS_VAR_POPDEF([ac_var])])
dnl **** Check whether the given MinGW header is available ****
dnl
dnl Usage: WINE_CHECK_MINGW_HEADER(header,[action-if-found],[action-if-not-found],[other-includes])
dnl
AC_DEFUN([WINE_CHECK_MINGW_HEADER],
[AS_VAR_PUSHDEF([ac_var],[ac_cv_mingw_header_$1])dnl
AC_CACHE_CHECK([for MinGW $1], ac_var,
[ac_wine_check_headers_saved_cc=$CC
ac_wine_check_headers_saved_exeext=$ac_exeext
CC="$CROSSCC"
ac_exeext=".exe"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$4
#include <$1>]])],[AS_VAR_SET([ac_var],[yes])],[AS_VAR_SET([ac_var],[no])])
CC=$ac_wine_check_headers_saved_cc
ac_exeext=$ac_wine_check_headers_saved_exeext])
AS_VAR_IF([ac_var],[yes],[$2],[$3])dnl
AS_VAR_POPDEF([ac_var])])
dnl **** Check whether the given MinGW library is available ****
dnl
dnl Usage: WINE_CHECK_MINGW_LIB(library,function,[action-if-found],[action-if-not-found],[other-libraries])
dnl
AC_DEFUN([WINE_CHECK_MINGW_LIB],
[AS_VAR_PUSHDEF([ac_var],[ac_cv_mingw_lib_$1])dnl
AC_CACHE_CHECK([for $2 in MinGW -l$1], ac_var,
[ac_wine_check_headers_saved_cc=$CC
ac_wine_check_headers_saved_exeext=$ac_exeext
ac_wine_check_headers_saved_libs=$LIBS
CC="$CROSSCC"
ac_exeext=".exe"
LIBS="-l$1 $5 $LIBS"
AC_LINK_IFELSE([AC_LANG_CALL([], [$2])],[AS_VAR_SET([ac_var],[yes])],[AS_VAR_SET([ac_var],[no])])
CC=$ac_wine_check_headers_saved_cc
ac_exeext=$ac_wine_check_headers_saved_exeext
LIBS=$ac_wine_check_headers_saved_libs])
AS_VAR_IF([ac_var],[yes],[$3],[$4])dnl
AS_VAR_POPDEF([ac_var])])
dnl **** Check if we can link an empty shared lib (no main) with special CFLAGS ****
dnl
dnl Usage: WINE_TRY_SHLIB_FLAGS(flags,[action-if-yes,[action-if-no]])
@ -305,18 +218,18 @@ dnl
AC_DEFUN([WINE_CHECK_MINGW_PROG],
[case "$host_cpu" in
aarch64*)
ac_prefix_list="aarch64-w64-mingw32-clang aarch64-w64-mingw32-gcc clang" ;;
ac_prefix_list="aarch64-w64-mingw32-clang aarch64-w64-mingw32-gcc" ;;
arm*)
ac_prefix_list="armv7-w64-mingw32-clang armv7-w64-mingw32-gcc clang" ;;
ac_prefix_list="armv7-w64-mingw32-clang armv7-w64-mingw32-gcc" ;;
i[[3456789]]86*)
ac_prefix_list="m4_foreach([ac_wine_prefix],[w64-mingw32, pc-mingw32, mingw32msvc, mingw32],
m4_foreach([ac_wine_cpu],[i686,i586,i486,i386],[ac_wine_cpu-ac_wine_prefix-gcc ]))
m4_foreach([ac_wine_cpu],[i686,i586,i486,i386],[ac_wine_cpu-w64-mingw32-clang ])
mingw32-gcc clang" ;;
mingw32-gcc" ;;
x86_64)
ac_prefix_list="m4_foreach([ac_wine_prefix],[pc-mingw32, w64-mingw32, mingw32msvc],
m4_foreach([ac_wine_cpu],[x86_64,amd64],[ac_wine_cpu-ac_wine_prefix-gcc ]))
m4_foreach([ac_wine_cpu],[x86_64,amd64],[ac_wine_cpu-w64-mingw32-clang ]) clang" ;;
m4_foreach([ac_wine_cpu],[x86_64,amd64],[ac_wine_cpu-w64-mingw32-clang ])" ;;
*)
ac_prefix_list="" ;;
esac
@ -328,7 +241,8 @@ dnl
dnl Usage: AC_REQUIRE([WINE_CONFIG_HELPERS])
dnl
AC_DEFUN([WINE_CONFIG_HELPERS],
[AS_VAR_SET([wine_rules],["all:"])
[wine_rules_file=conf$$rules.make
rm -f $wine_rules_file
AC_SUBST(SUBDIRS,"")
AC_SUBST(DISABLED_SUBDIRS,"")
AC_SUBST(CONFIGURE_TARGETS,"")
@ -340,7 +254,7 @@ wine_fn_append_file ()
wine_fn_append_rule ()
{
AS_VAR_APPEND(wine_rules,"$as_nl$[1]")
AS_ECHO("$[1]") >>$wine_rules_file
}
wine_fn_config_makefile ()

19186
configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
MODULE = acledit.dll
EXTRADLLFLAGS = -Wb,--prefer-native
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
main.c

View File

@ -29,6 +29,24 @@
WINE_DEFAULT_DEBUG_CHANNEL(acledit);
/*****************************************************
* DllMain
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls( hinstDLL );
break;
}
return TRUE;
}
/***********************************************************************
* FMExtensionProcW (acledit.@)
*
@ -36,7 +54,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(acledit);
LONG WINAPI FMExtensionProcW(HWND hWnd, WORD wEvent, LONG lParam)
{
FIXME("(%p, %d, 0x%lx) stub\n", hWnd, wEvent, lParam);
FIXME("(%p, %d, 0x%x) stub\n", hWnd, wEvent, lParam);
return 0;
}

View File

@ -1,9 +1,6 @@
MODULE = aclui.dll
IMPORTLIB = aclui
IMPORTS = comctl32 user32 advapi32 gdi32
EXTRADLLFLAGS = -Wb,--prefer-native
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = aclui_main.c
RC_SRCS = aclui.rc

View File

@ -1,52 +0,0 @@
/*
* Copyright (c) 2017 Michael Müller
*
* 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 "resource.h"
#include "winresrc.h"
#pragma makedep po
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_SECURITY_PROPERTIES DIALOGEX 0, 0, 240, 215
STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION
CAPTION "Security"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "&Group or user names:", -1, 5, 5, 230, 10
CONTROL "", IDC_USERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | LVS_SORTASCENDING
| LVS_SINGLESEL | LVS_SHOWSELALWAYS | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP,
5, 17, 230, 63, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
LTEXT "", IDC_ACE_USER, 5, 105, 110, 10
LTEXT "Allow", -1, 120, 105, 55, 10, SS_CENTER
LTEXT "Deny", -1, 180, 105, 55, 10, SS_CENTER
CONTROL "", IDC_ACE, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | LVS_SINGLESEL
| WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP,
5, 115, 230, 95, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
END
STRINGTABLE
BEGIN
IDS_PERMISSION_FOR "Permissions for %1"
END
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
/* @makedep: user_icons.bmp */
IDB_USER_ICONS BITMAP user_icons.bmp

View File

@ -19,504 +19,41 @@
*/
#include <stdarg.h>
#define COBJMACROS
#include "initguid.h"
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winnt.h"
#include "aclui.h"
#include "resource.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(aclui);
/* the aclui.h files does not contain the necessary COBJMACROS */
#define ISecurityInformation_AddRef(This) (This)->lpVtbl->AddRef(This)
#define ISecurityInformation_Release(This) (This)->lpVtbl->Release(This)
#define ISecurityInformation_GetObjectInformation(This, obj) (This)->lpVtbl->GetObjectInformation(This, obj)
#define ISecurityInformation_GetSecurity(This, info, sd, def) (This)->lpVtbl->GetSecurity(This, info, sd, def)
#define ISecurityInformation_GetAccessRights(This, type, flags, access, count, def) (This)->lpVtbl->GetAccessRights(This, type, flags, access, count, def)
struct user
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
WCHAR *name;
PSID sid;
};
TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
struct security_page
{
ISecurityInformation *security;
SI_OBJECT_INFO info;
PSECURITY_DESCRIPTOR sd;
SI_ACCESS *access;
ULONG access_count;
struct user *users;
unsigned int user_count;
HWND dialog;
HIMAGELIST image_list;
};
static HINSTANCE aclui_instance;
static WCHAR *WINAPIV load_formatstr(UINT resource, ...)
{
va_list valist;
WCHAR *str;
DWORD ret;
va_start(valist, resource);
ret = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE,
aclui_instance, resource, 0, (WCHAR*)&str, 0, &valist);
va_end(valist);
return ret ? str : NULL;
}
static WCHAR *get_sid_name(PSID sid, SID_NAME_USE *sid_type)
{
WCHAR *name, *domain;
DWORD domain_len = 0;
DWORD name_len = 0;
BOOL ret;
LookupAccountSidW(NULL, sid, NULL, &name_len, NULL, &domain_len, sid_type);
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
return NULL;
if (!(name = malloc(name_len * sizeof(WCHAR))))
return NULL;
if (!(domain = malloc(domain_len * sizeof(WCHAR))))
switch (fdwReason)
{
free(name);
return NULL;
}
ret = LookupAccountSidW(NULL, sid, name, &name_len, domain, &domain_len, sid_type);
free(domain);
if (ret) return name;
free(name);
return NULL;
}
static void add_user(struct security_page *page, PSID sid)
{
struct user *new_array, *user;
SID_NAME_USE sid_type;
unsigned int i;
LVITEMW item;
WCHAR *name;
/* check if we already processed this user or group */
for (i = 0; i < page->user_count; ++i)
{
if (EqualSid(sid, page->users[i].sid))
return;
}
if (!(name = get_sid_name(sid, &sid_type)))
return;
if (!(new_array = realloc(page->users, (page->user_count + 1) * sizeof(*page->users))))
{
free(name);
return;
}
page->users = new_array;
user = &page->users[page->user_count++];
user->name = name;
user->sid = sid;
item.mask = LVIF_PARAM | LVIF_TEXT | LVIF_IMAGE;
item.iItem = -1;
item.iSubItem = 0;
item.pszText = name;
item.lParam = (LPARAM)user;
item.iImage = (sid_type == SidTypeGroup || sid_type == SidTypeWellKnownGroup) ? 0 : 1;
SendMessageW(GetDlgItem(page->dialog, IDC_USERS), LVM_INSERTITEMW, 0, (LPARAM)&item);
}
static PSID get_sid_from_ace(ACE_HEADER *ace)
{
switch (ace->AceType)
{
case ACCESS_ALLOWED_ACE_TYPE:
return &((ACCESS_ALLOWED_ACE *)ace)->SidStart;
case ACCESS_DENIED_ACE_TYPE:
return &((ACCESS_DENIED_ACE *)ace)->SidStart;
default:
FIXME("Unhandled ACE type %#x.\n", ace->AceType);
return NULL;
}
}
static void compute_access_masks(PSECURITY_DESCRIPTOR sd, PSID sid, ACCESS_MASK *allowed, ACCESS_MASK *denied)
{
BOOL defaulted, present;
ACE_HEADER *ace;
PSID ace_sid;
DWORD index;
ACL *dacl;
*allowed = 0;
*denied = 0;
if (!GetSecurityDescriptorDacl(sd, &present, &dacl, &defaulted) || !present)
return;
for (index = 0; index < dacl->AceCount; index++)
{
if (!GetAce(dacl, index, (void**)&ace))
break;
ace_sid = get_sid_from_ace(ace);
if (!ace_sid || !EqualSid(ace_sid, sid))
continue;
if (ace->AceType == ACCESS_ALLOWED_ACE_TYPE)
*allowed |= ((ACCESS_ALLOWED_ACE*)ace)->Mask;
else if (ace->AceType == ACCESS_DENIED_ACE_TYPE)
*denied |= ((ACCESS_DENIED_ACE*)ace)->Mask;
}
}
static void update_access_list(struct security_page *page, struct user *user)
{
ACCESS_MASK allowed, denied;
WCHAR *infotext;
ULONG i, index;
LVITEMW item;
HWND control;
compute_access_masks(page->sd, user->sid, &allowed, &denied);
if ((infotext = load_formatstr(IDS_PERMISSION_FOR, user->name)))
{
SetDlgItemTextW(page->dialog, IDC_ACE_USER, infotext);
LocalFree(infotext);
}
control = GetDlgItem(page->dialog, IDC_ACE);
index = 0;
for (i = 0; i < page->access_count; i++)
{
if (!(page->access[i].dwFlags & SI_ACCESS_GENERAL))
continue;
item.mask = LVIF_TEXT;
item.iItem = index;
item.iSubItem = 1;
if ((page->access[i].mask & allowed) == page->access[i].mask)
item.pszText = (WCHAR *)L"X";
else
item.pszText = (WCHAR *)L"-";
SendMessageW(control, LVM_SETITEMW, 0, (LPARAM)&item);
item.iSubItem = 2;
if ((page->access[i].mask & denied) == page->access[i].mask)
item.pszText = (WCHAR *)L"X";
else
item.pszText = (WCHAR *)L"-";
SendMessageW(control, LVM_SETITEMW, 0, (LPARAM)&item);
index++;
}
}
static void init_users(struct security_page *page)
{
BOOL defaulted, present;
ACE_HEADER *ace;
DWORD index;
ACL *dacl;
PSID sid;
if (!GetSecurityDescriptorDacl(page->sd, &present, &dacl, &defaulted))
{
ERR("Failed to query descriptor information, error %lu.\n", GetLastError());
return;
}
if (!present)
return;
for (index = 0; index < dacl->AceCount; index++)
{
if (!GetAce(dacl, index, (void **)&ace))
break;
if (!(sid = get_sid_from_ace(ace)))
continue;
add_user(page, sid);
}
}
static void init_access_list(struct security_page *page)
{
ULONG i, index;
WCHAR str[256];
LVITEMW item;
HWND control;
control = GetDlgItem(page->dialog, IDC_ACE);
index = 0;
for (i = 0; i < page->access_count; i++)
{
if (!(page->access[i].dwFlags & SI_ACCESS_GENERAL))
continue;
item.mask = LVIF_TEXT;
item.iItem = index;
item.iSubItem = 0;
if (IS_INTRESOURCE(page->access[i].pszName))
{
str[0] = 0;
LoadStringW(page->info.hInstance, (DWORD_PTR)page->access[i].pszName, str, ARRAY_SIZE(str));
item.pszText = str;
}
else
item.pszText = (WCHAR *)page->access[i].pszName;
SendMessageW(control, LVM_INSERTITEMW, 0, (LPARAM)&item);
index++;
}
}
static HIMAGELIST create_image_list(UINT resource, UINT width, UINT height, UINT count, COLORREF mask_color)
{
HIMAGELIST image_list;
HBITMAP image;
INT ret;
if (!(image_list = ImageList_Create(width, height, ILC_COLOR32 | ILC_MASK, 0, count)))
return NULL;
if (!(image = LoadBitmapW(aclui_instance, MAKEINTRESOURCEW(resource))))
{
ImageList_Destroy(image_list);
return NULL;
}
ret = ImageList_AddMasked(image_list, image, mask_color);
DeleteObject(image);
if (ret == -1)
{
ImageList_Destroy(image_list);
return NULL;
}
return image_list;
}
static void security_page_free(struct security_page *page)
{
unsigned int i;
for (i = 0; i < page->user_count; ++i)
free(page->users[i].name);
free(page->users);
LocalFree(page->sd);
if (page->image_list)
ImageList_Destroy(page->image_list);
if (page->security)
ISecurityInformation_Release(page->security);
free(page);
}
static void security_page_init_dlg(HWND hwnd, struct security_page *page)
{
LVCOLUMNW column;
HWND control;
HRESULT hr;
ULONG def;
RECT rect;
page->dialog = hwnd;
if (FAILED(hr = ISecurityInformation_GetSecurity(page->security,
DACL_SECURITY_INFORMATION, &page->sd, FALSE)))
{
ERR("Failed to get security descriptor, hr %#lx.\n", hr);
return;
}
if (FAILED(hr = ISecurityInformation_GetAccessRights(page->security,
NULL, 0, &page->access, &page->access_count, &def)))
{
ERR("Failed to get access mapping, hr %#lx.\n", hr);
return;
}
/* user list */
control = GetDlgItem(hwnd, IDC_USERS);
SendMessageW(control, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
GetClientRect(control, &rect);
column.mask = LVCF_FMT | LVCF_WIDTH;
column.fmt = LVCFMT_LEFT;
column.cx = rect.right - rect.left;
SendMessageW(control, LVM_INSERTCOLUMNW, 0, (LPARAM)&column);
if (!(page->image_list = create_image_list(IDB_USER_ICONS, 18, 18, 2, RGB(255, 0, 255))))
return;
SendMessageW(control, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)page->image_list);
init_users(page);
/* ACE list */
control = GetDlgItem(hwnd, IDC_ACE);
SendMessageW(control, LVM_SETEXTENDEDLISTVIEWSTYLE, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
column.mask = LVCF_FMT | LVCF_WIDTH;
column.fmt = LVCFMT_LEFT;
column.cx = 170;
SendMessageW(control, LVM_INSERTCOLUMNW, 0, (LPARAM)&column);
column.fmt = LVCFMT_CENTER;
column.cx = 85;
SendMessageW(control, LVM_INSERTCOLUMNW, 1, (LPARAM)&column);
SendMessageW(control, LVM_INSERTCOLUMNW, 2, (LPARAM)&column);
init_access_list(page);
if (page->user_count)
{
LVITEMW item;
item.mask = LVIF_STATE;
item.iItem = 0;
item.iSubItem = 0;
item.state = LVIS_FOCUSED | LVIS_SELECTED;
item.stateMask = item.state;
SendMessageW(control, LVM_SETITEMW, 0, (LPARAM)&item);
}
}
static INT_PTR CALLBACK security_page_proc(HWND dialog, UINT msg, WPARAM wparam, LPARAM lparam)
{
switch (msg)
{
case WM_INITDIALOG:
{
PROPSHEETPAGEW *propsheet = (PROPSHEETPAGEW *)lparam;
SetWindowLongPtrW(dialog, DWLP_USER, propsheet->lParam);
security_page_init_dlg(dialog, (struct security_page *)propsheet->lParam);
break;
}
case WM_NOTIFY:
{
struct security_page *page = (struct security_page *)GetWindowLongPtrW(dialog, DWLP_USER);
NMHDR *hdr = (NMHDR *)lparam;
if (hdr->hwndFrom == GetDlgItem(dialog, IDC_USERS) && hdr->code == LVN_ITEMCHANGED)
{
NMLISTVIEW *listview = (NMLISTVIEW *)lparam;
if (!(listview->uOldState & LVIS_SELECTED) && (listview->uNewState & LVIS_SELECTED))
update_access_list(page, (struct user *)listview->lParam);
return TRUE;
}
break;
}
}
return FALSE;
}
static UINT CALLBACK security_page_callback(HWND hwnd, UINT msg, PROPSHEETPAGEW *ppsp)
{
struct security_page *page = (struct security_page *)ppsp->lParam;
if (msg == PSPCB_RELEASE)
security_page_free(page);
return 1;
}
HPROPSHEETPAGE WINAPI CreateSecurityPage(ISecurityInformation *security)
{
struct security_page *page;
PROPSHEETPAGEW propsheet;
HPROPSHEETPAGE ret;
TRACE("%p\n", security);
InitCommonControls();
if (!(page = calloc(1, sizeof(*page))))
return NULL;
if (FAILED(ISecurityInformation_GetObjectInformation(security, &page->info)))
{
free(page);
return NULL;
}
page->security = security;
ISecurityInformation_AddRef(security);
memset(&propsheet, 0, sizeof(propsheet));
propsheet.dwSize = sizeof(propsheet);
propsheet.dwFlags = PSP_DEFAULT | PSP_USECALLBACK;
propsheet.hInstance = aclui_instance;
propsheet.pszTemplate = (WCHAR *)MAKEINTRESOURCE(IDD_SECURITY_PROPERTIES);
propsheet.pfnDlgProc = security_page_proc;
propsheet.pfnCallback = security_page_callback;
propsheet.lParam = (LPARAM)page;
if (page->info.dwFlags & SI_PAGE_TITLE)
{
propsheet.pszTitle = page->info.pszPageTitle;
propsheet.dwFlags |= PSP_USETITLE;
}
if (!(ret = CreatePropertySheetPageW(&propsheet)))
{
ERR("Failed to create property sheet page.\n");
ISecurityInformation_Release(security);
free(page);
return NULL;
}
return ret;
}
BOOL WINAPI EditSecurity(HWND owner, ISecurityInformation *security)
{
PROPSHEETHEADERW sheet = {0};
HPROPSHEETPAGE pages[1];
SI_OBJECT_INFO info;
BOOL ret;
TRACE("(%p, %p)\n", owner, security);
if (FAILED(ISecurityInformation_GetObjectInformation(security, &info)))
return FALSE;
if (!(pages[0] = CreateSecurityPage(security)))
return FALSE;
sheet.dwSize = sizeof(sheet);
sheet.dwFlags = PSH_DEFAULT;
sheet.hwndParent = owner;
sheet.hInstance = aclui_instance;
sheet.pszCaption = load_formatstr(IDS_PERMISSION_FOR, info.pszObjectName);
sheet.nPages = 1;
sheet.nStartPage = 0;
sheet.phpage = pages;
ret = PropertySheetW(&sheet) != -1;
LocalFree((void *)sheet.pszCaption);
return ret;
}
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
{
if (reason == DLL_PROCESS_ATTACH)
{
aclui_instance = instance;
DisableThreadLibraryCalls(instance);
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
break;
}
return TRUE;
}
HPROPSHEETPAGE WINAPI CreateSecurityPage(LPSECURITYINFO psi)
{
FIXME("(%p): stub\n", psi);
return NULL;
}
BOOL WINAPI EditSecurity(HWND owner, LPSECURITYINFO psi)
{
FIXME("(%p, %p): stub\n", owner, psi);
return FALSE;
}

View File

@ -1,36 +0,0 @@
/*
* Definitions for aclui dialog controls
*
* Copyright (c) 2017 Michael Müller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_ACLUI__
#define __WINE_ACLUI__
#define IDD_SECURITY_PROPERTIES 100
#define IDC_USERS 101
#define IDC_ACE_USER 110
#define IDC_ACE 111
#define IDS_PERMISSION_FOR 1000
#define IDB_USER_ICONS 2000
#define IDB_CHECKBOX 2001
#endif /* __WINE_ACLUI__ */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -1,5 +1,3 @@
MODULE = activeds.tlb
EXTRADLLFLAGS = -Wb,--data-only
IDL_SRCS = activeds_tlb.idl

View File

@ -2,7 +2,7 @@ MODULE = activeds.dll
IMPORTLIB = activeds
IMPORTS = advapi32 ole32 oleaut32 uuid
EXTRADLLFLAGS = -Wb,--prefer-native
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
activeds_main.c \

View File

@ -22,7 +22,7 @@
26 stub PropVariantToAdsType2
27 stub ConvertSecDescriptorToVariant
28 stub ConvertSecurityDescriptorToSecDes
@ stdcall -private DllCanUnloadNow()
#@ stub DllCanUnloadNow
@ stdcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
#@ stub DllRegisterServer
#@ stub DllUnregisterServer

View File

@ -40,6 +40,24 @@
WINE_DEFAULT_DEBUG_CHANNEL(activeds);
/*****************************************************
* DllMain
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(%p, %d, %p)\n",hinstDLL, fdwReason, lpvReserved);
switch(fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls( hinstDLL );
break;
}
return TRUE;
}
/*****************************************************
* ADsGetObject [ACTIVEDS.3]
*/
@ -76,7 +94,7 @@ HRESULT WINAPI ADsFreeEnumerator(IEnumVARIANT* pEnumVariant)
*/
HRESULT WINAPI ADsEnumerateNext(IEnumVARIANT* pEnumVariant, ULONG cElements, VARIANT* pvar, ULONG * pcElementsFetched)
{
FIXME("(%p)->(%lu, %p, %p)!stub\n",pEnumVariant, cElements, pvar, pcElementsFetched);
FIXME("(%p)->(%u, %p, %p)!stub\n",pEnumVariant, cElements, pvar, pcElementsFetched);
return E_NOTIMPL;
}
@ -89,7 +107,7 @@ HRESULT WINAPI ADsBuildVarArrayStr(LPWSTR *str, DWORD count, VARIANT *var)
SAFEARRAY *sa;
LONG idx, end = count;
TRACE("(%p, %lu, %p)\n", str, count, var);
TRACE("(%p, %u, %p)\n", str, count, var);
if (!var) return E_ADS_BAD_PARAMETER;
@ -128,7 +146,7 @@ fail:
*/
HRESULT WINAPI ADsBuildVarArrayInt(LPDWORD lpdwObjectTypes, DWORD dwObjectTypes, VARIANT* pvar)
{
FIXME("(%p, %ld, %p)!stub\n",lpdwObjectTypes, dwObjectTypes, pvar);
FIXME("(%p, %d, %p)!stub\n",lpdwObjectTypes, dwObjectTypes, pvar);
return E_NOTIMPL;
}
@ -142,7 +160,7 @@ HRESULT WINAPI ADsOpenObject(LPCWSTR path, LPCWSTR user, LPCWSTR password, DWORD
WCHAR provider[MAX_PATH], progid[MAX_PATH];
DWORD idx = 0;
TRACE("(%s,%s,%lu,%s,%p)\n", debugstr_w(path), debugstr_w(user), reserved, debugstr_guid(riid), obj);
TRACE("(%s,%s,%u,%s,%p)\n", debugstr_w(path), debugstr_w(user), reserved, debugstr_guid(riid), obj);
if (!path || !riid || !obj)
return E_INVALIDARG;
@ -216,7 +234,7 @@ HRESULT WINAPI ADsOpenObject(LPCWSTR path, LPCWSTR user, LPCWSTR password, DWORD
*/
VOID WINAPI ADsSetLastError(DWORD dwErr, LPWSTR pszError, LPWSTR pszProvider)
{
FIXME("(%ld,%p,%p)!stub\n", dwErr, pszError, pszProvider);
FIXME("(%d,%p,%p)!stub\n", dwErr, pszError, pszProvider);
}
/*****************************************************
@ -224,7 +242,7 @@ VOID WINAPI ADsSetLastError(DWORD dwErr, LPWSTR pszError, LPWSTR pszProvider)
*/
HRESULT WINAPI ADsGetLastError(LPDWORD perror, LPWSTR errorbuf, DWORD errorbuflen, LPWSTR namebuf, DWORD namebuflen)
{
FIXME("(%p,%p,%ld,%p,%ld)!stub\n", perror, errorbuf, errorbuflen, namebuf, namebuflen);
FIXME("(%p,%p,%d,%p,%d)!stub\n", perror, errorbuf, errorbuflen, namebuf, namebuflen);
return E_NOTIMPL;
}
@ -295,6 +313,6 @@ BOOL WINAPI ReallocADsStr(LPWSTR *ppStr, LPWSTR pStr)
*/
HRESULT WINAPI ADsEncodeBinaryData(PBYTE pbSrcData, DWORD dwSrcLen, LPWSTR *ppszDestData)
{
FIXME("(%p,%ld,%p)!stub\n", pbSrcData, dwSrcLen, *ppszDestData);
FIXME("(%p,%d,%p)!stub\n", pbSrcData, dwSrcLen, *ppszDestData);
return E_NOTIMPL;
}

View File

@ -98,21 +98,21 @@ static HRESULT WINAPI path_GetTypeInfoCount(IADsPathname *iface, UINT *count)
static HRESULT WINAPI path_GetTypeInfo(IADsPathname *iface, UINT index, LCID lcid, ITypeInfo **info)
{
FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info);
FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
return E_NOTIMPL;
}
static HRESULT WINAPI path_GetIDsOfNames(IADsPathname *iface, REFIID riid, LPOLESTR *names,
UINT count, LCID lcid, DISPID *dispid)
{
FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
return E_NOTIMPL;
}
static HRESULT WINAPI path_Invoke(IADsPathname *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
{
FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
params, result, excepinfo, argerr);
return E_NOTIMPL;
}
@ -180,7 +180,7 @@ static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR adspath, LONG type)
HRESULT hr;
BSTR provider, server, dn;
TRACE("%p,%s,%ld\n", iface, debugstr_w(adspath), type);
TRACE("%p,%s,%d\n", iface, debugstr_w(adspath), type);
if (!adspath) return E_INVALIDARG;
@ -207,7 +207,7 @@ static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR adspath, LONG type)
if (type != ADS_SETTYPE_FULL)
{
FIXME("type %ld not implemented\n", type);
FIXME("type %d not implemented\n", type);
return E_INVALIDARG;
}
@ -227,7 +227,7 @@ static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR adspath, LONG type)
static HRESULT WINAPI path_SetDisplayType(IADsPathname *iface, LONG type)
{
FIXME("%p,%ld: stub\n", iface, type);
FIXME("%p,%d: stub\n", iface, type);
return E_NOTIMPL;
}
@ -236,14 +236,14 @@ static HRESULT WINAPI path_Retrieve(IADsPathname *iface, LONG type, BSTR *adspat
Pathname *path = impl_from_IADsPathname(iface);
int len;
TRACE("%p,%ld,%p\n", iface, type, adspath);
TRACE("%p,%d,%p\n", iface, type, adspath);
if (!adspath) return E_INVALIDARG;
switch (type)
{
default:
FIXME("type %ld not implemented\n", type);
FIXME("type %d not implemented\n", type);
/* fall through */
case ADS_FORMAT_X500:
@ -320,7 +320,7 @@ static HRESULT WINAPI path_GetElement(IADsPathname *iface, LONG index, BSTR *ele
WCHAR *p, *end;
LONG count;
TRACE("%p,%ld,%p\n", iface, index, element);
TRACE("%p,%d,%p\n", iface, index, element);
if (!element) return E_INVALIDARG;
@ -366,7 +366,7 @@ static HRESULT WINAPI path_CopyPath(IADsPathname *iface, IDispatch **path)
static HRESULT WINAPI path_GetEscapedElement(IADsPathname *iface, LONG reserved, BSTR element, BSTR *str)
{
FIXME("%p,%ld,%s,%p: stub\n", iface, reserved, debugstr_w(element), str);
FIXME("%p,%d,%s,%p: stub\n", iface, reserved, debugstr_w(element), str);
return E_NOTIMPL;
}
@ -378,7 +378,7 @@ static HRESULT WINAPI path_get_EscapedMode(IADsPathname *iface, LONG *mode)
static HRESULT WINAPI path_put_EscapedMode(IADsPathname *iface, LONG mode)
{
FIXME("%p,%ld: stub\n", iface, mode);
FIXME("%p,%d: stub\n", iface, mode);
return E_NOTIMPL;
}
@ -469,7 +469,7 @@ static ULONG WINAPI factory_AddRef(IClassFactory *iface)
class_factory *factory = impl_from_IClassFactory(iface);
ULONG ref = InterlockedIncrement(&factory->ref);
TRACE("(%p) ref %lu\n", iface, ref);
TRACE("(%p) ref %u\n", iface, ref);
return ref;
}
@ -479,7 +479,7 @@ static ULONG WINAPI factory_Release(IClassFactory *iface)
class_factory *factory = impl_from_IClassFactory(iface);
ULONG ref = InterlockedDecrement(&factory->ref);
TRACE("(%p) ref %lu\n", iface, ref);
TRACE("(%p) ref %u\n", iface, ref);
if (!ref)
heap_free(factory);

View File

@ -41,46 +41,46 @@ static void test_ADsBuildVarArrayStr(void)
LONG start, end, idx;
hr = ADsBuildVarArrayStr(NULL, 0, NULL);
ok(hr == E_ADS_BAD_PARAMETER || hr == E_FAIL /* XP */, "got %#lx\n", hr);
ok(hr == E_ADS_BAD_PARAMETER || hr == E_FAIL /* XP */, "got %#x\n", hr);
hr = ADsBuildVarArrayStr(NULL, 0, &var);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(V_VT(&var) == (VT_ARRAY | VT_VARIANT), "got %d\n", V_VT(&var));
start = 0xdeadbeef;
hr = SafeArrayGetLBound(V_ARRAY(&var), 1, &start);
ok(hr == S_OK, "got %#lx\n", hr);
ok(start == 0, "got %ld\n", start);
ok(hr == S_OK, "got %#x\n", hr);
ok(start == 0, "got %d\n", start);
end = 0xdeadbeef;
hr = SafeArrayGetUBound(V_ARRAY(&var), 1, &end);
ok(hr == S_OK, "got %#lx\n", hr);
ok(end == -1, "got %ld\n", end);
ok(hr == S_OK, "got %#x\n", hr);
ok(end == -1, "got %d\n", end);
VariantClear(&var);
hr = ADsBuildVarArrayStr((LPWSTR *)props, ARRAY_SIZE(props), &var);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(V_VT(&var) == (VT_ARRAY | VT_VARIANT), "got %d\n", V_VT(&var));
start = 0xdeadbeef;
hr = SafeArrayGetLBound(V_ARRAY(&var), 1, &start);
ok(hr == S_OK, "got %#lx\n", hr);
ok(start == 0, "got %ld\n", start);
ok(hr == S_OK, "got %#x\n", hr);
ok(start == 0, "got %d\n", start);
end = 0xdeadbeef;
hr = SafeArrayGetUBound(V_ARRAY(&var), 1, &end);
ok(hr == S_OK, "got %#lx\n", hr);
ok(end == 1, "got %ld\n", end);
ok(hr == S_OK, "got %#x\n", hr);
ok(end == 1, "got %d\n", end);
idx = 0;
hr = SafeArrayGetElement(V_ARRAY(&var), &idx, &item);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(V_VT(&item) == VT_BSTR, "got %d\n", V_VT(&item));
ok(!lstrcmpW(V_BSTR(&item), L"prop1"), "got %s\n", wine_dbgstr_w(V_BSTR(&item)));
VariantClear(&item);
hr = SafeArrayAccessData(V_ARRAY(&var), (void *)&data);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(V_VT(&data[0]) == VT_BSTR, "got %d\n", V_VT(&data[0]));
ok(!lstrcmpW(V_BSTR(&data[0]), L"prop1"), "got %s\n", wine_dbgstr_w(V_BSTR(&data[0])));
ok(V_VT(&data[0]) == VT_BSTR, "got %d\n", V_VT(&data[0]));
ok(!lstrcmpW(V_BSTR(&data[1]), L"prop2"), "got %s\n", wine_dbgstr_w(V_BSTR(&data[1])));
hr = SafeArrayUnaccessData(V_ARRAY(&var));
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
VariantClear(&var);
}
@ -93,68 +93,68 @@ static void test_Pathname(void)
LONG count, i;
hr = CoCreateInstance(&CLSID_Pathname, 0, CLSCTX_INPROC_SERVER, &IID_IADsPathname, (void **)&path);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
count = 0xdeadbeef;
hr = IADsPathname_GetNumElements(path, &count);
ok(hr == S_OK, "got %#lx\n", hr);
ok(count == 0, "got %ld\n", count);
ok(hr == S_OK, "got %#x\n", hr);
ok(count == 0, "got %d\n", count);
bstr = NULL;
hr = IADsPathname_Retrieve(path, ADS_FORMAT_X500, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(bstr && !wcscmp(bstr, L"LDAP://"), "got %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);
bstr = SysAllocString(L"LDAP://sample");
hr = IADsPathname_Set(path, bstr, ADS_SETTYPE_FULL);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
SysFreeString(bstr);
count = 0xdeadbeef;
hr = IADsPathname_GetNumElements(path, &count);
ok(hr == S_OK, "got %#lx\n", hr);
ok(count == 0, "got %ld\n", count);
ok(hr == S_OK, "got %#x\n", hr);
ok(count == 0, "got %d\n", count);
hr = IADsPathname_GetElement(path, 0, &bstr);
ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_INDEX), "got %#lx\n", hr);
ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_INDEX), "got %#x\n", hr);
SysFreeString(bstr);
bstr = SysAllocString(L"LDAP://sample:123/a=b,c=d,e=f");
hr = IADsPathname_Set(path, bstr, ADS_SETTYPE_FULL);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
SysFreeString(bstr);
count = 0xdeadbeef;
hr = IADsPathname_GetNumElements(path, &count);
ok(hr == S_OK, "got %#lx\n", hr);
ok(count == 3, "got %ld\n", count);
ok(hr == S_OK, "got %#x\n", hr);
ok(count == 3, "got %d\n", count);
for (i = 0; i < count; i++)
{
hr = IADsPathname_GetElement(path, i, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(!wcscmp(bstr, elem[i]), "%lu: %s\n", i, wine_dbgstr_w(bstr));
ok(hr == S_OK, "got %#x\n", hr);
ok(!wcscmp(bstr, elem[i]), "%u: %s\n", i, wine_dbgstr_w(bstr));
SysFreeString(bstr);
}
hr = IADsPathname_Retrieve(path, ADS_FORMAT_X500, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(!wcscmp(bstr, L"LDAP://sample:123/a=b,c=d,e=f"), "got %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);
hr = IADsPathname_Retrieve(path, ADS_FORMAT_PROVIDER, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(!wcscmp(bstr, L"LDAP"), "got %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);
hr = IADsPathname_Retrieve(path, ADS_FORMAT_SERVER, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(!wcscmp(bstr, L"sample:123"), "got %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);
hr = IADsPathname_Retrieve(path, ADS_FORMAT_LEAF, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(!wcscmp(bstr, L"a=b"), "got %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr);

View File

@ -1,6 +1,8 @@
MODULE = actxprxy.dll
IMPORTS = uuid oleaut32 ole32 rpcrt4
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
usrmarshal.c

View File

@ -175,7 +175,7 @@ HRESULT CALLBACK IEnumShellItems_Next_Proxy(
ULONG *pceltFetched)
{
ULONG fetched;
TRACE("(%p)->(%ld, %p, %p)\n", This, celt, rgelt, pceltFetched);
TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
if (!pceltFetched) pceltFetched = &fetched;
return IEnumShellItems_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
}
@ -187,7 +187,7 @@ HRESULT __RPC_STUB IEnumShellItems_Next_Stub(
ULONG *pceltFetched)
{
HRESULT hr;
TRACE("(%p)->(%ld, %p, %p)\n", This, celt, rgelt, pceltFetched);
TRACE("(%p)->(%d, %p, %p)\n", This, celt, rgelt, pceltFetched);
*pceltFetched = 0;
hr = IEnumShellItems_Next(This, celt, rgelt, pceltFetched);
if (hr == S_OK) *pceltFetched = celt;
@ -227,23 +227,3 @@ HRESULT __RPC_STUB IFolderView2_GetGroupBy_Proxy(
TRACE("(%p)->(%p %p)\n", This, pkey, ascending);
return IFolderView2_RemoteGetGroupBy_Proxy(This, pkey, ascending);
}
HRESULT __RPC_STUB IParentAndItem_GetParentAndItem_Stub(
IParentAndItem *This,
PIDLIST_ABSOLUTE *parent,
IShellFolder **folder,
PITEMID_CHILD *child)
{
TRACE("(%p)->(%p %p %p)\n", This, parent, folder, child);
return IParentAndItem_GetParentAndItem(This, parent, folder, child);
}
HRESULT __RPC_STUB IParentAndItem_GetParentAndItem_Proxy(
IParentAndItem *This,
PIDLIST_ABSOLUTE *parent,
IShellFolder **folder,
PITEMID_CHILD *child)
{
TRACE("(%p)->(%p %p %p)\n", This, parent, folder, child);
return IParentAndItem_RemoteGetParentAndItem_Proxy(This, parent, folder, child);
}

4
dlls/adsiid/Makefile.in Normal file
View File

@ -0,0 +1,4 @@
MODULE = libadsiid.a
C_SRCS = \
adsiid.c

View File

@ -2,7 +2,7 @@ MODULE = adsldp.dll
IMPORTS = ole32 oleaut32 secur32 activeds uuid
DELAYIMPORTS = netapi32 wldap32
EXTRADLLFLAGS = -Wb,--prefer-native
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
adsldp.c \

View File

@ -38,7 +38,6 @@
#include "lmcons.h"
#include "lmapibuf.h"
#include "winldap.h"
#include "winber.h"
#include "adsldp_private.h"
@ -53,6 +52,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(adsldp);
DEFINE_GUID(CLSID_LDAP,0x228d9a81,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91);
DEFINE_GUID(CLSID_LDAPNamespace,0x228d9a82,0xc302,0x11cf,0x9a,0xa4,0x00,0xaa,0x00,0x4a,0x56,0x91);
static HMODULE adsldp_hinst;
static HRESULT LDAPNamespace_create(REFIID riid, void **obj);
typedef struct
@ -218,21 +219,21 @@ static HRESULT WINAPI sysinfo_GetTypeInfoCount(IADsADSystemInfo *iface, UINT *co
static HRESULT WINAPI sysinfo_GetTypeInfo(IADsADSystemInfo *iface, UINT index, LCID lcid, ITypeInfo **info)
{
FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info);
FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
return E_NOTIMPL;
}
static HRESULT WINAPI sysinfo_GetIDsOfNames(IADsADSystemInfo *iface, REFIID riid, LPOLESTR *names,
UINT count, LCID lcid, DISPID *dispid)
{
FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
return E_NOTIMPL;
}
static HRESULT WINAPI sysinfo_Invoke(IADsADSystemInfo *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
{
FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
params, result, excepinfo, argerr);
return E_NOTIMPL;
}
@ -245,7 +246,7 @@ static HRESULT WINAPI sysinfo_get_UserName(IADsADSystemInfo *iface, BSTR *retval
static HRESULT WINAPI sysinfo_get_ComputerName(IADsADSystemInfo *iface, BSTR *retval)
{
ULONG size;
UINT size;
WCHAR *name;
TRACE("%p,%p\n", iface, retval);
@ -515,21 +516,21 @@ static HRESULT WINAPI ldapns_GetTypeInfoCount(IADs *iface, UINT *count)
static HRESULT WINAPI ldapns_GetTypeInfo(IADs *iface, UINT index, LCID lcid, ITypeInfo **info)
{
FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info);
FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
return E_NOTIMPL;
}
static HRESULT WINAPI ldapns_GetIDsOfNames(IADs *iface, REFIID riid, LPOLESTR *names,
UINT count, LCID lcid, DISPID *dispid)
{
FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
return E_NOTIMPL;
}
static HRESULT WINAPI ldapns_Invoke(IADs *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
{
FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
params, result, excepinfo, argerr);
return E_NOTIMPL;
}
@ -626,7 +627,7 @@ static HRESULT WINAPI ldapns_Get(IADs *iface, BSTR name, VARIANT *prop)
VARIANT item;
LONG idx;
TRACE("attr %s has %lu values\n", debugstr_w(ldap->attrs[i].name), count);
TRACE("attr %s has %u values\n", debugstr_w(ldap->attrs[i].name), count);
sa = SafeArrayCreateVector(VT_VARIANT, 0, count);
if (!sa) return E_OUTOFMEMORY;
@ -682,7 +683,7 @@ static HRESULT WINAPI ldapns_GetEx(IADs *iface, BSTR name, VARIANT *prop)
static HRESULT WINAPI ldapns_PutEx(IADs *iface, LONG code, BSTR name, VARIANT prop)
{
FIXME("%p,%ld,%s,%s: stub\n", iface, code, debugstr_w(name), wine_dbgstr_variant(&prop));
FIXME("%p,%d,%s,%s: stub\n", iface, code, debugstr_w(name), wine_dbgstr_variant(&prop));
return E_NOTIMPL;
}
@ -723,7 +724,7 @@ static HRESULT WINAPI ldapns_GetInfoEx(IADs *iface, VARIANT prop, LONG reserved)
LDAPMessage *res = NULL, *entry;
BerElement *ber;
TRACE("%p,%s,%ld\n", iface, wine_dbgstr_variant(&prop), reserved);
TRACE("%p,%s,%d\n", iface, wine_dbgstr_variant(&prop), reserved);
free_attributes(ldap);
@ -764,7 +765,7 @@ static HRESULT WINAPI ldapns_GetInfoEx(IADs *iface, VARIANT prop, LONG reserved)
err = ldap_search_sW(ldap->ld, NULL, LDAP_SCOPE_BASE, (WCHAR *)L"(objectClass=*)", props, FALSE, &res);
if (err != LDAP_SUCCESS)
{
TRACE("ldap_search_sW error %#lx\n", err);
TRACE("ldap_search_sW error %#x\n", err);
hr = HRESULT_FROM_WIN32(map_ldap_error(err));
goto exit;
}
@ -870,21 +871,21 @@ static HRESULT WINAPI openobj_GetTypeInfoCount(IADsOpenDSObject *iface, UINT *co
static HRESULT WINAPI openobj_GetTypeInfo(IADsOpenDSObject *iface, UINT index, LCID lcid, ITypeInfo **info)
{
FIXME("%p,%u,%#lx,%p: stub\n", iface, index, lcid, info);
FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info);
return E_NOTIMPL;
}
static HRESULT WINAPI openobj_GetIDsOfNames(IADsOpenDSObject *iface, REFIID riid, LPOLESTR *names,
UINT count, LCID lcid, DISPID *dispid)
{
FIXME("%p,%s,%p,%u,%lu,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid);
return E_NOTIMPL;
}
static HRESULT WINAPI openobj_Invoke(IADsOpenDSObject *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags,
DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr)
{
FIXME("%p,%ld,%s,%04lx,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags,
params, result, excepinfo, argerr);
return E_NOTIMPL;
}
@ -964,12 +965,12 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B
ULONG err, at_single_count = 0, at_multiple_count = 0;
struct attribute_type *at = NULL;
TRACE("%p,%s,%s,%p,%08lx,%p\n", iface, debugstr_w(path), debugstr_w(user), password, flags, obj);
TRACE("%p,%s,%s,%p,%08x,%p\n", iface, debugstr_w(path), debugstr_w(user), password, flags, obj);
hr = parse_path(path, &host, &port, &object);
if (hr != S_OK) return hr;
TRACE("host %s, port %lu, object %s\n", debugstr_w(host), port, debugstr_w(object));
TRACE("host %s, port %u, object %s\n", debugstr_w(host), port, debugstr_w(object));
if (host)
{
@ -990,7 +991,7 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B
err = DsGetDcNameW(NULL, NULL, NULL, NULL, DS_RETURN_DNS_NAME, &dcinfo);
if (err != ERROR_SUCCESS)
{
hr = HRESULT_FROM_WIN32(err);
hr = HRESULT_FROM_WIN32(LdapGetLastError());
goto fail;
}
@ -1043,7 +1044,7 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B
err = ldap_bind_sW(ld, NULL, (WCHAR *)&id, LDAP_AUTH_NEGOTIATE);
if (err != LDAP_SUCCESS)
{
TRACE("ldap_bind_sW error %#lx\n", err);
TRACE("ldap_bind_sW error %#x\n", err);
hr = HRESULT_FROM_WIN32(map_ldap_error(err));
ldap_unbind(ld);
goto fail;
@ -1054,7 +1055,7 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B
err = ldap_simple_bind_sW(ld, user, password);
if (err != LDAP_SUCCESS)
{
TRACE("ldap_simple_bind_sW error %#lx\n", err);
TRACE("ldap_simple_bind_sW error %#x\n", err);
hr = HRESULT_FROM_WIN32(map_ldap_error(err));
ldap_unbind(ld);
goto fail;
@ -1140,7 +1141,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
HRESULT hr = S_OK;
DWORD i;
TRACE("%p,%p,%lu\n", iface, prefs, count);
TRACE("%p,%p,%u\n", iface, prefs, count);
for (i = 0; i < count; i++)
{
@ -1159,7 +1160,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
case ADS_SCOPE_BASE:
case ADS_SCOPE_ONELEVEL:
case ADS_SCOPE_SUBTREE:
TRACE("SEARCH_SCOPE: %ld\n", prefs[i].vValue.u.Integer);
TRACE("SEARCH_SCOPE: %d\n", prefs[i].vValue.u.Integer);
ldap->search.scope = prefs[i].vValue.u.Integer;
prefs[i].dwStatus = ADS_STATUS_S_OK;
break;
@ -1185,7 +1186,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
break;
}
TRACE("SECURITY_MASK: %08lx\n", prefs[i].vValue.u.Integer);
TRACE("SECURITY_MASK: %08x\n", prefs[i].vValue.u.Integer);
security_mask = prefs[i].vValue.u.Integer;
if (!security_mask)
security_mask = ADS_SECURITY_INFO_OWNER;
@ -1208,7 +1209,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
err = ldap_set_optionW(ldap->ld, LDAP_OPT_SERVER_CONTROLS, ctrls);
if (err != LDAP_SUCCESS)
{
TRACE("ldap_set_option error %#lx\n", err);
TRACE("ldap_set_option error %#x\n", err);
prefs[i].dwStatus = ADS_STATUS_INVALID_SEARCHPREF;
hr = S_ADS_ERRORSOCCURRED;
}
@ -1228,7 +1229,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
break;
}
TRACE("PAGESIZE: %ld\n", prefs[i].vValue.u.Integer);
TRACE("PAGESIZE: %d\n", prefs[i].vValue.u.Integer);
ldap->search.pagesize = prefs[i].vValue.u.Integer;
prefs[i].dwStatus = ADS_STATUS_S_OK;
break;
@ -1241,7 +1242,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
break;
}
TRACE("CACHE_RESULTS: %ld\n", prefs[i].vValue.u.Boolean);
TRACE("CACHE_RESULTS: %d\n", prefs[i].vValue.u.Boolean);
ldap->search.cache_results = prefs[i].vValue.u.Boolean;
prefs[i].dwStatus = ADS_STATUS_S_OK;
break;
@ -1254,7 +1255,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
break;
}
TRACE("ATTRIBTYPES_ONLY: %ld\n", prefs[i].vValue.u.Boolean);
TRACE("ATTRIBTYPES_ONLY: %d\n", prefs[i].vValue.u.Boolean);
ldap->search.attribtypes_only = prefs[i].vValue.u.Boolean;
prefs[i].dwStatus = ADS_STATUS_S_OK;
break;
@ -1267,7 +1268,7 @@ static HRESULT WINAPI search_SetSearchPreference(IDirectorySearch *iface, PADS_S
break;
}
TRACE("TOMBSTONE: %ld\n", prefs[i].vValue.u.Boolean);
TRACE("TOMBSTONE: %d\n", prefs[i].vValue.u.Boolean);
ldap->search.tombstone = prefs[i].vValue.u.Boolean;
prefs[i].dwStatus = ADS_STATUS_S_OK;
break;
@ -1291,7 +1292,7 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte
LDAPControlW **ctrls = NULL, *ctrls_a[2], tombstone;
struct ldap_search_context *ldap_ctx;
TRACE("%p,%s,%p,%lu,%p\n", iface, debugstr_w(filter), names, count, res);
TRACE("%p,%s,%p,%u,%p\n", iface, debugstr_w(filter), names, count, res);
if (!res) return E_ADS_BAD_PARAMETER;
@ -1302,11 +1303,7 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte
props = NULL;
else
{
if (count && !names)
{
heap_free(ldap_ctx);
return E_ADS_BAD_PARAMETER;
}
if (count && !names) return E_ADS_BAD_PARAMETER;
props = heap_alloc((count + 1) * sizeof(props[0]));
if (!props)
@ -1352,7 +1349,7 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte
heap_free(props);
if (err != LDAP_SUCCESS)
{
TRACE("ldap_search_sW error %#lx\n", err);
TRACE("ldap_search_sW error %#x\n", err);
if (ldap_ctx->page)
ldap_search_abandon_page(ldap->ld, ldap_ctx->page);
heap_free(ldap_ctx);
@ -1427,7 +1424,7 @@ static HRESULT WINAPI search_GetNextRow(IDirectorySearch *iface, ADS_SEARCH_HAND
if (err != LDAP_NO_RESULTS_RETURNED)
{
TRACE("ldap_get_next_page_s error %#lx\n", err);
TRACE("ldap_get_next_page_s error %#x\n", err);
return HRESULT_FROM_WIN32(map_ldap_error(err));
}
/* fall through */
@ -1561,7 +1558,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
FIXME("not recognized boolean value %s\n", debugstr_w(values[i]));
col->pADsValues[i].u.Boolean = 0;
}
TRACE("%s => %ld\n", debugstr_w(values[i]), col->pADsValues[i].u.Boolean);
TRACE("%s => %d\n", debugstr_w(values[i]), col->pADsValues[i].u.Boolean);
}
ldap_value_freeW(values);
@ -1596,7 +1593,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
else
{
col->pADsValues[i].u.Integer = atol(values[i]->bv_val);
TRACE("%s => %ld\n", debugstr_an(values[i]->bv_val, values[i]->bv_len), col->pADsValues[i].u.Integer);
TRACE("%s => %d\n", debugstr_an(values[i]->bv_val, values[i]->bv_len), col->pADsValues[i].u.Integer);
}
}
@ -1738,7 +1735,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex
FIXME("wrong DN with binary separator '%c'\n", *p);
col->pADsValues[i].u.pDNWithBinary->pszDNString = p + 1;
TRACE("%s => %lu,%s,%s\n", debugstr_w(values[i]),
TRACE("%s => %u,%s,%s\n", debugstr_w(values[i]),
col->pADsValues[i].u.pDNWithBinary->dwLength,
debugstr_an((char *)col->pADsValues[i].u.pDNWithBinary->lpBinaryValue, col->pADsValues[i].u.pDNWithBinary->dwLength),
debugstr_w(col->pADsValues[i].u.pDNWithBinary->pszDNString));
@ -1915,21 +1912,21 @@ static HRESULT WINAPI dirobj_GetObjectInformation(IDirectoryObject *iface, PADS_
static HRESULT WINAPI dirobj_GetObjectAttributes(IDirectoryObject *iface, LPWSTR *names,
DWORD count, PADS_ATTR_INFO *attrs, DWORD *count_returned)
{
FIXME("%p,%p,%lu,%p,%p: stub\n", iface, names, count, attrs, count_returned);
FIXME("%p,%p,%u,%p,%p: stub\n", iface, names, count, attrs, count_returned);
return E_NOTIMPL;
}
static HRESULT WINAPI dirobj_SetObjectAttributes(IDirectoryObject *iface, PADS_ATTR_INFO attrs,
DWORD count, DWORD *count_set)
{
FIXME("%p,%p,%lu,%p: stub\n", iface, attrs, count, count_set);
FIXME("%p,%p,%u,%p: stub\n", iface, attrs, count, count_set);
return E_NOTIMPL;
}
static HRESULT WINAPI dirobj_CreateDSObject(IDirectoryObject *iface, LPWSTR name,
PADS_ATTR_INFO attrs, DWORD count, IDispatch **obj)
{
FIXME("%p,%s,%p,%lu,%p: stub\n", iface, debugstr_w(name), attrs, count, obj);
FIXME("%p,%s,%p,%u,%p: stub\n", iface, debugstr_w(name), attrs, count, obj);
return E_NOTIMPL;
}
@ -2032,7 +2029,7 @@ static ULONG WINAPI factory_AddRef(IClassFactory *iface)
class_factory *factory = impl_from_IClassFactory(iface);
ULONG ref = InterlockedIncrement(&factory->ref);
TRACE("(%p) ref %lu\n", iface, ref);
TRACE("(%p) ref %u\n", iface, ref);
return ref;
}
@ -2042,7 +2039,7 @@ static ULONG WINAPI factory_Release(IClassFactory *iface)
class_factory *factory = impl_from_IClassFactory(iface);
ULONG ref = InterlockedDecrement(&factory->ref);
TRACE("(%p) ref %lu\n", iface, ref);
TRACE("(%p) ref %u\n", iface, ref);
if (!ref)
heap_free(factory);
@ -2116,3 +2113,36 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *obj)
FIXME("class %s/%s is not implemented\n", debugstr_guid(clsid), debugstr_guid(iid));
return CLASS_E_CLASSNOTAVAILABLE;
}
HRESULT WINAPI DllCanUnloadNow(void)
{
return S_FALSE;
}
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources(adsldp_hinst);
}
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources(adsldp_hinst);
}
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, void *reserved)
{
TRACE("%p,%u,%p\n", hinst, reason, reserved);
switch (reason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
adsldp_hinst = hinst;
DisableThreadLibraryCalls(hinst);
break;
}
return TRUE;
}

View File

@ -198,7 +198,7 @@ static WCHAR *parse_name(WCHAR **str, ULONG *name_count)
tmp_name = parse_name(&p, &dummy);
if (!tmp_name) break;
TRACE("NAME[%lu] %s\n", *name_count, debugstr_w(tmp_name));
TRACE("NAME[%u] %s\n", *name_count, debugstr_w(tmp_name));
count = wcslen(tmp_name);
@ -368,7 +368,7 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_single_count, ULONG *at_m
err = ldap_search_sW(ld, NULL, LDAP_SCOPE_BASE, (WCHAR *)L"(objectClass=*)", subschema, FALSE, &res);
if (err != LDAP_SUCCESS)
{
TRACE("ldap_search_sW error %#lx\n", err);
TRACE("ldap_search_sW error %#x\n", err);
return NULL;
}
@ -382,7 +382,7 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_single_count, ULONG *at_m
err = ldap_search_sW(ld, schema[0], LDAP_SCOPE_BASE, (WCHAR *)L"(objectClass=*)", attribute_types, FALSE, &res);
if (err != LDAP_SUCCESS)
{
TRACE("ldap_search_sW error %#lx\n", err);
TRACE("ldap_search_sW error %#x\n", err);
ldap_value_freeW(schema);
return NULL;
}
@ -419,7 +419,7 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_single_count, ULONG *at_m
continue;
}
TRACE("oid %s, name %s, name_count %lu, syntax %s, single-value %d\n", debugstr_w(at[count].oid),
TRACE("oid %s, name %s, name_count %u, syntax %s, single-value %d\n", debugstr_w(at[count].oid),
debugstr_w(at[count].name), at[count].name_count, debugstr_w(at[count].syntax), at[count].single_value);
if (at[count].name_count > 1)

View File

@ -75,18 +75,18 @@ static void test_LDAP(void)
int i;
hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IADs, (void **)&ads);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IADs_Release(ads);
hr = CoCreateInstance(&CLSID_LDAPNamespace, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IDispatch, (void **)&disp);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IDispatch_Release(disp);
hr = IUnknown_QueryInterface(unk, &IID_IADsOpenDSObject, (void **)&ads_open);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
for (i = 0; i < ARRAY_SIZE(test); i++)
{
@ -101,7 +101,7 @@ static void test_LDAP(void)
skip("server is down\n");
break;
}
ok(hr == test[i].hr || hr == test[i].hr_ads_open, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr);
ok(hr == test[i].hr || hr == test[i].hr_ads_open, "%d: got %#x, expected %#x\n", i, hr, test[i].hr);
if (hr == S_OK)
IDispatch_Release(disp);
@ -112,7 +112,7 @@ static void test_LDAP(void)
skip("server is down\n");
break;
}
ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr);
ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr);
if (hr == S_OK)
IADs_Release(ads);
@ -123,7 +123,7 @@ static void test_LDAP(void)
skip("server is down\n");
break;
}
ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr);
ok(hr == test[i].hr || hr == test[i].hr_ads_get, "%d: got %#x, expected %#x\n", i, hr, test[i].hr);
if (hr == S_OK)
IDispatch_Release(disp);
@ -150,17 +150,17 @@ static void test_ParseDisplayName(void)
int i;
hr = CoCreateInstance(&CLSID_LDAP, 0, CLSCTX_INPROC_SERVER, &IID_IParseDisplayName, (void **)&parse);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IParseDisplayName_Release(parse);
hr = CoCreateInstance(&CLSID_LDAP, 0, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IParseDisplayName, (void **)&parse);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IUnknown_Release(unk);
hr = CreateBindCtx(0, &bc);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
for (i = 0; i < ARRAY_SIZE(test); i++)
{
@ -174,13 +174,13 @@ static void test_ParseDisplayName(void)
skip("server is down\n");
break;
}
ok(hr == test[i].hr || hr == test[i].hr_ads_open, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr);
ok(hr == test[i].hr || hr == test[i].hr_ads_open, "%d: got %#x, expected %#x\n", i, hr, test[i].hr);
if (hr == S_OK)
{
ok(count == lstrlenW(test[i].path), "%d: got %ld\n", i, count);
ok(count == lstrlenW(test[i].path), "%d: got %d\n", i, count);
hr = IMoniker_GetClassID(mk, &clsid);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(IsEqualGUID(&clsid, &CLSID_PointerMoniker), "%d: got %s\n", i, wine_dbgstr_guid(&clsid));
IMoniker_Release(mk);
@ -190,14 +190,14 @@ static void test_ParseDisplayName(void)
count = 0xdeadbeef;
hr = MkParseDisplayName(bc, test[i].path, &count, &mk);
todo_wine_if(i == 0 || i == 1 || i == 11 || i == 12)
ok(hr == test[i].hr, "%d: got %#lx, expected %#lx\n", i, hr, test[i].hr);
todo_wine_if(i == 0 || i == 1 || i == 11 || i == 12)
ok(hr == test[i].hr, "%d: got %#x, expected %#x\n", i, hr, test[i].hr);
if (hr == S_OK)
{
ok(count == lstrlenW(test[i].path), "%d: got %ld\n", i, count);
ok(count == lstrlenW(test[i].path), "%d: got %d\n", i, count);
hr = IMoniker_GetClassID(mk, &clsid);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(IsEqualGUID(&clsid, &CLSID_PointerMoniker), "%d: got %s\n", i, wine_dbgstr_guid(&clsid));
IMoniker_Release(mk);
@ -240,42 +240,42 @@ static void do_search(const struct search *s)
skip("server is down\n");
return;
}
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
pref.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE;
pref.vValue.dwType = ADSTYPE_INTEGER;
pref.vValue.Integer = s->scope;
pref.dwStatus = 0xdeadbeef;
hr = IDirectorySearch_SetSearchPreference(ds, &pref, 1);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(pref.dwStatus == ADS_STATUS_S_OK, "got %d\n", pref.dwStatus);
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, &sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
res = s->res;
while ((hr = IDirectorySearch_GetNextRow(ds, sh)) != S_ADS_NOMORE_ROWS)
{
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
while ((hr = IDirectorySearch_GetNextColumnName(ds, sh, &name)) != S_ADS_NOMORE_COLUMNS)
{
DWORD i;
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(res->name != NULL, "got extra row %s\n", wine_dbgstr_w(name));
ok(!wcscmp(res->name, name), "expected %s, got %s\n", wine_dbgstr_w(res->name), wine_dbgstr_w(name));
memset(&col, 0xde, sizeof(col));
hr = IDirectorySearch_GetColumn(ds, sh, name, &col);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(col.dwADsType == res->type, "got %d for %s\n", col.dwADsType, wine_dbgstr_w(name));
for (i = 0; i < col.dwNumValues; i++)
{
ok(col.pADsValues[i].dwType == col.dwADsType, "%lu: got %d for %s\n", i, col.pADsValues[i].dwType, wine_dbgstr_w(name));
ok(col.pADsValues[i].dwType == col.dwADsType, "%u: got %d for %s\n", i, col.pADsValues[i].dwType, wine_dbgstr_w(name));
ok(res->values[i] != NULL, "expected to have more values for %s\n", wine_dbgstr_w(name));
if (!res->values[i]) break;
@ -295,7 +295,7 @@ static void do_search(const struct search *s)
ok(res->name == NULL, "there are more rows in test data: %s\n", wine_dbgstr_w(res->name));
hr = IDirectorySearch_CloseSearchHandle(ds, sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IDirectorySearch_Release(ds);
}
@ -352,7 +352,7 @@ static void test_DirectorySearch(void)
LPWSTR name;
hr = ADsGetObject(L"LDAP:", &IID_IDirectorySearch, (void **)&ds);
ok(hr == E_NOINTERFACE, "got %#lx\n", hr);
ok(hr == E_NOINTERFACE, "got %#x\n", hr);
hr = ADsGetObject(L"LDAP://ldap.forumsys.com/rootDSE", &IID_IDirectorySearch, (void **)&ds);
if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN))
@ -360,7 +360,7 @@ static void test_DirectorySearch(void)
skip("server is down\n");
return;
}
ok(hr == E_NOINTERFACE, "got %#lx\n", hr);
ok(hr == E_NOINTERFACE, "got %#x\n", hr);
hr = ADsGetObject(L"LDAP://ldap.forumsys.com", &IID_IDirectorySearch, (void **)&ds);
if (hr == HRESULT_FROM_WIN32(ERROR_DS_SERVER_DOWN))
@ -368,34 +368,34 @@ static void test_DirectorySearch(void)
skip("server is down\n");
return;
}
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
pref.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE;
pref.vValue.dwType = ADSTYPE_INTEGER;
pref.vValue.Integer = ADS_SCOPE_BASE;
pref.dwStatus = 0xdeadbeef;
hr = IDirectorySearch_SetSearchPreference(ds, &pref, 1);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(pref.dwStatus == ADS_STATUS_S_OK, "got %d\n", pref.dwStatus);
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, NULL);
ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr);
ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr);
if (0) /* crashes under XP */
{
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, 1, &sh);
ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr);
ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr);
}
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, &sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IDirectorySearch_GetNextColumnName(ds, sh, &name);
ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr);
ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr);
hr = IDirectorySearch_GetPreviousRow(ds, sh);
todo_wine
ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr);
todo_wine
ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr);
while (IDirectorySearch_GetNextRow(ds, sh) != S_ADS_NOMORE_ROWS)
{
@ -404,7 +404,7 @@ static void test_DirectorySearch(void)
DWORD i;
hr = IDirectorySearch_GetColumn(ds, sh, name, &col);
ok(hr == S_OK, "got %#lx for column %s\n", hr, wine_dbgstr_w(name));
ok(hr == S_OK, "got %#x for column %s\n", hr, wine_dbgstr_w(name));
if (winetest_debug > 1) /* useful to create test arrays */
{
@ -416,51 +416,51 @@ static void test_DirectorySearch(void)
}
hr = IDirectorySearch_FreeColumn(ds, &col);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
}
name = (void *)0xdeadbeef;
hr = IDirectorySearch_GetNextColumnName(ds, sh, &name);
ok(hr == S_ADS_NOMORE_COLUMNS || broken(hr == S_OK) /* XP */, "got %#lx\n", hr);
ok(hr == S_ADS_NOMORE_COLUMNS || broken(hr == S_OK) /* XP */, "got %#x\n", hr);
ok(name == NULL || broken(name && !wcscmp(name, L"ADsPath")) /* XP */, "got %p/%s\n", name, wine_dbgstr_w(name));
}
hr = IDirectorySearch_GetNextRow(ds, sh);
ok(hr == S_ADS_NOMORE_ROWS, "got %#lx\n", hr);
ok(hr == S_ADS_NOMORE_ROWS, "got %#x\n", hr);
name = NULL;
hr = IDirectorySearch_GetNextColumnName(ds, sh, &name);
todo_wine
ok(hr == S_OK || broken(hr == S_ADS_NOMORE_COLUMNS) /* XP */, "got %#lx\n", hr);
todo_wine
todo_wine
ok(hr == S_OK || broken(hr == S_ADS_NOMORE_COLUMNS) /* XP */, "got %#x\n", hr);
todo_wine
ok((name && !wcscmp(name, L"ADsPath")) || broken(!name) /* XP */, "got %s\n", wine_dbgstr_w(name));
FreeADsMem(name);
name = (void *)0xdeadbeef;
hr = IDirectorySearch_GetNextColumnName(ds, sh, &name);
ok(hr == S_ADS_NOMORE_COLUMNS || broken(hr == S_OK) /* XP */, "got %#lx\n", hr);
ok(hr == S_ADS_NOMORE_COLUMNS || broken(hr == S_OK) /* XP */, "got %#x\n", hr);
ok(name == NULL || broken(name && !wcscmp(name, L"ADsPath")) /* XP */, "got %p/%s\n", name, wine_dbgstr_w(name));
if (0) /* crashes under XP */
{
hr = IDirectorySearch_GetColumn(ds, sh, NULL, &col);
ok(hr == E_ADS_BAD_PARAMETER, "got %#lx\n", hr);
ok(hr == E_ADS_BAD_PARAMETER, "got %#x\n", hr);
}
hr = IDirectorySearch_GetFirstRow(ds, sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
memset(&col, 0x55, sizeof(col));
hr = IDirectorySearch_GetColumn(ds, sh, (WCHAR *)L"deadbeef", &col);
ok(hr == E_ADS_COLUMN_NOT_SET, "got %#lx\n", hr);
ok(hr == E_ADS_COLUMN_NOT_SET, "got %#x\n", hr);
ok(!col.pszAttrName || broken(col.pszAttrName != NULL) /* XP */, "got %p\n", col.pszAttrName);
ok(col.dwADsType == ADSTYPE_INVALID || broken(col.dwADsType != ADSTYPE_INVALID) /* XP */, "got %d\n", col.dwADsType);
ok(!col.pADsValues, "got %p\n", col.pADsValues);
ok(!col.dwNumValues, "got %lu\n", col.dwNumValues);
ok(!col.dwNumValues, "got %u\n", col.dwNumValues);
ok(!col.hReserved, "got %p\n", col.hReserved);
hr = IDirectorySearch_CloseSearchHandle(ds, sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IDirectorySearch_Release(ds);
@ -485,20 +485,20 @@ static void test_DirectoryObject(void)
skip("server is down\n");
return;
}
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IADsOpenDSObject, (void **)&unk);
todo_wine
ok(hr == E_NOINTERFACE, "got %#lx\n", hr);
todo_wine
ok(hr == E_NOINTERFACE, "got %#x\n", hr);
if (hr == S_OK) IUnknown_Release(unk);
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IDispatch, (void **)&unk);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IUnknown_Release(unk);
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IADs, (void **)&unk);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IUnknown_Release(unk);
hr = IDirectoryObject_QueryInterface(dirobj, &IID_IDirectorySearch, (void **)&ds);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
pref[0].dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE;
pref[0].vValue.dwType = ADSTYPE_INTEGER;
@ -509,40 +509,40 @@ static void test_DirectoryObject(void)
pref[1].vValue.Integer = ADS_SECURITY_INFO_OWNER | ADS_SECURITY_INFO_GROUP | ADS_SECURITY_INFO_DACL;
pref[1].dwStatus = 0xdeadbeef;
hr = IDirectorySearch_SetSearchPreference(ds, pref, ARRAY_SIZE(pref));
ok(hr == S_ADS_ERRORSOCCURRED, "got %#lx\n", hr);
ok(hr == S_ADS_ERRORSOCCURRED, "got %#x\n", hr);
ok(pref[0].dwStatus == ADS_STATUS_S_OK, "got %d\n", pref[0].dwStatus);
/* ldap.forumsys.com doesn't support NT security, real ADs DC - does */
ok(pref[1].dwStatus == ADS_STATUS_INVALID_SEARCHPREF, "got %d\n", pref[1].dwStatus);
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, &sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IDirectorySearch_GetNextRow(ds, sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IDirectorySearch_GetColumn(ds, sh, (WCHAR *)L"nTSecurityDescriptor", &col);
ok(hr == E_ADS_COLUMN_NOT_SET, "got %#lx\n", hr);
ok(hr == E_ADS_COLUMN_NOT_SET, "got %#x\n", hr);
hr = IDirectorySearch_CloseSearchHandle(ds, sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
pref[0].dwSearchPref = ADS_SEARCHPREF_TOMBSTONE;
pref[0].vValue.dwType = ADSTYPE_BOOLEAN;
pref[0].vValue.Integer = 1;
pref[0].dwStatus = 0xdeadbeef;
hr = IDirectorySearch_SetSearchPreference(ds, pref, 1);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
ok(pref[0].dwStatus == ADS_STATUS_S_OK, "got %d\n", pref[0].dwStatus);
hr = IDirectorySearch_ExecuteSearch(ds, (WCHAR *)L"(objectClass=*)", NULL, ~0, &sh);
ok(hr == HRESULT_FROM_WIN32(ERROR_DS_UNAVAILABLE_CRIT_EXTENSION) || broken(hr == S_OK) /* XP */, "got %#lx\n", hr);
ok(hr == HRESULT_FROM_WIN32(ERROR_DS_UNAVAILABLE_CRIT_EXTENSION) || broken(hr == S_OK) /* XP */, "got %#x\n", hr);
if (hr == S_OK)
{
hr = IDirectorySearch_GetNextRow(ds, sh);
ok(hr == HRESULT_FROM_WIN32(ERROR_DS_UNAVAILABLE_CRIT_EXTENSION), "got %#lx\n", hr);
ok(hr == HRESULT_FROM_WIN32(ERROR_DS_UNAVAILABLE_CRIT_EXTENSION), "got %#x\n", hr);
hr = IDirectorySearch_CloseSearchHandle(ds, sh);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
}
IDirectorySearch_Release(ds);
@ -554,7 +554,7 @@ START_TEST(ldap)
HRESULT hr;
hr = CoInitialize(NULL);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
test_LDAP();
test_ParseDisplayName();

View File

@ -48,7 +48,7 @@ static void test_ComputerName(void)
name_size = MAX_COMPUTERNAME_LENGTH + 1;
SetLastError(0xdeadbeef);
ret = GetComputerNameW(name, &name_size);
ok(ret, "GetComputerName error %lu\n", GetLastError());
ok(ret, "GetComputerName error %u\n", GetLastError());
/* Distinguished name (rfc1779) is supposed to look like this:
* "CN=COMPNAME,CN=Computers,DC=domain,DC=com"
@ -57,23 +57,23 @@ static void test_ComputerName(void)
size = 1024;
SetLastError(0xdeadbeef);
ret = GetComputerObjectNameW(NameFullyQualifiedDN, buf, &size);
ok(ret || GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO, "GetComputerObjectName error %lu\n", GetLastError());
ok(ret || GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO, "GetComputerObjectName error %u\n", GetLastError());
if (ret)
{
const WCHAR *p;
ok(size == lstrlenW(buf) + 1, "got %lu, expected %u\n", size, lstrlenW(buf) + 1);
ok(size == lstrlenW(buf) + 1, "got %u, expected %u\n", size, lstrlenW(buf) + 1);
ok(!memcmp(buf, cnW, sizeof(cnW)), "got %s\n", wine_dbgstr_w(buf));
ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %lu)\n", wine_dbgstr_w(buf), name_size);
ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %u)\n", wine_dbgstr_w(buf), name_size);
p = wcschr(buf, ',');
ok(p != NULL, "delimiter was not found\n");
ok(p && !memcmp(p + 1, ComputersW, sizeof(ComputersW)), "got %s\n", p ? wine_dbgstr_w(p + 1) : wine_dbgstr_w(buf));
}
hr = CoCreateInstance(&CLSID_ADSystemInfo, 0, CLSCTX_ALL, &IID_IADsADSystemInfo, (void **)&sysinfo);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IADsADSystemInfo_get_ComputerName(sysinfo, &bstr);
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_CANT_ACCESS_DOMAIN_INFO), "got %#lx\n", hr);
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_CANT_ACCESS_DOMAIN_INFO), "got %#x\n", hr);
if (hr == S_OK)
{
ok(!lstrcmpW(bstr, buf), "got %s, expected %s\n", wine_dbgstr_w(bstr), wine_dbgstr_w(buf));
@ -98,7 +98,7 @@ static void test_UserName(void)
name_size = 256;
SetLastError(0xdeadbeef);
ret = GetUserNameW(name, &name_size);
ok(ret, "GetUserName error %lu\n", GetLastError());
ok(ret, "GetUserName error %u\n", GetLastError());
/* Distinguished name (rfc1779) is supposed to look like this:
* "CN=username,CN=Users,DC=domain,DC=com"
@ -107,24 +107,24 @@ static void test_UserName(void)
size = 1024;
SetLastError(0xdeadbeef);
ret = GetUserNameExW(NameFullyQualifiedDN, buf, &size);
ok(ret || GetLastError() == ERROR_NONE_MAPPED, "GetUserNameEx error %lu\n", GetLastError());
ok(ret || GetLastError() == ERROR_NONE_MAPPED, "GetUserNameEx error %u\n", GetLastError());
if (ret)
{
const WCHAR *p;
ok(size == lstrlenW(buf), "got %lu, expected %u\n", size, lstrlenW(buf));
ok(size == lstrlenW(buf), "got %u, expected %u\n", size, lstrlenW(buf));
ok(!memcmp(buf, cnW, sizeof(cnW)), "got %s\n", wine_dbgstr_w(buf));
ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %lu)\n", wine_dbgstr_w(buf), name_size);
ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %u)\n", wine_dbgstr_w(buf), name_size);
p = wcschr(buf, ',');
ok(p != NULL, "delimiter was not found\n");
ok(p && !memcmp(p + 1, UsersW, sizeof(UsersW)), "got %s\n", p ? wine_dbgstr_w(p + 1) : wine_dbgstr_w(buf));
}
hr = CoCreateInstance(&CLSID_ADSystemInfo, 0, CLSCTX_ALL, &IID_IADsADSystemInfo, (void **)&sysinfo);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IADsADSystemInfo_get_UserName(sysinfo, &bstr);
todo_wine
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NONE_MAPPED), "got %#lx\n", hr);
todo_wine
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NONE_MAPPED), "got %#x\n", hr);
if (hr == S_OK)
{
ok(!lstrcmpW(bstr, buf), "got %s, expected %s\n", wine_dbgstr_w(bstr), wine_dbgstr_w(buf));
@ -144,18 +144,18 @@ static void test_sysinfo(void)
HRESULT hr;
hr = CoCreateInstance(&CLSID_ADSystemInfo, 0, CLSCTX_ALL, &IID_IUnknown, (void **)&sysinfo);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IADsADSystemInfo_Release(sysinfo);
hr = CoCreateInstance(&CLSID_ADSystemInfo, 0, CLSCTX_ALL, &IID_IADsADSystemInfo, (void **)&sysinfo);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
hr = IADsADSystemInfo_QueryInterface(sysinfo, &IID_IDispatch, (void **)&dispatch);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
IDispatch_Release(dispatch);
hr = IADsADSystemInfo_get_ComputerName(sysinfo, &bstr);
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_CANT_ACCESS_DOMAIN_INFO), "got %#lx\n", hr);
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_CANT_ACCESS_DOMAIN_INFO), "got %#x\n", hr);
if (hr != S_OK)
{
skip("Computer is not part of a domain, skipping the tests\n");
@ -164,37 +164,37 @@ static void test_sysinfo(void)
SysFreeString(bstr);
hr = IADsADSystemInfo_get_UserName(sysinfo, &bstr);
todo_wine
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NONE_MAPPED), "got %#lx\n", hr);
todo_wine
ok(hr == S_OK || hr == HRESULT_FROM_WIN32(ERROR_NONE_MAPPED), "got %#x\n", hr);
if (hr != S_OK) goto done;
SysFreeString(bstr);
hr = IADsADSystemInfo_get_SiteName(sysinfo, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_DomainShortName(sysinfo, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_DomainDNSName(sysinfo, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_ForestDNSName(sysinfo, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_PDCRoleOwner(sysinfo, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
if (hr == S_OK) SysFreeString(bstr);
hr = IADsADSystemInfo_get_IsNativeMode(sysinfo, &value);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
if (hr == S_OK) ok(value == VARIANT_TRUE, "IsNativeMode: %s\n", value == VARIANT_TRUE ? "yes" : "no");
hr = IADsADSystemInfo_GetAnyDCName(sysinfo, &bstr);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
if (hr == S_OK) SysFreeString(bstr);
done:
IADsADSystemInfo_Release(sysinfo);
@ -205,7 +205,7 @@ START_TEST(sysinfo)
HRESULT hr;
hr = CoInitialize(NULL);
ok(hr == S_OK, "got %#lx\n", hr);
ok(hr == S_OK, "got %#x\n", hr);
test_ComputerName();
test_UserName();

View File

@ -1,3 +1,6 @@
MODULE = adsldpc.dll
EXTRADLLFLAGS = -Wb,--prefer-native
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
main.c

43
dlls/adsldpc/main.c Normal file
View File

@ -0,0 +1,43 @@
/*
* Active Directory Services Lightweight Directory Provider C
*
* Copyright 2017 Alex Henrie
*
* 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 <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(adsldpc);
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
{
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
switch (reason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(instance);
break;
}
return TRUE;
}

View File

@ -4,6 +4,8 @@ IMPORTLIB = advapi32
IMPORTS = kernelbase sechost msvcrt
DELAYIMPORTS = rpcrt4
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
advapi.c \
cred.c \

View File

@ -180,7 +180,7 @@ BOOL WINAPI InitiateSystemShutdownExA( LPSTR lpMachineName, LPSTR lpMessage,
DWORD dwTimeout, BOOL bForceAppsClosed, BOOL bRebootAfterShutdown,
DWORD dwReason)
{
FIXME("%s %s %ld %d %d %#lx\n", debugstr_a(lpMachineName),
FIXME("%s %s %d %d %d %#x\n", debugstr_a(lpMachineName),
debugstr_a(lpMessage), dwTimeout, bForceAppsClosed,
bRebootAfterShutdown, dwReason);
return TRUE;
@ -195,7 +195,7 @@ BOOL WINAPI InitiateSystemShutdownExW( LPWSTR lpMachineName, LPWSTR lpMessage,
DWORD dwTimeout, BOOL bForceAppsClosed, BOOL bRebootAfterShutdown,
DWORD dwReason)
{
FIXME("%s %s %ld %d %d %#lx\n", debugstr_w(lpMachineName),
FIXME("%s %s %d %d %d %#x\n", debugstr_w(lpMachineName),
debugstr_w(lpMessage), dwTimeout, bForceAppsClosed,
bRebootAfterShutdown, dwReason);
return TRUE;
@ -222,7 +222,7 @@ BOOL WINAPI InitiateSystemShutdownW( LPWSTR lpMachineName, LPWSTR lpMessage, DWO
*/
DWORD WINAPI InitiateShutdownA(char *name, char *message, DWORD seconds, DWORD flags, DWORD reason)
{
FIXME("%s, %s, %ld, %ld, %ld stub\n", debugstr_a(name), debugstr_a(message), seconds, flags, reason);
FIXME("%s, %s, %d, %d, %d stub\n", debugstr_a(name), debugstr_a(message), seconds, flags, reason);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -231,7 +231,7 @@ DWORD WINAPI InitiateShutdownA(char *name, char *message, DWORD seconds, DWORD f
*/
DWORD WINAPI InitiateShutdownW(WCHAR *name, WCHAR *message, DWORD seconds, DWORD flags, DWORD reason)
{
FIXME("%s, %s, %ld, %ld, %ld stub\n", debugstr_w(name), debugstr_w(message), seconds, flags, reason);
FIXME("%s, %s, %d, %d, %d stub\n", debugstr_w(name), debugstr_w(message), seconds, flags, reason);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -241,7 +241,7 @@ BOOL WINAPI LogonUserA( LPCSTR lpszUsername, LPCSTR lpszDomain, LPCSTR lpszPassw
WCHAR *usernameW = NULL, *domainW = NULL, *passwordW = NULL;
BOOL ret = FALSE;
TRACE("%s %s %p 0x%08lx 0x%08lx %p\n", debugstr_a(lpszUsername),
TRACE("%s %s %p 0x%08x 0x%08x %p\n", debugstr_a(lpszUsername),
debugstr_a(lpszDomain), lpszPassword, dwLogonType, dwLogonProvider, phToken);
if (lpszUsername && !(usernameW = strdupAW( lpszUsername ))) return FALSE;
@ -260,7 +260,7 @@ done:
BOOL WINAPI LogonUserW( LPCWSTR lpszUsername, LPCWSTR lpszDomain, LPCWSTR lpszPassword,
DWORD dwLogonType, DWORD dwLogonProvider, PHANDLE phToken )
{
FIXME("%s %s %p 0x%08lx 0x%08lx %p - stub\n", debugstr_w(lpszUsername),
FIXME("%s %s %p 0x%08x 0x%08x %p - stub\n", debugstr_w(lpszUsername),
debugstr_w(lpszDomain), lpszPassword, dwLogonType, dwLogonProvider, phToken);
*phToken = (HANDLE *)0xdeadbeef;
@ -297,19 +297,3 @@ void WINAPI RegisterWaitChainCOMCallback(PCOGETCALLSTATE call_state_cb,
{
FIXME("%p, %p\n", call_state_cb, activation_state_cb);
}
HWCT WINAPI OpenThreadWaitChainSession(DWORD flags, PWAITCHAINCALLBACK callback)
{
FIXME("flags %ld, callback %p stub!\n", flags, callback);
SetLastError(ERROR_NOT_SUPPORTED);
return NULL;
}
BOOL WINAPI GetThreadWaitChain(HWCT handle, DWORD_PTR ctx, DWORD flags, DWORD thread_id, DWORD *node_count,
WAITCHAIN_NODE_INFO *node_info_arr, BOOL *is_cycle)
{
FIXME( "handle %p, ctx %Ix, flags %ld, thread_id %ld, node_count %p, node_info_arr %p, is_cycle %p stub!\n",
handle, ctx, flags, thread_id, node_count, node_info_arr, is_cycle );
SetLastError(ERROR_NOT_SUPPORTED);
return FALSE;
}

View File

@ -91,7 +91,7 @@
# @ stub CancelOverlappedAccess
@ stdcall -import ChangeServiceConfig2A(long long ptr)
@ stdcall -import ChangeServiceConfig2W(long long ptr)
@ stdcall -import ChangeServiceConfigA(long long long long str str ptr str str str str)
@ stdcall -import ChangeServiceConfigA(long long long long wstr str ptr str str str str)
@ stdcall -import ChangeServiceConfigW(long long long long wstr wstr ptr wstr wstr wstr wstr)
# @ stub CheckForHiberboot
@ stdcall -import CheckTokenMembership(long ptr ptr)
@ -129,8 +129,8 @@
# @ stub ConvertStringSDToSDRootDomainW
@ stdcall ConvertStringSecurityDescriptorToSecurityDescriptorA(str long ptr ptr)
@ stdcall -import ConvertStringSecurityDescriptorToSecurityDescriptorW(wstr long ptr ptr)
@ stdcall ConvertStringSidToSidA(str ptr)
@ stdcall -import ConvertStringSidToSidW(wstr ptr)
@ stdcall ConvertStringSidToSidA(ptr ptr)
@ stdcall -import ConvertStringSidToSidW(ptr ptr)
@ stdcall -import ConvertToAutoInheritPrivateObjectSecurity(ptr ptr ptr ptr long ptr)
@ stdcall -import CopySid(long ptr ptr)
# @ stub CreateCodeAuthzLevel
@ -370,7 +370,7 @@
@ stdcall -import GetSidSubAuthorityCount(ptr)
@ stub GetSiteSidFromToken
# @ stub GetStringConditionFromBinary
@ stdcall GetThreadWaitChain(ptr ptr long long ptr ptr ptr)
# @ stub GetThreadWaitChain
@ stdcall -import GetTokenInformation(long long ptr long ptr)
@ stdcall GetTraceEnableFlags(int64) ntdll.EtwGetTraceEnableFlags
@ stdcall GetTraceEnableLevel(int64) ntdll.EtwGetTraceEnableLevel
@ -429,16 +429,16 @@
@ stdcall LogonUserW(wstr wstr wstr long long ptr)
@ stdcall LookupAccountNameA(str str ptr ptr ptr ptr ptr)
@ stdcall LookupAccountNameW(wstr wstr ptr ptr ptr ptr ptr)
@ stdcall LookupAccountSidA(str ptr ptr ptr ptr ptr ptr)
@ stdcall LookupAccountSidA(ptr ptr ptr ptr ptr ptr ptr)
@ stdcall LookupAccountSidLocalA(ptr ptr ptr ptr ptr ptr)
@ stdcall LookupAccountSidLocalW(ptr ptr ptr ptr ptr ptr)
@ stdcall LookupAccountSidW(wstr ptr ptr ptr ptr ptr ptr)
@ stdcall LookupAccountSidW(ptr ptr ptr ptr ptr ptr ptr)
@ stdcall LookupPrivilegeDisplayNameA(str str str ptr ptr)
@ stdcall LookupPrivilegeDisplayNameW(wstr wstr wstr ptr ptr)
@ stdcall LookupPrivilegeNameA(str ptr ptr ptr)
@ stdcall LookupPrivilegeNameW(wstr ptr ptr ptr)
@ stdcall LookupPrivilegeValueA(str str ptr)
@ stdcall LookupPrivilegeValueW(wstr wstr ptr)
@ stdcall LookupPrivilegeValueA(ptr ptr ptr)
@ stdcall LookupPrivilegeValueW(ptr ptr ptr)
@ stdcall LookupSecurityDescriptorPartsA(ptr ptr ptr ptr ptr ptr ptr)
@ stdcall LookupSecurityDescriptorPartsW(ptr ptr ptr ptr ptr ptr ptr)
@ stdcall LsaAddAccountRights(ptr ptr ptr long)
@ -548,7 +548,7 @@
@ stdcall -import OpenServiceA(long str long)
@ stdcall -import OpenServiceW(long wstr long)
@ stdcall -import OpenThreadToken(long long long ptr)
@ stdcall OpenThreadWaitChainSession(long ptr)
# @ stub OpenThreadWaitChainSession
@ stdcall -ret64 OpenTraceA(ptr)
@ stdcall -ret64 -import OpenTraceW(ptr)
# @ stub OperationEnd
@ -603,7 +603,7 @@
@ stdcall -import QueryServiceObjectSecurity(long long ptr long ptr)
@ stdcall -import QueryServiceStatus(long ptr)
@ stdcall -import QueryServiceStatusEx (long long ptr long ptr)
@ stdcall QueryTraceA(int64 str ptr)
# @ stub QueryTraceA
@ stdcall QueryTraceW(int64 wstr ptr)
# @ stub QueryUserServiceName
# @ stub QueryUsersOnEncryptedFile
@ -681,17 +681,17 @@
@ stdcall RegReplaceKeyW(long wstr wstr wstr)
@ stdcall -import RegRestoreKeyA(long str long)
@ stdcall -import RegRestoreKeyW(long wstr long)
@ stdcall RegSaveKeyA(long str ptr)
@ stdcall RegSaveKeyA(long ptr ptr)
@ stdcall -import RegSaveKeyExA(long str ptr long)
@ stdcall -import RegSaveKeyExW(long wstr ptr long)
@ stdcall RegSaveKeyW(long wstr ptr)
@ stdcall RegSaveKeyW(long ptr ptr)
@ stdcall -import RegSetKeySecurity(long long ptr)
@ stdcall -import RegSetKeyValueA(long str str long ptr long)
@ stdcall -import RegSetKeyValueW(long wstr wstr long ptr long)
@ stdcall RegSetValueA(long str long str long)
@ stdcall RegSetValueA(long str long ptr long)
@ stdcall -import RegSetValueExA(long str long long ptr long)
@ stdcall -import RegSetValueExW(long wstr long long ptr long)
@ stdcall RegSetValueW(long wstr long wstr long)
@ stdcall RegSetValueW(long wstr long ptr long)
@ stdcall -import RegUnLoadKeyA(long str)
@ stdcall -import RegUnLoadKeyW(long wstr)
@ stdcall RegisterEventSourceA(str str)

View File

@ -303,11 +303,11 @@ static DWORD host_write_credential( const CREDENTIALW *credential, BOOL preserve
BOOL ret;
if (credential->Flags)
FIXME( "flags 0x%lx not written\n", credential->Flags );
FIXME( "flags 0x%x not written\n", credential->Flags );
if (credential->Type != CRED_TYPE_DOMAIN_PASSWORD)
FIXME( "credential type of %ld not supported\n", credential->Type );
FIXME( "credential type of %d not supported\n", credential->Type );
if (credential->Persist != CRED_PERSIST_LOCAL_MACHINE)
FIXME( "persist value of %ld not supported\n", credential->Persist );
FIXME( "persist value of %d not supported\n", credential->Persist );
if (credential->AttributeCount)
FIXME( "custom attributes not supported\n" );
@ -721,7 +721,7 @@ BOOL WINAPI CredDeleteA(LPCSTR TargetName, DWORD Type, DWORD Flags)
DWORD len;
BOOL ret;
TRACE("(%s, %ld, 0x%lx)\n", debugstr_a(TargetName), Type, Flags);
TRACE("(%s, %d, 0x%x)\n", debugstr_a(TargetName), Type, Flags);
if (!TargetName)
{
@ -784,7 +784,7 @@ BOOL WINAPI CredDeleteW(LPCWSTR TargetName, DWORD Type, DWORD Flags)
DWORD ret;
LPWSTR key_name;
TRACE("(%s, %ld, 0x%lx)\n", debugstr_w(TargetName), Type, Flags);
TRACE("(%s, %d, 0x%x)\n", debugstr_w(TargetName), Type, Flags);
if (!TargetName)
{
@ -794,14 +794,14 @@ BOOL WINAPI CredDeleteW(LPCWSTR TargetName, DWORD Type, DWORD Flags)
if (Type != CRED_TYPE_GENERIC && Type != CRED_TYPE_DOMAIN_PASSWORD)
{
FIXME("unhandled type %ld\n", Type);
FIXME("unhandled type %d\n", Type);
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (Flags)
{
FIXME("unhandled flags 0x%lx\n", Flags);
FIXME("unhandled flags 0x%x\n", Flags);
SetLastError(ERROR_INVALID_FLAGS);
return FALSE;
}
@ -816,7 +816,7 @@ BOOL WINAPI CredDeleteW(LPCWSTR TargetName, DWORD Type, DWORD Flags)
ret = open_cred_mgr_key(&hkeyMgr, TRUE);
if (ret != ERROR_SUCCESS)
{
WARN("couldn't open/create manager key, error %ld\n", ret);
WARN("couldn't open/create manager key, error %d\n", ret);
SetLastError(ERROR_NO_SUCH_LOGON_SESSION);
return FALSE;
}
@ -847,7 +847,7 @@ BOOL WINAPI CredEnumerateA(LPCSTR Filter, DWORD Flags, DWORD *Count,
INT needed;
char *buffer;
TRACE("(%s, 0x%lx, %p, %p)\n", debugstr_a(Filter), Flags, Count, Credentials);
TRACE("(%s, 0x%x, %p, %p)\n", debugstr_a(Filter), Flags, Count, Credentials);
if (Filter)
{
@ -1012,7 +1012,7 @@ BOOL WINAPI CredEnumerateW(LPCWSTR Filter, DWORD Flags, DWORD *Count, PCREDENTIA
char *buffer;
BYTE key_data[KEY_SIZE];
TRACE("(%s, 0x%lx, %p, %p)\n", debugstr_w(Filter), Flags, Count, Credentials);
TRACE("(%s, 0x%x, %p, %p)\n", debugstr_w(Filter), Flags, Count, Credentials);
if (Flags)
{
@ -1023,7 +1023,7 @@ BOOL WINAPI CredEnumerateW(LPCWSTR Filter, DWORD Flags, DWORD *Count, PCREDENTIA
ret = open_cred_mgr_key(&hkeyMgr, FALSE);
if (ret != ERROR_SUCCESS)
{
WARN("couldn't open/create manager key, error %ld\n", ret);
WARN("couldn't open/create manager key, error %d\n", ret);
SetLastError(ERROR_NO_SUCH_LOGON_SESSION);
return FALSE;
}
@ -1119,7 +1119,7 @@ BOOL WINAPI CredReadA(LPCSTR TargetName, DWORD Type, DWORD Flags, PCREDENTIALA *
PCREDENTIALW CredentialW;
INT len;
TRACE("(%s, %ld, 0x%lx, %p)\n", debugstr_a(TargetName), Type, Flags, Credential);
TRACE("(%s, %d, 0x%x, %p)\n", debugstr_a(TargetName), Type, Flags, Credential);
if (!TargetName)
{
@ -1249,7 +1249,7 @@ BOOL WINAPI CredReadW(LPCWSTR TargetName, DWORD Type, DWORD Flags, PCREDENTIALW
DWORD len;
BYTE key_data[KEY_SIZE];
TRACE("(%s, %ld, 0x%lx, %p)\n", debugstr_w(TargetName), Type, Flags, Credential);
TRACE("(%s, %d, 0x%x, %p)\n", debugstr_w(TargetName), Type, Flags, Credential);
if (!TargetName)
{
@ -1259,14 +1259,14 @@ BOOL WINAPI CredReadW(LPCWSTR TargetName, DWORD Type, DWORD Flags, PCREDENTIALW
if (Type != CRED_TYPE_GENERIC && Type != CRED_TYPE_DOMAIN_PASSWORD)
{
FIXME("unhandled type %ld\n", Type);
FIXME("unhandled type %d\n", Type);
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (Flags)
{
FIXME("unhandled flags 0x%lx\n", Flags);
FIXME("unhandled flags 0x%x\n", Flags);
SetLastError(ERROR_INVALID_FLAGS);
return FALSE;
}
@ -1285,7 +1285,7 @@ BOOL WINAPI CredReadW(LPCWSTR TargetName, DWORD Type, DWORD Flags, PCREDENTIALW
ret = open_cred_mgr_key(&hkeyMgr, FALSE);
if (ret != ERROR_SUCCESS)
{
WARN("couldn't open/create manager key, error %ld\n", ret);
WARN("couldn't open/create manager key, error %d\n", ret);
SetLastError(ERROR_NO_SUCH_LOGON_SESSION);
return FALSE;
}
@ -1347,7 +1347,7 @@ BOOL WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA TargetInf
BOOL ret;
PCREDENTIALW* CredentialsW;
TRACE("(%p, 0x%lx, %p, %p)\n", TargetInformation, Flags, Size, Credentials);
TRACE("(%p, 0x%x, %p, %p)\n", TargetInformation, Flags, Size, Credentials);
/* follow Windows behavior - do not test for NULL, initialize early */
*Size = 0;
@ -1486,7 +1486,7 @@ BOOL WINAPI CredReadDomainCredentialsA(PCREDENTIAL_TARGET_INFORMATIONA TargetInf
BOOL WINAPI CredReadDomainCredentialsW(PCREDENTIAL_TARGET_INFORMATIONW TargetInformation, DWORD Flags,
DWORD *Size, PCREDENTIALW **Credentials)
{
FIXME("(%p, 0x%lx, %p, %p) stub\n", TargetInformation, Flags, Size, Credentials);
FIXME("(%p, 0x%x, %p, %p) stub\n", TargetInformation, Flags, Size, Credentials);
/* follow Windows behavior - do not test for NULL, initialize early */
*Size = 0;
@ -1510,7 +1510,7 @@ BOOL WINAPI CredWriteA(PCREDENTIALA Credential, DWORD Flags)
INT len;
PCREDENTIALW CredentialW;
TRACE("(%p, 0x%lx)\n", Credential, Flags);
TRACE("(%p, 0x%x)\n", Credential, Flags);
if (!Credential || !Credential->TargetName)
{
@ -1546,7 +1546,7 @@ BOOL WINAPI CredWriteW(PCREDENTIALW Credential, DWORD Flags)
LPWSTR key_name;
BYTE key_data[KEY_SIZE];
TRACE("(%p, 0x%lx)\n", Credential, Flags);
TRACE("(%p, 0x%x)\n", Credential, Flags);
if (!Credential || !Credential->TargetName)
{
@ -1556,23 +1556,23 @@ BOOL WINAPI CredWriteW(PCREDENTIALW Credential, DWORD Flags)
if (Flags & ~CRED_PRESERVE_CREDENTIAL_BLOB)
{
FIXME("unhandled flags 0x%lx\n", Flags);
FIXME("unhandled flags 0x%x\n", Flags);
SetLastError(ERROR_INVALID_FLAGS);
return FALSE;
}
if (Credential->Type != CRED_TYPE_GENERIC && Credential->Type != CRED_TYPE_DOMAIN_PASSWORD)
{
FIXME("unhandled type %ld\n", Credential->Type);
FIXME("unhandled type %d\n", Credential->Type);
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
TRACE("Credential->Flags = 0x%08lx\n", Credential->Flags);
TRACE("Credential->Type = %lu\n", Credential->Type);
TRACE("Credential->Flags = 0x%08x\n", Credential->Flags);
TRACE("Credential->Type = %u\n", Credential->Type);
TRACE("Credential->TargetName = %s\n", debugstr_w(Credential->TargetName));
TRACE("Credential->Comment = %s\n", debugstr_w(Credential->Comment));
TRACE("Credential->Persist = %lu\n", Credential->Persist);
TRACE("Credential->Persist = %u\n", Credential->Persist);
TRACE("Credential->TargetAlias = %s\n", debugstr_w(Credential->TargetAlias));
TRACE("Credential->UserName = %s\n", debugstr_w(Credential->UserName));
@ -1604,7 +1604,7 @@ BOOL WINAPI CredWriteW(PCREDENTIALW Credential, DWORD Flags)
ret = open_cred_mgr_key(&hkeyMgr, FALSE);
if (ret != ERROR_SUCCESS)
{
WARN("couldn't open/create manager key, error %ld\n", ret);
WARN("couldn't open/create manager key, error %d\n", ret);
SetLastError(ERROR_NO_SUCH_LOGON_SESSION);
return FALSE;
}
@ -1649,7 +1649,7 @@ BOOL WINAPI CredWriteW(PCREDENTIALW Credential, DWORD Flags)
*/
WINADVAPI BOOL WINAPI CredGetSessionTypes(DWORD persistCount, LPDWORD persists)
{
TRACE("(%lu, %p)\n", persistCount, persists);
TRACE("(%u, %p)\n", persistCount, persists);
memset(persists, CRED_PERSIST_NONE, persistCount*sizeof(*persists));
if (CRED_TYPE_GENERIC < persistCount)

View File

@ -37,7 +37,6 @@
#include "winreg.h"
#include "rpc.h"
#include "wine/debug.h"
#include "wine/exception.h"
#include "winternl.h"
WINE_DEFAULT_DEBUG_CHANNEL(crypt);
@ -58,41 +57,6 @@ static HWND crypt_hWindow;
#define CRYPT_Alloc(size) (LocalAlloc(LMEM_ZEROINIT, size))
#define CRYPT_Free(buffer) (LocalFree(buffer))
static void *pointer_from_handle(UINT_PTR handle, DWORD magic)
{
void *ret = NULL;
__TRY
{
if (handle && *(DWORD *)handle == magic)
ret = (void *)handle;
}
__EXCEPT_PAGE_FAULT
{
}
__ENDTRY
if (!ret)
SetLastError(ERROR_INVALID_PARAMETER);
return ret;
}
static PCRYPTPROV provider_from_handle(HCRYPTPROV handle)
{
return pointer_from_handle(handle, MAGIC_CRYPTPROV);
}
static PCRYPTHASH hash_from_handle(HCRYPTHASH handle)
{
return pointer_from_handle(handle, MAGIC_CRYPTHASH);
}
static PCRYPTKEY key_from_handle(HCRYPTKEY handle)
{
return pointer_from_handle(handle, MAGIC_CRYPTKEY);
}
static inline PWSTR CRYPT_GetProvKeyName(PCWSTR pProvName)
{
static const WCHAR KEYSTR[] = L"Software\\Microsoft\\Cryptography\\Defaults\\Provider\\";
@ -364,7 +328,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
DWORD keytype, type, len;
ULONG r;
TRACE("(%p, %s, %s, %ld, %08lx)\n", phProv, debugstr_w(pszContainer),
TRACE("(%p, %s, %s, %d, %08x)\n", phProv, debugstr_w(pszContainer),
debugstr_w(pszProvider), dwProvType, dwFlags);
if (dwProvType < 1 || dwProvType > MAXPROVTYPES)
@ -388,7 +352,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
* then try the machine default CSP
*/
if ( !(keyname = CRYPT_GetTypeKeyName(dwProvType, TRUE)) ) {
TRACE("No provider registered for crypto provider type %ld.\n", dwProvType);
TRACE("No provider registered for crypto provider type %d.\n", dwProvType);
SetLastError(NTE_PROV_TYPE_NOT_DEF);
return FALSE;
}
@ -396,7 +360,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
{
CRYPT_Free(keyname);
if ( !(keyname = CRYPT_GetTypeKeyName(dwProvType, FALSE)) ) {
TRACE("No type registered for crypto provider type %ld.\n", dwProvType);
TRACE("No type registered for crypto provider type %d.\n", dwProvType);
RegCloseKey(key);
SetLastError(NTE_PROV_TYPE_NOT_DEF);
goto error;
@ -413,7 +377,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
r = RegQueryValueExW(key, L"Name", NULL, &keytype, NULL, &len);
if( r != ERROR_SUCCESS || !len || keytype != REG_SZ)
{
TRACE("error %ld reading size of 'Name' from registry\n", r );
TRACE("error %d reading size of 'Name' from registry\n", r );
RegCloseKey(key);
SetLastError(NTE_PROV_TYPE_ENTRY_BAD);
goto error;
@ -427,7 +391,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
r = RegQueryValueExW(key, L"Name", NULL, NULL, (LPBYTE)provname, &len);
if( r != ERROR_SUCCESS )
{
TRACE("error %ld reading 'Name' from registry\n", r );
TRACE("error %d reading 'Name' from registry\n", r );
RegCloseKey(key);
SetLastError(NTE_PROV_TYPE_ENTRY_BAD);
goto error;
@ -459,7 +423,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
}
if (type != dwProvType)
{
TRACE("Crypto provider has wrong type (%ld vs expected %ld).\n", type, dwProvType);
TRACE("Crypto provider has wrong type (%d vs expected %d).\n", type, dwProvType);
SetLastError(NTE_PROV_TYPE_NO_MATCH);
goto error;
}
@ -467,7 +431,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
r = RegQueryValueExW(key, L"Image Path", NULL, &keytype, NULL, &len);
if ( r != ERROR_SUCCESS || keytype != REG_SZ)
{
TRACE("error %ld reading size of 'Image Path' from registry\n", r );
TRACE("error %d reading size of 'Image Path' from registry\n", r );
RegCloseKey(key);
SetLastError(NTE_PROV_TYPE_ENTRY_BAD);
goto error;
@ -481,7 +445,7 @@ BOOL WINAPI CryptAcquireContextW (HCRYPTPROV *phProv, LPCWSTR pszContainer,
r = RegQueryValueExW(key, L"Image Path", NULL, NULL, (LPBYTE)temp, &len);
if( r != ERROR_SUCCESS )
{
TRACE("error %ld reading 'Image Path' from registry\n", r );
TRACE("error %d reading 'Image Path' from registry\n", r );
RegCloseKey(key);
SetLastError(NTE_PROV_TYPE_ENTRY_BAD);
goto error;
@ -569,7 +533,7 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
PWSTR pProvider = NULL, pContainer = NULL;
BOOL ret = FALSE;
TRACE("(%p, %s, %s, %ld, %08lx)\n", phProv, debugstr_a(pszContainer),
TRACE("(%p, %s, %s, %d, %08x)\n", phProv, debugstr_a(pszContainer),
debugstr_a(pszProvider), dwProvType, dwFlags);
if ( !CRYPT_ANSIToUnicode(pszContainer, &pContainer, -1) )
@ -609,12 +573,21 @@ BOOL WINAPI CryptAcquireContextA (HCRYPTPROV *phProv, LPCSTR pszContainer,
*/
BOOL WINAPI CryptContextAddRef (HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFlags)
{
PCRYPTPROV pProv = provider_from_handle(hProv);
PCRYPTPROV pProv = (PCRYPTPROV)hProv;
TRACE("(0x%Ix, %p, %08lx)\n", hProv, pdwReserved, dwFlags);
TRACE("(0x%lx, %p, %08x)\n", hProv, pdwReserved, dwFlags);
if (!pProv)
{
SetLastError(NTE_BAD_UID);
return FALSE;
}
if (pProv->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
InterlockedIncrement(&pProv->refcount);
return TRUE;
@ -635,13 +608,22 @@ BOOL WINAPI CryptContextAddRef (HCRYPTPROV hProv, DWORD *pdwReserved, DWORD dwFl
*/
BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags)
{
PCRYPTPROV pProv = provider_from_handle(hProv);
PCRYPTPROV pProv = (PCRYPTPROV)hProv;
BOOL ret = TRUE;
TRACE("(0x%Ix, %08lx)\n", hProv, dwFlags);
TRACE("(0x%lx, %08x)\n", hProv, dwFlags);
if (!pProv)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (pProv->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (InterlockedDecrement(&pProv->refcount) == 0)
{
@ -678,12 +660,21 @@ BOOL WINAPI CryptReleaseContext (HCRYPTPROV hProv, DWORD dwFlags)
*/
BOOL WINAPI CryptGenRandom (HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer)
{
PCRYPTPROV prov = provider_from_handle(hProv);
PCRYPTPROV prov = (PCRYPTPROV)hProv;
TRACE("(0x%Ix, %ld, %p)\n", hProv, dwLen, pbBuffer);
TRACE("(0x%lx, %d, %p)\n", hProv, dwLen, pbBuffer);
if (!prov)
if (!hProv)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (prov->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
return prov->pFuncs->pCPGenRandom(prov->hPrivate, dwLen, pbBuffer);
}
@ -710,19 +701,14 @@ BOOL WINAPI CryptGenRandom (HCRYPTPROV hProv, DWORD dwLen, BYTE *pbBuffer)
BOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
DWORD dwFlags, HCRYPTHASH *phHash)
{
PCRYPTKEY key = NULL;
PCRYPTPROV prov;
PCRYPTPROV prov = (PCRYPTPROV)hProv;
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTHASH hash;
TRACE("(0x%Ix, 0x%x, 0x%Ix, %08lx, %p)\n", hProv, Algid, hKey, dwFlags, phHash);
TRACE("(0x%lx, 0x%x, 0x%lx, %08x, %p)\n", hProv, Algid, hKey, dwFlags, phHash);
if (!(prov = provider_from_handle(hProv)))
return FALSE;
if (hKey && !(key = key_from_handle(hKey)))
return FALSE;
if (!phHash)
if (!prov || !phHash || prov->dwMagic != MAGIC_CRYPTPROV ||
(key && key->dwMagic != MAGIC_CRYPTKEY))
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -775,19 +761,15 @@ BOOL WINAPI CryptCreateHash (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
BOOL WINAPI CryptDecrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen)
{
PCRYPTHASH hash = NULL;
PCRYPTPROV prov;
PCRYPTKEY key;
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
TRACE("(0x%Ix, 0x%Ix, %d, %08lx, %p, %p)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen);
TRACE("(0x%lx, 0x%lx, %d, %08x, %p, %p)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen);
if (!(key = key_from_handle(hKey)))
return FALSE;
if (hHash && !(hash = hash_from_handle(hHash)))
return FALSE;
if (!pbData || !pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!key || !pbData || !pdwDataLen ||
!key->pProvider || key->dwMagic != MAGIC_CRYPTKEY ||
key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -817,19 +799,18 @@ BOOL WINAPI CryptDecrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
BOOL WINAPI CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData,
DWORD dwFlags, HCRYPTKEY *phKey)
{
PCRYPTPROV prov;
PCRYPTHASH hash;
PCRYPTPROV prov = (PCRYPTPROV)hProv;
PCRYPTHASH hash = (PCRYPTHASH)hBaseData;
PCRYPTKEY key;
TRACE("(0x%Ix, 0x%08x, 0x%Ix, 0x%08lx, %p)\n", hProv, Algid, hBaseData, dwFlags, phKey);
TRACE("(0x%lx, 0x%08x, 0x%lx, 0x%08x, %p)\n", hProv, Algid, hBaseData, dwFlags, phKey);
if (!(prov = provider_from_handle(hProv)))
if (!prov || !hash)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
if (!(hash = hash_from_handle(hBaseData)))
return FALSE;
if (!phKey)
}
if (!phKey || prov->dwMagic != MAGIC_CRYPTPROV || hash->dwMagic != MAGIC_CRYPTHASH)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -869,16 +850,20 @@ BOOL WINAPI CryptDeriveKey (HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseData
*/
BOOL WINAPI CryptDestroyHash (HCRYPTHASH hHash)
{
PCRYPTHASH hash;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTPROV prov;
BOOL ret;
TRACE("(0x%Ix)\n", hHash);
TRACE("(0x%lx)\n", hHash);
if (!(hash = hash_from_handle(hHash)))
if (!hash)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!hash->pProvider || hash->dwMagic != MAGIC_CRYPTHASH ||
hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -905,16 +890,20 @@ BOOL WINAPI CryptDestroyHash (HCRYPTHASH hHash)
*/
BOOL WINAPI CryptDestroyKey (HCRYPTKEY hKey)
{
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTPROV prov;
PCRYPTKEY key;
BOOL ret;
TRACE("(0x%Ix)\n", hKey);
TRACE("(0x%lx)\n", hKey);
if (!(key = key_from_handle(hKey)))
if (!key)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (!key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!key->pProvider || key->dwMagic != MAGIC_CRYPTKEY ||
key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -948,12 +937,11 @@ BOOL WINAPI CryptDuplicateHash (HCRYPTHASH hHash, DWORD *pdwReserved,
PCRYPTPROV prov;
PCRYPTHASH orghash, newhash;
TRACE("(0x%Ix, %p, %08lx, %p)\n", hHash, pdwReserved, dwFlags, phHash);
TRACE("(0x%lx, %p, %08x, %p)\n", hHash, pdwReserved, dwFlags, phHash);
if (!(orghash = hash_from_handle(hHash)))
return FALSE;
if (pdwReserved || !phHash || !orghash->pProvider || orghash->pProvider->dwMagic != MAGIC_CRYPTPROV)
orghash = (PCRYPTHASH)hHash;
if (!orghash || pdwReserved || !phHash || !orghash->pProvider ||
orghash->dwMagic != MAGIC_CRYPTHASH || orghash->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1004,12 +992,12 @@ BOOL WINAPI CryptDuplicateKey (HCRYPTKEY hKey, DWORD *pdwReserved, DWORD dwFlags
PCRYPTPROV prov;
PCRYPTKEY orgkey, newkey;
TRACE("(0x%Ix, %p, %08lx, %p)\n", hKey, pdwReserved, dwFlags, phKey);
TRACE("(0x%lx, %p, %08x, %p)\n", hKey, pdwReserved, dwFlags, phKey);
if (!(orgkey = key_from_handle(hKey)))
return FALSE;
if (pdwReserved || !phKey || !orgkey->pProvider || orgkey->pProvider->dwMagic != MAGIC_CRYPTPROV)
orgkey = (PCRYPTKEY)hKey;
if (!orgkey || pdwReserved || !phKey || !orgkey->pProvider ||
orgkey->dwMagic != MAGIC_CRYPTKEY ||
orgkey->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1066,19 +1054,14 @@ BOOL WINAPI CryptDuplicateKey (HCRYPTKEY hKey, DWORD *pdwReserved, DWORD dwFlags
BOOL WINAPI CryptEncrypt (HCRYPTKEY hKey, HCRYPTHASH hHash, BOOL Final,
DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen, DWORD dwBufLen)
{
PCRYPTHASH hash = NULL;
PCRYPTPROV prov;
PCRYPTKEY key;
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
TRACE("(0x%Ix, 0x%Ix, %d, %08lx, %p, %p, %ld)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen, dwBufLen);
TRACE("(0x%lx, 0x%lx, %d, %08x, %p, %p, %d)\n", hKey, hHash, Final, dwFlags, pbData, pdwDataLen, dwBufLen);
if (!(key = key_from_handle(hKey)))
return FALSE;
if (hHash && !(hash = hash_from_handle(hHash)))
return FALSE;
if (!pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!key || !pdwDataLen || !key->pProvider ||
key->dwMagic != MAGIC_CRYPTKEY || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1117,7 +1100,7 @@ BOOL WINAPI CryptEnumProvidersW (DWORD dwIndex, DWORD *pdwReserved,
HKEY hKey;
BOOL ret;
TRACE("(%ld, %p, %ld, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
TRACE("(%d, %p, %d, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszProvName, pcbProvName);
if (pdwReserved || !pcbProvName)
@ -1202,7 +1185,7 @@ BOOL WINAPI CryptEnumProvidersA (DWORD dwIndex, DWORD *pdwReserved,
DWORD bufsize;
BOOL ret;
TRACE("(%ld, %p, %08lx, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
TRACE("(%d, %p, %08x, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszProvName, pcbProvName);
if(!CryptEnumProvidersW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &bufsize))
@ -1258,7 +1241,7 @@ BOOL WINAPI CryptEnumProviderTypesW (DWORD dwIndex, DWORD *pdwReserved,
PWSTR keyname, ch;
DWORD result;
TRACE("(%ld, %p, %08lx, %p, %p, %p)\n", dwIndex, pdwReserved,
TRACE("(%d, %p, %08x, %p, %p, %p)\n", dwIndex, pdwReserved,
dwFlags, pdwProvType, pszTypeName, pcbTypeName);
if (pdwReserved || !pdwProvType || !pcbTypeName)
@ -1328,7 +1311,7 @@ BOOL WINAPI CryptEnumProviderTypesA (DWORD dwIndex, DWORD *pdwReserved,
DWORD bufsize;
BOOL ret;
TRACE("(%ld, %p, %08lx, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
TRACE("(%d, %p, %08x, %p, %p, %p)\n", dwIndex, pdwReserved, dwFlags,
pdwProvType, pszTypeName, pcbTypeName);
if(!CryptEnumProviderTypesW(dwIndex, pdwReserved, dwFlags, pdwProvType, NULL, &bufsize))
@ -1379,17 +1362,12 @@ BOOL WINAPI CryptExportKey (HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType,
DWORD dwFlags, BYTE *pbData, DWORD *pdwDataLen)
{
PCRYPTPROV prov;
PCRYPTKEY key, expkey = NULL;
PCRYPTKEY key = (PCRYPTKEY)hKey, expkey = (PCRYPTKEY)hExpKey;
TRACE("(0x%Ix, 0x%Ix, %ld, %08lx, %p, %p)\n", hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen);
TRACE("(0x%lx, 0x%lx, %d, %08x, %p, %p)\n", hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen);
if (!(key = key_from_handle(hKey)))
return FALSE;
if (hExpKey && !(expkey = key_from_handle(hExpKey)))
return FALSE;
if (!pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!key || !pdwDataLen || !key->pProvider ||
key->dwMagic != MAGIC_CRYPTKEY || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1417,15 +1395,12 @@ BOOL WINAPI CryptExportKey (HCRYPTKEY hKey, HCRYPTKEY hExpKey, DWORD dwBlobType,
*/
BOOL WINAPI CryptGenKey (HCRYPTPROV hProv, ALG_ID Algid, DWORD dwFlags, HCRYPTKEY *phKey)
{
PCRYPTPROV prov;
PCRYPTPROV prov = (PCRYPTPROV)hProv;
PCRYPTKEY key;
TRACE("(0x%Ix, %d, %08lx, %p)\n", hProv, Algid, dwFlags, phKey);
TRACE("(0x%lx, %d, %08x, %p)\n", hProv, Algid, dwFlags, phKey);
if (!(prov = provider_from_handle(hProv)))
return FALSE;
if (!phKey)
if (!phKey || !prov || prov->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1533,7 +1508,7 @@ BOOL WINAPI CryptGetDefaultProviderA (DWORD dwProvType, DWORD *pdwReserved,
DWORD bufsize;
BOOL ret;
TRACE("(%ld, %p, %08lx, %p, %p)\n", dwProvType, pdwReserved, dwFlags, pszProvName, pcbProvName);
TRACE("(%d, %p, %08x, %p, %p)\n", dwProvType, pdwReserved, dwFlags, pszProvName, pcbProvName);
CryptGetDefaultProviderW(dwProvType, pdwReserved, dwFlags, NULL, &bufsize);
if ( pszProvName && !(str = CRYPT_Alloc(bufsize)) )
@ -1580,15 +1555,12 @@ BOOL WINAPI CryptGetHashParam (HCRYPTHASH hHash, DWORD dwParam, BYTE *pbData,
DWORD *pdwDataLen, DWORD dwFlags)
{
PCRYPTPROV prov;
PCRYPTHASH hash;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
TRACE("(0x%Ix, %ld, %p, %p, %08lx)\n", hHash, dwParam, pbData, pdwDataLen, dwFlags);
TRACE("(0x%lx, %d, %p, %p, %08x)\n", hHash, dwParam, pbData, pdwDataLen, dwFlags);
if (!(hash = hash_from_handle(hHash)))
return FALSE;
if (!pdwDataLen || !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!hash || !pdwDataLen || !hash->pProvider ||
hash->dwMagic != MAGIC_CRYPTHASH || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1622,14 +1594,12 @@ BOOL WINAPI CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData,
DWORD *pdwDataLen, DWORD dwFlags)
{
PCRYPTPROV prov;
PCRYPTKEY key;
PCRYPTKEY key = (PCRYPTKEY)hKey;
TRACE("(0x%Ix, %ld, %p, %p, %08lx)\n", hKey, dwParam, pbData, pdwDataLen, dwFlags);
TRACE("(0x%lx, %d, %p, %p, %08x)\n", hKey, dwParam, pbData, pdwDataLen, dwFlags);
if (!(key = key_from_handle(hKey)))
return FALSE;
if (!pdwDataLen || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!key || !pdwDataLen || !key->pProvider ||
key->dwMagic != MAGIC_CRYPTKEY || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1662,12 +1632,15 @@ BOOL WINAPI CryptGetKeyParam (HCRYPTKEY hKey, DWORD dwParam, BYTE *pbData,
BOOL WINAPI CryptGetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
DWORD *pdwDataLen, DWORD dwFlags)
{
PCRYPTPROV prov;
PCRYPTPROV prov = (PCRYPTPROV)hProv;
TRACE("(0x%Ix, %ld, %p, %p, %08lx)\n", hProv, dwParam, pbData, pdwDataLen, dwFlags);
TRACE("(0x%lx, %d, %p, %p, %08x)\n", hProv, dwParam, pbData, pdwDataLen, dwFlags);
if (!(prov = provider_from_handle(hProv)))
if (!prov || prov->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
return prov->pFuncs->pCPGetProvParam(prov->hPrivate, dwParam, pbData, pdwDataLen, dwFlags);
}
@ -1688,15 +1661,17 @@ BOOL WINAPI CryptGetProvParam (HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
*/
BOOL WINAPI CryptGetUserKey (HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUserKey)
{
PCRYPTPROV prov;
PCRYPTPROV prov = (PCRYPTPROV)hProv;
PCRYPTKEY key;
TRACE("(0x%Ix, %ld, %p)\n", hProv, dwKeySpec, phUserKey);
TRACE("(0x%lx, %d, %p)\n", hProv, dwKeySpec, phUserKey);
if (!(prov = provider_from_handle(hProv)))
if (!prov)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
if (!phUserKey)
}
if (!phUserKey || prov->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1739,15 +1714,18 @@ BOOL WINAPI CryptGetUserKey (HCRYPTPROV hProv, DWORD dwKeySpec, HCRYPTKEY *phUse
*/
BOOL WINAPI CryptHashData (HCRYPTHASH hHash, const BYTE *pbData, DWORD dwDataLen, DWORD dwFlags)
{
PCRYPTHASH hash;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTPROV prov;
TRACE("(0x%Ix, %p, %ld, %08lx)\n", hHash, pbData, dwDataLen, dwFlags);
TRACE("(0x%lx, %p, %d, %08x)\n", hHash, pbData, dwDataLen, dwFlags);
if (!(hash = hash_from_handle(hHash)))
if (!hash)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
if (!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
}
if (!hash->pProvider || hash->dwMagic != MAGIC_CRYPTHASH ||
hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1773,19 +1751,20 @@ BOOL WINAPI CryptHashData (HCRYPTHASH hHash, const BYTE *pbData, DWORD dwDataLen
*/
BOOL WINAPI CryptHashSessionKey (HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags)
{
PCRYPTHASH hash;
PCRYPTKEY key;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTKEY key = (PCRYPTKEY)hKey;
PCRYPTPROV prov;
TRACE("(0x%Ix, 0x%Ix, %08lx)\n", hHash, hKey, dwFlags);
TRACE("(0x%lx, 0x%lx, %08x)\n", hHash, hKey, dwFlags);
if (!(hash = hash_from_handle(hHash)))
if (!hash || !key)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (!(key = key_from_handle(hKey)))
return FALSE;
if (!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!hash->pProvider || hash->dwMagic != MAGIC_CRYPTHASH ||
hash->pProvider->dwMagic != MAGIC_CRYPTPROV || key->dwMagic != MAGIC_CRYPTKEY)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1815,18 +1794,14 @@ BOOL WINAPI CryptHashSessionKey (HCRYPTHASH hHash, HCRYPTKEY hKey, DWORD dwFlags
BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLen,
HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY *phKey)
{
PCRYPTPROV prov;
PCRYPTKEY pubkey = NULL, importkey;
PCRYPTPROV prov = (PCRYPTPROV)hProv;
PCRYPTKEY pubkey = (PCRYPTKEY)hPubKey, importkey;
TRACE("(0x%Ix, %p, %ld, 0x%Ix, %08lx, %p)\n", hProv, pbData, dwDataLen, hPubKey, dwFlags, phKey);
TRACE("(0x%lx, %p, %d, 0x%lx, %08x, %p)\n", hProv, pbData, dwDataLen, hPubKey, dwFlags, phKey);
if (!(prov = provider_from_handle(hProv)))
return FALSE;
if (hPubKey && !(pubkey = key_from_handle(hPubKey)))
return FALSE;
if (!pbData || !dwDataLen || !phKey)
if (!prov || !pbData || !dwDataLen || !phKey ||
prov->dwMagic != MAGIC_CRYPTPROV ||
(pubkey && pubkey->dwMagic != MAGIC_CRYPTKEY))
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1877,16 +1852,19 @@ BOOL WINAPI CryptImportKey (HCRYPTPROV hProv, const BYTE *pbData, DWORD dwDataLe
BOOL WINAPI CryptSignHashW (HCRYPTHASH hHash, DWORD dwKeySpec, LPCWSTR sDescription,
DWORD dwFlags, BYTE *pbSignature, DWORD *pdwSigLen)
{
PCRYPTHASH hash;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTPROV prov;
TRACE("(0x%Ix, %ld, %s, %08lx, %p, %p)\n",
TRACE("(0x%lx, %d, %s, %08x, %p, %p)\n",
hHash, dwKeySpec, debugstr_w(sDescription), dwFlags, pbSignature, pdwSigLen);
if (!(hash = hash_from_handle(hHash)))
if (!hash)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
if (!pdwSigLen || !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
}
if (!pdwSigLen || !hash->pProvider || hash->dwMagic != MAGIC_CRYPTHASH ||
hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1908,7 +1886,7 @@ BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescripti
LPWSTR wsDescription;
BOOL result;
TRACE("(0x%Ix, %ld, %s, %08lx, %p, %p)\n",
TRACE("(0x%lx, %d, %s, %08x, %p, %p)\n",
hHash, dwKeySpec, debugstr_a(sDescription), dwFlags, pbSignature, pdwSigLen);
CRYPT_ANSIToUnicode(sDescription, &wsDescription, -1);
@ -1936,14 +1914,12 @@ BOOL WINAPI CryptSignHashA (HCRYPTHASH hHash, DWORD dwKeySpec, LPCSTR sDescripti
BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, const BYTE *pbData, DWORD dwFlags)
{
PCRYPTPROV prov;
PCRYPTHASH hash;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
TRACE("(0x%Ix, %ld, %p, %08lx)\n", hHash, dwParam, pbData, dwFlags);
TRACE("(0x%lx, %d, %p, %08x)\n", hHash, dwParam, pbData, dwFlags);
if (!(hash = hash_from_handle(hHash)))
return FALSE;
if (!pbData || !hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!hash || !pbData || !hash->pProvider ||
hash->dwMagic != MAGIC_CRYPTHASH || hash->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -1972,14 +1948,12 @@ BOOL WINAPI CryptSetHashParam (HCRYPTHASH hHash, DWORD dwParam, const BYTE *pbDa
BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, const BYTE *pbData, DWORD dwFlags)
{
PCRYPTPROV prov;
PCRYPTKEY key;
PCRYPTKEY key = (PCRYPTKEY)hKey;
TRACE("(0x%Ix, %ld, %p, %08lx)\n", hKey, dwParam, pbData, dwFlags);
TRACE("(0x%lx, %d, %p, %08x)\n", hKey, dwParam, pbData, dwFlags);
if (!(key = key_from_handle(hKey)))
return FALSE;
if (!pbData || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
if (!key || !pbData || !key->pProvider ||
key->dwMagic != MAGIC_CRYPTKEY || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
@ -2005,7 +1979,7 @@ BOOL WINAPI CryptSetKeyParam (HCRYPTKEY hKey, DWORD dwParam, const BYTE *pbData,
*/
BOOL WINAPI CryptSetProviderA (LPCSTR pszProvName, DWORD dwProvType)
{
TRACE("(%s, %ld)\n", pszProvName, dwProvType);
TRACE("(%s, %d)\n", pszProvName, dwProvType);
return CryptSetProviderExA(pszProvName, dwProvType, NULL, CRYPT_USER_DEFAULT);
}
@ -2016,7 +1990,7 @@ BOOL WINAPI CryptSetProviderA (LPCSTR pszProvName, DWORD dwProvType)
*/
BOOL WINAPI CryptSetProviderW (LPCWSTR pszProvName, DWORD dwProvType)
{
TRACE("(%s, %ld)\n", debugstr_w(pszProvName), dwProvType);
TRACE("(%s, %d)\n", debugstr_w(pszProvName), dwProvType);
return CryptSetProviderExW(pszProvName, dwProvType, NULL, CRYPT_USER_DEFAULT);
}
@ -2040,7 +2014,7 @@ BOOL WINAPI CryptSetProviderExW (LPCWSTR pszProvName, DWORD dwProvType, DWORD *p
HKEY hProvKey, hTypeKey;
PWSTR keyname;
TRACE("(%s, %ld, %p, %08lx)\n", debugstr_w(pszProvName), dwProvType, pdwReserved, dwFlags);
TRACE("(%s, %d, %p, %08x)\n", debugstr_w(pszProvName), dwProvType, pdwReserved, dwFlags);
if (!pszProvName || pdwReserved)
{
@ -2120,7 +2094,7 @@ BOOL WINAPI CryptSetProviderExA (LPCSTR pszProvName, DWORD dwProvType, DWORD *pd
BOOL ret = FALSE;
PWSTR str = NULL;
TRACE("(%s, %ld, %p, %08lx)\n", pszProvName, dwProvType, pdwReserved, dwFlags);
TRACE("(%s, %d, %p, %08x)\n", pszProvName, dwProvType, pdwReserved, dwFlags);
if (CRYPT_ANSIToUnicode(pszProvName, &str, -1))
{
@ -2147,13 +2121,20 @@ BOOL WINAPI CryptSetProviderExA (LPCSTR pszProvName, DWORD dwProvType, DWORD *pd
*/
BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, const BYTE *pbData, DWORD dwFlags)
{
PCRYPTPROV prov;
PCRYPTPROV prov = (PCRYPTPROV)hProv;
TRACE("(0x%Ix, %ld, %p, %08lx)\n", hProv, dwParam, pbData, dwFlags);
TRACE("(0x%lx, %d, %p, %08x)\n", hProv, dwParam, pbData, dwFlags);
if (!(prov = provider_from_handle(hProv)))
if (!prov)
{
SetLastError(ERROR_INVALID_HANDLE);
return FALSE;
}
if (prov->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
if (dwParam == PP_USE_HARDWARE_RNG)
{
FIXME("PP_USE_HARDWARE_RNG: What do I do with this?\n");
@ -2200,20 +2181,15 @@ BOOL WINAPI CryptSetProvParam (HCRYPTPROV hProv, DWORD dwParam, const BYTE *pbDa
BOOL WINAPI CryptVerifySignatureW (HCRYPTHASH hHash, const BYTE *pbSignature, DWORD dwSigLen,
HCRYPTKEY hPubKey, LPCWSTR sDescription, DWORD dwFlags)
{
PCRYPTHASH hash;
PCRYPTKEY key;
PCRYPTHASH hash = (PCRYPTHASH)hHash;
PCRYPTKEY key = (PCRYPTKEY)hPubKey;
PCRYPTPROV prov;
TRACE("(0x%Ix, %p, %ld, 0x%Ix, %s, %08lx)\n", hHash, pbSignature,
TRACE("(0x%lx, %p, %d, 0x%lx, %s, %08x)\n", hHash, pbSignature,
dwSigLen, hPubKey, debugstr_w(sDescription), dwFlags);
if (!(hash = hash_from_handle(hHash)))
return FALSE;
if (!(key = key_from_handle(hPubKey)))
return FALSE;
if (!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV ||
if (!hash || !key || key->dwMagic != MAGIC_CRYPTKEY || hash->dwMagic != MAGIC_CRYPTHASH ||
!hash->pProvider || hash->pProvider->dwMagic != MAGIC_CRYPTPROV ||
!key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
{
SetLastError(ERROR_INVALID_PARAMETER);
@ -2236,7 +2212,7 @@ BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, const BYTE *pbSignature, DW
LPWSTR wsDescription;
BOOL result;
TRACE("(0x%Ix, %p, %ld, 0x%Ix, %s, %08lx)\n", hHash, pbSignature,
TRACE("(0x%lx, %p, %d, 0x%lx, %s, %08x)\n", hHash, pbSignature,
dwSigLen, hPubKey, debugstr_a(sDescription), dwFlags);
CRYPT_ANSIToUnicode(sDescription, &wsDescription, -1);
@ -2253,7 +2229,7 @@ BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, const BYTE *pbSignature, DW
*/
DWORD WINAPI OpenEncryptedFileRawA(LPCSTR filename, ULONG flags, PVOID *context)
{
FIXME("(%s, %lx, %p): stub\n", debugstr_a(filename), flags, context);
FIXME("(%s, %x, %p): stub\n", debugstr_a(filename), flags, context);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -2272,7 +2248,7 @@ DWORD WINAPI OpenEncryptedFileRawA(LPCSTR filename, ULONG flags, PVOID *context)
*/
DWORD WINAPI OpenEncryptedFileRawW(LPCWSTR filename, ULONG flags, PVOID *context)
{
FIXME("(%s, %lx, %p): stub\n", debugstr_w(filename), flags, context);
FIXME("(%s, %x, %p): stub\n", debugstr_w(filename), flags, context);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -2403,7 +2379,7 @@ static BOOL fill_random_buffer(void)
if ((status = NtQuerySystemInformation( SystemInterruptInformation, random_buf, len, NULL )))
{
WARN( "failed to get random bytes %08lx\n", status );
WARN( "failed to get random bytes %08x\n", status );
return FALSE;
}
random_len = len;
@ -2478,7 +2454,7 @@ BOOLEAN WINAPI SystemFunction036( void *buffer, ULONG len )
*/
NTSTATUS WINAPI SystemFunction040(PVOID memory, ULONG length, ULONG flags)
{
FIXME("(%p, %lx, %lx): stub [RtlEncryptMemory]\n", memory, length, flags);
FIXME("(%p, %x, %x): stub [RtlEncryptMemory]\n", memory, length, flags);
return STATUS_SUCCESS;
}
@ -2506,7 +2482,7 @@ NTSTATUS WINAPI SystemFunction040(PVOID memory, ULONG length, ULONG flags)
*/
NTSTATUS WINAPI SystemFunction041(PVOID memory, ULONG length, ULONG flags)
{
FIXME("(%p, %lx, %lx): stub [RtlDecryptMemory]\n", memory, length, flags);
FIXME("(%p, %x, %x): stub [RtlDecryptMemory]\n", memory, length, flags);
return STATUS_SUCCESS;
}

View File

@ -205,7 +205,7 @@ ULONG WINAPI EnableTraceEx( LPCGUID provider, LPCGUID source, TRACEHANDLE hSessi
UCHAR level, ULONGLONG anykeyword, ULONGLONG allkeyword, ULONG enableprop,
PEVENT_FILTER_DESCRIPTOR filterdesc )
{
FIXME("(%s, %s, %s, %lu, %u, %s, %s, %lu, %p): stub\n", debugstr_guid(provider),
FIXME("(%s, %s, %s, %u, %u, %s, %s, %u, %p): stub\n", debugstr_guid(provider),
debugstr_guid(source), wine_dbgstr_longlong(hSession), enable, level,
wine_dbgstr_longlong(anykeyword), wine_dbgstr_longlong(allkeyword),
enableprop, filterdesc);
@ -218,7 +218,7 @@ ULONG WINAPI EnableTraceEx( LPCGUID provider, LPCGUID source, TRACEHANDLE hSessi
*/
ULONG WINAPI EnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, TRACEHANDLE hSession )
{
FIXME("(%ld, 0x%lx, %ld, %s, %s): stub\n", enable, flag, level,
FIXME("(%d, 0x%x, %d, %s, %s): stub\n", enable, flag, level,
debugstr_guid(guid), wine_dbgstr_longlong(hSession));
return ERROR_SUCCESS;
@ -245,7 +245,7 @@ BOOL WINAPI GetEventLogInformation( HANDLE hEventLog, DWORD dwInfoLevel, LPVOID
{
EVENTLOG_FULL_INFORMATION *efi;
FIXME("(%p, %ld, %p, %ld, %p) stub\n", hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded);
FIXME("(%p, %d, %p, %d, %p) stub\n", hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded);
if (dwInfoLevel != EVENTLOG_FULL_INFO)
{
@ -506,7 +506,7 @@ HANDLE WINAPI OpenEventLogW( LPCWSTR uncname, LPCWSTR source )
BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
{
FIXME("(%p,0x%08lx,0x%08lx,%p,0x%08lx,%p,%p) stub\n", hEventLog, dwReadFlags,
FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
SetLastError(ERROR_HANDLE_EOF);
@ -521,7 +521,7 @@ BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOf
BOOL WINAPI ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOffset,
LPVOID lpBuffer, DWORD nNumberOfBytesToRead, DWORD *pnBytesRead, DWORD *pnMinNumberOfBytesNeeded )
{
FIXME("(%p,0x%08lx,0x%08lx,%p,0x%08lx,%p,%p) stub\n", hEventLog, dwReadFlags,
FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
SetLastError(ERROR_HANDLE_EOF);
@ -602,7 +602,7 @@ BOOL WINAPI ReportEventA ( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD d
UINT i;
BOOL ret;
FIXME("(%p,0x%04x,0x%04x,0x%08lx,%p,0x%04x,0x%08lx,%p,%p): stub\n", hEventLog,
FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog,
wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
if (wNumStrings == 0) return TRUE;
@ -632,7 +632,7 @@ BOOL WINAPI ReportEventW( HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dw
{
UINT i;
FIXME("(%p,0x%04x,0x%04x,0x%08lx,%p,0x%04x,0x%08lx,%p,%p): stub\n", hEventLog,
FIXME("(%p,0x%04x,0x%04x,0x%08x,%p,0x%04x,0x%08x,%p,%p): stub\n", hEventLog,
wType, wCategory, dwEventID, lpUserSid, wNumStrings, dwDataSize, lpStrings, lpRawData);
/* partial stub */
@ -673,15 +673,6 @@ ULONG WINAPI StopTraceA( TRACEHANDLE session, LPCSTR session_name, PEVENT_TRACE_
return ERROR_SUCCESS;
}
/******************************************************************************
* QueryTraceA [ADVAPI32.@]
*/
ULONG WINAPI QueryTraceA( TRACEHANDLE handle, LPCSTR sessionname, PEVENT_TRACE_PROPERTIES properties )
{
FIXME("%s %s %p: stub\n", wine_dbgstr_longlong(handle), debugstr_a(sessionname), properties);
return ERROR_WMI_INSTANCE_NOT_FOUND;
}
/******************************************************************************
* QueryTraceW [ADVAPI32.@]
*/
@ -709,6 +700,6 @@ TRACEHANDLE WINAPI OpenTraceA( PEVENT_TRACE_LOGFILEA logfile )
ULONG WINAPI EnumerateTraceGuids(PTRACE_GUID_PROPERTIES *propertiesarray,
ULONG arraycount, PULONG guidcount)
{
FIXME("%p %ld %p: stub\n", propertiesarray, arraycount, guidcount);
FIXME("%p %d %p: stub\n", propertiesarray, arraycount, guidcount);
return ERROR_INVALID_PARAMETER;
}

View File

@ -54,7 +54,7 @@ static void dumpLsaAttributes(const LSA_OBJECT_ATTRIBUTES *oa)
{
if (oa)
{
TRACE("\n\tlength=%lu, rootdir=%p, objectname=%s\n\tattr=0x%08lx, sid=%s qos=%p\n",
TRACE("\n\tlength=%u, rootdir=%p, objectname=%s\n\tattr=0x%08x, sid=%s qos=%p\n",
oa->Length, oa->RootDirectory,
oa->ObjectName?debugstr_w(oa->ObjectName->Buffer):"null",
oa->Attributes, debugstr_sid(oa->SecurityDescriptor),
@ -172,7 +172,7 @@ NTSTATUS WINAPI LsaAddAccountRights(
PLSA_UNICODE_STRING rights,
ULONG count)
{
FIXME("(%p,%p,%p,0x%08lx) stub\n", policy, sid, rights, count);
FIXME("(%p,%p,%p,0x%08x) stub\n", policy, sid, rights, count);
return STATUS_SUCCESS;
}
@ -190,7 +190,7 @@ NTSTATUS WINAPI LsaAddAccountRights(
*/
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
{
WARN("(%p) stub\n", ObjectHandle);
FIXME("(%p) stub\n", ObjectHandle);
return STATUS_SUCCESS;
}
@ -205,7 +205,7 @@ NTSTATUS WINAPI LsaCreateTrustedDomainEx(
ACCESS_MASK access,
PLSA_HANDLE domain)
{
FIXME("(%p,%p,%p,0x%08lx,%p) stub\n", policy, domain_info, auth_info,
FIXME("(%p,%p,%p,0x%08x,%p) stub\n", policy, domain_info, auth_info,
access, domain);
return STATUS_SUCCESS;
}
@ -247,7 +247,7 @@ NTSTATUS WINAPI LsaEnumerateAccounts(
ULONG maxlen,
PULONG count)
{
FIXME("(%p,%p,%p,%ld,%p) stub\n", policy, context, buffer, maxlen, count);
FIXME("(%p,%p,%p,%d,%p) stub\n", policy, context, buffer, maxlen, count);
if (count) *count = 0;
return STATUS_NO_MORE_ENTRIES;
}
@ -295,7 +295,7 @@ NTSTATUS WINAPI LsaEnumerateTrustedDomains(
IN ULONG PreferredMaximumLength,
OUT PULONG CountReturned)
{
FIXME("(%p,%p,%p,0x%08lx,%p) stub\n", PolicyHandle, EnumerationContext,
FIXME("(%p,%p,%p,0x%08x,%p) stub\n", PolicyHandle, EnumerationContext,
Buffer, PreferredMaximumLength, CountReturned);
if (CountReturned) *CountReturned = 0;
@ -313,7 +313,7 @@ NTSTATUS WINAPI LsaEnumerateTrustedDomainsEx(
ULONG length,
PULONG count)
{
FIXME("(%p,%p,%p,0x%08lx,%p) stub\n", policy, context, buffer, length, count);
FIXME("(%p,%p,%p,0x%08x,%p) stub\n", policy, context, buffer, length, count);
if (count) *count = 0;
return STATUS_SUCCESS;
@ -363,7 +363,7 @@ NTSTATUS WINAPI LsaLookupNames(
OUT PLSA_REFERENCED_DOMAIN_LIST* ReferencedDomains,
OUT PLSA_TRANSLATED_SID* Sids)
{
FIXME("(%p,0x%08lx,%p,%p,%p) stub\n", PolicyHandle, Count, Names,
FIXME("(%p,0x%08x,%p,%p,%p) stub\n", PolicyHandle, Count, Names,
ReferencedDomains, Sids);
return STATUS_NONE_MAPPED;
@ -447,7 +447,7 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
SID_NAME_USE use;
SID *sid;
TRACE("(%p,0x%08lx,0x%08lx,%p,%p,%p)\n", policy, flags, count, names, domains, sids);
TRACE("(%p,0x%08x,0x%08x,%p,%p,%p)\n", policy, flags, count, names, domains, sids);
mapped = 0;
for (i = 0; i < count; i++)
@ -467,7 +467,7 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
mapped++;
}
}
TRACE("mapped %lu out of %lu\n", mapped, count);
TRACE("mapped %u out of %u\n", mapped, count);
size = sizeof(LSA_TRANSLATED_SID2) * count + sid_size_total;
if (!(*sids = heap_alloc(size))) return STATUS_NO_MEMORY;
@ -553,7 +553,7 @@ NTSTATUS WINAPI LsaLookupSids(
SID_NAME_USE use;
WCHAR *strsid;
TRACE("(%p, %lu, %p, %p, %p)\n", PolicyHandle, Count, Sids, ReferencedDomains, Names);
TRACE("(%p, %u, %p, %p, %p)\n", PolicyHandle, Count, Sids, ReferencedDomains, Names);
/* this length does not include actual string length yet */
name_fullsize = sizeof(LSA_TRANSLATED_NAME) * Count;
@ -686,7 +686,7 @@ NTSTATUS WINAPI LsaLookupSids(
name_buffer += lstrlenW(name_buffer) + 1;
}
TRACE("mapped %lu out of %lu\n", mapped, Count);
TRACE("mapped %u out of %u\n", mapped, Count);
if (mapped == Count) return STATUS_SUCCESS;
if (mapped) return STATUS_SOME_NOT_MAPPED;
@ -734,7 +734,7 @@ NTSTATUS WINAPI LsaOpenPolicy(
IN ACCESS_MASK DesiredAccess,
IN OUT PLSA_HANDLE PolicyHandle)
{
WARN("(%s,%p,0x%08lx,%p) stub\n",
FIXME("(%s,%p,0x%08x,%p) stub\n",
SystemName?debugstr_w(SystemName->Buffer):"(null)",
ObjectAttributes, DesiredAccess, PolicyHandle);
@ -756,7 +756,7 @@ NTSTATUS WINAPI LsaOpenTrustedDomainByName(
ACCESS_MASK access,
PLSA_HANDLE handle)
{
FIXME("(%p,%p,0x%08lx,%p) stub\n", policy, name, access, handle);
FIXME("(%p,%p,0x%08x,%p) stub\n", policy, name, access, handle);
return STATUS_OBJECT_NAME_NOT_FOUND;
}
@ -970,7 +970,7 @@ NTSTATUS WINAPI LsaRemoveAccountRights(
PLSA_UNICODE_STRING rights,
ULONG count)
{
FIXME("(%p,%p,%d,%p,0x%08lx) stub\n", policy, sid, all, rights, count);
FIXME("(%p,%p,%d,%p,0x%08x) stub\n", policy, sid, all, rights, count);
return STATUS_SUCCESS;
}
@ -1160,7 +1160,7 @@ NTSTATUS WINAPI LsaLookupPrivilegeDisplayName(LSA_HANDLE handle, LSA_UNICODE_STR
BOOLEAN WINAPI AuditQuerySystemPolicy(const GUID* guids, ULONG count, AUDIT_POLICY_INFORMATION** policy)
{
FIXME("(%p, %ld, %p)\n", guids, count, policy);
FIXME("(%p, %d, %p)\n", guids, count, policy);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}

View File

@ -94,7 +94,7 @@ LSTATUS WINAPI RegCreateKeyTransactedW( HKEY hkey, LPCWSTR name, DWORD reserved,
DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
PHKEY retkey, LPDWORD dispos, HANDLE transaction, PVOID reserved2 )
{
FIXME( "(%p,%s,%lu,%s,%lu,%lu,%p,%p,%p,%p,%p): stub\n", hkey, debugstr_w(name), reserved,
FIXME( "(%p,%s,%u,%s,%u,%u,%p,%p,%p,%p,%p): stub\n", hkey, debugstr_w(name), reserved,
debugstr_w(class), options, access, sa, retkey, dispos, transaction, reserved2 );
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -107,7 +107,7 @@ LSTATUS WINAPI RegCreateKeyTransactedA( HKEY hkey, LPCSTR name, DWORD reserved,
DWORD options, REGSAM access, SECURITY_ATTRIBUTES *sa,
PHKEY retkey, LPDWORD dispos, HANDLE transaction, PVOID reserved2 )
{
FIXME( "(%p,%s,%lu,%s,%lu,%lu,%p,%p,%p,%p,%p): stub\n", hkey, debugstr_a(name), reserved,
FIXME( "(%p,%s,%u,%s,%u,%u,%p,%p,%p,%p,%p): stub\n", hkey, debugstr_a(name), reserved,
debugstr_a(class), options, access, sa, retkey, dispos, transaction, reserved2 );
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -219,7 +219,7 @@ LSTATUS WINAPI RegQueryMultipleValuesA( HKEY hkey, PVALENTA val_list, DWORD num_
LPSTR bufptr = lpValueBuf;
*ldwTotsize = 0;
TRACE("(%p,%p,%ld,%p,%p=%ld)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
TRACE("(%p,%p,%d,%p,%p=%d)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
for(i=0; i < num_vals; ++i)
{
@ -265,7 +265,7 @@ LSTATUS WINAPI RegQueryMultipleValuesW( HKEY hkey, PVALENTW val_list, DWORD num_
LPSTR bufptr = (LPSTR)lpValueBuf;
*ldwTotsize = 0;
TRACE("(%p,%p,%ld,%p,%p=%ld)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
TRACE("(%p,%p,%d,%p,%p=%d)\n", hkey, val_list, num_vals, lpValueBuf, ldwTotsize, *ldwTotsize);
for(i=0; i < num_vals; ++i)
{
@ -360,7 +360,7 @@ LSTATUS WINAPI RegDeleteKeyA( HKEY hkey, LPCSTR name )
*/
LSTATUS WINAPI RegSetValueW( HKEY hkey, LPCWSTR subkey, DWORD type, LPCWSTR data, DWORD count )
{
TRACE("(%p,%s,%ld,%s,%ld)\n", hkey, debugstr_w(subkey), type, debugstr_w(data), count );
TRACE("(%p,%s,%d,%s,%d)\n", hkey, debugstr_w(subkey), type, debugstr_w(data), count );
if (type != REG_SZ || !data) return ERROR_INVALID_PARAMETER;
@ -374,7 +374,7 @@ LSTATUS WINAPI RegSetValueW( HKEY hkey, LPCWSTR subkey, DWORD type, LPCWSTR data
*/
LSTATUS WINAPI RegSetValueA( HKEY hkey, LPCSTR subkey, DWORD type, LPCSTR data, DWORD count )
{
TRACE("(%p,%s,%ld,%s,%ld)\n", hkey, debugstr_a(subkey), type, debugstr_a(data), count );
TRACE("(%p,%s,%d,%s,%d)\n", hkey, debugstr_a(subkey), type, debugstr_a(data), count );
if (type != REG_SZ || !data) return ERROR_INVALID_PARAMETER;
@ -403,7 +403,7 @@ LSTATUS WINAPI RegQueryValueW( HKEY hkey, LPCWSTR name, LPWSTR data, LPLONG coun
DWORD ret;
HKEY subkey = hkey;
TRACE("(%p,%s,%p,%ld)\n", hkey, debugstr_w(name), data, count ? *count : 0 );
TRACE("(%p,%s,%p,%d)\n", hkey, debugstr_w(name), data, count ? *count : 0 );
if (name && name[0])
{
@ -432,7 +432,7 @@ LSTATUS WINAPI RegQueryValueA( HKEY hkey, LPCSTR name, LPSTR data, LPLONG count
DWORD ret;
HKEY subkey = hkey;
TRACE("(%p,%s,%p,%ld)\n", hkey, debugstr_a(name), data, count ? *count : 0 );
TRACE("(%p,%s,%p,%d)\n", hkey, debugstr_a(name), data, count ? *count : 0 );
if (name && name[0])
{

View File

@ -101,7 +101,7 @@ static const AccountSid ACCOUNT_SIDS[] = {
{ WinBuiltinPreWindows2000CompatibleAccessSid, L"Pre-Windows 2000 Compatible Access", L"BUILTIN", SidTypeAlias },
{ WinBuiltinRemoteDesktopUsersSid, L"Remote Desktop Users", L"BUILTIN", SidTypeAlias },
{ WinBuiltinNetworkConfigurationOperatorsSid, L"Network Configuration Operators", L"BUILTIN", SidTypeAlias },
{ WinNTLMAuthenticationSid, L"NTLM Authentication", L"NT AUTHORITY", SidTypeWellKnownGroup },
{ WinNTLMAuthenticationSid, L"NTML Authentication", L"NT AUTHORITY", SidTypeWellKnownGroup },
{ WinDigestAuthenticationSid, L"Digest Authentication", L"NT AUTHORITY", SidTypeWellKnownGroup },
{ WinSChannelAuthenticationSid, L"SChannel Authentication", L"NT AUTHORITY", SidTypeWellKnownGroup },
{ WinThisOrganizationSid, L"This Organization", L"NT AUTHORITY", SidTypeWellKnownGroup },
@ -128,33 +128,33 @@ const char * debugstr_sid(PSID sid)
case 0:
return wine_dbg_sprintf("S-%d-%d", psid->Revision, auth);
case 1:
return wine_dbg_sprintf("S-%d-%d-%lu", psid->Revision, auth,
return wine_dbg_sprintf("S-%d-%d-%u", psid->Revision, auth,
psid->SubAuthority[0]);
case 2:
return wine_dbg_sprintf("S-%d-%d-%lu-%lu", psid->Revision, auth,
return wine_dbg_sprintf("S-%d-%d-%u-%u", psid->Revision, auth,
psid->SubAuthority[0], psid->SubAuthority[1]);
case 3:
return wine_dbg_sprintf("S-%d-%d-%lu-%lu-%lu", psid->Revision, auth,
return wine_dbg_sprintf("S-%d-%d-%u-%u-%u", psid->Revision, auth,
psid->SubAuthority[0], psid->SubAuthority[1], psid->SubAuthority[2]);
case 4:
return wine_dbg_sprintf("S-%d-%d-%lu-%lu-%lu-%lu", psid->Revision, auth,
return wine_dbg_sprintf("S-%d-%d-%u-%u-%u-%u", psid->Revision, auth,
psid->SubAuthority[0], psid->SubAuthority[1], psid->SubAuthority[2],
psid->SubAuthority[3]);
case 5:
return wine_dbg_sprintf("S-%d-%d-%lu-%lu-%lu-%lu-%lu", psid->Revision, auth,
return wine_dbg_sprintf("S-%d-%d-%u-%u-%u-%u-%u", psid->Revision, auth,
psid->SubAuthority[0], psid->SubAuthority[1], psid->SubAuthority[2],
psid->SubAuthority[3], psid->SubAuthority[4]);
case 6:
return wine_dbg_sprintf("S-%d-%d-%lu-%lu-%lu-%lu-%lu-%lu", psid->Revision, auth,
return wine_dbg_sprintf("S-%d-%d-%u-%u-%u-%u-%u-%u", psid->Revision, auth,
psid->SubAuthority[3], psid->SubAuthority[1], psid->SubAuthority[2],
psid->SubAuthority[0], psid->SubAuthority[4], psid->SubAuthority[5]);
case 7:
return wine_dbg_sprintf("S-%d-%d-%lu-%lu-%lu-%lu-%lu-%lu-%lu", psid->Revision, auth,
return wine_dbg_sprintf("S-%d-%d-%u-%u-%u-%u-%u-%u-%u", psid->Revision, auth,
psid->SubAuthority[0], psid->SubAuthority[1], psid->SubAuthority[2],
psid->SubAuthority[3], psid->SubAuthority[4], psid->SubAuthority[5],
psid->SubAuthority[6]);
case 8:
return wine_dbg_sprintf("S-%d-%d-%lu-%lu-%lu-%lu-%lu-%lu-%lu-%lu", psid->Revision, auth,
return wine_dbg_sprintf("S-%d-%d-%u-%u-%u-%u-%u-%u-%u-%u", psid->Revision, auth,
psid->SubAuthority[0], psid->SubAuthority[1], psid->SubAuthority[2],
psid->SubAuthority[3], psid->SubAuthority[4], psid->SubAuthority[5],
psid->SubAuthority[6], psid->SubAuthority[7]);
@ -315,7 +315,7 @@ DWORD WINAPI BuildSecurityDescriptorA(
IN OUT PULONG lpdwBufferLength,
OUT PSECURITY_DESCRIPTOR* pNewSD)
{
FIXME("(%p,%p,%ld,%p,%ld,%p,%p,%p,%p) stub!\n",pOwner,pGroup,
FIXME("(%p,%p,%d,%p,%d,%p,%p,%p,%p) stub!\n",pOwner,pGroup,
cCountOfAccessEntries,pListOfAccessEntries,cCountOfAuditEntries,
pListofAuditEntries,pOldSD,lpdwBufferLength,pNewSD);
@ -342,7 +342,7 @@ DWORD WINAPI BuildSecurityDescriptorW(
NTSTATUS status;
DWORD ret = ERROR_SUCCESS;
TRACE("(%p,%p,%ld,%p,%ld,%p,%p,%p,%p)\n", pOwner, pGroup,
TRACE("(%p,%p,%d,%p,%d,%p,%p,%p,%p)\n", pOwner, pGroup,
cCountOfAccessEntries, pListOfAccessEntries, cCountOfAuditEntries,
pListOfAuditEntries, pOldSD, lpdwBufferLength, pNewSD);
@ -525,7 +525,7 @@ LookupPrivilegeValueW( LPCWSTR lpSystemName, LPCWSTR lpName, PLUID lpLuid )
continue;
lpLuid->LowPart = i;
lpLuid->HighPart = 0;
TRACE( "%s -> %08lx-%08lx\n",debugstr_w( lpSystemName ),
TRACE( "%s -> %08x-%08x\n",debugstr_w( lpSystemName ),
lpLuid->HighPart, lpLuid->LowPart );
return TRUE;
}
@ -833,7 +833,7 @@ LookupAccountSidW(
LPWSTR computer_name = NULL;
LPWSTR account_name = NULL;
TRACE("(%s,sid=%s,%p,%p(%lu),%p,%p(%lu),%p)\n",
TRACE("(%s,sid=%s,%p,%p(%u),%p,%p(%u),%p)\n",
debugstr_w(system),debugstr_sid(sid),
account,accountSize,accountSize?*accountSize:0,
domain,domainSize,domainSize?*domainSize:0,
@ -1023,7 +1023,7 @@ BOOL WINAPI SetFileSecurityA( LPCSTR lpFileName,
BOOL WINAPI
QueryWindows31FilesMigration( DWORD x1 )
{
FIXME("(%ld):stub\n",x1);
FIXME("(%d):stub\n",x1);
return TRUE;
}
@ -1040,7 +1040,7 @@ BOOL WINAPI
SynchronizeWindows31FilesAndWindowsNTRegistry( DWORD x1, DWORD x2, DWORD x3,
DWORD x4 )
{
FIXME("(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub\n",x1,x2,x3,x4);
FIXME("(0x%08x,0x%08x,0x%08x,0x%08x):stub\n",x1,x2,x3,x4);
return TRUE;
}
@ -1422,7 +1422,7 @@ BOOL WINAPI AccessCheckAndAuditAlarmA(LPCSTR Subsystem, LPVOID HandleId, LPSTR O
PGENERIC_MAPPING GenericMapping, BOOL ObjectCreation, LPDWORD GrantedAccess,
LPBOOL AccessStatus, LPBOOL pfGenerateOnClose)
{
FIXME("stub (%s,%p,%s,%s,%p,%08lx,%p,%x,%p,%p,%p)\n", debugstr_a(Subsystem),
FIXME("stub (%s,%p,%s,%s,%p,%08x,%p,%x,%p,%p,%p)\n", debugstr_a(Subsystem),
HandleId, debugstr_a(ObjectTypeName), debugstr_a(ObjectName),
SecurityDescriptor, DesiredAccess, GenericMapping,
ObjectCreation, GrantedAccess, AccessStatus, pfGenerateOnClose);
@ -1441,7 +1441,7 @@ BOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, LPSTR O
DWORD GrantedAccess, PPRIVILEGE_SET Privileges, BOOL ObjectCreation, BOOL AccessGranted,
LPBOOL GenerateOnClose)
{
FIXME("stub (%s,%p,%s,%s,%p,%p,0x%08lx,0x%08lx,%p,%x,%x,%p)\n", debugstr_a(SubsystemName),
FIXME("stub (%s,%p,%s,%s,%p,%p,0x%08x,0x%08x,%p,%x,%x,%p)\n", debugstr_a(SubsystemName),
HandleId, debugstr_a(ObjectTypeName), debugstr_a(ObjectName), pSecurityDescriptor,
ClientToken, DesiredAccess, GrantedAccess, Privileges, ObjectCreation, AccessGranted,
GenerateOnClose);
@ -1452,7 +1452,7 @@ BOOL WINAPI ObjectOpenAuditAlarmA(LPCSTR SubsystemName, LPVOID HandleId, LPSTR O
BOOL WINAPI ObjectPrivilegeAuditAlarmA( LPCSTR SubsystemName, LPVOID HandleId, HANDLE ClientToken,
DWORD DesiredAccess, PPRIVILEGE_SET Privileges, BOOL AccessGranted)
{
FIXME("stub (%s,%p,%p,0x%08lx,%p,%x)\n", debugstr_a(SubsystemName), HandleId, ClientToken,
FIXME("stub (%s,%p,%p,0x%08x,%p,%x)\n", debugstr_a(SubsystemName), HandleId, ClientToken,
DesiredAccess, Privileges, AccessGranted);
return TRUE;
@ -1467,9 +1467,6 @@ BOOL WINAPI PrivilegedServiceAuditAlarmA( LPCSTR SubsystemName, LPCSTR ServiceNa
return TRUE;
}
#define HKEY_SPECIAL_ROOT_FIRST HKEY_CLASSES_ROOT
#define HKEY_SPECIAL_ROOT_LAST HKEY_DYN_DATA
/******************************************************************************
* GetSecurityInfo [ADVAPI32.@]
*
@ -1525,43 +1522,17 @@ DWORD WINAPI GetSecurityInfo( HANDLE handle, SE_OBJECT_TYPE type, SECURITY_INFOR
}
else
{
HKEY key = NULL;
if (type == SE_REGISTRY_KEY && (HandleToUlong(handle) >= HandleToUlong(HKEY_SPECIAL_ROOT_FIRST))
&& (HandleToUlong(handle) <= HandleToUlong(HKEY_SPECIAL_ROOT_LAST)))
{
REGSAM access = READ_CONTROL;
DWORD ret;
if (SecurityInfo & SACL_SECURITY_INFORMATION)
access |= ACCESS_SYSTEM_SECURITY;
if ((ret = RegCreateKeyExW( handle, NULL, 0, NULL, 0, access, NULL, &key, NULL )))
return ret;
handle = key;
}
status = NtQuerySecurityObject( handle, SecurityInfo, NULL, 0, &size );
if (status != STATUS_SUCCESS && status != STATUS_BUFFER_TOO_SMALL)
{
RegCloseKey( key );
return RtlNtStatusToDosError( status );
}
if (!(sd = LocalAlloc( 0, size )))
{
RegCloseKey( key );
return ERROR_NOT_ENOUGH_MEMORY;
}
if (!(sd = LocalAlloc( 0, size ))) return ERROR_NOT_ENOUGH_MEMORY;
if ((status = NtQuerySecurityObject( handle, SecurityInfo, sd, size, &size )))
{
RegCloseKey( key );
LocalFree(sd);
return RtlNtStatusToDosError( status );
}
RegCloseKey( key );
}
if (ppsidOwner)
@ -1630,7 +1601,7 @@ VOID WINAPI BuildExplicitAccessWithNameA( PEXPLICIT_ACCESSA pExplicitAccess,
LPSTR pTrusteeName, DWORD AccessPermissions,
ACCESS_MODE AccessMode, DWORD Inheritance )
{
TRACE("%p %s 0x%08lx 0x%08x 0x%08lx\n", pExplicitAccess, debugstr_a(pTrusteeName),
TRACE("%p %s 0x%08x 0x%08x 0x%08x\n", pExplicitAccess, debugstr_a(pTrusteeName),
AccessPermissions, AccessMode, Inheritance);
pExplicitAccess->grfAccessPermissions = AccessPermissions;
@ -1651,7 +1622,7 @@ VOID WINAPI BuildExplicitAccessWithNameW( PEXPLICIT_ACCESSW pExplicitAccess,
LPWSTR pTrusteeName, DWORD AccessPermissions,
ACCESS_MODE AccessMode, DWORD Inheritance )
{
TRACE("%p %s 0x%08lx 0x%08x 0x%08lx\n", pExplicitAccess, debugstr_w(pTrusteeName),
TRACE("%p %s 0x%08x 0x%08x 0x%08x\n", pExplicitAccess, debugstr_w(pTrusteeName),
AccessPermissions, AccessMode, Inheritance);
pExplicitAccess->grfAccessPermissions = AccessPermissions;
@ -2085,7 +2056,7 @@ DWORD WINAPI SetEntriesInAclA( ULONG count, PEXPLICIT_ACCESSA pEntries,
EXPLICIT_ACCESSW *pEntriesW;
UINT alloc_index, free_index;
TRACE("%ld %p %p %p\n", count, pEntries, OldAcl, NewAcl);
TRACE("%d %p %p %p\n", count, pEntries, OldAcl, NewAcl);
if (NewAcl)
*NewAcl = NULL;
@ -2145,7 +2116,7 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
DWORD acl_size = sizeof(ACL);
NTSTATUS status;
TRACE("%ld %p %p %p\n", count, pEntries, OldAcl, NewAcl);
TRACE("%d %p %p %p\n", count, pEntries, OldAcl, NewAcl);
if (NewAcl)
*NewAcl = NULL;
@ -2162,7 +2133,7 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
{
ppsid[i] = (char *)&ppsid[count] + i * FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]);
TRACE("[%ld]:\n\tgrfAccessPermissions = 0x%lx\n\tgrfAccessMode = %d\n\tgrfInheritance = 0x%lx\n\t"
TRACE("[%d]:\n\tgrfAccessPermissions = 0x%x\n\tgrfAccessMode = %d\n\tgrfInheritance = 0x%x\n\t"
"Trustee.pMultipleTrustee = %p\n\tMultipleTrusteeOperation = %d\n\tTrusteeForm = %d\n\t"
"Trustee.TrusteeType = %d\n\tptstrName = %p\n", i,
pEntries[i].grfAccessPermissions, pEntries[i].grfAccessMode, pEntries[i].grfInheritance,
@ -2192,7 +2163,7 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
case REVOKE_ACCESS:
break;
default:
WARN("bad access mode %d for trustee %ld\n", pEntries[i].grfAccessMode, i);
WARN("bad access mode %d for trustee %d\n", pEntries[i].grfAccessMode, i);
ret = ERROR_INVALID_PARAMETER;
goto exit;
}
@ -2314,7 +2285,8 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
add = FALSE;
break;
case ACCESS_DENIED_ACE_TYPE:
/* REVOKE_ACCESS does not affect ACCESS_DENIED_ACE. */
if (EqualSid(ppsid[j], &((ACCESS_DENIED_ACE *)old_ace_header)->SidStart))
add = FALSE;
break;
case SYSTEM_AUDIT_ACE_TYPE:
if (EqualSid(ppsid[j], &((SYSTEM_AUDIT_ACE *)old_ace_header)->SidStart))
@ -2336,7 +2308,7 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
status = RtlAddAce(*NewAcl, ACL_REVISION, 1, (PACE_HEADER)old_ace_header, old_ace_header->AceSize);
if (status != STATUS_SUCCESS)
{
WARN("RtlAddAce failed with error 0x%08lx\n", status);
WARN("RtlAddAce failed with error 0x%08x\n", status);
ret = RtlNtStatusToDosError(status);
break;
}
@ -2358,7 +2330,7 @@ DWORD WINAPI SetNamedSecurityInfoA(LPSTR pObjectName,
LPWSTR wstr;
DWORD r;
TRACE("%s %d %ld %p %p %p %p\n", debugstr_a(pObjectName), ObjectType,
TRACE("%s %d %d %p %p %p %p\n", debugstr_a(pObjectName), ObjectType,
SecurityInfo, psidOwner, psidGroup, pDacl, pSacl);
wstr = strdupAW(pObjectName);
@ -2381,7 +2353,7 @@ DWORD WINAPI SetNamedSecurityInfoW(LPWSTR pObjectName,
HANDLE handle;
DWORD err;
TRACE( "%s %d %ld %p %p %p %p\n", debugstr_w(pObjectName), ObjectType,
TRACE( "%s %d %d %p %p %p %p\n", debugstr_w(pObjectName), ObjectType,
SecurityInfo, psidOwner, psidGroup, pDacl, pSacl);
if (!pObjectName) return ERROR_INVALID_PARAMETER;
@ -2555,7 +2527,7 @@ BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorA(
BOOL ret;
LPWSTR StringSecurityDescriptorW;
TRACE("%s, %lu, %p, %p\n", debugstr_a(StringSecurityDescriptor), StringSDRevision,
TRACE("%s, %u, %p, %p\n", debugstr_a(StringSecurityDescriptor), StringSDRevision,
SecurityDescriptor, SecurityDescriptorSize);
if(!StringSecurityDescriptor)
@ -2651,7 +2623,7 @@ BOOL WINAPI CreateProcessWithLogonW( LPCWSTR lpUsername, LPCWSTR lpDomain, LPCWS
LPCWSTR lpApplicationName, LPWSTR lpCommandLine, DWORD dwCreationFlags, LPVOID lpEnvironment,
LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation )
{
FIXME("%s %s %s 0x%08lx %s %s 0x%08lx %p %s %p %p stub\n", debugstr_w(lpUsername), debugstr_w(lpDomain),
FIXME("%s %s %s 0x%08x %s %s 0x%08x %p %s %p %p stub\n", debugstr_w(lpUsername), debugstr_w(lpDomain),
debugstr_w(lpPassword), dwLogonFlags, debugstr_w(lpApplicationName),
debugstr_w(lpCommandLine), dwCreationFlags, lpEnvironment, debugstr_w(lpCurrentDirectory),
lpStartupInfo, lpProcessInformation);
@ -2663,7 +2635,7 @@ BOOL WINAPI CreateProcessWithTokenW(HANDLE token, DWORD logon_flags, LPCWSTR app
DWORD creation_flags, void *environment, LPCWSTR current_directory, STARTUPINFOW *startup_info,
PROCESS_INFORMATION *process_information )
{
FIXME("%p 0x%08lx %s %s 0x%08lx %p %s %p %p - semi-stub\n", token,
FIXME("%p 0x%08x %s %s 0x%08x %p %s %p %p - semi-stub\n", token,
logon_flags, debugstr_w(application_name), debugstr_w(command_line),
creation_flags, environment, debugstr_w(current_directory),
startup_info, process_information);
@ -2684,7 +2656,7 @@ DWORD WINAPI GetNamedSecurityInfoA(LPSTR pObjectName,
LPWSTR wstr;
DWORD r;
TRACE("%s %d %ld %p %p %p %p %p\n", pObjectName, ObjectType, SecurityInfo,
TRACE("%s %d %d %p %p %p %p %p\n", pObjectName, ObjectType, SecurityInfo,
ppsidOwner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor);
wstr = strdupAW(pObjectName);
@ -2707,7 +2679,7 @@ DWORD WINAPI GetNamedSecurityInfoW( LPWSTR name, SE_OBJECT_TYPE type,
HANDLE handle;
DWORD err;
TRACE( "%s %d %ld %p %p %p %p %p\n", debugstr_w(name), type, info, owner,
TRACE( "%s %d %d %p %p %p %p %p\n", debugstr_w(name), type, info, owner,
group, dacl, sacl, descriptor );
/* A NULL descriptor is allowed if any one of the other pointers is not NULL */
@ -2768,7 +2740,7 @@ DWORD WINAPI GetNamedSecurityInfoExW( LPCWSTR object, SE_OBJECT_TYPE type,
SECURITY_INFORMATION info, LPCWSTR provider, LPCWSTR property,
PACTRL_ACCESSW* access_list, PACTRL_AUDITW* audit_list, LPWSTR* owner, LPWSTR* group )
{
FIXME("(%s, %d, %ld, %s, %s, %p, %p, %p, %p) stub\n", debugstr_w(object), type, info,
FIXME("(%s, %d, %d, %s, %s, %p, %p, %p, %p) stub\n", debugstr_w(object), type, info,
debugstr_w(provider), debugstr_w(property), access_list, audit_list, owner, group);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -2780,7 +2752,7 @@ DWORD WINAPI GetNamedSecurityInfoExA( LPCSTR object, SE_OBJECT_TYPE type,
SECURITY_INFORMATION info, LPCSTR provider, LPCSTR property,
PACTRL_ACCESSA* access_list, PACTRL_AUDITA* audit_list, LPSTR* owner, LPSTR* group )
{
FIXME("(%s, %d, %ld, %s, %s, %p, %p, %p, %p) stub\n", debugstr_a(object), type, info,
FIXME("(%s, %d, %d, %s, %s, %p, %p, %p, %p) stub\n", debugstr_a(object), type, info,
debugstr_a(provider), debugstr_a(property), access_list, audit_list, owner, group);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -2790,7 +2762,7 @@ DWORD WINAPI GetNamedSecurityInfoExA( LPCSTR object, SE_OBJECT_TYPE type,
*/
BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved)
{
FIXME("(%s, %08lx): stub\n", debugstr_w(lpFileName), dwReserved);
FIXME("(%s, %08x): stub\n", debugstr_w(lpFileName), dwReserved);
return TRUE;
}
@ -2799,7 +2771,7 @@ BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved)
*/
BOOL WINAPI DecryptFileA(LPCSTR lpFileName, DWORD dwReserved)
{
FIXME("(%s, %08lx): stub\n", debugstr_a(lpFileName), dwReserved);
FIXME("(%s, %08x): stub\n", debugstr_a(lpFileName), dwReserved);
return TRUE;
}
@ -3039,7 +3011,7 @@ DWORD WINAPI SetSecurityInfo(HANDLE handle, SE_OBJECT_TYPE ObjectType,
BOOL WINAPI SaferCreateLevel(DWORD ScopeId, DWORD LevelId, DWORD OpenFlags,
SAFER_LEVEL_HANDLE* LevelHandle, LPVOID lpReserved)
{
FIXME("(%lu, %lx, %lu, %p, %p) stub\n", ScopeId, LevelId, OpenFlags, LevelHandle, lpReserved);
FIXME("(%u, %x, %u, %p, %p) stub\n", ScopeId, LevelId, OpenFlags, LevelHandle, lpReserved);
*LevelHandle = (SAFER_LEVEL_HANDLE)0xdeadbeef;
return TRUE;
@ -3051,7 +3023,7 @@ BOOL WINAPI SaferCreateLevel(DWORD ScopeId, DWORD LevelId, DWORD OpenFlags,
BOOL WINAPI SaferComputeTokenFromLevel(SAFER_LEVEL_HANDLE handle, HANDLE token, PHANDLE access_token,
DWORD flags, LPVOID reserved)
{
FIXME("(%p, %p, %p, %lx, %p) stub\n", handle, token, access_token, flags, reserved);
FIXME("(%p, %p, %p, %x, %p) stub\n", handle, token, access_token, flags, reserved);
*access_token = (flags & SAFER_TOKEN_NULL_IF_EQUAL) ? NULL : (HANDLE)0xdeadbeef;
return TRUE;
@ -3075,7 +3047,7 @@ DWORD WINAPI TreeResetNamedSecurityInfoW( LPWSTR pObjectName,
BOOL KeepExplicit, FN_PROGRESS fnProgress,
PROG_INVOKE_SETTING ProgressInvokeSetting, PVOID Args)
{
FIXME("(%s, %i, %li, %p, %p, %p, %p, %i, %p, %i, %p) stub\n",
FIXME("(%s, %i, %i, %p, %p, %p, %p, %i, %p, %i, %p) stub\n",
debugstr_w(pObjectName), ObjectType, SecurityInfo, pOwner, pGroup,
pDacl, pSacl, KeepExplicit, fnProgress, ProgressInvokeSetting, Args);
@ -3088,7 +3060,7 @@ DWORD WINAPI TreeResetNamedSecurityInfoW( LPWSTR pObjectName,
BOOL WINAPI SaferGetPolicyInformation(DWORD scope, SAFER_POLICY_INFO_CLASS class, DWORD size,
PVOID buffer, PDWORD required, LPVOID lpReserved)
{
FIXME("(%lu %u %lu %p %p %p) stub\n", scope, class, size, buffer, required, lpReserved);
FIXME("(%u %u %u %p %p %p) stub\n", scope, class, size, buffer, required, lpReserved);
return FALSE;
}
@ -3098,7 +3070,7 @@ BOOL WINAPI SaferGetPolicyInformation(DWORD scope, SAFER_POLICY_INFO_CLASS class
BOOL WINAPI SaferIdentifyLevel(DWORD count, SAFER_CODE_PROPERTIES *properties, SAFER_LEVEL_HANDLE *handle,
void *reserved)
{
FIXME("(%lu %p %p %p) stub\n", count, properties, handle, reserved);
FIXME("(%u %p %p %p) stub\n", count, properties, handle, reserved);
*handle = (SAFER_LEVEL_HANDLE)0xdeadbeef;
return TRUE;
}
@ -3109,7 +3081,7 @@ BOOL WINAPI SaferIdentifyLevel(DWORD count, SAFER_CODE_PROPERTIES *properties, S
BOOL WINAPI SaferSetLevelInformation(SAFER_LEVEL_HANDLE handle, SAFER_OBJECT_INFO_CLASS infotype,
LPVOID buffer, DWORD size)
{
FIXME("(%p %u %p %lu) stub\n", handle, infotype, buffer, size);
FIXME("(%p %u %p %u) stub\n", handle, infotype, buffer, size);
return FALSE;
}

View File

@ -64,7 +64,7 @@ EnumServicesStatusA( SC_HANDLE hmngr, DWORD type, DWORD state, LPENUM_SERVICE_ST
DWORD sz, n;
char *p;
TRACE("%p 0x%lx 0x%lx %p %lu %p %p %p\n", hmngr, type, state, services, size, needed,
TRACE("%p 0x%x 0x%x %p %u %p %p %p\n", hmngr, type, state, services, size, needed,
returned, resume_handle);
if (!hmngr)
@ -128,7 +128,7 @@ EnumServicesStatusW( SC_HANDLE manager, DWORD type, DWORD state, ENUM_SERVICE_ST
DWORD alloc_size, count, i;
WCHAR *p;
TRACE("%p 0x%lx 0x%lx %p %lu %p %p %p\n", manager, type, state, status, size,
TRACE("%p 0x%x 0x%x %p %u %p %p %p\n", manager, type, state, status, size,
ret_size, ret_count, resume_handle);
if (!manager)
@ -225,7 +225,7 @@ EnumServicesStatusExA( SC_HANDLE hmngr, SC_ENUM_TYPE level, DWORD type, DWORD st
DWORD sz, n;
char *p;
TRACE("%p %u 0x%lx 0x%lx %p %lu %p %p %p %s\n", hmngr, level, type, state, buffer,
TRACE("%p %u 0x%x 0x%x %p %u %p %p %p %s\n", hmngr, level, type, state, buffer,
size, needed, returned, resume_handle, debugstr_a(group));
sz = max( 2 * size, sizeof(*servicesW) );
@ -333,7 +333,7 @@ BOOL WINAPI QueryServiceLockStatusA( SC_HANDLE hSCManager,
LPQUERY_SERVICE_LOCK_STATUSA lpLockStatus,
DWORD cbBufSize, LPDWORD pcbBytesNeeded)
{
FIXME("%p %p %08lx %p\n", hSCManager, lpLockStatus, cbBufSize, pcbBytesNeeded);
FIXME("%p %p %08x %p\n", hSCManager, lpLockStatus, cbBufSize, pcbBytesNeeded);
return FALSE;
}
@ -345,7 +345,7 @@ BOOL WINAPI QueryServiceLockStatusW( SC_HANDLE hSCManager,
LPQUERY_SERVICE_LOCK_STATUSW lpLockStatus,
DWORD cbBufSize, LPDWORD pcbBytesNeeded)
{
FIXME("%p %p %08lx %p\n", hSCManager, lpLockStatus, cbBufSize, pcbBytesNeeded);
FIXME("%p %p %08x %p\n", hSCManager, lpLockStatus, cbBufSize, pcbBytesNeeded);
return FALSE;
}
@ -405,7 +405,7 @@ BOOL WINAPI SetServiceBits( SERVICE_STATUS_HANDLE hServiceStatus,
BOOL bSetBitsOn,
BOOL bUpdateImmediately)
{
FIXME("%p %08lx %x %x\n", hServiceStatus, dwServiceBits,
FIXME("%p %08x %x %x\n", hServiceStatus, dwServiceBits,
bSetBitsOn, bUpdateImmediately);
return TRUE;
}
@ -417,7 +417,7 @@ BOOL WINAPI EnumDependentServicesA( SC_HANDLE hService, DWORD dwServiceState,
LPENUM_SERVICE_STATUSA lpServices, DWORD cbBufSize,
LPDWORD pcbBytesNeeded, LPDWORD lpServicesReturned )
{
FIXME("%p 0x%08lx %p 0x%08lx %p %p - stub\n", hService, dwServiceState,
FIXME("%p 0x%08x %p 0x%08x %p %p - stub\n", hService, dwServiceState,
lpServices, cbBufSize, pcbBytesNeeded, lpServicesReturned);
*lpServicesReturned = 0;

View File

@ -10,7 +10,6 @@ C_SRCS = \
crypt_sha.c \
eventlog.c \
lsa.c \
perf.c \
registry.c \
security.c \
service.c

View File

@ -51,19 +51,19 @@ static void test_CredReadA(void)
SetLastError(0xdeadbeef);
ret = pCredReadA(TEST_TARGET_NAME, -1, 0, &cred);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n",
"CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = pCredReadA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0xdeadbeef, &cred);
ok(!ret && ( GetLastError() == ERROR_INVALID_FLAGS || GetLastError() == ERROR_INVALID_PARAMETER ),
"CredReadA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %ld\n",
"CredReadA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = pCredReadA(NULL, CRED_TYPE_GENERIC, 0, &cred);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n",
"CredReadA should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
}
@ -75,7 +75,7 @@ static void test_CredWriteA(void)
SetLastError(0xdeadbeef);
ret = pCredWriteA(NULL, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n",
"CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
new_cred.Flags = 0;
@ -93,7 +93,7 @@ static void test_CredWriteA(void)
SetLastError(0xdeadbeef);
ret = pCredWriteA(&new_cred, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n",
"CredWriteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
new_cred.TargetName = (char *)TEST_TARGET_NAME;
@ -105,63 +105,63 @@ static void test_CredWriteA(void)
{
ok(GetLastError() == ERROR_SUCCESS ||
GetLastError() == ERROR_IO_PENDING, /* Vista */
"Expected ERROR_IO_PENDING, got %ld\n", GetLastError());
"Expected ERROR_IO_PENDING, got %d\n", GetLastError());
}
else
{
ok(GetLastError() == ERROR_BAD_USERNAME ||
GetLastError() == ERROR_NO_SUCH_LOGON_SESSION, /* Vista */
"CredWrite with username without domain should return ERROR_BAD_USERNAME"
"or ERROR_NO_SUCH_LOGON_SESSION not %ld\n", GetLastError());
"or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError());
}
new_cred.UserName = NULL;
SetLastError(0xdeadbeef);
ret = pCredWriteA(&new_cred, 0);
ok(!ret && GetLastError() == ERROR_BAD_USERNAME,
"CredWriteA with NULL username should have failed with ERROR_BAD_USERNAME instead of %ld\n",
"CredWriteA with NULL username should have failed with ERROR_BAD_USERNAME instead of %d\n",
GetLastError());
new_cred.UserName = (char *)"winetest";
new_cred.Persist = CRED_PERSIST_LOCAL_MACHINE;
SetLastError(0xdeadbeef);
ret = pCredWriteA(&new_cred, 0);
ok(ret || broken(!ret), "CredWriteA failed with error %lu\n", GetLastError());
ok(ret || broken(!ret), "CredWriteA failed with error %u\n", GetLastError());
if (ret)
{
ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_DOMAIN_PASSWORD, 0);
ok(ret, "CredDeleteA failed with error %lu\n", GetLastError());
ok(ret, "CredDeleteA failed with error %u\n", GetLastError());
}
new_cred.Type = CRED_TYPE_GENERIC;
SetLastError(0xdeadbeef);
ret = pCredWriteA(&new_cred, 0);
ok(ret || broken(!ret), "CredWriteA failed with error %lu\n", GetLastError());
ok(ret || broken(!ret), "CredWriteA failed with error %u\n", GetLastError());
if (ret)
{
ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0);
ok(ret, "CredDeleteA failed with error %lu\n", GetLastError());
ok(ret, "CredDeleteA failed with error %u\n", GetLastError());
}
new_cred.Persist = CRED_PERSIST_SESSION;
ret = pCredWriteA(&new_cred, 0);
ok(ret, "CredWriteA failed with error %lu\n", GetLastError());
ok(ret, "CredWriteA failed with error %u\n", GetLastError());
ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0);
ok(ret, "CredDeleteA failed with error %lu\n", GetLastError());
ok(ret, "CredDeleteA failed with error %u\n", GetLastError());
new_cred.Type = CRED_TYPE_DOMAIN_PASSWORD;
SetLastError(0xdeadbeef);
ret = pCredWriteA(&new_cred, 0);
ok(ret || broken(!ret), "CredWriteA failed with error %lu\n", GetLastError());
ok(ret || broken(!ret), "CredWriteA failed with error %u\n", GetLastError());
if (ret)
{
ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_DOMAIN_PASSWORD, 0);
ok(ret, "CredDeleteA failed with error %lu\n", GetLastError());
ok(ret, "CredDeleteA failed with error %u\n", GetLastError());
}
new_cred.UserName = NULL;
SetLastError(0xdeadbeef);
ret = pCredWriteA(&new_cred, 0);
ok(!ret, "CredWriteA succeeded\n");
ok(GetLastError() == ERROR_BAD_USERNAME, "got %lu\n", GetLastError());
ok(GetLastError() == ERROR_BAD_USERNAME, "got %u\n", GetLastError());
}
static void test_CredDeleteA(void)
@ -171,13 +171,13 @@ static void test_CredDeleteA(void)
SetLastError(0xdeadbeef);
ret = pCredDeleteA(TEST_TARGET_NAME, -1, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"CredDeleteA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n",
"CredDeleteA should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0xdeadbeef);
ok(!ret && ( GetLastError() == ERROR_INVALID_FLAGS || GetLastError() == ERROR_INVALID_PARAMETER /* Vista */ ),
"CredDeleteA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %ld\n",
"CredDeleteA should have failed with ERROR_INVALID_FLAGS or ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
}
@ -208,7 +208,7 @@ if(0)
SetLastError(0xdeadbeef);
ret = pCredReadDomainCredentialsA(NULL, 0, &count, &creds);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"CredReadDomainCredentialsA should have failed with ERROR_INVALID_PARAMETER instead of %ld\n",
"CredReadDomainCredentialsA should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
SetLastError(0xdeadbeef);
@ -216,7 +216,7 @@ if(0)
count = 2;
ret = pCredReadDomainCredentialsA(&info, 0, &count, &creds);
ok(!ret && GetLastError() == ERROR_NOT_FOUND,
"CredReadDomainCredentialsA should have failed with ERROR_NOT_FOUND instead of %ld\n",
"CredReadDomainCredentialsA should have failed with ERROR_NOT_FOUND instead of %d\n",
GetLastError());
ok(count ==0 && creds == NULL, "CredReadDomainCredentialsA must not return any result\n");
@ -227,7 +227,7 @@ if(0)
ok(!ret, "CredReadDomainCredentialsA should have failed\n");
ok(GetLastError() == ERROR_NOT_FOUND ||
GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */
"Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %ld\n",
"Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
info.DnsServerName = NULL;
@ -237,7 +237,7 @@ if(0)
ok(!ret, "CredReadDomainCredentialsA should have failed\n");
ok(GetLastError() == ERROR_NOT_FOUND ||
GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */
"Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %ld\n",
"Expected ERROR_NOT_FOUND or ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
}
@ -246,14 +246,14 @@ static void check_blob(int line, DWORD cred_type, PCREDENTIALA cred)
if (cred_type == CRED_TYPE_DOMAIN_PASSWORD)
{
todo_wine
ok_(__FILE__, line)(cred->CredentialBlobSize == 0, "expected CredentialBlobSize of 0 but got %ld\n", cred->CredentialBlobSize);
ok_(__FILE__, line)(cred->CredentialBlobSize == 0, "expected CredentialBlobSize of 0 but got %d\n", cred->CredentialBlobSize);
todo_wine
ok_(__FILE__, line)(!cred->CredentialBlob, "expected NULL credentials but got %p\n", cred->CredentialBlob);
}
else
{
DWORD size=sizeof(TEST_PASSWORD);
ok_(__FILE__, line)(cred->CredentialBlobSize == size, "expected CredentialBlobSize of %lu but got %lu\n", size, cred->CredentialBlobSize);
ok_(__FILE__, line)(cred->CredentialBlobSize == size, "expected CredentialBlobSize of %u but got %u\n", size, cred->CredentialBlobSize);
ok_(__FILE__, line)(cred->CredentialBlob != NULL, "CredentialBlob should be present\n");
if (cred->CredentialBlob)
ok_(__FILE__, line)(!memcmp(cred->CredentialBlob, TEST_PASSWORD, size), "wrong CredentialBlob\n");
@ -283,7 +283,7 @@ static void test_generic(void)
ret = pCredWriteA(&new_cred, 0);
ok(ret || broken(GetLastError() == ERROR_NO_SUCH_LOGON_SESSION),
"CredWriteA failed with error %ld\n", GetLastError());
"CredWriteA failed with error %d\n", GetLastError());
if (!ret)
{
skip("couldn't write generic credentials, skipping tests\n");
@ -291,7 +291,7 @@ static void test_generic(void)
}
ret = pCredEnumerateA(NULL, 0, &count, &creds);
ok(ret, "CredEnumerateA failed with error %ld\n", GetLastError());
ok(ret, "CredEnumerateA failed with error %d\n", GetLastError());
for (i = 0; i < count; i++)
{
@ -299,12 +299,12 @@ static void test_generic(void)
{
ok(creds[i]->Type == CRED_TYPE_GENERIC ||
creds[i]->Type == CRED_TYPE_DOMAIN_PASSWORD, /* Vista */
"expected creds[%ld]->Type CRED_TYPE_GENERIC or CRED_TYPE_DOMAIN_PASSWORD but got %ld\n", i, creds[i]->Type);
ok(!creds[i]->Flags, "expected creds[%ld]->Flags 0 but got 0x%lx\n", i, creds[i]->Flags);
ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%ld]->Comment \"Comment\" but got \"%s\"\n", i, creds[i]->Comment);
"expected creds[%d]->Type CRED_TYPE_GENERIC or CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type);
ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags);
ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%d]->Comment \"Comment\" but got \"%s\"\n", i, creds[i]->Comment);
check_blob(__LINE__, creds[i]->Type, creds[i]);
ok(creds[i]->Persist, "expected creds[%ld]->Persist CRED_PERSIST_ENTERPRISE but got %ld\n", i, creds[i]->Persist);
ok(!strcmp(creds[i]->UserName, "winetest"), "expected creds[%ld]->UserName \"winetest\" but got \"%s\"\n", i, creds[i]->UserName);
ok(creds[i]->Persist, "expected creds[%d]->Persist CRED_PERSIST_ENTERPRISE but got %d\n", i, creds[i]->Persist);
ok(!strcmp(creds[i]->UserName, "winetest"), "expected creds[%d]->UserName \"winetest\" but got \"%s\"\n", i, creds[i]->UserName);
found = TRUE;
}
}
@ -312,11 +312,11 @@ static void test_generic(void)
ok(found, "credentials not found\n");
ret = pCredReadA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0, &cred);
ok(ret, "CredReadA failed with error %ld\n", GetLastError());
ok(ret, "CredReadA failed with error %d\n", GetLastError());
pCredFree(cred);
ret = pCredDeleteA(TEST_TARGET_NAME, CRED_TYPE_GENERIC, 0);
ok(ret, "CredDeleteA failed with error %ld\n", GetLastError());
ok(ret, "CredDeleteA failed with error %d\n", GetLastError());
}
static void test_domain_password(DWORD cred_type)
@ -346,21 +346,21 @@ static void test_domain_password(DWORD cred_type)
"or are disabled. Skipping\n");
return;
}
ok(ret, "CredWriteA failed with error %ld\n", GetLastError());
ok(ret, "CredWriteA failed with error %d\n", GetLastError());
ret = pCredEnumerateA(NULL, 0, &count, &creds);
ok(ret, "CredEnumerateA failed with error %ld\n", GetLastError());
ok(ret, "CredEnumerateA failed with error %d\n", GetLastError());
for (i = 0; i < count; i++)
{
if (creds[i]->TargetName && !strcmp(creds[i]->TargetName, TEST_TARGET_NAME))
{
ok(creds[i]->Type == cred_type, "expected creds[%ld]->Type CRED_TYPE_DOMAIN_PASSWORD but got %ld\n", i, creds[i]->Type);
ok(!creds[i]->Flags, "expected creds[%ld]->Flags 0 but got 0x%lx\n", i, creds[i]->Flags);
ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%ld]->Comment \"Comment\" but got \"%s\"\n", i, creds[i]->Comment);
ok(creds[i]->Type == cred_type, "expected creds[%d]->Type CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type);
ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags);
ok(!strcmp(creds[i]->Comment, "Comment"), "expected creds[%d]->Comment \"Comment\" but got \"%s\"\n", i, creds[i]->Comment);
check_blob(__LINE__, cred_type, creds[i]);
ok(creds[i]->Persist, "expected creds[%ld]->Persist CRED_PERSIST_ENTERPRISE but got %ld\n", i, creds[i]->Persist);
ok(!strcmp(creds[i]->UserName, "test\\winetest"), "expected creds[%ld]->UserName \"winetest\" but got \"%s\"\n", i, creds[i]->UserName);
ok(creds[i]->Persist, "expected creds[%d]->Persist CRED_PERSIST_ENTERPRISE but got %d\n", i, creds[i]->Persist);
ok(!strcmp(creds[i]->UserName, "test\\winetest"), "expected creds[%d]->UserName \"winetest\" but got \"%s\"\n", i, creds[i]->UserName);
found = TRUE;
}
}
@ -368,7 +368,7 @@ static void test_domain_password(DWORD cred_type)
ok(found, "credentials not found\n");
ret = pCredReadA(TEST_TARGET_NAME, cred_type, 0, &cred);
ok(ret, "CredReadA failed with error %ld\n", GetLastError());
ok(ret, "CredReadA failed with error %d\n", GetLastError());
if (ret) /* don't check the values of cred, if CredReadA failed. */
{
check_blob(__LINE__, cred_type, cred);
@ -376,7 +376,7 @@ static void test_domain_password(DWORD cred_type)
}
ret = pCredDeleteA(TEST_TARGET_NAME, cred_type, 0);
ok(ret, "CredDeleteA failed with error %ld\n", GetLastError());
ok(ret, "CredDeleteA failed with error %d\n", GetLastError());
}
static void test_CredMarshalCredentialA(void)
@ -397,7 +397,7 @@ static void test_CredMarshalCredentialA(void)
ret = pCredMarshalCredentialA( 0, NULL, NULL );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
memset( cert.rgbHashOfCert, 0, sizeof(cert.rgbHashOfCert) );
cert.cbSize = sizeof(cert);
@ -405,28 +405,28 @@ static void test_CredMarshalCredentialA(void)
ret = pCredMarshalCredentialA( 0, &cert, NULL );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
str = (char *)0xdeadbeef;
SetLastError( 0xdeadbeef );
ret = pCredMarshalCredentialA( 0, &cert, &str );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
ok( str == (char *)0xdeadbeef, "got %p\n", str );
SetLastError( 0xdeadbeef );
ret = pCredMarshalCredentialA( CertCredential, NULL, NULL );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
if (0) { /* crash */
SetLastError( 0xdeadbeef );
ret = pCredMarshalCredentialA( CertCredential, &cert, NULL );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
}
cert.cbSize = 0;
@ -435,13 +435,13 @@ static void test_CredMarshalCredentialA(void)
ret = pCredMarshalCredentialA( CertCredential, &cert, &str );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
ok( str == (char *)0xdeadbeef, "got %p\n", str );
cert.cbSize = sizeof(cert) + 4;
str = NULL;
ret = pCredMarshalCredentialA( CertCredential, &cert, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str );
pCredFree( str );
@ -450,7 +450,7 @@ static void test_CredMarshalCredentialA(void)
cert.rgbHashOfCert[0] = 2;
str = NULL;
ret = pCredMarshalCredentialA( CertCredential, &cert, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@BCAAAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str );
pCredFree( str );
@ -458,7 +458,7 @@ static void test_CredMarshalCredentialA(void)
cert.rgbHashOfCert[0] = 255;
str = NULL;
ret = pCredMarshalCredentialA( CertCredential, &cert, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@B-DAAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str );
pCredFree( str );
@ -467,7 +467,7 @@ static void test_CredMarshalCredentialA(void)
cert.rgbHashOfCert[1] = 1;
str = NULL;
ret = pCredMarshalCredentialA( CertCredential, &cert, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@BBEAAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str );
pCredFree( str );
@ -477,7 +477,7 @@ static void test_CredMarshalCredentialA(void)
cert.rgbHashOfCert[2] = 1;
str = NULL;
ret = pCredMarshalCredentialA( CertCredential, &cert, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@BBEQAAAAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str );
pCredFree( str );
@ -489,7 +489,7 @@ static void test_CredMarshalCredentialA(void)
cert.rgbHashOfCert[3] = 'e';
str = NULL;
ret = pCredMarshalCredentialA( CertCredential, &cert, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@BXlmblBAAAAAAAAAAAAAAAAAAAAA" ), "got %s\n", str );
pCredFree( str );
@ -497,7 +497,7 @@ static void test_CredMarshalCredentialA(void)
memset( cert.rgbHashOfCert, 0xff, sizeof(cert.rgbHashOfCert) );
str = NULL;
ret = pCredMarshalCredentialA( CertCredential, &cert, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@B--------------------------P" ), "got %s\n", str );
pCredFree( str );
@ -508,7 +508,7 @@ static void test_CredMarshalCredentialA(void)
ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
ok( str == (char *)0xdeadbeef, "got %p\n", str );
username.UserName = emptyW;
@ -517,13 +517,13 @@ static void test_CredMarshalCredentialA(void)
ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
ok( str == (char *)0xdeadbeef, "got %p\n", str );
username.UserName = tW;
str = NULL;
ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@CCAAAAA0BA" ), "got %s\n", str );
pCredFree( str );
@ -531,7 +531,7 @@ static void test_CredMarshalCredentialA(void)
username.UserName = teW;
str = NULL;
ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@CEAAAAA0BQZAA" ), "got %s\n", str );
pCredFree( str );
@ -539,7 +539,7 @@ static void test_CredMarshalCredentialA(void)
username.UserName = tesW;
str = NULL;
ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@CGAAAAA0BQZAMHA" ), "got %s\n", str );
pCredFree( str );
@ -547,7 +547,7 @@ static void test_CredMarshalCredentialA(void)
username.UserName = testW;
str = NULL;
ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@CIAAAAA0BQZAMHA0BA" ), "got %s\n", str );
pCredFree( str );
@ -555,7 +555,7 @@ static void test_CredMarshalCredentialA(void)
username.UserName = test1W;
str = NULL;
ret = pCredMarshalCredentialA( UsernameTargetCredential, &username, &str );
ok( ret, "unexpected failure %lu\n", GetLastError() );
ok( ret, "unexpected failure %u\n", GetLastError() );
ok( str != NULL, "str not set\n" );
ok( !lstrcmpA( str, "@@CKAAAAA0BQZAMHA0BQMAA" ), "got %s\n", str );
pCredFree( str );
@ -627,14 +627,14 @@ static void test_CredUnmarshalCredentialA(void)
ret = pCredUnmarshalCredentialA( NULL, NULL, NULL );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
cert = NULL;
SetLastError( 0xdeadbeef );
ret = pCredUnmarshalCredentialA( NULL, NULL, (void **)&cert );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
type = 0;
cert = NULL;
@ -642,20 +642,20 @@ static void test_CredUnmarshalCredentialA(void)
ret = pCredUnmarshalCredentialA( NULL, &type, (void **)&cert );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
if (0) { /* crash */
SetLastError( 0xdeadbeef );
ret = pCredUnmarshalCredentialA( "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA", &type, NULL );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
SetLastError( 0xdeadbeef );
ret = pCredUnmarshalCredentialA( "@@BAAAAAAAAAAAAAAAAAAAAAAAAAAA", NULL, (void **)&cert );
error = GetLastError();
ok( !ret, "unexpected success\n" );
ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error );
}
for (i = 0; i < ARRAY_SIZE(tests); i++)
@ -667,7 +667,7 @@ static void test_CredUnmarshalCredentialA(void)
error = GetLastError();
if (tests[i].unmarshaled)
{
ok(ret, "[%u] unexpected failure %lu\n", i, error);
ok(ret, "[%u] unexpected failure %u\n", i, error);
ok(type == tests[i].type, "[%u] got %u\n", i, type);
ok(p != NULL, "[%u] returned pointer is NULL\n", i);
if (tests[i].type == CertCredential)
@ -675,7 +675,7 @@ static void test_CredUnmarshalCredentialA(void)
cert = p;
hash = tests[i].unmarshaled;
ok(cert->cbSize == sizeof(*cert),
"[%u] wrong size %lu\n", i, cert->cbSize);
"[%u] wrong size %u\n", i, cert->cbSize);
for (j = 0; j < sizeof(cert->rgbHashOfCert); j++)
ok(cert->rgbHashOfCert[j] == hash[j], "[%u] wrong data\n", i);
}
@ -690,7 +690,7 @@ static void test_CredUnmarshalCredentialA(void)
else
{
ok(!ret, "[%u] unexpected success\n", i);
ok(error == ERROR_INVALID_PARAMETER, "[%u] got %lu\n", i, error);
ok(error == ERROR_INVALID_PARAMETER, "[%u] got %u\n", i, error);
ok(type == tests[i].type, "[%u] got %u\n", i, type);
ok(p == NULL, "[%u] returned pointer is not NULL\n", i);
}
@ -752,11 +752,11 @@ static void test_CredIsMarshaledCredentialA(void)
SetLastError(0xdeadbeef);
res = pCredIsMarshaledCredentialA(ptr[i]);
if (expected)
ok(res != FALSE, "%d: got %d and %lu for %s (expected TRUE)\n", i, res, GetLastError(), ptr[i]);
ok(res != FALSE, "%d: got %d and %u for %s (expected TRUE)\n", i, res, GetLastError(), ptr[i]);
else
{
/* Windows returns ERROR_INVALID_PARAMETER here, but that's not documented */
ok(!res, "%d: got %d and %lu for %s (expected FALSE)\n", i, res, GetLastError(), ptr[i]);
ok(!res, "%d: got %d and %u for %s (expected FALSE)\n", i, res, GetLastError(), ptr[i]);
}
}
}
@ -789,10 +789,10 @@ START_TEST(cred)
BOOL ret;
DWORD i;
ret = pCredGetSessionTypes(CRED_TYPE_MAXIMUM, persists);
ok(ret, "CredGetSessionTypes failed with error %ld\n", GetLastError());
ok(persists[0] == CRED_PERSIST_NONE, "persists[0] = %lu instead of CRED_PERSIST_NONE\n", persists[0]);
ok(ret, "CredGetSessionTypes failed with error %d\n", GetLastError());
ok(persists[0] == CRED_PERSIST_NONE, "persists[0] = %u instead of CRED_PERSIST_NONE\n", persists[0]);
for (i=0; i < CRED_TYPE_MAXIMUM; i++)
ok(persists[i] <= CRED_PERSIST_ENTERPRISE, "bad value for persists[%lu]: %lu\n", i, persists[i]);
ok(persists[i] <= CRED_PERSIST_ENTERPRISE, "bad value for persists[%u]: %u\n", i, persists[i]);
}
else
memset(persists, CRED_PERSIST_ENTERPRISE, sizeof(persists));
@ -809,7 +809,7 @@ START_TEST(cred)
else
test_generic();
trace("domain password:\n");
trace("domain password:\n");
if (persists[CRED_TYPE_DOMAIN_PASSWORD] == CRED_PERSIST_NONE)
skip("CRED_TYPE_DOMAIN_PASSWORD credentials are not supported or are disabled. Skipping\n");
else

View File

@ -72,7 +72,7 @@ static void init_environment(void)
CryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_NEWKEYSET);
}
ret = CryptReleaseContext(hProv, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
/* Ensure that container "wine_test_keyset" does exist in default PROV_RSA_FULL type provider */
if (!CryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, 0))
@ -80,13 +80,13 @@ static void init_environment(void)
CryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET);
}
ret = CryptReleaseContext(hProv, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
/* Ensure that container "wine_test_bad_keyset" does not exist. */
if (CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, 0))
{
ret = CryptReleaseContext(hProv, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
}
@ -101,7 +101,7 @@ static void clean_up_environment(void)
if (CryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0))
{
ret = CryptReleaseContext(hProv, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
CryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
}
@ -110,7 +110,7 @@ static void clean_up_environment(void)
if (CryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, 0))
{
ret = CryptReleaseContext(hProv, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
CryptAcquireContextA(&hProv, szKeySet, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
}
@ -119,7 +119,7 @@ static void clean_up_environment(void)
if (CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, 0))
{
ret = CryptReleaseContext(hProv, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
}
@ -137,47 +137,42 @@ static void test_CryptReleaseContext(void)
SetLastError(0xdeadbeef);
ret = CryptReleaseContext(0, 0);
ok(!ret, "CryptReleaseContext succeeded unexpectedly\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError());
SetLastError(0xdeadbeef);
ret = CryptReleaseContext(0, ~0);
ok(!ret, "CryptReleaseContext succeeded unexpectedly\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError());
/* Additional refcount */
ret = CryptAcquireContextA(&prov, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
ret = CryptContextAddRef(prov, NULL, 0);
ok(ret, "got %lu\n", GetLastError());
ret = CryptContextAddRef(0, NULL, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
ret = CryptContextAddRef(0xdeadbeef, NULL, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
ret = CryptReleaseContext(prov, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
/* Nonzero flags, which allow release nonetheless */
SetLastError(0xdeadbeef);
ret = CryptReleaseContext(prov, ~0);
ok(!ret, "CryptReleaseContext succeeded unexpectedly\n");
ok(GetLastError() == NTE_BAD_FLAGS, "got %lu\n", GetLastError());
ok(GetLastError() == NTE_BAD_FLAGS, "got %u\n", GetLastError());
/* Obsolete provider */
SetLastError(0xdeadbeef);
ret = CryptReleaseContext(prov, 0);
ok(!ret, "CryptReleaseContext succeeded unexpectedly\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError());
SetLastError(0xdeadbeef);
ret = CryptReleaseContext(prov, ~0);
ok(!ret, "CryptReleaseContext succeeded unexpectedly\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %u\n", GetLastError());
}
static void test_acquire_context(void)
@ -191,19 +186,19 @@ static void test_acquire_context(void)
* but since this is likely to change between CSP versions, we don't check
* this. Please don't change the order of tests. */
result = CryptAcquireContextA(&hProv, NULL, NULL, 0, 0);
ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%ld\n", GetLastError());
ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%d\n", GetLastError());
result = CryptAcquireContextA(&hProv, NULL, NULL, 1000, 0);
ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%ld\n", GetLastError());
ok(!result && GetLastError()==NTE_BAD_PROV_TYPE, "%d\n", GetLastError());
result = CryptAcquireContextA(&hProv, NULL, NULL, NON_DEF_PROV_TYPE, 0);
ok(!result && GetLastError()==NTE_PROV_TYPE_NOT_DEF, "%ld\n", GetLastError());
ok(!result && GetLastError()==NTE_PROV_TYPE_NOT_DEF, "%d\n", GetLastError());
result = CryptAcquireContextA(&hProv, szKeySet, szNonExistentProv, PROV_RSA_FULL, 0);
ok(!result && GetLastError()==NTE_KEYSET_NOT_DEF, "%ld\n", GetLastError());
ok(!result && GetLastError()==NTE_KEYSET_NOT_DEF, "%d\n", GetLastError());
result = CryptAcquireContextA(&hProv, szKeySet, szRsaBaseProv, NON_DEF_PROV_TYPE, 0);
ok(!result && GetLastError()==NTE_PROV_TYPE_NO_MATCH, "%ld\n", GetLastError());
ok(!result && GetLastError()==NTE_PROV_TYPE_NO_MATCH, "%d\n", GetLastError());
if (0)
@ -212,7 +207,7 @@ if (0)
result = TRUE, GetLastError() == ERROR_INVALID_PARAMETER */
SetLastError(0xdeadbeef);
result = CryptAcquireContextA(NULL, szKeySet, szRsaBaseProv, PROV_RSA_FULL, 0);
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d/%ld\n", result, GetLastError());
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d/%d\n", result, GetLastError());
}
/* Last not least, try to really acquire a context. */
@ -224,12 +219,12 @@ if (0)
GLE == ERROR_SUCCESS ||
GLE == ERROR_RING2_STACK_IN_USE ||
GLE == NTE_FAIL ||
GLE == ERROR_NOT_LOGGED_ON), "%d/%ld\n", result, GLE);
GLE == ERROR_NOT_LOGGED_ON), "%d/%d\n", result, GLE);
if (hProv)
{
result = CryptReleaseContext(hProv, 0);
ok(result, "got %lu\n", GetLastError());
ok(result, "got %u\n", GetLastError());
}
/* Try again, witch an empty ("\0") szProvider parameter */
@ -241,12 +236,12 @@ if (0)
GLE == ERROR_SUCCESS ||
GLE == ERROR_RING2_STACK_IN_USE ||
GLE == NTE_FAIL ||
GLE == ERROR_NOT_LOGGED_ON), "%d/%ld\n", result, GetLastError());
GLE == ERROR_NOT_LOGGED_ON), "%d/%d\n", result, GetLastError());
if (hProv)
{
result = CryptReleaseContext(hProv, 0);
ok(result, "got %lu\n", GetLastError());
ok(result, "got %u\n", GetLastError());
}
}
@ -271,203 +266,139 @@ static void test_incorrect_api_usage(void)
result = CryptAcquireContextA(&hProv, szBadKeySet, szRsaBaseProv,
PROV_RSA_FULL, CRYPT_NEWKEYSET);
ok (result, "%08lx\n", GetLastError());
ok (result, "%08x\n", GetLastError());
if (!result) return;
/* Looks like native handles are just pointers. */
ok(!!*(void **)hProv, "Got zero *(void **)hProv.\n");
result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash);
ok (result, "%ld\n", GetLastError());
ok (result, "%d\n", GetLastError());
if (!result) return;
result = CryptDeriveKey(0, CALG_RC4, hHash, 0, &hKey2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC4, 0, 0, &hKey2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptHashData(0, &temp, 1, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptGenKey(hProv, CALG_RC4, 0, &hKey);
ok (result, "%ld\n", GetLastError());
if (!result) return;
result = pCryptHashSessionKey(hHash, 0, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = pCryptHashSessionKey(0, hKey, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDestroyHash(hHash);
ok (result, "%08lx\n", GetLastError());
result = CryptDestroyHash(0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptCreateHash(0xdeadbeef, CALG_SHA, 0, 0, &hHash);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
CryptDestroyHash(hHash);
result = CryptCreateHash(0, CALG_SHA, 0, 0, &hHash);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptGenKey(0, CALG_RC4, 0, &hKey);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
dwLen = 1;
result = CryptDecrypt(hKey, 0, TRUE, 0, &temp, &dwLen);
ok (result, "%ld\n", GetLastError());
result = CryptDecrypt(hKey, 0xdeadbeef, TRUE, 0, &temp, &dwLen);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDecrypt(0, 0, TRUE, 0, &temp, &dwLen);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptDecrypt(0xdeadbeef, 0, TRUE, 0, &temp, &dwLen);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptEncrypt(hKey, 0, TRUE, 0, &temp, &dwLen, sizeof(temp));
ok (result, "%ld\n", GetLastError());
result = CryptEncrypt(hKey, 0xdeadbeef, TRUE, 0, &temp, &dwLen, sizeof(temp));
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptEncrypt(0, 0, TRUE, 0, &temp, &dwLen, sizeof(temp));
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptEncrypt(0xdeadbeef, 0, TRUE, 0, &temp, &dwLen, sizeof(temp));
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
dwLen = 1;
result = CryptExportKey(hKey, 0xdeadbeef, 0, 0, &temp, &dwLen);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptGenKey(hProv, CALG_RC4, 0, &hKey);
ok (result, "%d\n", GetLastError());
if (!result) return;
result = CryptDestroyKey(hKey);
ok (result, "%ld\n", GetLastError());
ok (result, "%d\n", GetLastError());
result = CryptGenKey(hProv, CALG_RC4, 0, &hKey2);
ok (result, "%ld\n", GetLastError());
ok (result, "%d\n", GetLastError());
if (!result) return;
result = CryptDestroyKey(hKey2);
ok (result, "%ld\n", GetLastError());
result = CryptDestroyKey(0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (result, "%d\n", GetLastError());
dwTemp = CRYPT_MODE_ECB;
result = CryptSetKeyParam(hKey2, KP_MODE, (BYTE*)&dwTemp, sizeof(DWORD));
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
hProv2 = 0xdeadbeef;
result = CryptAcquireContextA(&hProv2, szBadKeySet, NULL, PROV_RSA_FULL,
CRYPT_DELETEKEYSET);
ok (result, "%ld\n", GetLastError());
ok (hProv2 == 0, "%Id\n", hProv2);
ok (result, "%d\n", GetLastError());
ok (hProv2 == 0, "%ld\n", hProv2);
if (!result) return;
result = CryptReleaseContext(hProv, 0);
ok(result, "got %lu\n", GetLastError());
ok(result, "got %u\n", GetLastError());
if (!result) return;
result = pCryptGenRandom(0, 1, &temp);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = pCryptGenRandom(hProv, 1, &temp);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptContextAddRef(hProv, NULL, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
dwLen = 1;
result = CryptDecrypt(hKey, 0, TRUE, 0, &temp, &dwLen);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
dwLen = 1;
result = CryptEncrypt(hKey, 0, TRUE, 0, &temp, &dwLen, 1);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC4, hHash, 0, &hKey2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = pCryptDuplicateHash(hHash, NULL, 0, &hHash2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptDuplicateKey(hKey, NULL, 0, &hKey2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
dwLen = 1;
result = CryptExportKey(hKey, 0, 0, 0, &temp, &dwLen);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptGenKey(hProv, CALG_RC4, 0, &hKey2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
dwLen = 1;
result = CryptGetHashParam(hHash, 0, &temp, &dwLen, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
dwLen = 1;
result = CryptGetKeyParam(hKey, 0, &temp, &dwLen, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
dwLen = 1;
result = CryptGetProvParam(hProv, 0, &temp, &dwLen, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptGetUserKey(0, 0, &hKey2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptGetUserKey(hProv, 0, &hKey2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptHashData(hHash, &temp, 1, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = pCryptHashSessionKey(hHash, hKey, 0);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptImportKey(hProv, &temp, 1, 0, 0, &hKey2);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
if (pCryptSignHashW)
{
dwLen = 1;
result = pCryptSignHashW(hHash, 0, NULL, 0, &temp, &dwLen);
ok (!result && (GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%ld\n", GetLastError());
result = pCryptSignHashW(hHash, 0, NULL, 0, &temp, &dwLen);
ok (!result && (GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%ld\n", GetLastError());
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError());
}
else
win_skip("CryptSignHashW is not available\n");
result = CryptSetKeyParam(hKey, 0, &temp, 1);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptSetHashParam(hHash, 0, &temp, 1);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
result = CryptSetProvParam(0, 0, &temp, 1);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptSetProvParam(hProv, 0, &temp, 1);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
if (pCryptVerifySignatureW)
{
result = pCryptVerifySignatureW(hHash, &temp, 1, hKey, NULL, 0);
ok (!result && (GetLastError() == ERROR_INVALID_PARAMETER ||
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%ld\n", GetLastError());
GetLastError() == ERROR_CALL_NOT_IMPLEMENTED), "%d\n", GetLastError());
}
else
win_skip("CryptVerifySignatureW is not available\n");
result = CryptDestroyHash(hHash);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
result = CryptDestroyKey(hKey);
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
}
static const BYTE privKey[] = {
@ -518,51 +449,51 @@ static void test_verify_sig(void)
return;
}
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
ret = CryptAcquireContextA(&prov, szKeySet, NULL, PROV_RSA_FULL,
CRYPT_NEWKEYSET);
if (!ret && GetLastError() == NTE_EXISTS)
ret = CryptAcquireContextA(&prov, szKeySet, NULL, PROV_RSA_FULL, 0);
ok(ret, "CryptAcquireContextA failed: %08lx\n", GetLastError());
ok(ret, "CryptAcquireContextA failed: %08x\n", GetLastError());
ret = CryptImportKey(prov, (LPBYTE)privKey, sizeof(privKey), 0, 0, &key);
ok(ret, "CryptImportKey failed: %08lx\n", GetLastError());
ok(ret, "CryptImportKey failed: %08x\n", GetLastError());
ret = CryptCreateHash(prov, CALG_MD5, 0, 0, &hash);
ok(ret, "CryptCreateHash failed: %08lx\n", GetLastError());
ok(ret, "CryptCreateHash failed: %08x\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptVerifySignatureW(hash, NULL, 0, 0, NULL, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptVerifySignatureW(0, NULL, 0, key, NULL, 0);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError());
"Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptVerifySignatureW(hash, NULL, 0, key, NULL, 0);
ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE ||
GetLastError() == ERROR_INVALID_PARAMETER),
"Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08lx\n",
"Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptVerifySignatureW(hash, NULL, sizeof(bogus), key, NULL, 0);
ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE ||
GetLastError() == ERROR_INVALID_PARAMETER),
"Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08lx\n",
"Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n",
GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptVerifySignatureW(hash, bogus, 0, key, NULL, 0);
ok(!ret && GetLastError() == NTE_BAD_SIGNATURE,
"Expected NTE_BAD_SIGNATURE, got %08lx\n", GetLastError());
"Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pCryptVerifySignatureW(hash, bogus, sizeof(bogus), key, NULL, 0);
ok(!ret &&
(GetLastError() == NTE_BAD_SIGNATURE ||
broken(GetLastError() == NTE_BAD_HASH_STATE /* older NT4 */)),
"Expected NTE_BAD_SIGNATURE, got %08lx\n", GetLastError());
"Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError());
CryptDestroyKey(key);
CryptDestroyHash(hash);
ret = CryptReleaseContext(prov, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
}
static BOOL FindProvRegVals(DWORD dwIndex, DWORD *pdwProvType, LPSTR *pszProvName,
@ -626,11 +557,11 @@ static void test_enum_providers(void)
/* check pdwReserved flag for NULL */
result = pCryptEnumProvidersA(dwIndex, &notNull, 0, &type, NULL, &providerLen);
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%ld\n", GetLastError());
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%d\n", GetLastError());
/* check dwFlags == 0 */
result = pCryptEnumProvidersA(dwIndex, NULL, notZeroFlags, &type, NULL, &providerLen);
ok(!result && GetLastError()==NTE_BAD_FLAGS, "%ld\n", GetLastError());
ok(!result && GetLastError()==NTE_BAD_FLAGS, "%d\n", GetLastError());
/* alloc provider to half the size required
* cbName holds the size required */
@ -639,7 +570,7 @@ static void test_enum_providers(void)
return;
result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen);
ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %ld\n",
ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %d\n",
ERROR_MORE_DATA, GetLastError());
LocalFree(provider);
@ -657,7 +588,7 @@ static void test_enum_providers(void)
* ERROR_NO_MORE_ITEMS */
for (count = 0; count < provCount + 1; count++)
result = pCryptEnumProvidersA(count, NULL, 0, &type, NULL, &providerLen);
ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %i, got %ld\n",
ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected %i, got %d\n",
ERROR_NO_MORE_ITEMS, GetLastError());
/* check expected versus actual values returned */
@ -668,20 +599,20 @@ static void test_enum_providers(void)
providerLen = -1;
result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen);
ok(result, "expected TRUE, got %ld\n", result);
ok(type==dwType, "expected %ld, got %ld\n", dwType, type);
ok(result, "expected TRUE, got %d\n", result);
ok(type==dwType, "expected %d, got %d\n", dwType, type);
if (pszProvName)
ok(!strcmp(pszProvName, provider), "expected %s, got %s\n", pszProvName, provider);
ok(cbName==providerLen, "expected %ld, got %ld\n", cbName, providerLen);
ok(cbName==providerLen, "expected %d, got %d\n", cbName, providerLen);
providerLen = -1000;
provider[0] = 0;
result = pCryptEnumProvidersA(dwIndex, NULL, 0, &type, provider, &providerLen);
ok(result, "expected TRUE, got %ld\n", result);
ok(type==dwType, "expected %ld, got %ld\n", dwType, type);
ok(result, "expected TRUE, got %d\n", result);
ok(type==dwType, "expected %d, got %d\n", dwType, type);
if (pszProvName)
ok(!strcmp(pszProvName, provider), "expected %s, got %s\n", pszProvName, provider);
ok(cbName==providerLen, "expected %ld, got %ld\n", cbName, providerLen);
ok(cbName==providerLen, "expected %d, got %d\n", cbName, providerLen);
LocalFree(pszProvName);
LocalFree(provider);
@ -779,12 +710,12 @@ static void test_enum_provider_types(void)
/* check pdwReserved for NULL */
result = pCryptEnumProviderTypesA(index, &notNull, 0, &provType, typeName, &typeNameSize);
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n",
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
/* check dwFlags == zero */
result = pCryptEnumProviderTypesA(index, NULL, notZeroFlags, &provType, typeName, &typeNameSize);
ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected ERROR_INVALID_PARAMETER, got %ld\n",
ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
/* This test fails under Win2k SP4:
@ -799,7 +730,7 @@ static void test_enum_provider_types(void)
SetLastError(0xdeadbeef);
result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize);
ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %ld/%ld\n",
ok(!result && GetLastError()==ERROR_MORE_DATA, "expected 0/ERROR_MORE_DATA, got %d/%d\n",
result, GetLastError());
LocalFree(typeName);
@ -812,28 +743,28 @@ static void test_enum_provider_types(void)
while(pCryptEnumProviderTypesA(typeCount++, NULL, 0, &provType, NULL, &typeNameSize))
;
typeCount--;
ok(typeCount==dwTypeCount, "expected %ld, got %ld\n", dwTypeCount, typeCount);
ok(typeCount==dwTypeCount, "expected %d, got %d\n", dwTypeCount, typeCount);
/* loop past the actual number of provider types to get the error
* ERROR_NO_MORE_ITEMS */
for (typeCount = 0; typeCount < dwTypeCount + 1; typeCount++)
result = pCryptEnumProviderTypesA(typeCount, NULL, 0, &provType, NULL, &typeNameSize);
ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %ld\n",
ok(!result && GetLastError()==ERROR_NO_MORE_ITEMS, "expected ERROR_NO_MORE_ITEMS, got %d\n",
GetLastError());
/* check expected versus actual values returned */
result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, NULL, &typeNameSize);
ok(result && typeNameSize==cbTypeName, "expected %ld, got %ld\n", cbTypeName, typeNameSize);
ok(result && typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize);
if (!(typeName = LocalAlloc(LMEM_ZEROINIT, typeNameSize)))
goto cleanup;
typeNameSize = 0xdeadbeef;
result = pCryptEnumProviderTypesA(index, NULL, 0, &provType, typeName, &typeNameSize);
ok(result, "expected TRUE, got %ld\n", result);
ok(provType==dwProvType, "expected %ld, got %ld\n", dwProvType, provType);
ok(result, "expected TRUE, got %d\n", result);
ok(provType==dwProvType, "expected %d, got %d\n", dwProvType, provType);
if (pszTypeName)
ok(!strcmp(pszTypeName, typeName), "expected %s, got %s\n", pszTypeName, typeName);
ok(typeNameSize==cbTypeName, "expected %ld, got %ld\n", cbTypeName, typeNameSize);
ok(typeNameSize==cbTypeName, "expected %d, got %d\n", cbTypeName, typeNameSize);
LocalFree(typeName);
cleanup:
@ -920,13 +851,13 @@ static void test_get_default_provider(void)
/* check pdwReserved for NULL */
result = pCryptGetDefaultProviderA(provType, &notNull, flags, provName, &provNameSize);
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %ld\n",
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %d\n",
ERROR_INVALID_PARAMETER, GetLastError());
/* check for invalid flag */
flags = 0xdeadbeef;
result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize);
ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected %ld, got %ld\n",
ok(!result && GetLastError()==NTE_BAD_FLAGS, "expected %d, got %d\n",
NTE_BAD_FLAGS, GetLastError());
flags = CRYPT_MACHINE_DEFAULT;
@ -935,7 +866,7 @@ static void test_get_default_provider(void)
result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize);
ok(!result && (GetLastError() == NTE_BAD_PROV_TYPE ||
GetLastError() == ERROR_INVALID_PARAMETER),
"expected NTE_BAD_PROV_TYPE or ERROR_INVALID_PARAMETER, got %ld/%ld\n",
"expected NTE_BAD_PROV_TYPE or ERROR_INVALID_PARAMETER, got %d/%d\n",
result, GetLastError());
provType = PROV_RSA_FULL;
@ -948,14 +879,14 @@ static void test_get_default_provider(void)
return;
result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize);
ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %ld\n",
ok(!result && GetLastError()==ERROR_MORE_DATA, "expected %i, got %d\n",
ERROR_MORE_DATA, GetLastError());
LocalFree(provName);
/* check expected versus actual values returned */
result = pCryptGetDefaultProviderA(provType, NULL, flags, NULL, &provNameSize);
ok(result && provNameSize==cbProvName, "expected %ld, got %ld\n", cbProvName, provNameSize);
ok(result && provNameSize==cbProvName, "expected %d, got %d\n", cbProvName, provNameSize);
provNameSize = cbProvName;
if (!(provName = LocalAlloc(LMEM_ZEROINIT, provNameSize)))
@ -963,10 +894,10 @@ static void test_get_default_provider(void)
provNameSize = 0xdeadbeef;
result = pCryptGetDefaultProviderA(provType, NULL, flags, provName, &provNameSize);
ok(result, "expected TRUE, got %ld\n", result);
ok(result, "expected TRUE, got %d\n", result);
if(pszProvName)
ok(!strcmp(pszProvName, provName), "expected %s, got %s\n", pszProvName, provName);
ok(provNameSize==cbProvName, "expected %ld, got %ld\n", cbProvName, provNameSize);
ok(provNameSize==cbProvName, "expected %d, got %d\n", cbProvName, provNameSize);
LocalFree(pszProvName);
LocalFree(provName);
@ -994,11 +925,11 @@ static void test_set_provider_ex(void)
if (!(curProvName = LocalAlloc(LMEM_ZEROINIT, curlen)))
return;
result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, curProvName, &curlen);
ok(result, "%ld\n", GetLastError());
ok(result, "%d\n", GetLastError());
/* check pdwReserved for NULL */
result = pCryptSetProviderExA(MS_DEF_PROV_A, PROV_RSA_FULL, &notNull, CRYPT_MACHINE_DEFAULT);
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %ld\n",
ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "expected %i, got %d\n",
ERROR_INVALID_PARAMETER, GetLastError());
/* remove the default provider and then set it to MS_DEF_PROV/PROV_RSA_FULL */
@ -1007,31 +938,31 @@ static void test_set_provider_ex(void)
if (!result)
{
ok( GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == ERROR_INVALID_PARAMETER),
"wrong error %lu\n", GetLastError() );
"wrong error %u\n", GetLastError() );
skip("Not enough rights to remove the default provider\n");
LocalFree(curProvName);
return;
}
result = pCryptSetProviderExA(MS_DEF_PROV_A, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT);
ok(result, "%ld\n", GetLastError());
ok(result, "%d\n", GetLastError());
/* call CryptGetDefaultProvider to see if they match */
result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, NULL, &cbProvName);
ok(result, "%ld\n", GetLastError());
ok(result, "%d\n", GetLastError());
if (!(pszProvName = LocalAlloc(LMEM_ZEROINIT, cbProvName)))
goto reset;
result = pCryptGetDefaultProviderA(PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT, pszProvName, &cbProvName);
ok(result && !strcmp(MS_DEF_PROV_A, pszProvName), "expected %s, got %s\n", MS_DEF_PROV_A, pszProvName);
ok(result && cbProvName==(strlen(MS_DEF_PROV_A) + 1), "expected %i, got %ld\n", (lstrlenA(MS_DEF_PROV_A) + 1), cbProvName);
ok(result && cbProvName==(strlen(MS_DEF_PROV_A) + 1), "expected %i, got %d\n", (lstrlenA(MS_DEF_PROV_A) + 1), cbProvName);
LocalFree(pszProvName);
reset:
/* Set the provider back to its original */
result = pCryptSetProviderExA(curProvName, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT);
ok(result, "%ld\n", GetLastError());
ok(result, "%d\n", GetLastError());
LocalFree(curProvName);
}
@ -1059,7 +990,7 @@ static void test_machine_guid(void)
{
restoreGuid = TRUE;
r = RegDeleteValueA(key, "MachineGuid");
ok(!r || broken(r == ERROR_ACCESS_DENIED) /*win8*/, "RegDeleteValueA failed: %ld\n", r);
ok(!r || broken(r == ERROR_ACCESS_DENIED) /*win8*/, "RegDeleteValueA failed: %d\n", r);
if (r == ERROR_ACCESS_DENIED)
{
skip("broken virtualization on HKLM\\Software\\Microsoft\\Cryptography\n");
@ -1068,14 +999,14 @@ static void test_machine_guid(void)
}
}
else
ok(r == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n",
ok(r == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n",
r);
/* Create and release a provider */
ret = CryptAcquireContextA(&hCryptProv, szKeySet, NULL, PROV_RSA_FULL, 0);
ok(ret || broken(!ret && GetLastError() == NTE_KEYSET_ENTRY_BAD /* NT4 */),
"CryptAcquireContextA failed: %08lx\n", GetLastError());
"CryptAcquireContextA failed: %08x\n", GetLastError());
ret = CryptReleaseContext(hCryptProv, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
if (restoreGuid)
RegSetValueExA(key, "MachineGuid", 0, REG_SZ, (const BYTE *)originalGuid,
@ -1105,7 +1036,7 @@ static void test_rc2_keylen(void)
SetLastError(0xdeadbeef);
ret = CryptAcquireContextA(&provider, NULL, NULL,
PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
ok(ret, "CryptAcquireContext error %lu\n", GetLastError());
ok(ret, "CryptAcquireContext error %u\n", GetLastError());
if (ret)
{
key_blob.header.bType = PLAINTEXTKEYBLOB;
@ -1122,18 +1053,18 @@ static void test_rc2_keylen(void)
/* CRYPT_IPSEC_HMAC_KEY is not supported on W2K and lower */
ok(ret ||
broken(!ret && GetLastError() == NTE_BAD_FLAGS),
"CryptImportKey error %08lx\n", GetLastError());
"CryptImportKey error %08x\n", GetLastError());
if (ret)
CryptDestroyKey(hkey);
ret = CryptReleaseContext(provider, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
}
SetLastError(0xdeadbeef);
ret = CryptAcquireContextA(&provider, NULL, MS_DEF_PROV_A,
PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
ok(ret, "CryptAcquireContext error %08lx\n", GetLastError());
ok(ret, "CryptAcquireContext error %08x\n", GetLastError());
if (ret)
{
@ -1145,7 +1076,7 @@ static void test_rc2_keylen(void)
GetLastError() == NTE_BAD_LEN || /* Win7 */
GetLastError() == NTE_BAD_TYPE || /* W2K */
GetLastError() == NTE_PERM), /* Win9x, WinMe and NT4 */
"unexpected error %08lx\n", GetLastError());
"unexpected error %08x\n", GetLastError());
/* but importing an 56-bit (7-byte) key does.. */
key_blob.key_size = 7;
SetLastError(0xdeadbeef);
@ -1154,7 +1085,7 @@ static void test_rc2_keylen(void)
ok(ret ||
broken(!ret && GetLastError() == NTE_BAD_TYPE) || /* W2K */
broken(!ret && GetLastError() == NTE_PERM), /* Win9x, WinMe and NT4 */
"CryptAcquireContext error %08lx\n", GetLastError());
"CryptAcquireContext error %08x\n", GetLastError());
if (ret)
CryptDestroyKey(hkey);
/* as does importing a 16-byte key with the base provider when
@ -1167,18 +1098,18 @@ static void test_rc2_keylen(void)
/* CRYPT_IPSEC_HMAC_KEY is not supported on W2K and lower */
ok(ret ||
broken(!ret && GetLastError() == NTE_BAD_FLAGS),
"CryptImportKey error %08lx\n", GetLastError());
"CryptImportKey error %08x\n", GetLastError());
if (ret)
CryptDestroyKey(hkey);
ret = CryptReleaseContext(provider, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
}
key_blob.key_size = sizeof(key);
SetLastError(0xdeadbeef);
ret = CryptAcquireContextA(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT);
ok(ret, "CryptAcquireContext error %08lx\n", GetLastError());
ok(ret, "CryptAcquireContext error %08x\n", GetLastError());
if (ret)
{
@ -1190,7 +1121,7 @@ static void test_rc2_keylen(void)
0, CRYPT_IPSEC_HMAC_KEY, &hkey);
ok(ret ||
broken(!ret && GetLastError() == NTE_BAD_FLAGS),
"CryptImportKey error %08lx\n", GetLastError());
"CryptImportKey error %08x\n", GetLastError());
if (ret)
CryptDestroyKey(hkey);
@ -1203,12 +1134,12 @@ static void test_rc2_keylen(void)
0, CRYPT_IPSEC_HMAC_KEY, &hkey);
ok(ret ||
broken(!ret && GetLastError() == NTE_BAD_FLAGS),
"CryptImportKey error %08lx\n", GetLastError());
"CryptImportKey error %08x\n", GetLastError());
if (ret)
CryptDestroyKey(hkey);
ret = CryptReleaseContext(provider, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
}
}
@ -1231,7 +1162,7 @@ static void test_SystemFunction036(void)
{
SetLastError(0xdeadbeef);
ret = pSystemFunction036(NULL, 5);
trace("ret = %d, GetLastError() = %ld\n", ret, GetLastError());
trace("ret = %d, GetLastError() = %d\n", ret, GetLastError());
}
ret = pSystemFunction036(&test, 0);
@ -1250,29 +1181,29 @@ static void test_container_sd(void)
ret = CryptAcquireContextA(&prov, "winetest", "Microsoft Enhanced Cryptographic Provider v1.0",
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_NEWKEYSET);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
len = 0;
SetLastError(0xdeadbeef);
ret = CryptGetProvParam(prov, PP_KEYSET_SEC_DESCR, NULL, &len, OWNER_SECURITY_INFORMATION);
err = GetLastError();
ok(ret, "got %lu\n", err);
ok(err == ERROR_INSUFFICIENT_BUFFER || broken(err == ERROR_INVALID_PARAMETER), "got %lu\n", err);
ok(ret, "got %u\n", err);
ok(err == ERROR_INSUFFICIENT_BUFFER || broken(err == ERROR_INVALID_PARAMETER), "got %u\n", err);
ok(len, "expected len > 0\n");
sd = HeapAlloc(GetProcessHeap(), 0, len);
ret = CryptGetProvParam(prov, PP_KEYSET_SEC_DESCR, (BYTE *)sd, &len, OWNER_SECURITY_INFORMATION);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
HeapFree(GetProcessHeap(), 0, sd);
ret = CryptReleaseContext(prov, 0);
ok(ret, "got %lu\n", GetLastError());
ok(ret, "got %u\n", GetLastError());
prov = 0xdeadbeef;
ret = CryptAcquireContextA(&prov, "winetest", "Microsoft Enhanced Cryptographic Provider v1.0",
PROV_RSA_FULL, CRYPT_MACHINE_KEYSET|CRYPT_DELETEKEYSET);
ok(ret, "got %lu\n", GetLastError());
ok(prov == 0, "got %Id\n", prov);
ok(ret, "got %u\n", GetLastError());
ok(prov == 0, "got %ld\n", prov);
}
START_TEST(crypt)

View File

@ -64,15 +64,8 @@ static BOOL create_backup(const char *filename)
HANDLE handle;
DWORD rc, attribs;
handle = OpenEventLogA(NULL, "Application");
if (!handle && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE))
{
win_skip( "Can't open event log\n" );
return FALSE;
}
ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
DeleteFileA(filename);
handle = OpenEventLogA(NULL, "Application");
rc = BackupEventLogA(handle, filename);
if (!rc && GetLastError() == ERROR_PRIVILEGE_NOT_HELD)
{
@ -80,12 +73,12 @@ static BOOL create_backup(const char *filename)
CloseEventLog(handle);
return FALSE;
}
ok(rc, "BackupEventLogA failed, le=%lu\n", GetLastError());
ok(rc, "BackupEventLogA failed, le=%u\n", GetLastError());
CloseEventLog(handle);
attribs = GetFileAttributesA(filename);
todo_wine
ok(attribs != INVALID_FILE_ATTRIBUTES, "Expected a backup file attribs=%#lx le=%lu\n", attribs, GetLastError());
ok(attribs != INVALID_FILE_ATTRIBUTES, "Expected a backup file attribs=%#x le=%u\n", attribs, GetLastError());
return TRUE;
}
@ -99,46 +92,46 @@ static void test_open_close(void)
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE ||
GetLastError() == ERROR_NOACCESS, /* W2K */
"Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
handle = OpenEventLogA(NULL, NULL);
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
handle = OpenEventLogA("IDontExist", NULL);
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
handle = OpenEventLogA("IDontExist", "deadbeef");
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE ||
GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */
"Expected RPC_S_SERVER_UNAVAILABLE, got %ld\n", GetLastError());
"Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError());
/* This one opens the Application log */
handle = OpenEventLogA(NULL, "deadbeef");
ok(handle != NULL, "Expected a handle : %ld\n", GetLastError());
ok(handle != NULL, "Expected a handle\n");
ret = CloseEventLog(handle);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
/* Close a second time */
SetLastError(0xdeadbeef);
ret = CloseEventLog(handle);
todo_wine
{
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
}
/* Empty servername should be read as local server */
handle = OpenEventLogA("", "Application");
ok(handle != NULL, "Expected a handle : %ld\n", GetLastError());
ok(handle != NULL, "Expected a handle\n");
CloseEventLog(handle);
handle = OpenEventLogA(NULL, "Application");
ok(handle != NULL, "Expected a handle : %ld\n", GetLastError());
ok(handle != NULL, "Expected a handle\n");
CloseEventLog(handle);
}
@ -159,47 +152,46 @@ static void test_info(void)
SetLastError(0xdeadbeef);
ret = pGetEventLogInformation(NULL, 1, NULL, 0, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_LEVEL, "Expected ERROR_INVALID_LEVEL, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_LEVEL, "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pGetEventLogInformation(NULL, EVENTLOG_FULL_INFO, NULL, 0, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
handle = OpenEventLogA(NULL, "Application");
ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %ld\n", GetLastError());
ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, &needed);
ok(!ret, "Expected failure\n");
ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %ld\n", GetLastError());
ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, efi, 0, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %ld\n", GetLastError());
ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
needed = 0xdeadbeef;
efi->dwFull = 0xdeadbeef;
ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, efi, 0, &needed);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %ld\n", needed);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed);
ok(efi->dwFull == 0xdeadbeef, "Expected no change to the dwFull member\n");
/* Not that we care, but on success last error is set to ERROR_IO_PENDING */
efi->dwFull = 0xdeadbeef;
needed = sizeof(buffer);
ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, efi, needed, &needed);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %ld\n", needed);
ok(efi->dwFull == 0 || efi->dwFull == 1, "Expected 0 (not full) or 1 (full), got %ld\n", efi->dwFull);
ok(ret, "Expected success\n");
ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed);
ok(efi->dwFull == 0 || efi->dwFull == 1, "Expected 0 (not full) or 1 (full), got %d\n", efi->dwFull);
CloseEventLog(handle);
}
@ -214,26 +206,25 @@ static void test_count(void)
SetLastError(0xdeadbeef);
ret = GetNumberOfEventLogRecords(NULL, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
count = 0xdeadbeef;
ret = GetNumberOfEventLogRecords(NULL, &count);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
ok(count == 0xdeadbeef, "Expected count to stay unchanged\n");
handle = OpenEventLogA(NULL, "Application");
ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = GetNumberOfEventLogRecords(handle, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
count = 0xdeadbeef;
ret = GetNumberOfEventLogRecords(handle, &count);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
ok(count != 0xdeadbeef, "Expected the number of records\n");
CloseEventLog(handle);
@ -243,14 +234,14 @@ static void test_count(void)
{
handle = OpenBackupEventLogA(NULL, backup);
todo_wine
ok(handle != NULL, "Expected a handle, le=%ld\n", GetLastError());
ok(handle != NULL, "Expected a handle, le=%d\n", GetLastError());
/* Does GetNumberOfEventLogRecords work with backup eventlogs? */
count = 0xdeadbeef;
ret = GetNumberOfEventLogRecords(handle, &count);
todo_wine
{
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
ok(count != 0xdeadbeef, "Expected the number of records\n");
}
@ -269,31 +260,25 @@ static void test_oldest(void)
SetLastError(0xdeadbeef);
ret = GetOldestEventLogRecord(NULL, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
oldest = 0xdeadbeef;
ret = GetOldestEventLogRecord(NULL, &oldest);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
ok(oldest == 0xdeadbeef, "Expected oldest to stay unchanged\n");
handle = OpenEventLogA(NULL, "Application");
if (!handle && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE))
{
win_skip( "Can't open event log\n" );
return;
}
ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = GetOldestEventLogRecord(handle, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
oldest = 0xdeadbeef;
ret = GetOldestEventLogRecord(handle, &oldest);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
ok(oldest != 0xdeadbeef, "Expected the number of the oldest record\n");
CloseEventLog(handle);
@ -310,7 +295,7 @@ static void test_oldest(void)
ret = GetOldestEventLogRecord(handle, &oldest);
todo_wine
{
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
ok(oldest != 0xdeadbeef, "Expected the number of the oldest record\n");
}
@ -329,7 +314,7 @@ static void test_backup(void)
SetLastError(0xdeadbeef);
ret = BackupEventLogA(NULL, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = BackupEventLogA(NULL, backup);
@ -337,17 +322,11 @@ static void test_backup(void)
ok(GetFileAttributesA(backup) == INVALID_FILE_ATTRIBUTES, "Expected no backup file\n");
handle = OpenEventLogA(NULL, "Application");
if (!handle && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE))
{
win_skip( "Can't open event log\n" );
return;
}
ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
SetLastError(0xdeadbeef);
ret = BackupEventLogA(handle, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
ret = BackupEventLogA(handle, backup);
if (!ret && GetLastError() == ERROR_PRIVILEGE_NOT_HELD)
@ -356,7 +335,7 @@ static void test_backup(void)
CloseEventLog(handle);
return;
}
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
todo_wine
ok(GetFileAttributesA(backup) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n");
@ -366,7 +345,7 @@ static void test_backup(void)
todo_wine
{
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_ALREADY_EXISTS, "Expected ERROR_ALREADY_EXISTS, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_ALREADY_EXISTS, "Expected ERROR_ALREADY_EXISTS, got %d\n", GetLastError());
}
CloseEventLog(handle);
@ -379,7 +358,7 @@ static void test_backup(void)
ret = BackupEventLogA(handle, backup2);
todo_wine
{
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
ok(GetFileAttributesA(backup2) != INVALID_FILE_ATTRIBUTES, "Expected a backup file\n");
}
@ -399,7 +378,7 @@ static void test_read(void)
ret = ReadEventLogA(NULL, 0, 0, NULL, 0, NULL, NULL);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
read = 0xdeadbeef;
SetLastError(0xdeadbeef);
@ -407,7 +386,7 @@ static void test_read(void)
ok(!ret, "Expected failure\n");
ok(read == 0xdeadbeef, "Expected 'read' parameter to remain unchanged\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
needed = 0xdeadbeef;
SetLastError(0xdeadbeef);
@ -415,26 +394,26 @@ static void test_read(void)
ok(!ret, "Expected failure\n");
ok(needed == 0xdeadbeef, "Expected 'needed' parameter to remain unchanged\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
/* 'read' and 'needed' are only filled when the needed buffer size is passed back or when the call succeeds */
SetLastError(0xdeadbeef);
ret = ReadEventLogA(NULL, 0, 0, NULL, 0, &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, NULL, 0, NULL, NULL);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, NULL, 0, &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
buf = NULL;
SetLastError(0xdeadbeef);
@ -442,7 +421,7 @@ static void test_read(void)
0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
SetLastError(0xdeadbeef);
@ -450,16 +429,10 @@ static void test_read(void)
0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
HeapFree(GetProcessHeap(), 0, buf);
handle = OpenEventLogA(NULL, "Application");
if (!handle && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE))
{
win_skip( "Can't open event log\n" );
return;
}
ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
/* Show that we need the proper dwFlags with a (for the rest) proper call */
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
@ -468,40 +441,40 @@ static void test_read(void)
ret = ReadEventLogA(handle, 0, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ | EVENTLOG_BACKWARDS_READ,
0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ | EVENTLOG_FORWARDS_READ | EVENTLOG_BACKWARDS_READ,
0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, EVENTLOG_SEEK_READ | EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
HeapFree(GetProcessHeap(), 0, buf);
@ -524,7 +497,7 @@ static void test_read(void)
ok(!ret, "Expected failure\n");
ok(read == 0, "Expected no bytes read\n");
ok(needed > sizeof(EVENTLOGRECORD), "Expected the needed buffersize to be bigger than sizeof(EVENTLOGRECORD)\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
/* Read the first record */
toread = needed;
@ -532,7 +505,7 @@ static void test_read(void)
read = needed = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, toread, &read, &needed);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
ok(read == toread ||
broken(read < toread), /* NT4 wants a buffer size way bigger than just 1 record */
"Expected the requested size to be read\n");
@ -552,27 +525,24 @@ static void test_openbackup(void)
SetLastError(0xdeadbeef);
handle = OpenBackupEventLogA(NULL, NULL);
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
handle = OpenBackupEventLogA(NULL, "idontexist.evt");
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == ERROR_FILE_NOT_FOUND ||
GetLastError() == ERROR_ACCESS_DENIED ||
GetLastError() == RPC_S_SERVER_UNAVAILABLE,
"got %ld\n", GetLastError());
ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
handle = OpenBackupEventLogA("IDontExist", NULL);
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
handle = OpenBackupEventLogA("IDontExist", "idontexist.evt");
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE ||
GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */
"Expected RPC_S_SERVER_UNAVAILABLE, got %ld\n", GetLastError());
"Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError());
/* Make a backup eventlog to work with */
if (create_backup(backup))
@ -589,7 +559,7 @@ static void test_openbackup(void)
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == RPC_S_SERVER_UNAVAILABLE ||
GetLastError() == RPC_S_INVALID_NET_ADDR, /* Some Vista and Win7 */
"Expected RPC_S_SERVER_UNAVAILABLE, got %ld\n", GetLastError());
"Expected RPC_S_SERVER_UNAVAILABLE, got %d\n", GetLastError());
/* Empty servername should be read as local server */
handle = OpenBackupEventLogA("", backup);
@ -616,10 +586,8 @@ static void test_openbackup(void)
handle = OpenBackupEventLogA(NULL, backup);
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY ||
GetLastError() == ERROR_ACCESS_DENIED ||
GetLastError() == RPC_S_SERVER_UNAVAILABLE ||
GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT, /* Vista and Win7 */
"got %ld\n", GetLastError());
"Expected ERROR_NOT_ENOUGH_MEMORY, got %d\n", GetLastError());
CloseEventLog(handle);
DeleteFileA(backup);
@ -629,10 +597,7 @@ static void test_openbackup(void)
SetLastError(0xdeadbeef);
handle = OpenBackupEventLogA(NULL, backup);
ok(handle == NULL, "Didn't expect a handle\n");
ok(GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT ||
GetLastError() == ERROR_ACCESS_DENIED ||
GetLastError() == RPC_S_SERVER_UNAVAILABLE,
"got %ld\n", GetLastError());
ok(GetLastError() == ERROR_EVENTLOG_FILE_CORRUPT, "Expected ERROR_EVENTLOG_FILE_CORRUPT, got %d\n", GetLastError());
CloseEventLog(handle);
DeleteFileA(backup);
}
@ -647,7 +612,7 @@ static void test_clear(void)
SetLastError(0xdeadbeef);
ret = ClearEventLogA(NULL, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
/* Make a backup eventlog to work with */
if (!create_backup(backup))
@ -656,7 +621,7 @@ static void test_clear(void)
SetLastError(0xdeadbeef);
ret = ClearEventLogA(NULL, backup);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
handle = OpenBackupEventLogA(NULL, backup);
todo_wine
@ -671,19 +636,19 @@ static void test_clear(void)
*/
ok(GetLastError() == ERROR_INVALID_HANDLE ||
GetLastError() == ERROR_ACCESS_DENIED, /* Vista+ */
"Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
"Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
/* Show that ClearEventLog only works for real eventlogs. */
SetLastError(0xdeadbeef);
ret = ClearEventLogA(handle, backup2);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
ok(GetFileAttributesA(backup2) == INVALID_FILE_ATTRIBUTES, "Expected no backup file\n");
SetLastError(0xdeadbeef);
ret = ClearEventLogA(handle, NULL);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
CloseEventLog(handle);
todo_wine
@ -832,7 +797,7 @@ static void test_readwrite(void)
{
win_skip("Win7 fails when using incorrect event types\n");
ret = ReportEventA(handle, 0, 0, 0, NULL, 0, 0, NULL, NULL);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success : %d\n", GetLastError());
}
else
{
@ -840,7 +805,7 @@ static void test_readwrite(void)
DWORD read, needed = 0;
EVENTLOGRECORD *record;
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success : %d\n", GetLastError());
/* Needed to catch earlier Vista (with no ServicePack for example) */
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
@ -891,22 +856,22 @@ static void test_readwrite(void)
ret = ReportEventA(handle, read_write[i].evt_type, read_write[i].evt_cat,
read_write[i].evt_id, run_sidtests ? user : NULL,
read_write[i].evt_numstrings, 0, read_write[i].evt_strings, NULL);
ok(ret, "Expected ReportEvent success : %ld\n", GetLastError());
ok(ret, "Expected ReportEvent success : %d\n", GetLastError());
count = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = GetNumberOfEventLogRecords(handle, &count);
ok(ret, "Expected GetNumberOfEventLogRecords success : %ld\n", GetLastError());
ok(ret, "Expected GetNumberOfEventLogRecords success : %d\n", GetLastError());
todo_wine
ok(count == (i + 1), "Expected %ld records, got %ld\n", i + 1, count);
ok(count == (i + 1), "Expected %d records, got %d\n", i + 1, count);
oldest = 0xdeadbeef;
ret = GetOldestEventLogRecord(handle, &oldest);
ok(ret, "Expected GetOldestEventLogRecord success : %ld\n", GetLastError());
ok(ret, "Expected GetOldestEventLogRecord success : %d\n", GetLastError());
todo_wine
ok(oldest == 1 ||
(oldest > 1 && oldest != 0xdeadbeef), /* Vista SP1+, W2K8 and Win7 */
"Expected oldest to be 1 or higher, got %ld\n", oldest);
"Expected oldest to be 1 or higher, got %d\n", oldest);
if (oldest > 1 && oldest != 0xdeadbeef)
on_vista = TRUE;
@ -915,15 +880,15 @@ static void test_readwrite(void)
ret = CloseEventLog(handle);
else
ret = DeregisterEventSource(handle);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success : %d\n", GetLastError());
}
handle = OpenEventLogA(NULL, eventlogname);
count = 0xdeadbeef;
ret = GetNumberOfEventLogRecords(handle, &count);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
todo_wine
ok(count == i, "Expected %ld records, got %ld\n", i, count);
ok(count == i, "Expected %d records, got %d\n", i, count);
CloseEventLog(handle);
if (count == 0)
@ -954,7 +919,7 @@ static void test_readwrite(void)
/* Read all events from our created eventlog, one by one */
handle = OpenEventLogA(NULL, eventlogname);
ok(handle != NULL, "Failed to open Event Log, got %ld\n", GetLastError());
ok(handle != NULL, "Failed to open Event Log, got %d\n", GetLastError());
i = 0;
for (;;)
{
@ -974,26 +939,26 @@ static void test_readwrite(void)
if (!ret && GetLastError() != ERROR_INSUFFICIENT_BUFFER)
{
HeapFree(GetProcessHeap(), 0, buf);
ok(GetLastError() == ERROR_HANDLE_EOF, "record %ld, got %ld\n", i, GetLastError());
ok(GetLastError() == ERROR_HANDLE_EOF, "record %d, got %d\n", i, GetLastError());
break;
}
buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed);
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
0, buf, needed, &read, &needed);
ok(ret, "Expected success: %ld\n", GetLastError());
ok(ret, "Expected success: %d\n", GetLastError());
record = (EVENTLOGRECORD *)buf;
ok(record->Length == read,
"Expected %ld, got %ld\n", read, record->Length);
"Expected %d, got %d\n", read, record->Length);
ok(record->Reserved == 0x654c664c,
"Expected 0x654c664c, got %ld\n", record->Reserved);
"Expected 0x654c664c, got %d\n", record->Reserved);
ok(record->RecordNumber == i + 1 ||
(on_vista && (record->RecordNumber > i + 1)),
"Expected %ld or higher, got %ld\n", i + 1, record->RecordNumber);
"Expected %d or higher, got %d\n", i + 1, record->RecordNumber);
ok(record->EventID == read_write[i].evt_id,
"Expected %ld, got %ld\n", read_write[i].evt_id, record->EventID);
"Expected %d, got %d\n", read_write[i].evt_id, record->EventID);
ok(record->EventType == read_write[i].evt_type,
"Expected %d, got %d\n", read_write[i].evt_type, record->EventType);
ok(record->NumStrings == read_write[i].evt_numstrings,
@ -1028,15 +993,15 @@ static void test_readwrite(void)
if (run_sidtests)
{
ok(record->UserSidLength == sidsize, "Expected %ld, got %ld\n", sidsize, record->UserSidLength);
ok(record->UserSidLength == sidsize, "Expected %d, got %d\n", sidsize, record->UserSidLength);
}
else
{
ok(record->StringOffset == record->UserSidOffset, "Expected offsets to be the same\n");
ok(record->UserSidLength == 0, "Expected 0, got %ld\n", record->UserSidLength);
ok(record->UserSidLength == 0, "Expected 0, got %d\n", record->UserSidLength);
}
ok(record->DataLength == 0, "Expected 0, got %ld\n", record->DataLength);
ok(record->DataLength == 0, "Expected 0, got %d\n", record->DataLength);
ptr = (char *)((BYTE *)buf + record->StringOffset);
for (k = 0; k < record->NumStrings; k++)
@ -1055,16 +1020,16 @@ static void test_readwrite(void)
/* Test clearing a real eventlog */
handle = OpenEventLogA(NULL, eventlogname);
ok(handle != NULL, "Failed to open Event Log, got %ld\n", GetLastError());
ok(handle != NULL, "Failed to open Event Log, got %d\n", GetLastError());
SetLastError(0xdeadbeef);
ret = ClearEventLogA(handle, NULL);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(ret, "Expected success\n");
count = 0xdeadbeef;
ret = GetNumberOfEventLogRecords(handle, &count);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(count == 0, "Expected an empty eventlog, got %ld records\n", count);
ok(ret, "Expected success\n");
ok(count == 0, "Expected an empty eventlog, got %d records\n", count);
CloseEventLog(handle);
@ -1111,7 +1076,7 @@ static void test_autocreation(void)
{
char sources_verify[sizeof(eventsources)];
ok(type == REG_MULTI_SZ, "Expected a REG_MULTI_SZ, got %ld\n", type);
ok(type == REG_MULTI_SZ, "Expected a REG_MULTI_SZ, got %d\n", type);
/* Build the expected string */
memset(sources_verify, 0, sizeof(sources_verify));
@ -1124,7 +1089,7 @@ static void test_autocreation(void)
lstrcpyA(p, eventlogname);
ok(!memcmp(sources, sources_verify, size),
"Expected a correct 'Sources' value (size : %ld)\n", size);
"Expected a correct 'Sources' value (size : %d)\n", size);
}
RegCloseKey(eventkey);
@ -1179,13 +1144,13 @@ static void cleanup_eventlog(void)
RegDeleteValueA(key, "Sources");
RegCloseKey(key);
lret = RegDeleteKeyA(HKEY_LOCAL_MACHINE, winesvc);
ok(lret == ERROR_SUCCESS, "Could not delete the registry tree : %ld\n", lret);
ok(lret == ERROR_SUCCESS, "Could not delete the registry tree : %d\n", lret);
/* A handle to the eventlog is locked by services.exe. We can only
* delete the eventlog file after reboot.
*/
bret = MoveFileExA(eventlogfile, NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
ok(bret, "Expected MoveFileEx to succeed: %ld\n", GetLastError());
ok(bret, "Expected MoveFileEx to succeed: %d\n", GetLastError());
}
static void test_trace_event_params(void)
@ -1203,25 +1168,25 @@ static void test_trace_event_params(void)
}
uret = pEventRegister(NULL, NULL, NULL, &reg_handle);
todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventRegister gave wrong error: %#lx\n", uret);
todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventRegister gave wrong error: %#x\n", uret);
uret = pEventRegister(&test_guid, NULL, NULL, NULL);
ok(uret == ERROR_INVALID_PARAMETER, "EventRegister gave wrong error: %#lx\n", uret);
ok(uret == ERROR_INVALID_PARAMETER, "EventRegister gave wrong error: %#x\n", uret);
uret = pEventRegister(&test_guid, NULL, NULL, &reg_handle);
ok(uret == ERROR_SUCCESS, "EventRegister gave wrong error: %#lx\n", uret);
ok(uret == ERROR_SUCCESS, "EventRegister gave wrong error: %#x\n", uret);
uret = pEventWriteString(0, 0, 0, emptyW);
todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventWriteString gave wrong error: %#lx\n", uret);
todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventWriteString gave wrong error: %#x\n", uret);
uret = pEventWriteString(reg_handle, 0, 0, NULL);
todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventWriteString gave wrong error: %#lx\n", uret);
todo_wine ok(uret == ERROR_INVALID_PARAMETER, "EventWriteString gave wrong error: %#x\n", uret);
uret = pEventUnregister(0);
todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventUnregister gave wrong error: %#lx\n", uret);
todo_wine ok(uret == ERROR_INVALID_HANDLE, "EventUnregister gave wrong error: %#x\n", uret);
uret = pEventUnregister(reg_handle);
ok(uret == ERROR_SUCCESS, "EventUnregister gave wrong error: %#lx\n", uret);
ok(uret == ERROR_SUCCESS, "EventUnregister gave wrong error: %#x\n", uret);
}
static void test_start_trace(void)
@ -1248,37 +1213,37 @@ static void test_start_trace(void)
todo_wine
ok(ret == ERROR_BAD_LENGTH ||
ret == ERROR_INVALID_PARAMETER, /* XP and 2k3 */
"Expected ERROR_BAD_LENGTH, got %ld\n", ret);
"Expected ERROR_BAD_LENGTH, got %d\n", ret);
properties->Wnode.BufferSize = buffersize;
ret = StartTraceA(&handle, "this name is too long", properties);
todo_wine
ok(ret == ERROR_BAD_LENGTH, "Expected ERROR_BAD_LENGTH, got %ld\n", ret);
ok(ret == ERROR_BAD_LENGTH, "Expected ERROR_BAD_LENGTH, got %d\n", ret);
ret = StartTraceA(&handle, sessionname, NULL);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret);
ret = StartTraceA(NULL, sessionname, properties);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret);
properties->LogFileNameOffset = 1;
ret = StartTraceA(&handle, sessionname, properties);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret);
properties->LogFileNameOffset = sizeof(EVENT_TRACE_PROPERTIES) + sizeof(sessionname);
properties->LoggerNameOffset = 1;
ret = StartTraceA(&handle, sessionname, properties);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret);
properties->LoggerNameOffset = sizeof(EVENT_TRACE_PROPERTIES);
properties->LogFileMode = EVENT_TRACE_FILE_MODE_SEQUENTIAL | EVENT_TRACE_FILE_MODE_CIRCULAR;
ret = StartTraceA(&handle, sessionname, properties);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret);
properties->LogFileMode = EVENT_TRACE_FILE_MODE_NONE;
/* XP creates a file we can't delete, so change the filepath to something else */
strcpy((char *)properties + properties->LogFileNameOffset, filepath2);
@ -1286,13 +1251,13 @@ static void test_start_trace(void)
properties->Wnode.Guid = SystemTraceControlGuid;
ret = StartTraceA(&handle, sessionname, properties);
todo_wine
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", ret);
ok(ret == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", ret);
memset(&properties->Wnode.Guid, 0, sizeof(properties->Wnode.Guid));
properties->LogFileNameOffset = 0;
ret = StartTraceA(&handle, sessionname, properties);
todo_wine
ok(ret == ERROR_BAD_PATHNAME, "Expected ERROR_BAD_PATHNAME, got %ld\n", ret);
ok(ret == ERROR_BAD_PATHNAME, "Expected ERROR_BAD_PATHNAME, got %d\n", ret);
properties->LogFileNameOffset = sizeof(EVENT_TRACE_PROPERTIES) + sizeof(sessionname);
ret = StartTraceA(&handle, sessionname, properties);
@ -1301,13 +1266,13 @@ static void test_start_trace(void)
skip("need admin rights\n");
goto done;
}
ok(ret == ERROR_SUCCESS, "Expected success, got %ld\n", ret);
ok(ret == ERROR_SUCCESS, "Expected success, got %d\n", ret);
ret = StartTraceA(&handle, sessionname, properties);
todo_wine
ok(ret == ERROR_ALREADY_EXISTS ||
ret == ERROR_SHARING_VIOLATION, /* 2k3 */
"Expected ERROR_ALREADY_EXISTS, got %ld\n", ret);
"Expected ERROR_ALREADY_EXISTS, got %d\n", ret);
/* clean up */
ControlTraceA(handle, sessionname, properties, EVENT_TRACE_CONTROL_STOP);

View File

@ -52,13 +52,13 @@ static void test_lsa(void)
status = LsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle);
ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
"LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx\n", status);
"LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status);
/* try a more restricted access mask if necessary */
if (status == STATUS_ACCESS_DENIED) {
trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES\n");
status = LsaOpenPolicy( NULL, &object_attributes, POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES, &handle);
ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES) returned 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION|POLICY_LOOKUP_NAMES) returned 0x%08x\n", status);
}
if (status == STATUS_SUCCESS) {
@ -73,12 +73,12 @@ static void test_lsa(void)
if (status == STATUS_ACCESS_DENIED)
skip("Not enough rights to retrieve PolicyAuditEventsInformation\n");
else
ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAuditEventsInformation) failed, returned 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAuditEventsInformation) failed, returned 0x%08x\n", status);
if (status == STATUS_SUCCESS)
LsaFreeMemory(audit_events_info);
status = LsaQueryInformationPolicy(handle, PolicyPrimaryDomainInformation, (void **)&primary_domain_info);
ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyPrimaryDomainInformation) failed, returned 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyPrimaryDomainInformation) failed, returned 0x%08x\n", status);
if (status == STATUS_SUCCESS) {
if (primary_domain_info->Sid) {
LPSTR strsid;
@ -105,14 +105,14 @@ static void test_lsa(void)
}
status = LsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (void **)&account_domain_info);
ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) failed, returned 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) failed, returned 0x%08x\n", status);
if (status == STATUS_SUCCESS)
LsaFreeMemory(account_domain_info);
/* This isn't supported in NT4 */
status = LsaQueryInformationPolicy(handle, PolicyDnsDomainInformation, (void **)&dns_domain_info);
ok(status == STATUS_SUCCESS || status == STATUS_INVALID_PARAMETER,
"LsaQueryInformationPolicy(PolicyDnsDomainInformation) failed, returned 0x%08lx\n", status);
"LsaQueryInformationPolicy(PolicyDnsDomainInformation) failed, returned 0x%08x\n", status);
if (status == STATUS_SUCCESS) {
if (dns_domain_info->Sid || !IsEqualGUID(&dns_domain_info->DomainGuid, &GUID_NULL)) {
LPSTR strsid = NULL;
@ -159,15 +159,15 @@ static void test_lsa(void)
/* We need a valid SID to pass to LsaEnumerateAccountRights */
ret = OpenProcessToken( GetCurrentProcess(), TOKEN_QUERY, &token );
ok(ret, "Unable to obtain process token, error %lu\n", GetLastError( ));
ok(ret, "Unable to obtain process token, error %u\n", GetLastError( ));
if (ret) {
char buffer[64];
DWORD len;
TOKEN_USER *token_user = (TOKEN_USER *) buffer;
ret = GetTokenInformation( token, TokenUser, (LPVOID) token_user, sizeof(buffer), &len );
ok(ret || GetLastError( ) == ERROR_INSUFFICIENT_BUFFER, "Unable to obtain token information, error %lu\n", GetLastError( ));
ok(ret || GetLastError( ) == ERROR_INSUFFICIENT_BUFFER, "Unable to obtain token information, error %u\n", GetLastError( ));
if (! ret && GetLastError( ) == ERROR_INSUFFICIENT_BUFFER) {
trace("Resizing buffer to %lu.\n", len);
trace("Resizing buffer to %u.\n", len);
token_user = LocalAlloc( 0, len );
if (token_user != NULL)
ret = GetTokenInformation( token, TokenUser, (LPVOID) token_user, len, &len );
@ -179,7 +179,7 @@ static void test_lsa(void)
rights = (PLSA_UNICODE_STRING) 0xdeadbeaf;
rights_count = 0xcafecafe;
status = LsaEnumerateAccountRights(handle, token_user->User.Sid, &rights, &rights_count);
ok(status == STATUS_SUCCESS || status == STATUS_OBJECT_NAME_NOT_FOUND, "Unexpected status 0x%lx\n", status);
ok(status == STATUS_SUCCESS || status == STATUS_OBJECT_NAME_NOT_FOUND, "Unexpected status 0x%x\n", status);
if (status == STATUS_SUCCESS)
LsaFreeMemory( rights );
else
@ -191,7 +191,7 @@ static void test_lsa(void)
}
status = LsaClose(handle);
ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status);
}
}
@ -208,7 +208,7 @@ static void get_sid_info(PSID psid, LPSTR *user, LPSTR *dom)
user_size = dom_size = 257;
account[0] = domain[0] = 0;
ret = LookupAccountSidA(NULL, psid, account, &user_size, domain, &dom_size, &use);
ok(ret, "LookupAccountSidA failed %lu\n", GetLastError());
ok(ret, "LookupAccountSidA failed %u\n", GetLastError());
}
static void test_LsaLookupNames2(void)
@ -236,14 +236,14 @@ static void test_LsaLookupNames2(void)
status = LsaOpenPolicy(NULL, &attrs, POLICY_ALL_ACCESS, &handle);
ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
"LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx\n", status);
"LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status);
/* try a more restricted access mask if necessary */
if (status == STATUS_ACCESS_DENIED)
{
trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION\n");
status = LsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &handle);
ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08x\n", status);
}
if (status != STATUS_SUCCESS)
{
@ -267,10 +267,10 @@ static void test_LsaLookupNames2(void)
sids = NULL;
domains = NULL;
status = LsaLookupNames2(handle, 0, 1, &name[0], &domains, &sids);
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %lx)\n", status);
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status);
ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use);
ok(sids[0].Flags == 0, "expected 0, got 0x%08lx\n", sids[0].Flags);
ok(domains->Entries == 1, "expected 1, got %lu\n", domains->Entries);
ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags);
ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries);
get_sid_info(sids[0].Sid, &account, &sid_dom);
ok(!strcmp(account, "LOCAL SERVICE"), "expected \"LOCAL SERVICE\", got \"%s\"\n", account);
ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected \"NT AUTHORITY\", got \"%s\"\n", sid_dom);
@ -281,10 +281,10 @@ static void test_LsaLookupNames2(void)
sids = NULL;
domains = NULL;
status = LsaLookupNames2(handle, 0, 1, &name[1], &domains, &sids);
ok(status == STATUS_NONE_MAPPED, "expected STATUS_NONE_MAPPED, got %lx)\n", status);
ok(status == STATUS_NONE_MAPPED, "expected STATUS_NONE_MAPPED, got %x)\n", status);
ok(sids[0].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[0].Use);
ok(sids[0].Flags == 0, "expected 0, got 0x%08lx\n", sids[0].Flags);
ok(domains->Entries == 0, "expected 0, got %lu\n", domains->Entries);
ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags);
ok(domains->Entries == 0, "expected 0, got %u\n", domains->Entries);
LsaFreeMemory(sids);
LsaFreeMemory(domains);
@ -292,10 +292,10 @@ static void test_LsaLookupNames2(void)
sids = NULL;
domains = NULL;
status = LsaLookupNames2(handle, 0, 1, &name[2], &domains, &sids);
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %lx)\n", status);
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status);
ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use);
ok(sids[0].Flags == 0, "expected 0, got 0x%08lx\n", sids[0].Flags);
ok(domains->Entries == 1, "expected 1, got %lu\n", domains->Entries);
ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags);
ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries);
get_sid_info(sids[0].Sid, &account, &sid_dom);
ok(!strcmp(account, "LOCAL SERVICE"), "expected \"LOCAL SERVICE\", got \"%s\"\n", account);
ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected \"NT AUTHORITY\", got \"%s\"\n", sid_dom);
@ -306,12 +306,12 @@ static void test_LsaLookupNames2(void)
sids = NULL;
domains = NULL;
status = LsaLookupNames2(handle, 0, 3, name, &domains, &sids);
ok(status == STATUS_SOME_NOT_MAPPED, "expected STATUS_SOME_NOT_MAPPED, got %lx)\n", status);
ok(status == STATUS_SOME_NOT_MAPPED, "expected STATUS_SOME_NOT_MAPPED, got %x)\n", status);
ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use);
ok(sids[1].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[1].Use);
ok(sids[2].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[2].Use);
ok(sids[0].DomainIndex == 0, "expected 0, got %lu\n", sids[0].DomainIndex);
ok(domains->Entries == 1, "expected 1, got %lu\n", domains->Entries);
ok(sids[0].DomainIndex == 0, "expected 0, got %u\n", sids[0].DomainIndex);
ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries);
LsaFreeMemory(sids);
LsaFreeMemory(domains);
@ -320,15 +320,15 @@ static void test_LsaLookupNames2(void)
HeapFree(GetProcessHeap(), 0, name[2].Buffer);
status = LsaClose(handle);
ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status);
}
static void check_unicode_string_(int line, const LSA_UNICODE_STRING *string, const WCHAR *expect)
{
ok_(__FILE__, line)(string->Length == wcslen(string->Buffer) * sizeof(WCHAR),
"expected %Iu, got %u\n", wcslen(string->Buffer) * sizeof(WCHAR), string->Length);
"expected %u, got %u\n", wcslen(string->Buffer) * sizeof(WCHAR), string->Length);
ok_(__FILE__, line)(string->MaximumLength == string->Length + sizeof(WCHAR),
"expected %Iu, got %u\n", string->Length + sizeof(WCHAR), string->MaximumLength);
"expected %u, got %u\n", string->Length + sizeof(WCHAR), string->MaximumLength);
ok_(__FILE__, line)(!wcsicmp(string->Buffer, expect), "expected %s, got %s\n",
debugstr_w(expect), debugstr_w(string->Buffer));
}
@ -351,30 +351,30 @@ static void test_LsaLookupSids(void)
PSID sid;
status = LsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &policy);
ok(status == STATUS_SUCCESS, "got 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "got 0x%08x\n", status);
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &token);
ok(ret, "OpenProcessToken() failed, error %lu\n", GetLastError());
ok(ret, "OpenProcessToken() failed, error %u\n", GetLastError());
ret = GetTokenInformation(token, TokenUser, user, sizeof(user_buffer), &size);
ok(ret, "GetTokenInformation() failed, error %lu\n", GetLastError());
ok(ret, "GetTokenInformation() failed, error %u\n", GetLastError());
size = ARRAY_SIZE(computer_name);
ret = GetComputerNameW(computer_name, &size);
ok(ret, "GetComputerName() failed, error %lu\n", GetLastError());
ok(ret, "GetComputerName() failed, error %u\n", GetLastError());
size = ARRAY_SIZE(user_name);
ret = GetUserNameW(user_name, &size);
ok(ret, "GetUserName() failed, error %lu\n", GetLastError());
ok(ret, "GetUserName() failed, error %u\n", GetLastError());
status = LsaLookupSids(policy, 1, &user->User.Sid, &list, &names);
ok(status == STATUS_SUCCESS, "got 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "got 0x%08x\n", status);
ok(list->Entries == 1, "got %ld\n", list->Entries);
ok(list->Entries == 1, "got %d\n", list->Entries);
check_unicode_string(&list->Domains[0].Name, computer_name);
ok(names[0].Use == SidTypeUser, "got type %u\n", names[0].Use);
ok(!names[0].DomainIndex, "got index %lu\n", names[0].DomainIndex);
ok(!names[0].DomainIndex, "got index %u\n", names[0].DomainIndex);
check_unicode_string(&names[0].Name, user_name);
LsaFreeMemory(names);
@ -382,16 +382,16 @@ static void test_LsaLookupSids(void)
CloseHandle(token);
ret = ConvertStringSidToSidA("S-1-1-0", &sid);
ok(ret, "ConvertStringSidToSidA() failed, error %lu\n", GetLastError());
ok(ret, "ConvertStringSidToSidA() failed, error %u\n", GetLastError());
status = LsaLookupSids(policy, 1, &sid, &list, &names);
ok(status == STATUS_SUCCESS, "got 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "got 0x%08x\n", status);
ok(list->Entries == 1, "got %ld\n", list->Entries);
ok(list->Entries == 1, "got %d\n", list->Entries);
check_unicode_string(&list->Domains[0].Name, L"");
ok(names[0].Use == SidTypeWellKnownGroup, "got type %u\n", names[0].Use);
ok(!names[0].DomainIndex, "got index %lu\n", names[0].DomainIndex);
ok(!names[0].DomainIndex, "got index %u\n", names[0].DomainIndex);
/* The group name gets translated... but not in all locales */
size = ARRAY_SIZE(langW);
@ -413,15 +413,15 @@ static void test_LsaLookupSids(void)
FreeSid(sid);
ret = ConvertStringSidToSidA("S-1-1234-5678-1234-5678", &sid);
ok(ret, "ConvertStringSidToSidA() failed, error %lu\n", GetLastError());
ok(ret, "ConvertStringSidToSidA() failed, error %u\n", GetLastError());
status = LsaLookupSids(policy, 1, &sid, &list, &names);
ok(status == STATUS_NONE_MAPPED, "got 0x%08lx\n", status);
ok(status == STATUS_NONE_MAPPED, "got 0x%08x\n", status);
ok(!list->Entries, "got %ld\n", list->Entries);
ok(!list->Entries, "got %d\n", list->Entries);
ok(names[0].Use == SidTypeUnknown, "got type %u\n", names[0].Use);
ok(names[0].DomainIndex == -1, "got index %lu\n", names[0].DomainIndex);
ok(names[0].DomainIndex == -1, "got index %u\n", names[0].DomainIndex);
check_unicode_string(&names[0].Name, L"S-1-1234-5678-1234-5678");
LsaFreeMemory(names);
@ -429,7 +429,7 @@ static void test_LsaLookupSids(void)
FreeSid(sid);
status = LsaClose(policy);
ok(status == STATUS_SUCCESS, "got 0x%08lx\n", status);
ok(status == STATUS_SUCCESS, "got 0x%08x\n", status);
}
static void test_LsaLookupPrivilegeName(void)
@ -444,24 +444,24 @@ static void test_LsaLookupPrivilegeName(void)
attrs.Length = sizeof(attrs);
status = LsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &policy);
ok(status == STATUS_SUCCESS, "Failed to open policy, %#lx.\n", status);
ok(status == STATUS_SUCCESS, "Failed to open policy, %#x.\n", status);
name = (void *)0xdeadbeef;
status = LsaLookupPrivilegeName(policy, NULL, &name);
ok(status != STATUS_SUCCESS, "Unexpected status %#lx.\n", status);
ok(status != STATUS_SUCCESS, "Unexpected status %#x.\n", status);
ok(name == (void *)0xdeadbeef, "Unexpected name pointer.\n");
name = (void *)0xdeadbeef;
luid.HighPart = 1;
luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE;
status = LsaLookupPrivilegeName(policy, &luid, &name);
ok(status == STATUS_NO_SUCH_PRIVILEGE, "Unexpected status %#lx.\n", status);
ok(status == STATUS_NO_SUCH_PRIVILEGE, "Unexpected status %#x.\n", status);
ok(name == NULL, "Unexpected name pointer.\n");
luid.HighPart = 0;
luid.LowPart = SE_CREATE_TOKEN_PRIVILEGE;
status = LsaLookupPrivilegeName(policy, &luid, &name);
ok(status == 0, "got %#lx.\n", status);
ok(status == 0, "got %#x.\n", status);
LsaFreeMemory(name);
}
@ -481,11 +481,11 @@ static void test_LsaGetUserName(void)
size = ARRAY_SIZE(user);
ret = GetUserNameW(user, &size);
ok(ret, "GetUserName error %lu\n", GetLastError());
ok(ret, "GetUserName error %u\n", GetLastError());
size = ARRAY_SIZE(computer);
ret = GetComputerNameW(computer, &size);
ok(ret, "GetComputerName error %lu\n", GetLastError());
ok(ret, "GetComputerName error %u\n", GetLastError());
if (0) /* crashes under Windows */
status = pLsaGetUserName(NULL, NULL);
@ -494,12 +494,12 @@ static void test_LsaGetUserName(void)
status = pLsaGetUserName(NULL, &lsa_domain);
status = pLsaGetUserName(&lsa_user, NULL);
ok(!status, "got %#lx\n", status);
ok(!status, "got %#x\n", status);
check_unicode_string(lsa_user, user);
LsaFreeMemory(lsa_user);
status = pLsaGetUserName(&lsa_user, &lsa_domain);
ok(!status, "got %#lx\n", status);
ok(!status, "got %#x\n", status);
ok(!lstrcmpW(user, lsa_user->Buffer), "%s != %s\n", wine_dbgstr_w(user), wine_dbgstr_wn(lsa_user->Buffer, lsa_user->Length/sizeof(WCHAR)));
check_unicode_string(lsa_user, user);
check_unicode_string(lsa_domain, computer);

View File

@ -1,194 +0,0 @@
/*
* Unit tests for Perflib functions
*
* Copyright (c) 2021 Paul Gofman for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "perflib.h"
#include "winperf.h"
#include "wine/test.h"
static ULONG WINAPI test_provider_callback(ULONG code, void *buffer, ULONG size)
{
ok(0, "Provider callback called.\n");
return ERROR_SUCCESS;
}
void test_provider_init(void)
{
static GUID test_set_guid = {0xdeadbeef, 0x0002, 0x0003, {0x0f, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00 ,0x0a}};
static GUID test_set_guid2 = {0xdeadbeef, 0x0003, 0x0003, {0x0f, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00 ,0x0a}};
static GUID test_guid = {0xdeadbeef, 0x0001, 0x0002, {0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00 ,0x0a}};
static struct
{
PERF_COUNTERSET_INFO counterset;
PERF_COUNTER_INFO counter[2];
}
pc_template =
{
{{0}},
{
{1, PERF_COUNTER_COUNTER, PERF_ATTRIB_BY_REFERENCE, sizeof(PERF_COUNTER_INFO),
PERF_DETAIL_NOVICE, 0, 0xdeadbeef},
{2, PERF_COUNTER_COUNTER, PERF_ATTRIB_BY_REFERENCE, sizeof(PERF_COUNTER_INFO),
PERF_DETAIL_NOVICE, 0, 0xdeadbeef},
},
};
PERF_COUNTERSET_INSTANCE *instance;
PERF_PROVIDER_CONTEXT prov_context;
UINT64 counter1, counter2;
HANDLE prov, prov2;
ULONG ret, size;
BOOL bret;
prov = (HANDLE)0xdeadbeef;
ret = PerfStartProvider(NULL, test_provider_callback, &prov);
ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %lu.\n", ret);
ok(prov == (HANDLE)0xdeadbeef, "Got unexpected prov %p.\n", prov);
prov = (HANDLE)0xdeadbeef;
ret = PerfStartProvider(&test_guid, test_provider_callback, NULL);
ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %lu.\n", ret);
ok(prov == (HANDLE)0xdeadbeef, "Got unexpected prov %p.\n", prov);
prov = (HANDLE)0xdeadbeef;
ret = PerfStartProvider(&test_guid, test_provider_callback, &prov);
ok(!ret, "Got unexpected ret %lu.\n", ret);
ok(prov != (HANDLE)0xdeadbeef, "Provider handle is not set.\n");
prov2 = prov;
ret = PerfStartProvider(&test_guid, test_provider_callback, &prov2);
ok(!ret, "Got unexpected ret %lu.\n", ret);
ok(prov2 != prov, "Got the same provider handle.\n");
ret = PerfStopProvider(prov2);
ok(!ret, "Got unexpected ret %lu.\n", ret);
if (0)
{
/* Access violation on Windows. */
PerfStopProvider(prov2);
}
/* Provider handle is a pointer and not a kernel object handle. */
bret = DuplicateHandle(GetCurrentProcess(), prov, GetCurrentProcess(), &prov2, 0, FALSE, DUPLICATE_SAME_ACCESS);
ok(!bret && GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected bret %d, err %lu.\n", bret, GetLastError());
bret = IsBadWritePtr(prov, 8);
ok(!bret, "Handle does not point to the data.\n");
pc_template.counterset.CounterSetGuid = test_set_guid;
pc_template.counterset.ProviderGuid = test_guid;
pc_template.counterset.NumCounters = 0;
pc_template.counterset.InstanceType = PERF_COUNTERSET_SINGLE_INSTANCE;
ret = PerfSetCounterSetInfo(prov, &pc_template.counterset, sizeof(pc_template.counterset));
ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %lu.\n", ret);
pc_template.counterset.CounterSetGuid = test_set_guid;
pc_template.counterset.ProviderGuid = test_guid;
pc_template.counterset.NumCounters = 2;
pc_template.counterset.InstanceType = PERF_COUNTERSET_SINGLE_INSTANCE;
ret = PerfSetCounterSetInfo(prov, &pc_template.counterset, sizeof(pc_template));
ok(!ret, "Got unexpected ret %lu.\n", ret);
pc_template.counterset.CounterSetGuid = test_set_guid2;
/* Looks like ProviderGuid doesn't need to match provider. */
pc_template.counterset.ProviderGuid = test_set_guid;
pc_template.counterset.NumCounters = 1;
pc_template.counterset.InstanceType = PERF_COUNTERSET_SINGLE_INSTANCE;
ret = PerfSetCounterSetInfo(prov, &pc_template.counterset, sizeof(pc_template));
ok(!ret, "Got unexpected ret %lu.\n", ret);
ret = PerfSetCounterSetInfo(prov, &pc_template.counterset, sizeof(pc_template));
ok(ret == ERROR_ALREADY_EXISTS, "Got unexpected ret %lu.\n", ret);
SetLastError(0xdeadbeef);
instance = PerfCreateInstance(prov, NULL, L"1", 1);
ok(!instance, "Got unexpected instance %p.\n", instance);
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %lu.\n", GetLastError());
SetLastError(0xdeadbeef);
instance = PerfCreateInstance(prov, &test_guid, L"1", 1);
ok(!instance, "Got unexpected instance %p.\n", instance);
ok(GetLastError() == ERROR_NOT_FOUND, "Got unexpected error %lu.\n", GetLastError());
SetLastError(0xdeadbeef);
instance = PerfCreateInstance(prov, &test_guid, NULL, 1);
ok(!instance, "Got unexpected instance %p.\n", instance);
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %lu.\n", GetLastError());
SetLastError(0xdeadbeef);
instance = PerfCreateInstance(prov, &test_set_guid, L"11", 1);
ok(!!instance, "Got NULL instance.\n");
ok(GetLastError() == 0xdeadbeef, "Got unexpected error %lu.\n", GetLastError());
ok(instance->InstanceId == 1, "Got unexpected InstanceId %lu.\n", instance->InstanceId);
ok(instance->InstanceNameSize == 6, "Got unexpected InstanceNameSize %lu.\n", instance->InstanceNameSize);
ok(IsEqualGUID(&instance->CounterSetGuid, &test_set_guid), "Got unexpected guid %s.\n",
debugstr_guid(&instance->CounterSetGuid));
ok(instance->InstanceNameOffset == sizeof(*instance) + sizeof(UINT64) * 2,
"Got unexpected InstanceNameOffset %lu.\n", instance->InstanceNameOffset);
ok(!lstrcmpW((WCHAR *)((BYTE *)instance + instance->InstanceNameOffset), L"11"),
"Got unexpected instance name %s.\n",
debugstr_w((WCHAR *)((BYTE *)instance + instance->InstanceNameOffset)));
size = ((sizeof(*instance) + sizeof(UINT64) * 2 + instance->InstanceNameSize) + 7) & ~7;
ok(size == instance->dwSize, "Got unexpected size %lu, instance->dwSize %lu.\n", size, instance->dwSize);
ret = PerfSetCounterRefValue(prov, instance, 1, &counter1);
ok(!ret, "Got unexpected ret %lu.\n", ret);
ret = PerfSetCounterRefValue(prov, instance, 2, &counter2);
ok(!ret, "Got unexpected ret %lu.\n", ret);
ret = PerfSetCounterRefValue(prov, instance, 0, &counter2);
ok(ret == ERROR_NOT_FOUND, "Got unexpected ret %lu.\n", ret);
ok(*(void **)(instance + 1) == &counter1, "Got unexpected counter value %p.\n",
*(void **)(instance + 1));
ok(*(void **)((BYTE *)instance + sizeof(*instance) + sizeof(UINT64)) == &counter2,
"Got unexpected counter value %p.\n", *(void **)(instance + 1));
ret = PerfDeleteInstance(prov, instance);
ok(!ret, "Got unexpected ret %lu.\n", ret);
ret = PerfStopProvider(prov);
ok(!ret, "Got unexpected ret %lu.\n", ret);
memset( &prov_context, 0, sizeof(prov_context) );
prov = (HANDLE)0xdeadbeef;
ret = PerfStartProviderEx( &test_guid, &prov_context, &prov );
ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %lu.\n", ret);
ok(prov == (HANDLE)0xdeadbeef, "Got unexpected prov %p.\n", prov);
prov_context.ContextSize = sizeof(prov_context) + 1;
ret = PerfStartProviderEx( &test_guid, &prov_context, &prov );
ok(!ret, "Got unexpected ret %lu.\n", ret);
ok(prov != (HANDLE)0xdeadbeef, "Provider handle is not set.\n");
ret = PerfStopProvider(prov);
ok(!ret, "Got unexpected ret %lu.\n", ret);
}
START_TEST(perf)
{
test_provider_init();
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmi);
ULONG WMIAPI WmiExecuteMethodA(WMIHANDLE handle, const char *name, ULONG method, ULONG inputsize,
void *inputbuffer, ULONG *outputsize, void *outputbuffer)
{
FIXME(" %p %s %lu %lu %p %p %p: stub\n", handle, debugstr_a(name), method, inputsize, inputbuffer,
FIXME(" %p %s %u %u %p %p %p: stub\n", handle, debugstr_a(name), method, inputsize, inputbuffer,
outputsize, outputbuffer);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -52,7 +52,7 @@ ULONG WMIAPI WmiExecuteMethodA(WMIHANDLE handle, const char *name, ULONG method,
ULONG WMIAPI WmiExecuteMethodW(WMIHANDLE handle, const WCHAR *name, ULONG method, ULONG inputsize,
void *inputbuffer, ULONG *outputsize, void *outputbuffer)
{
FIXME("%p %s %lu %lu %p %p %p: stub\n", handle, debugstr_w(name), method, inputsize, inputbuffer,
FIXME("%p %s %u %u %p %p %p: stub\n", handle, debugstr_w(name), method, inputsize, inputbuffer,
outputsize, outputbuffer);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -89,7 +89,7 @@ ULONG WMIAPI WmiMofEnumerateResourcesW(MOFHANDLE handle, ULONG *count, MOFRESOUR
ULONG WMIAPI WmiNotificationRegistrationA(GUID *guid, BOOLEAN enable, void *info,
ULONG_PTR context, ULONG flags)
{
FIXME("%s %u %p 0x%Ix 0x%08lx: stub\n", debugstr_guid(guid), enable, info, context, flags);
FIXME("%s %u %p 0x%lx 0x%08x: stub\n", debugstr_guid(guid), enable, info, context, flags);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -99,7 +99,7 @@ ULONG WMIAPI WmiNotificationRegistrationA(GUID *guid, BOOLEAN enable, void *info
ULONG WMIAPI WmiNotificationRegistrationW(GUID *guid, BOOLEAN enable, void *info,
ULONG_PTR context, ULONG flags)
{
FIXME("%s %u %p 0x%Ix 0x%08lx: stub\n", debugstr_guid(guid), enable, info, context, flags);
FIXME("%s %u %p 0x%lx 0x%08x: stub\n", debugstr_guid(guid), enable, info, context, flags);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -108,7 +108,7 @@ ULONG WMIAPI WmiNotificationRegistrationW(GUID *guid, BOOLEAN enable, void *info
*/
ULONG WINAPI WmiOpenBlock(GUID *guid, ULONG access, WMIHANDLE *handle)
{
FIXME("%s %lu %p: stub\n", debugstr_guid(guid), access, handle);
FIXME("%s %u %p: stub\n", debugstr_guid(guid), access, handle);
return ERROR_SUCCESS;
}
@ -145,7 +145,7 @@ ULONG WMIAPI WmiQueryGuidInformation(WMIHANDLE handle, WMIGUIDINFORMATION *info)
ULONG WMIAPI WmiSetSingleInstanceA(WMIHANDLE handle, const char *name, ULONG reserved,
ULONG size, void *buffer)
{
FIXME("%p %s %lu %lu %p: stub\n", handle, debugstr_a(name), reserved, size, buffer);
FIXME("%p %s %u %u %p: stub\n", handle, debugstr_a(name), reserved, size, buffer);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -155,7 +155,7 @@ ULONG WMIAPI WmiSetSingleInstanceA(WMIHANDLE handle, const char *name, ULONG res
ULONG WMIAPI WmiSetSingleInstanceW(WMIHANDLE handle, const WCHAR *name, ULONG reserved,
ULONG size, void *buffer)
{
FIXME("%p %s %lu %lu %p: stub\n", handle, debugstr_w(name), reserved, size, buffer);
FIXME("%p %s %u %u %p: stub\n", handle, debugstr_w(name), reserved, size, buffer);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -165,7 +165,7 @@ ULONG WMIAPI WmiSetSingleInstanceW(WMIHANDLE handle, const WCHAR *name, ULONG re
ULONG WMIAPI WmiSetSingleItemA(WMIHANDLE handle, const char *name, ULONG id, ULONG reserved,
ULONG size, void *buffer)
{
FIXME("%p %s %lu %lu %lu %p: stub\n", handle, debugstr_a(name), id, reserved, size, buffer);
FIXME("%p %s %u %u %u %p: stub\n", handle, debugstr_a(name), id, reserved, size, buffer);
return ERROR_CALL_NOT_IMPLEMENTED;
}
@ -175,6 +175,6 @@ ULONG WMIAPI WmiSetSingleItemA(WMIHANDLE handle, const char *name, ULONG id, ULO
ULONG WMIAPI WmiSetSingleItemW(WMIHANDLE handle, const WCHAR *name, ULONG id, ULONG reserved,
ULONG size, void *buffer)
{
FIXME("%p %s %lu %lu %lu %p: stub\n", handle, debugstr_w(name), id, reserved, size, buffer);
FIXME("%p %s %u %u %u %p: stub\n", handle, debugstr_w(name), id, reserved, size, buffer);
return ERROR_CALL_NOT_IMPLEMENTED;
}

View File

@ -2,6 +2,8 @@ MODULE = advpack.dll
IMPORTLIB = advpack
IMPORTS = ole32 setupapi version advapi32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
advpack.c \
files.c \

View File

@ -213,7 +213,7 @@ BOOL WINAPI IsNTAdmin(DWORD reserved, LPDWORD pReserved)
HANDLE hToken;
PSID pSid;
TRACE("(%ld, %p)\n", reserved, pReserved);
TRACE("(%d, %p)\n", reserved, pReserved);
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
return FALSE;
@ -295,7 +295,7 @@ DWORD WINAPI NeedRebootInit(VOID)
*/
BOOL WINAPI NeedReboot(DWORD dwRebootCheck)
{
FIXME("(%ld): stub\n", dwRebootCheck);
FIXME("(%d): stub\n", dwRebootCheck);
return FALSE;
}
@ -310,7 +310,7 @@ HRESULT WINAPI OpenINFEngineA(LPCSTR pszInfFilename, LPCSTR pszInstallSection,
UNICODE_STRING filenameW, installW;
HRESULT res;
TRACE("(%s, %s, %ld, %p, %p)\n", debugstr_a(pszInfFilename),
TRACE("(%s, %s, %d, %p, %p)\n", debugstr_a(pszInfFilename),
debugstr_a(pszInstallSection), dwFlags, phInf, pvReserved);
if (!pszInfFilename || !phInf)
@ -348,7 +348,7 @@ HRESULT WINAPI OpenINFEngineA(LPCSTR pszInfFilename, LPCSTR pszInstallSection,
HRESULT WINAPI OpenINFEngineW(LPCWSTR pszInfFilename, LPCWSTR pszInstallSection,
DWORD dwFlags, HINF *phInf, PVOID pvReserved)
{
TRACE("(%s, %s, %ld, %p, %p)\n", debugstr_w(pszInfFilename),
TRACE("(%s, %s, %d, %p, %p)\n", debugstr_w(pszInfFilename),
debugstr_w(pszInstallSection), dwFlags, phInf, pvReserved);
if (!pszInfFilename || !phInf)
@ -374,7 +374,7 @@ HRESULT WINAPI RebootCheckOnInstallA(HWND hWnd, LPCSTR pszINF,
UNICODE_STRING infW, secW;
HRESULT res;
TRACE("(%p, %s, %s, %ld)\n", hWnd, debugstr_a(pszINF),
TRACE("(%p, %s, %s, %d)\n", hWnd, debugstr_a(pszINF),
debugstr_a(pszSec), dwReserved);
if (!pszINF || !pszSec)
@ -417,7 +417,7 @@ HRESULT WINAPI RebootCheckOnInstallA(HWND hWnd, LPCSTR pszINF,
HRESULT WINAPI RebootCheckOnInstallW(HWND hWnd, LPCWSTR pszINF,
LPCWSTR pszSec, DWORD dwReserved)
{
FIXME("(%p, %s, %s, %ld): stub\n", hWnd, debugstr_w(pszINF),
FIXME("(%p, %s, %s, %d): stub\n", hWnd, debugstr_w(pszINF),
debugstr_w(pszSec), dwReserved);
return E_FAIL;
@ -616,7 +616,7 @@ HRESULT WINAPI TranslateInfStringA(LPCSTR pszInfFilename, LPCSTR pszInstallSecti
HRESULT res;
DWORD len = 0;
TRACE("(%s, %s, %s, %s, %p, %ld, %p, %p)\n",
TRACE("(%s, %s, %s, %s, %p, %d, %p, %p)\n",
debugstr_a(pszInfFilename), debugstr_a(pszInstallSection),
debugstr_a(pszTranslateSection), debugstr_a(pszTranslateKey),
pszBuffer, dwBufferSize,pdwRequiredSize, pvReserved);
@ -693,7 +693,7 @@ HRESULT WINAPI TranslateInfStringW(LPCWSTR pszInfFilename, LPCWSTR pszInstallSec
HINF hInf;
HRESULT hret = S_OK;
TRACE("(%s, %s, %s, %s, %p, %ld, %p, %p)\n",
TRACE("(%s, %s, %s, %s, %p, %d, %p, %p)\n",
debugstr_w(pszInfFilename), debugstr_w(pszInstallSection),
debugstr_w(pszTranslateSection), debugstr_w(pszTranslateKey),
pszBuffer, dwBufferSize,pdwRequiredSize, pvReserved);
@ -736,7 +736,7 @@ HRESULT WINAPI TranslateInfStringExA(HINF hInf, LPCSTR pszInfFilename,
HRESULT res;
DWORD len = 0;
TRACE("(%p, %s, %s, %s, %p, %ld, %p, %p)\n", hInf, debugstr_a(pszInfFilename),
TRACE("(%p, %s, %s, %s, %p, %d, %p, %p)\n", hInf, debugstr_a(pszInfFilename),
debugstr_a(pszTranslateSection), debugstr_a(pszTranslateKey),
pszBuffer, dwBufferSize, pdwRequiredSize, pvReserved);
@ -816,7 +816,7 @@ HRESULT WINAPI TranslateInfStringExW(HINF hInf, LPCWSTR pszInfFilename,
LPWSTR pszBuffer, DWORD dwBufferSize,
PDWORD pdwRequiredSize, PVOID pvReserved)
{
TRACE("(%p, %s, %s, %s, %p, %ld, %p, %p)\n", hInf, debugstr_w(pszInfFilename),
TRACE("(%p, %s, %s, %s, %p, %d, %p, %p)\n", hInf, debugstr_w(pszInfFilename),
debugstr_w(pszTranslateSection), debugstr_w(pszTranslateKey),
pszBuffer, dwBufferSize, pdwRequiredSize, pvReserved);

View File

@ -11,6 +11,7 @@
@ stdcall DelNodeRunDLL32A(ptr ptr str long)
@ stdcall DelNodeRunDLL32W(ptr ptr wstr long)
@ stdcall DelNodeW(wstr long)
@ stdcall -private DllMain(long long ptr)
@ stdcall DoInfInstall(ptr)
@ stdcall ExecuteCab(ptr ptr ptr) ExecuteCabA
@ stdcall ExecuteCabA(ptr ptr ptr)

View File

@ -64,7 +64,7 @@ HRESULT WINAPI AddDelBackupEntryA(LPCSTR lpcszFileList, LPCSTR lpcszBackupDir,
LPCWSTR backup;
HRESULT res;
TRACE("(%s, %s, %s, %ld)\n", debugstr_a(lpcszFileList),
TRACE("(%s, %s, %s, %d)\n", debugstr_a(lpcszFileList),
debugstr_a(lpcszBackupDir), debugstr_a(lpcszBaseName), dwFlags);
if (lpcszFileList)
@ -120,7 +120,7 @@ HRESULT WINAPI AddDelBackupEntryW(LPCWSTR lpcszFileList, LPCWSTR lpcszBackupDir,
WCHAR szIniPath[MAX_PATH];
LPCWSTR szString = NULL;
TRACE("(%s, %s, %s, %ld)\n", debugstr_w(lpcszFileList),
TRACE("(%s, %s, %s, %d)\n", debugstr_w(lpcszFileList),
debugstr_w(lpcszBackupDir), debugstr_w(lpcszBaseName), dwFlags);
if (!lpcszFileList || !*lpcszFileList)
@ -193,7 +193,7 @@ HRESULT WINAPI AdvInstallFileA(HWND hwnd, LPCSTR lpszSourceDir, LPCSTR lpszSourc
UNICODE_STRING destdir, destfile;
HRESULT res;
TRACE("(%p, %s, %s, %s, %s, %ld, %ld)\n", hwnd, debugstr_a(lpszSourceDir),
TRACE("(%p, %s, %s, %s, %s, %d, %d)\n", hwnd, debugstr_a(lpszSourceDir),
debugstr_a(lpszSourceFile), debugstr_a(lpszDestDir),
debugstr_a(lpszDestFile), dwFlags, dwReserved);
@ -250,7 +250,7 @@ HRESULT WINAPI AdvInstallFileW(HWND hwnd, LPCWSTR lpszSourceDir, LPCWSTR lpszSou
HSPFILEQ fileQueue;
PVOID pContext;
TRACE("(%p, %s, %s, %s, %s, %ld, %ld)\n", hwnd, debugstr_w(lpszSourceDir),
TRACE("(%p, %s, %s, %s, %s, %d, %d)\n", hwnd, debugstr_w(lpszSourceDir),
debugstr_w(lpszSourceFile), debugstr_w(lpszDestDir),
debugstr_w(lpszDestFile), dwFlags, dwReserved);
@ -387,7 +387,7 @@ HRESULT WINAPI DelNodeA(LPCSTR pszFileOrDirName, DWORD dwFlags)
UNICODE_STRING fileordirname;
HRESULT res;
TRACE("(%s, %ld)\n", debugstr_a(pszFileOrDirName), dwFlags);
TRACE("(%s, %d)\n", debugstr_a(pszFileOrDirName), dwFlags);
RtlCreateUnicodeStringFromAsciiz(&fileordirname, pszFileOrDirName);
@ -421,7 +421,7 @@ HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
WCHAR fname[MAX_PATH];
HRESULT ret = E_FAIL;
TRACE("(%s, %ld)\n", debugstr_w(pszFileOrDirName), dwFlags);
TRACE("(%s, %d)\n", debugstr_w(pszFileOrDirName), dwFlags);
if (dwFlags)
FIXME("Flags ignored!\n");
@ -682,7 +682,7 @@ HRESULT WINAPI ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags,
DWORD dwFilesFound = 0;
LPSTR szConvertedList = NULL;
TRACE("(%s, %s, %ld, %s, %p, %ld)\n", debugstr_a(CabName), debugstr_a(ExpandDir),
TRACE("(%s, %s, %d, %s, %p, %d)\n", debugstr_a(CabName), debugstr_a(ExpandDir),
Flags, debugstr_a(FileList), LReserved, Reserved);
if (!CabName || !ExpandDir)
@ -770,7 +770,7 @@ HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags,
char *cab_name = NULL, *expand_dir = NULL, *file_list = NULL;
HRESULT hres = S_OK;
TRACE("(%s, %s, %ld, %s, %p, %ld)\n", debugstr_w(CabName), debugstr_w(ExpandDir),
TRACE("(%s, %s, %d, %s, %p, %d)\n", debugstr_w(CabName), debugstr_w(ExpandDir),
Flags, debugstr_w(FileList), LReserved, Reserved);
if(CabName) {
@ -849,7 +849,7 @@ HRESULT WINAPI FileSaveRestoreA(HWND hDlg, LPSTR pszFileList, LPSTR pszDir,
UNICODE_STRING filelist, dir, basename;
HRESULT hr;
TRACE("(%p, %s, %s, %s, %ld)\n", hDlg, debugstr_a(pszFileList),
TRACE("(%p, %s, %s, %s, %d)\n", hDlg, debugstr_a(pszFileList),
debugstr_a(pszDir), debugstr_a(pszBaseName), dwFlags);
RtlCreateUnicodeStringFromAsciiz(&filelist, pszFileList);
@ -891,7 +891,7 @@ HRESULT WINAPI FileSaveRestoreA(HWND hDlg, LPSTR pszFileList, LPSTR pszDir,
HRESULT WINAPI FileSaveRestoreW(HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir,
LPWSTR pszBaseName, DWORD dwFlags)
{
FIXME("(%p, %s, %s, %s, %ld) stub\n", hDlg, debugstr_w(pszFileList),
FIXME("(%p, %s, %s, %s, %d) stub\n", hDlg, debugstr_w(pszFileList),
debugstr_w(pszDir), debugstr_w(pszBaseName), dwFlags);
return E_FAIL;
@ -910,7 +910,7 @@ HRESULT WINAPI FileSaveRestoreOnINFA(HWND hWnd, LPCSTR pszTitle, LPCSTR pszINF,
UNICODE_STRING backupdir, backupfile;
HRESULT hr;
TRACE("(%p, %s, %s, %s, %s, %s, %ld)\n", hWnd, debugstr_a(pszTitle),
TRACE("(%p, %s, %s, %s, %s, %s, %d)\n", hWnd, debugstr_a(pszTitle),
debugstr_a(pszINF), debugstr_a(pszSection), debugstr_a(pszBackupDir),
debugstr_a(pszBaseBackupFile), dwFlags);
@ -959,7 +959,7 @@ HRESULT WINAPI FileSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF
LPCWSTR pszSection, LPCWSTR pszBackupDir,
LPCWSTR pszBaseBackupFile, DWORD dwFlags)
{
FIXME("(%p, %s, %s, %s, %s, %s, %ld): stub\n", hWnd, debugstr_w(pszTitle),
FIXME("(%p, %s, %s, %s, %s, %s, %d): stub\n", hWnd, debugstr_w(pszTitle),
debugstr_w(pszINF), debugstr_w(pszSection), debugstr_w(pszBackupDir),
debugstr_w(pszBaseBackupFile), dwFlags);

View File

@ -913,7 +913,7 @@ HRESULT WINAPI RunSetupCommandA(HWND hWnd, LPCSTR szCmdName,
UNICODE_STRING dir, title;
HRESULT hr;
TRACE("(%p, %s, %s, %s, %s, %p, %ld, %p)\n",
TRACE("(%p, %s, %s, %s, %s, %p, %d, %p)\n",
hWnd, debugstr_a(szCmdName), debugstr_a(szInfSection),
debugstr_a(szDir), debugstr_a(lpszTitle),
phEXE, dwFlags, pvReserved);
@ -970,7 +970,7 @@ HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName,
ADVInfo info;
HRESULT hr;
TRACE("(%p, %s, %s, %s, %s, %p, %ld, %p)\n",
TRACE("(%p, %s, %s, %s, %s, %p, %d, %p)\n",
hWnd, debugstr_w(szCmdName), debugstr_w(szInfSection),
debugstr_w(szDir), debugstr_w(lpszTitle),
phEXE, dwFlags, pvReserved);

View File

@ -314,7 +314,7 @@ HRESULT WINAPI RegSaveRestoreA(HWND hWnd, LPCSTR pszTitleString, HKEY hkBackupKe
UNICODE_STRING title, root, subkey, value;
HRESULT hr;
TRACE("(%p, %s, %p, %s, %s, %s, %ld)\n", hWnd, debugstr_a(pszTitleString),
TRACE("(%p, %s, %p, %s, %s, %s, %d)\n", hWnd, debugstr_a(pszTitleString),
hkBackupKey, debugstr_a(pcszRootKey), debugstr_a(pcszSubKey),
debugstr_a(pcszValueName), dwFlags);
@ -359,7 +359,7 @@ HRESULT WINAPI RegSaveRestoreW(HWND hWnd, LPCWSTR pszTitleString, HKEY hkBackupK
LPCWSTR pcszRootKey, LPCWSTR pcszSubKey,
LPCWSTR pcszValueName, DWORD dwFlags)
{
FIXME("(%p, %s, %p, %s, %s, %s, %ld): stub\n", hWnd, debugstr_w(pszTitleString),
FIXME("(%p, %s, %p, %s, %s, %s, %d): stub\n", hWnd, debugstr_w(pszTitleString),
hkBackupKey, debugstr_w(pcszRootKey), debugstr_w(pcszSubKey),
debugstr_w(pcszValueName), dwFlags);
@ -378,7 +378,7 @@ HRESULT WINAPI RegSaveRestoreOnINFA(HWND hWnd, LPCSTR pszTitle, LPCSTR pszINF,
UNICODE_STRING title, inf, section;
HRESULT hr;
TRACE("(%p, %s, %s, %s, %p, %p, %ld)\n", hWnd, debugstr_a(pszTitle),
TRACE("(%p, %s, %s, %s, %p, %p, %d)\n", hWnd, debugstr_a(pszTitle),
debugstr_a(pszINF), debugstr_a(pszSection),
hHKLMBackKey, hHKCUBackKey, dwFlags);
@ -421,7 +421,7 @@ HRESULT WINAPI RegSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF,
LPCWSTR pszSection, HKEY hHKLMBackKey,
HKEY hHKCUBackKey, DWORD dwFlags)
{
FIXME("(%p, %s, %s, %s, %p, %p, %ld): stub\n", hWnd, debugstr_w(pszTitle),
FIXME("(%p, %s, %s, %s, %p, %p, %d): stub\n", hWnd, debugstr_w(pszTitle),
debugstr_w(pszINF), debugstr_w(pszSection),
hHKLMBackKey, hHKCUBackKey, dwFlags);

View File

@ -99,28 +99,28 @@ static void version_test(void)
major = minor = 0;
hr = pGetVersionFromFile("kernel32.dll", &major, &minor, FALSE);
ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
"0x%08lx\n", hr);
trace("kernel32.dll Language ID: 0x%08lx, Codepage ID: 0x%08lx\n",
"0x%08x\n", hr);
trace("kernel32.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n",
major, minor);
major = minor = 0;
hr = pGetVersionFromFile("kernel32.dll", &major, &minor, TRUE);
ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
"0x%08lx\n", hr);
"0x%08x\n", hr);
trace("kernel32.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
HIWORD(minor), LOWORD(minor));
major = minor = 0;
hr = pGetVersionFromFile("advpack.dll", &major, &minor, FALSE);
ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned "
"0x%08lx\n", hr);
trace("advpack.dll Language ID: 0x%08lx, Codepage ID: 0x%08lx\n",
"0x%08x\n", hr);
trace("advpack.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n",
major, minor);
major = minor = 0;
hr = pGetVersionFromFile("advpack.dll", &major, &minor, TRUE);
ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned "
"0x%08lx\n", hr);
"0x%08x\n", hr);
trace("advpack.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
HIWORD(minor), LOWORD(minor));
}
@ -191,12 +191,12 @@ static void delnode_test(void)
static void WINAPIV append_str(char **str, const char *data, ...)
{
va_list valist;
__ms_va_list valist;
va_start(valist, data);
__ms_va_start(valist, data);
vsprintf(*str, data, valist);
*str += strlen(*str);
va_end(valist);
__ms_va_end(valist);
}
static void create_inf_file(void)
@ -278,7 +278,7 @@ static void translateinfstring_test(void)
}
ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr);
ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
ok(dwSize == 25, "Expected size 25, got %ld\n", dwSize);
ok(dwSize == 25, "Expected size 25, got %d\n", dwSize);
buffer[0] = 0;
/* try other nonexistent section */
@ -304,7 +304,7 @@ static void translateinfstring_test(void)
if(hr == ERROR_SUCCESS)
{
ok(!strcmp(buffer, APP_PATH), "Expected '%s', got '%s'\n", APP_PATH, buffer);
ok(dwSize == APP_PATH_LEN, "Expected size %ld, got %ld\n", APP_PATH_LEN, dwSize);
ok(dwSize == APP_PATH_LEN, "Expected size %d, got %d\n", APP_PATH_LEN, dwSize);
}
buffer[0] = 0;
@ -315,7 +315,7 @@ static void translateinfstring_test(void)
todo_wine
{
ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
ok(dwSize == 25, "Expected size 25, got %ld\n", dwSize);
ok(dwSize == 25, "Expected size 25, got %d\n", dwSize);
}
DeleteFileA("c:\\a.inf");
@ -342,31 +342,31 @@ static void translateinfstringex_test(void)
/* try a NULL filename */
hr = pOpenINFEngine(NULL, "Options.NTx86", 0, &hinf, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
/* try an empty filename */
hr = pOpenINFEngine("", "Options.NTx86", 0, &hinf, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) /* NT+ */ ||
hr == HRESULT_FROM_WIN32(E_UNEXPECTED) /* 9x */,
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND or E_UNEXPECTED), got %08lx\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND or E_UNEXPECTED), got %08x\n", hr);
/* try a NULL hinf */
hr = pOpenINFEngine(inf_file, "Options.NTx86", 0, NULL, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
/* open the INF without the Install section specified */
hr = pOpenINFEngine(inf_file, NULL, 0, &hinf, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
/* try a NULL hinf */
hr = pTranslateInfStringEx(NULL, inf_file, "Options.NTx86", "InstallDir",
buffer, size, &size, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
/* try a NULL filename */
hr = pTranslateInfStringEx(hinf, NULL, "Options.NTx86", "InstallDir",
buffer, size, &size, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
/* try an empty filename */
memset(buffer, 'a', 25);
@ -374,32 +374,32 @@ static void translateinfstringex_test(void)
size = MAX_PATH;
hr = pTranslateInfStringEx(hinf, "", "Options.NTx86", "InstallDir",
buffer, size, &size, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
todo_wine
{
ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
ok(size == 25, "Expected size 25, got %ld\n", size);
ok(size == 25, "Expected size 25, got %d\n", size);
}
/* try a NULL translate section */
hr = pTranslateInfStringEx(hinf, inf_file, NULL, "InstallDir",
buffer, size, &size, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
/* try an empty translate section */
hr = pTranslateInfStringEx(hinf, inf_file, "", "InstallDir",
buffer, size, &size, NULL);
ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08lx\n", hr);
ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr);
/* try a NULL translate key */
hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", NULL,
buffer, size, &size, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
/* try an empty translate key */
hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "",
buffer, size, &size, NULL);
ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08lx\n", hr);
ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr);
/* successfully translate the string */
memset(buffer, 'a', 25);
@ -407,20 +407,20 @@ static void translateinfstringex_test(void)
size = MAX_PATH;
hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "InstallDir",
buffer, size, &size, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
todo_wine
{
ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
ok(size == 25, "Expected size 25, got %ld\n", size);
ok(size == 25, "Expected size 25, got %d\n", size);
}
/* try a NULL hinf */
hr = pCloseINFEngine(NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08lx\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
/* successfully close the hinf */
hr = pCloseINFEngine(hinf);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
/* open the inf with the install section */
hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL);
@ -430,7 +430,7 @@ static void translateinfstringex_test(void)
DeleteFileA(inf_file);
return;
}
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
/* translate the string with the install section specified */
memset(buffer, 'a', APP_PATH_LEN);
@ -438,9 +438,9 @@ static void translateinfstringex_test(void)
size = MAX_PATH;
hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "InstallDir",
buffer, size, &size, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(!strcmp(buffer, APP_PATH), "Expected %s, got %s\n", APP_PATH, buffer);
ok(size == APP_PATH_LEN, "Expected size %ld, got %ld\n", APP_PATH_LEN, size);
ok(size == APP_PATH_LEN, "Expected size %d, got %d\n", APP_PATH_LEN, size);
/* Single quote test (Note size includes null on return from call) */
memset(buffer, 'a', APP_PATH_LEN);
@ -448,10 +448,10 @@ static void translateinfstringex_test(void)
size = MAX_PATH;
hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result1",
buffer, size, &size, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(!lstrcmpiA(buffer, PROG_FILES_ROOT),
"Expected %s, got %s\n", PROG_FILES_ROOT, buffer);
ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %ld\n",
ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n",
lstrlenA(PROG_FILES_ROOT)+1, size);
memset(buffer, 'a', APP_PATH_LEN);
@ -459,10 +459,10 @@ static void translateinfstringex_test(void)
size = MAX_PATH;
hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result2",
buffer, size, &size, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(!lstrcmpiA(buffer, PROG_FILES_ROOT),
"Expected %s, got %s\n", PROG_FILES_ROOT, buffer);
ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %ld\n",
ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n",
lstrlenA(PROG_FILES_ROOT)+1, size);
{
@ -475,16 +475,16 @@ static void translateinfstringex_test(void)
size = MAX_PATH;
hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result3",
buffer, size, &size, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(!lstrcmpiA(buffer, drive),
"Expected %s, got %s\n", drive, buffer);
ok(size == strlen(drive)+1, "Expected size %d, got %ld\n",
ok(size == strlen(drive)+1, "Expected size %d, got %d\n",
lstrlenA(drive)+1, size);
}
/* close the INF again */
hr = pCloseINFEngine(hinf);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
DeleteFileA(inf_file);
@ -525,7 +525,7 @@ static void translateinfstringex_test(void)
/* open the inf with the install section */
hr = pOpenINFEngine(inf_file, "section", 0, &hinf, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
/* Single quote test (Note size includes null on return from call) */
memset(buffer, 'a', APP_PATH_LEN);
@ -533,15 +533,15 @@ static void translateinfstringex_test(void)
size = MAX_PATH;
hr = pTranslateInfStringEx(hinf, inf_file, "Options.NTx86", "Result2",
buffer, size, &size, NULL);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(!lstrcmpiA(buffer, PROG_FILES_ROOT),
"Expected %s, got %s\n", PROG_FILES_ROOT, buffer);
ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %ld\n",
ok(size == strlen(PROG_FILES_ROOT)+1, "Expected size %d, got %d\n",
lstrlenA(PROG_FILES_ROOT)+1, size);
/* close the INF again */
hr = pCloseINFEngine(hinf);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
DeleteFileA(inf_file);
}
@ -588,14 +588,14 @@ static void setperusersecvalues_test(void)
/* This crashes on systems with IE7 */
hr = pSetPerUserSecValues(NULL);
todo_wine
ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
}
/* at the very least, szGUID must be valid */
peruser.szGUID[0] = '\0';
hr = pSetPerUserSecValues(&peruser);
ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
/* set initial values */
@ -606,7 +606,7 @@ static void setperusersecvalues_test(void)
skip("SetPerUserSecValues is broken\n");
return;
}
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(OPEN_GUID_KEY(), "Expected guid key to exist\n");
ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
@ -623,7 +623,7 @@ static void setperusersecvalues_test(void)
/* raise the version, but bRollback is FALSE, so vals not saved */
lstrcpyA(peruser.szVersion, "2,1,1,1");
hr = pSetPerUserSecValues(&peruser);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
@ -640,7 +640,7 @@ static void setperusersecvalues_test(void)
peruser.bRollback = TRUE;
lstrcpyA(peruser.szVersion, "3,1,1,1");
hr = pSetPerUserSecValues(&peruser);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");

View File

@ -111,7 +111,7 @@ static void test_AddDelBackupEntry(void)
/* try a NULL file list */
res = pAddDelBackupEntry(NULL, "backup", "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %ld\n", res);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(!DeleteFileA(path), "Expected path to not exist\n");
lstrcpyA(path, CURR_DIR);
@ -119,7 +119,7 @@ static void test_AddDelBackupEntry(void)
/* try an empty base name */
res = pAddDelBackupEntry("one\0two\0three\0", "backup", "", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %ld\n", res);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(!DeleteFileA(path), "Expected path to not exist\n");
lstrcpyA(path, CURR_DIR);
@ -127,14 +127,14 @@ static void test_AddDelBackupEntry(void)
/* try an invalid flag */
res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", 0);
ok(res == S_OK, "Expected S_OK, got %ld\n", res);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(!DeleteFileA(path), "Expected path to not exist\n");
lstrcpyA(path, "c:\\basename.INI");
/* create the INF file */
res = pAddDelBackupEntry("one\0two\0three\0", "c:\\", "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %ld\n", res);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
if (GetFileAttributesA(path) != INVALID_FILE_ATTRIBUTES)
{
ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
@ -149,14 +149,14 @@ static void test_AddDelBackupEntry(void)
/* try to create the INI file in a nonexistent directory */
RemoveDirectoryA("backup");
res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %ld\n", res);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(!check_ini_file_attr(path), "Expected ini file to not be hidden\n");
ok(!DeleteFileA(path), "Expected path to not exist\n");
/* try an existent, relative backup directory */
CreateDirectoryA("backup", NULL);
res = pAddDelBackupEntry("one\0two\0three\0", "backup", "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %ld\n", res);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ok(check_ini_file_attr(path), "Expected ini file to be hidden\n");
ok(DeleteFileA(path), "Expected path to exist\n");
RemoveDirectoryA("backup");
@ -166,13 +166,13 @@ static void test_AddDelBackupEntry(void)
/* try a NULL backup dir, INI is created in the windows directory */
res = pAddDelBackupEntry("one\0two\0three\0", NULL, "basename", AADBE_ADD_ENTRY);
ok(res == S_OK, "Expected S_OK, got %ld\n", res);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
/* remove the entries with AADBE_DEL_ENTRY */
SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL);
res = pAddDelBackupEntry("one\0three\0", NULL, "basename", AADBE_DEL_ENTRY);
SetFileAttributesA(path, FILE_ATTRIBUTE_NORMAL);
ok(res == S_OK, "Expected S_OK, got %ld\n", res);
ok(res == S_OK, "Expected S_OK, got %d\n", res);
ret = DeleteFileA(path);
ok(ret == TRUE ||
broken(ret == FALSE), /* win98 */
@ -395,19 +395,19 @@ static void test_ExtractFiles(void)
/* try NULL cab file */
hr = pExtractFiles(NULL, destFolder, 0, NULL, NULL, 0);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
ok(RemoveDirectoryA("dest"), "Expected dest to exist\n");
/* try NULL destination */
hr = pExtractFiles("extract.cab", NULL, 0, NULL, NULL, 0);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
ok(!RemoveDirectoryA("dest"), "Expected dest to not exist\n");
/* extract all files in the cab to nonexistent destination directory */
hr = pExtractFiles("extract.cab", destFolder, 0, NULL, NULL, 0);
ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) ||
hr == E_FAIL, /* win95 */
"Expected %08lx or %08lx, got %08lx\n", E_FAIL,
"Expected %08x or %08x, got %08x\n", E_FAIL,
HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), hr);
ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
@ -417,7 +417,7 @@ static void test_ExtractFiles(void)
/* extract all files in the cab to the destination directory */
CreateDirectoryA("dest", NULL);
hr = pExtractFiles("extract.cab", destFolder, 0, NULL, NULL, 0);
ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n");
ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
@ -426,7 +426,7 @@ static void test_ExtractFiles(void)
/* extract all files to a relative destination directory */
hr = pExtractFiles("extract.cab", "dest", 0, NULL, NULL, 0);
ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
ok(DeleteFileA("dest\\b.txt"), "Expected dest\\b.txt to exist\n");
ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
@ -435,7 +435,7 @@ static void test_ExtractFiles(void)
/* only extract two of the files from the cab */
hr = pExtractFiles("extract.cab", "dest", 0, "a.txt:testdir\\c.txt", NULL, 0);
ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n");
@ -444,7 +444,7 @@ static void test_ExtractFiles(void)
/* use valid chars before and after file list */
hr = pExtractFiles("extract.cab", "dest", 0, " :\t: a.txt:testdir\\c.txt \t:", NULL, 0);
ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n");
@ -453,27 +453,27 @@ static void test_ExtractFiles(void)
/* use invalid chars before and after file list */
hr = pExtractFiles("extract.cab", "dest", 0, " +-\\ a.txt:testdir\\c.txt a_:", NULL, 0);
ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr);
ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr);
ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n");
/* try an empty file list */
hr = pExtractFiles("extract.cab", "dest", 0, "", NULL, 0);
ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr);
ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr);
ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n");
/* try a nonexistent file in the file list */
hr = pExtractFiles("extract.cab", "dest", 0, "a.txt:idontexist:testdir\\c.txt", NULL, 0);
ok(hr == E_FAIL, "Expected E_FAIL, got %ld\n", hr);
ok(hr == E_FAIL, "Expected E_FAIL, got %d\n", hr);
ok(!DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to not exist\n");
ok(!DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to not exist\n");
ok(!RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to not exist\n");
if(pExtractFilesW) {
hr = pExtractFilesW(L"extract.cab", L"dest", 0, L"a.txt:testdir\\c.txt", NULL, 0);
ok(hr == S_OK, "Expected S_OK, got %08lx\n", hr);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok(DeleteFileA("dest\\a.txt"), "Expected dest\\a.txt to exist\n");
ok(DeleteFileA("dest\\testdir\\c.txt"), "Expected dest\\testdir\\c.txt to exist\n");
ok(RemoveDirectoryA("dest\\testdir"), "Expected dest\\testdir to exist\n");
@ -507,22 +507,22 @@ static void test_AdvInstallFile(void)
/* try invalid source directory */
hr = pAdvInstallFile(NULL, NULL, "source.txt", destFolder, "destination.txt", 0, 0);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
/* try invalid source file */
hr = pAdvInstallFile(NULL, CURR_DIR, NULL, destFolder, "destination.txt", 0, 0);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
/* try invalid destination directory */
hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", NULL, "destination.txt", 0, 0);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
ok(!DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to not exist\n");
/* try copying to nonexistent destination directory */
hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", destFolder, "destination.txt", 0, 0);
ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to exist\n");
/* native windows screws up if the source file doesn't exist */
@ -531,7 +531,7 @@ static void test_AdvInstallFile(void)
createTestFile("dest\\destination.txt");
hr = pAdvInstallFile(NULL, CURR_DIR, "source.txt", destFolder,
"destination.txt", AIF_NOOVERWRITE | AIF_QUIET, 0);
ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
ok(DeleteFileA("dest\\destination.txt"), "Expected dest\\destination.txt to exist\n");
ok(RemoveDirectoryA("dest"), "Expected dest to exist\n");

View File

@ -84,17 +84,17 @@ static void test_RunSetupCommand(void)
/* try an invalid cmd name */
hr = pRunSetupCommand(NULL, NULL, "Install", "Dir", "Title", NULL, 0, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
/* try an invalid directory */
hr = pRunSetupCommand(NULL, "winver.exe", "Install", NULL, "Title", NULL, 0, NULL);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
/* try to run a nonexistent exe */
hexe = (HANDLE)0xdeadbeef;
hr = pRunSetupCommand(NULL, "idontexist.exe", "Install", systemdir, "Title", &hexe, 0, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
ok(hexe == NULL, "Expected hexe to be NULL\n");
ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
@ -102,21 +102,21 @@ static void test_RunSetupCommand(void)
hexe = (HANDLE)0xdeadbeef;
hr = pRunSetupCommand(NULL, "winver.exe", "Install", "non\\existent\\directory", "Title", &hexe, 0, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_DIRECTORY),
"Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %ld\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %d\n", hr);
ok(hexe == NULL, "Expected hexe to be NULL\n");
ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
/* try to run an exe with the RSC_FLAG_INF flag */
hexe = (HANDLE)0xdeadbeef;
hr = pRunSetupCommand(NULL, "winver.exe", "Install", systemdir, "Title", &hexe, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(is_spapi_err(hr), "Expected a setupapi error, got %ld\n", hr);
ok(is_spapi_err(hr), "Expected a setupapi error, got %d\n", hr);
ok(hexe == (HANDLE)0xdeadbeef, "Expected hexe to be 0xdeadbeef\n");
ok(!TerminateProcess(hexe, 0), "Expected TerminateProcess to fail\n");
/* run winver.exe */
hexe = (HANDLE)0xdeadbeef;
hr = pRunSetupCommand(NULL, "winver.exe", "Install", systemdir, "Title", &hexe, 0, NULL);
ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %ld\n", hr);
ok(hr == S_ASYNCHRONOUS, "Expected S_ASYNCHRONOUS, got %d\n", hr);
ok(hexe != NULL, "Expected hexe to be non-NULL\n");
ok(TerminateProcess(hexe, 0), "Expected TerminateProcess to succeed\n");
@ -129,42 +129,42 @@ static void test_RunSetupCommand(void)
lstrcpyA(dir, CURR_DIR);
lstrcatA(dir, "\\one");
hr = pRunSetupCommand(NULL, path, "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr);
/* try a full path to the INF, NULL working dir */
hr = pRunSetupCommand(NULL, path, "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr);
/* try a full path to the INF, empty working dir */
hr = pRunSetupCommand(NULL, path, "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr);
/* try a relative path to the INF, with working dir provided */
hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr);
/* try a relative path to the INF, NULL working dir */
hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr);
/* try a relative path to the INF, empty working dir */
hr = pRunSetupCommand(NULL, "one\\test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", hr);
ok(hr == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", hr);
/* try only the INF filename, with working dir provided */
hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", dir, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
/* try only the INF filename, NULL working dir */
hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr);
/* try only the INF filename, empty working dir */
hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", "", "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
DeleteFileA("one\\test.inf");
RemoveDirectoryA("one");
@ -173,16 +173,16 @@ static void test_RunSetupCommand(void)
/* try INF file in the current directory, working directory provided */
hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
/* try INF file in the current directory, NULL working directory */
hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", NULL, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %ld\n", hr);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n", hr);
/* try INF file in the current directory, empty working directory */
hr = pRunSetupCommand(NULL, "test.inf", "DefaultInstall", CURR_DIR, "Title", NULL, RSC_FLAG_INF | RSC_FLAG_QUIET, NULL);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %ld\n", hr);
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n", hr);
}
static void test_LaunchINFSection(void)
@ -199,7 +199,7 @@ static void test_LaunchINFSection(void)
{
/* try an invalid cmdline */
hr = pLaunchINFSection(NULL, NULL, NULL, 0);
ok(hr == 1, "Expected 1, got %ld\n", hr);
ok(hr == 1, "Expected 1, got %d\n", hr);
}
CreateDirectoryA("one", NULL);
@ -210,7 +210,7 @@ static void test_LaunchINFSection(void)
lstrcatA(cmdline, "\\");
lstrcatA(cmdline, "one\\test.inf,DefaultInstall,,4");
hr = pLaunchINFSection(NULL, NULL, cmdline, 0);
ok(hr == 0, "Expected 0, got %ld\n", hr);
ok(hr == 0, "Expected 0, got %d\n", hr);
DeleteFileA("one\\test.inf");
RemoveDirectoryA("one");
@ -219,10 +219,10 @@ static void test_LaunchINFSection(void)
/* try just the INF filename */
hr = pLaunchINFSection(NULL, NULL, file, 0);
ok(hr == 0, "Expected 0, got %ld\n", hr);
ok(hr == 0, "Expected 0, got %d\n", hr);
hr = pLaunchINFSection(NULL, NULL, file2, 0);
ok(hr == 0, "Expected 0, got %ld\n", hr);
ok(hr == 0, "Expected 0, got %d\n", hr);
DeleteFileA("test.inf");
}
@ -239,14 +239,14 @@ static void test_LaunchINFSectionEx(void)
lstrcatA(cmdline, "\\");
lstrcatA(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4");
hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0);
ok(hr == 0, "Expected 0, got %ld\n", hr);
ok(hr == 0, "Expected 0, got %d\n", hr);
/* try quoting the parameters */
lstrcpyA(cmdline, "\"");
lstrcatA(cmdline, CURR_DIR);
lstrcatA(cmdline, "\\test.inf\",\"DefaultInstall\",\"c:,imacab.cab\",\"4\"");
hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0);
ok(hr == 0, "Expected 0, got %ld\n", hr);
ok(hr == 0, "Expected 0, got %d\n", hr);
/* The 'No UI' flag seems to have no effect whatsoever on Windows.
* So only do this test in interactive mode.
@ -256,7 +256,7 @@ static void test_LaunchINFSectionEx(void)
/* try an invalid CAB filename with a relative INF name */
lstrcpyA(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4");
hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %ld\n", hr);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
}
DeleteFileA("test.inf");

View File

@ -1,4 +1,6 @@
MODULE = amsi.dll
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
main.c

View File

@ -7,7 +7,7 @@
@ stub AmsiUacScan
@ stub AmsiUacUninitialize
@ stdcall AmsiUninitialize(ptr)
@ stdcall -private DllCanUnloadNow()
@ stub DllCanUnloadNow
@ stub DllGetClassObject
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
@ stub DllRegisterServer
@ stub DllUnregisterServer

View File

@ -46,7 +46,7 @@ void WINAPI AmsiCloseSession( HAMSICONTEXT context, HAMSISESSION session )
HRESULT WINAPI AmsiScanBuffer( HAMSICONTEXT context, void *buffer, ULONG length, const WCHAR *name,
HAMSISESSION session, AMSI_RESULT *result )
{
FIXME( "%p, %p, %lu, %s, %p, %p\n", context, buffer, length, debugstr_w(name), session, result );
FIXME( "%p, %p, %u, %s, %p, %p\n", context, buffer, length, debugstr_w(name), session, result );
*result = AMSI_RESULT_NOT_DETECTED;
return S_OK;
}

View File

@ -1,6 +1,8 @@
MODULE = amstream.dll
IMPORTS = strmiids strmbase uuid ole32 advapi32 ddraw
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
audiodata.c \
audiostream.c \

View File

@ -32,6 +32,7 @@
#include "mmstream.h"
#include "austream.h"
#include "amstream.h"
#include "wine/heap.h"
HRESULT multimedia_stream_create(IUnknown *outer, void **out) DECLSPEC_HIDDEN;
HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;

View File

@ -25,7 +25,7 @@
#include "winbase.h"
#include "amstream_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
typedef struct {
IAudioData IAudioData_iface;
@ -64,23 +64,26 @@ static ULONG WINAPI IAudioDataImpl_AddRef(IAudioData* iface)
AMAudioDataImpl *This = impl_from_IAudioData(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p)->(): new ref = %lu\n", iface, This->ref);
TRACE("(%p)->(): new ref = %u\n", iface, This->ref);
return ref;
}
static ULONG WINAPI IAudioDataImpl_Release(IAudioData* iface)
{
AMAudioDataImpl *audiodata = impl_from_IAudioData(iface);
ULONG ref = InterlockedDecrement(&audiodata->ref);
AMAudioDataImpl *This = impl_from_IAudioData(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("%p decreasing refcount to %lu.\n", audiodata, ref);
TRACE("(%p)->(): new ref = %u\n", iface, This->ref);
if (!ref)
{
if (audiodata->data_owned)
free(audiodata->data);
free(audiodata);
if (This->data_owned)
{
CoTaskMemFree(This->data);
}
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
@ -91,7 +94,7 @@ static HRESULT WINAPI IAudioDataImpl_SetBuffer(IAudioData* iface, DWORD size, BY
{
AMAudioDataImpl *This = impl_from_IAudioData(iface);
TRACE("(%p)->(%lu,%p,%lx)\n", iface, size, data, flags);
TRACE("(%p)->(%u,%p,%x)\n", iface, size, data, flags);
if (!size)
{
@ -100,7 +103,7 @@ static HRESULT WINAPI IAudioDataImpl_SetBuffer(IAudioData* iface, DWORD size, BY
if (This->data_owned)
{
free(This->data);
CoTaskMemFree(This->data);
This->data_owned = FALSE;
}
@ -109,7 +112,7 @@ static HRESULT WINAPI IAudioDataImpl_SetBuffer(IAudioData* iface, DWORD size, BY
if (!This->data)
{
This->data = malloc(This->size);
This->data = CoTaskMemAlloc(This->size);
This->data_owned = TRUE;
if (!This->data)
{
@ -151,7 +154,7 @@ static HRESULT WINAPI IAudioDataImpl_SetActual(IAudioData* iface, DWORD data_val
{
AMAudioDataImpl *This = impl_from_IAudioData(iface);
TRACE("(%p)->(%lu)\n", iface, data_valid);
TRACE("(%p)->(%u)\n", iface, data_valid);
if (data_valid > This->size)
{
@ -225,7 +228,8 @@ HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj)
if (pUnkOuter)
return CLASS_E_NOAGGREGATION;
if (!(object = calloc(1, sizeof(*object))))
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AMAudioDataImpl));
if (!object)
return E_OUTOFMEMORY;
object->IAudioData_iface.lpVtbl = &AudioData_Vtbl;

View File

@ -21,10 +21,9 @@
#define COBJMACROS
#include "amstream_private.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/strmbase.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
static const WCHAR sink_id[] = L"I{A35FF56B-9FDA-11D0-8FDF-00C04FD9189D}";
@ -188,7 +187,7 @@ static ULONG WINAPI audio_sample_AddRef(IAudioStreamSample *iface)
{
struct audio_sample *sample = impl_from_IAudioStreamSample(iface);
ULONG refcount = InterlockedIncrement(&sample->ref);
TRACE("%p increasing refcount to %lu.\n", sample, refcount);
TRACE("%p increasing refcount to %u.\n", sample, refcount);
return refcount;
}
@ -196,13 +195,13 @@ static ULONG WINAPI audio_sample_Release(IAudioStreamSample *iface)
{
struct audio_sample *sample = impl_from_IAudioStreamSample(iface);
ULONG refcount = InterlockedDecrement(&sample->ref);
TRACE("%p decreasing refcount to %lu.\n", sample, refcount);
TRACE("%p decreasing refcount to %u.\n", sample, refcount);
if (!refcount)
{
IAMMediaStream_Release(&sample->parent->IAMMediaStream_iface);
IAudioData_Release(sample->audio_data);
CloseHandle(sample->update_event);
free(sample);
HeapFree(GetProcessHeap(), 0, sample);
}
return refcount;
}
@ -257,7 +256,7 @@ static HRESULT WINAPI audio_sample_Update(IAudioStreamSample *iface,
DWORD length;
HRESULT hr;
TRACE("sample %p, flags %#lx, event %p, apc_func %p, apc_data %#lx.\n",
TRACE("sample %p, flags %#x, event %p, apc_func %p, apc_data %#x.\n",
sample, flags, event, apc_func, apc_data);
hr = IAudioData_GetInfo(sample->audio_data, &length, &pointer, NULL);
@ -281,7 +280,7 @@ static HRESULT WINAPI audio_sample_Update(IAudioStreamSample *iface,
if (flags & ~SSUPDATE_ASYNC)
{
FIXME("Unsupported flags %#lx.\n", flags);
FIXME("Unsupported flags %#x.\n", flags);
return E_NOTIMPL;
}
@ -328,11 +327,11 @@ static HRESULT WINAPI audio_sample_CompletionStatus(IAudioStreamSample *iface, D
struct audio_sample *sample = impl_from_IAudioStreamSample(iface);
HRESULT hr;
TRACE("sample %p, flags %#lx, milliseconds %lu.\n", sample, flags, milliseconds);
TRACE("sample %p, flags %#x, milliseconds %u.\n", sample, flags, milliseconds);
if (flags)
{
FIXME("Unhandled flags %#lx.\n", flags);
FIXME("Unhandled flags %#x.\n", flags);
return E_NOTIMPL;
}
@ -383,7 +382,8 @@ static HRESULT audiostreamsample_create(struct audio_stream *parent, IAudioData
TRACE("(%p)\n", audio_stream_sample);
if (!(object = calloc(1, sizeof(*object))))
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
return E_OUTOFMEMORY;
object->IAudioStreamSample_iface.lpVtbl = &AudioStreamSample_Vtbl;
@ -448,22 +448,22 @@ static ULONG WINAPI audio_IAMMediaStream_AddRef(IAMMediaStream *iface)
struct audio_stream *This = impl_from_IAMMediaStream(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p/%p)->(): new ref = %lu\n", iface, This, ref);
TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
return ref;
}
static ULONG WINAPI audio_IAMMediaStream_Release(IAMMediaStream *iface)
{
struct audio_stream *stream = impl_from_IAMMediaStream(iface);
ULONG ref = InterlockedDecrement(&stream->ref);
struct audio_stream *This = impl_from_IAMMediaStream(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("%p decreasing refcount to %lu.\n", stream, ref);
TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
if (!ref)
{
DeleteCriticalSection(&stream->cs);
free(stream);
DeleteCriticalSection(&This->cs);
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
@ -506,7 +506,7 @@ static HRESULT WINAPI audio_IAMMediaStream_SetSameFormat(IAMMediaStream *iface,
{
struct audio_stream *This = impl_from_IAMMediaStream(iface);
FIXME("(%p/%p)->(%p,%lx) stub!\n", This, iface, pStreamThatHasDesiredFormat, flags);
FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, flags);
return S_FALSE;
}
@ -516,7 +516,7 @@ static HRESULT WINAPI audio_IAMMediaStream_AllocateSample(IAMMediaStream *iface,
{
struct audio_stream *This = impl_from_IAMMediaStream(iface);
FIXME("(%p/%p)->(%lx,%p) stub!\n", This, iface, flags, sample);
FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, flags, sample);
return S_FALSE;
}
@ -526,7 +526,7 @@ static HRESULT WINAPI audio_IAMMediaStream_CreateSharedSample(IAMMediaStream *if
{
struct audio_stream *This = impl_from_IAMMediaStream(iface);
FIXME("(%p/%p)->(%p,%lx,%p) stub!\n", This, iface, existing_sample, flags, sample);
FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, existing_sample, flags, sample);
return S_FALSE;
}
@ -535,7 +535,7 @@ static HRESULT WINAPI audio_IAMMediaStream_SendEndOfStream(IAMMediaStream *iface
{
struct audio_stream *This = impl_from_IAMMediaStream(iface);
FIXME("(%p/%p)->(%lx) stub!\n", This, iface, flags);
FIXME("(%p/%p)->(%x) stub!\n", This, iface, flags);
return S_FALSE;
}
@ -546,7 +546,7 @@ static HRESULT WINAPI audio_IAMMediaStream_Initialize(IAMMediaStream *iface, IUn
{
struct audio_stream *stream = impl_from_IAMMediaStream(iface);
TRACE("stream %p, source_object %p, flags %lx, purpose_id %s, stream_type %u.\n", stream, source_object, flags,
TRACE("stream %p, source_object %p, flags %x, purpose_id %s, stream_type %u.\n", stream, source_object, flags,
debugstr_guid(purpose_id), stream_type);
if (!purpose_id)
@ -761,7 +761,7 @@ static HRESULT WINAPI audio_IAudioMediaStream_CreateSample(IAudioMediaStream *if
{
struct audio_stream *This = impl_from_IAudioMediaStream(iface);
TRACE("(%p/%p)->(%p,%lu,%p)\n", iface, This, audio_data, flags, sample);
TRACE("(%p/%p)->(%p,%u,%p)\n", iface, This, audio_data, flags, sample);
if (!audio_data)
return E_POINTER;
@ -819,7 +819,7 @@ static ULONG WINAPI enum_media_types_AddRef(IEnumMediaTypes *iface)
{
struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface);
ULONG refcount = InterlockedIncrement(&enum_media_types->refcount);
TRACE("%p increasing refcount to %lu.\n", enum_media_types, refcount);
TRACE("%p increasing refcount to %u.\n", enum_media_types, refcount);
return refcount;
}
@ -827,9 +827,9 @@ static ULONG WINAPI enum_media_types_Release(IEnumMediaTypes *iface)
{
struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface);
ULONG refcount = InterlockedDecrement(&enum_media_types->refcount);
TRACE("%p decreasing refcount to %lu.\n", enum_media_types, refcount);
TRACE("%p decreasing refcount to %u.\n", enum_media_types, refcount);
if (!refcount)
free(enum_media_types);
heap_free(enum_media_types);
return refcount;
}
@ -848,7 +848,7 @@ static HRESULT WINAPI enum_media_types_Next(IEnumMediaTypes *iface, ULONG count,
.cbSize = 0,
};
TRACE("iface %p, count %lu, mts %p, ret_count %p.\n", iface, count, mts, ret_count);
TRACE("iface %p, count %u, mts %p, ret_count %p.\n", iface, count, mts, ret_count);
if (!ret_count)
return E_POINTER;
@ -880,7 +880,7 @@ static HRESULT WINAPI enum_media_types_Skip(IEnumMediaTypes *iface, ULONG count)
{
struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface);
TRACE("iface %p, count %lu.\n", iface, count);
TRACE("iface %p, count %u.\n", iface, count);
enum_media_types->index += count;
return S_OK;
@ -903,7 +903,7 @@ static HRESULT WINAPI enum_media_types_Clone(IEnumMediaTypes *iface, IEnumMediaT
TRACE("iface %p, out %p.\n", iface, out);
if (!(object = calloc(1, sizeof(*object))))
if (!(object = heap_alloc(sizeof(*object))))
return E_OUTOFMEMORY;
object->IEnumMediaTypes_iface.lpVtbl = &enum_media_types_vtbl;
@ -1120,7 +1120,7 @@ static HRESULT WINAPI audio_sink_EnumMediaTypes(IPin *iface, IEnumMediaTypes **e
if (!enum_media_types)
return E_POINTER;
if (!(object = calloc(1, sizeof(*object))))
if (!(object = heap_alloc(sizeof(*object))))
return E_OUTOFMEMORY;
object->IEnumMediaTypes_iface.lpVtbl = &enum_media_types_vtbl;
@ -1157,36 +1157,23 @@ static HRESULT WINAPI audio_sink_EndOfStream(IPin *iface)
LeaveCriticalSection(&stream->cs);
/* Calling IMediaStreamFilter::EndOfStream() inside the critical section
* would invert the locking order, so we must leave it first to avoid
* the streaming thread deadlocking on the filter's critical section. */
IMediaStreamFilter_EndOfStream(stream->filter);
return S_OK;
}
static HRESULT WINAPI audio_sink_BeginFlush(IPin *iface)
{
struct audio_stream *stream = impl_from_IPin(iface);
BOOL cancel_eos;
TRACE("stream %p.\n", stream);
EnterCriticalSection(&stream->cs);
cancel_eos = stream->eos;
stream->flushing = TRUE;
stream->eos = FALSE;
flush_receive_queue(stream);
LeaveCriticalSection(&stream->cs);
/* Calling IMediaStreamFilter::Flush() inside the critical section would
* invert the locking order, so we must leave it first to avoid the
* application thread deadlocking on the filter's critical section. */
IMediaStreamFilter_Flush(stream->filter, cancel_eos);
return S_OK;
}
@ -1363,7 +1350,7 @@ static HRESULT WINAPI audio_meminput_Receive(IMemInputPin *iface, IMediaSample *
static HRESULT WINAPI audio_meminput_ReceiveMultiple(IMemInputPin *iface,
IMediaSample **samples, LONG count, LONG *processed)
{
FIXME("iface %p, samples %p, count %lu, processed %p, stub!\n", iface, samples, count, processed);
FIXME("iface %p, samples %p, count %u, processed %p, stub!\n", iface, samples, count, processed);
return E_NOTIMPL;
}
@ -1393,7 +1380,8 @@ HRESULT audio_stream_create(IUnknown *outer, void **out)
if (outer)
return CLASS_E_NOAGGREGATION;
if (!(object = calloc(1, sizeof(*object))))
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
return E_OUTOFMEMORY;
object->IAMMediaStream_iface.lpVtbl = &audio_IAMMediaStream_vtbl;

View File

@ -22,10 +22,9 @@
#define COBJMACROS
#include "amstream_private.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/strmbase.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
static const WCHAR sink_id[] = L"I{A35FF56A-9FDA-11D0-8FDF-00C04FD9189D}";
@ -212,7 +211,7 @@ static ULONG WINAPI ddraw_IAMMediaStream_AddRef(IAMMediaStream *iface)
struct ddraw_stream *This = impl_from_IAMMediaStream(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p/%p)->(): new ref = %lu\n", iface, This, ref);
TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref);
return ref;
}
@ -222,14 +221,14 @@ static ULONG WINAPI ddraw_IAMMediaStream_Release(IAMMediaStream *iface)
struct ddraw_stream *stream = impl_from_IAMMediaStream(iface);
ULONG ref = InterlockedDecrement(&stream->ref);
TRACE("%p decreasing refcount to %lu.\n", stream, ref);
TRACE("%p decreasing refcount to %u.\n", stream, ref);
if (!ref)
{
DeleteCriticalSection(&stream->cs);
if (stream->ddraw)
IDirectDraw_Release(stream->ddraw);
free(stream);
HeapFree(GetProcessHeap(), 0, stream);
}
return ref;
@ -272,7 +271,7 @@ static HRESULT WINAPI ddraw_IAMMediaStream_SetSameFormat(IAMMediaStream *iface,
{
struct ddraw_stream *This = impl_from_IAMMediaStream(iface);
FIXME("(%p/%p)->(%p,%lx) stub!\n", This, iface, pStreamThatHasDesiredFormat, flags);
FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, flags);
return S_FALSE;
}
@ -282,7 +281,7 @@ static HRESULT WINAPI ddraw_IAMMediaStream_AllocateSample(IAMMediaStream *iface,
{
struct ddraw_stream *This = impl_from_IAMMediaStream(iface);
FIXME("(%p/%p)->(%lx,%p) stub!\n", This, iface, flags, sample);
FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, flags, sample);
return S_FALSE;
}
@ -292,7 +291,7 @@ static HRESULT WINAPI ddraw_IAMMediaStream_CreateSharedSample(IAMMediaStream *if
{
struct ddraw_stream *This = impl_from_IAMMediaStream(iface);
FIXME("(%p/%p)->(%p,%lx,%p) stub!\n", This, iface, existing_sample, flags, sample);
FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, existing_sample, flags, sample);
return S_FALSE;
}
@ -301,7 +300,7 @@ static HRESULT WINAPI ddraw_IAMMediaStream_SendEndOfStream(IAMMediaStream *iface
{
struct ddraw_stream *This = impl_from_IAMMediaStream(iface);
FIXME("(%p/%p)->(%lx) stub!\n", This, iface, flags);
FIXME("(%p/%p)->(%x) stub!\n", This, iface, flags);
return S_FALSE;
}
@ -313,7 +312,7 @@ static HRESULT WINAPI ddraw_IAMMediaStream_Initialize(IAMMediaStream *iface, IUn
struct ddraw_stream *stream = impl_from_IAMMediaStream(iface);
HRESULT hr;
TRACE("stream %p, source_object %p, flags %lx, purpose_id %s, stream_type %u.\n", stream, source_object, flags,
TRACE("stream %p, source_object %p, flags %x, purpose_id %s, stream_type %u.\n", stream, source_object, flags,
debugstr_guid(purpose_id), stream_type);
if (!purpose_id)
@ -327,7 +326,7 @@ static HRESULT WINAPI ddraw_IAMMediaStream_Initialize(IAMMediaStream *iface, IUn
if (source_object
&& FAILED(hr = IUnknown_QueryInterface(source_object, &IID_IDirectDraw, (void **)&stream->ddraw)))
FIXME("Stream object doesn't implement IDirectDraw interface, hr %#lx.\n", hr);
FIXME("Stream object doesn't implement IDirectDraw interface, hr %#x.\n", hr);
if (!source_object)
{
@ -549,10 +548,6 @@ static HRESULT WINAPI ddraw_IDirectDrawMediaStream_SetFormat(IDirectDrawMediaStr
if (format->dwSize != sizeof(DDSURFACEDESC))
return E_INVALIDARG;
TRACE("flags %#lx, pixel format flags %#lx, bit count %lu, size %lux%lu.\n",
format->dwFlags, format->ddpfPixelFormat.dwFlags,
format->ddpfPixelFormat.u1.dwRGBBitCount, format->dwWidth, format->dwHeight);
if (format->dwFlags & DDSD_PIXELFORMAT)
{
if (format->ddpfPixelFormat.dwSize != sizeof(DDPIXELFORMAT))
@ -711,7 +706,7 @@ static HRESULT WINAPI ddraw_IDirectDrawMediaStream_CreateSample(IDirectDrawMedia
struct ddraw_stream *stream = impl_from_IDirectDrawMediaStream(iface);
HRESULT hr;
TRACE("stream %p, surface %p, rect %s, flags %#lx, sample %p.\n",
TRACE("stream %p, surface %p, rect %s, flags %#x, sample %p.\n",
stream, surface, wine_dbgstr_rect(rect), flags, sample);
if (!surface && rect)
@ -805,7 +800,7 @@ static ULONG WINAPI enum_media_types_AddRef(IEnumMediaTypes *iface)
{
struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface);
ULONG refcount = InterlockedIncrement(&enum_media_types->refcount);
TRACE("%p increasing refcount to %lu.\n", enum_media_types, refcount);
TRACE("%p increasing refcount to %u.\n", enum_media_types, refcount);
return refcount;
}
@ -813,9 +808,9 @@ static ULONG WINAPI enum_media_types_Release(IEnumMediaTypes *iface)
{
struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface);
ULONG refcount = InterlockedDecrement(&enum_media_types->refcount);
TRACE("%p decreasing refcount to %lu.\n", enum_media_types, refcount);
TRACE("%p decreasing refcount to %u.\n", enum_media_types, refcount);
if (!refcount)
free(enum_media_types);
heap_free(enum_media_types);
return refcount;
}
@ -823,7 +818,7 @@ static HRESULT WINAPI enum_media_types_Next(IEnumMediaTypes *iface, ULONG count,
{
struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface);
TRACE("iface %p, count %lu, mts %p, ret_count %p.\n", iface, count, mts, ret_count);
TRACE("iface %p, count %u, mts %p, ret_count %p.\n", iface, count, mts, ret_count);
if (!ret_count)
return E_POINTER;
@ -849,7 +844,7 @@ static HRESULT WINAPI enum_media_types_Skip(IEnumMediaTypes *iface, ULONG count)
{
struct enum_media_types *enum_media_types = impl_from_IEnumMediaTypes(iface);
TRACE("iface %p, count %lu.\n", iface, count);
TRACE("iface %p, count %u.\n", iface, count);
enum_media_types->index += count;
@ -873,7 +868,7 @@ static HRESULT WINAPI enum_media_types_Clone(IEnumMediaTypes *iface, IEnumMediaT
TRACE("iface %p, out %p.\n", iface, out);
if (!(object = calloc(1, sizeof(*object))))
if (!(object = heap_alloc(sizeof(*object))))
return E_OUTOFMEMORY;
object->IEnumMediaTypes_iface.lpVtbl = &enum_media_types_vtbl;
@ -1148,7 +1143,7 @@ static HRESULT WINAPI ddraw_sink_EnumMediaTypes(IPin *iface, IEnumMediaTypes **e
if (!enum_media_types)
return E_POINTER;
if (!(object = calloc(1, sizeof(*object))))
if (!(object = heap_alloc(sizeof(*object))))
return E_OUTOFMEMORY;
object->IEnumMediaTypes_iface.lpVtbl = &enum_media_types_vtbl;
@ -1185,36 +1180,23 @@ static HRESULT WINAPI ddraw_sink_EndOfStream(IPin *iface)
LeaveCriticalSection(&stream->cs);
/* Calling IMediaStreamFilter::EndOfStream() inside the critical section
* would invert the locking order, so we must leave it first to avoid
* the streaming thread deadlocking on the filter's critical section. */
IMediaStreamFilter_EndOfStream(stream->filter);
return S_OK;
}
static HRESULT WINAPI ddraw_sink_BeginFlush(IPin *iface)
{
struct ddraw_stream *stream = impl_from_IPin(iface);
BOOL cancel_eos;
TRACE("stream %p.\n", stream);
EnterCriticalSection(&stream->cs);
cancel_eos = stream->eos;
stream->flushing = TRUE;
stream->eos = FALSE;
WakeConditionVariable(&stream->update_queued_cv);
LeaveCriticalSection(&stream->cs);
/* Calling IMediaStreamFilter::Flush() inside the critical section would
* invert the locking order, so we must leave it first to avoid the
* application thread deadlocking on the filter's critical section. */
IMediaStreamFilter_Flush(stream->filter, cancel_eos);
return S_OK;
}
@ -1430,7 +1412,7 @@ static HRESULT WINAPI ddraw_meminput_Receive(IMemInputPin *iface, IMediaSample *
static HRESULT WINAPI ddraw_meminput_ReceiveMultiple(IMemInputPin *iface,
IMediaSample **samples, LONG count, LONG *processed)
{
FIXME("iface %p, samples %p, count %lu, processed %p, stub!\n", iface, samples, count, processed);
FIXME("iface %p, samples %p, count %u, processed %p, stub!\n", iface, samples, count, processed);
return E_NOTIMPL;
}
@ -1460,7 +1442,8 @@ HRESULT ddraw_stream_create(IUnknown *outer, void **out)
if (outer)
return CLASS_E_NOAGGREGATION;
if (!(object = calloc(1, sizeof(*object))))
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
return E_OUTOFMEMORY;
object->IAMMediaStream_iface.lpVtbl = &ddraw_IAMMediaStream_vtbl;
@ -1514,7 +1497,7 @@ static ULONG WINAPI ddraw_sample_AddRef(IDirectDrawStreamSample *iface)
struct ddraw_sample *sample = impl_from_IDirectDrawStreamSample(iface);
ULONG ref = InterlockedIncrement(&sample->ref);
TRACE("(%p)->(): new ref = %lu\n", iface, ref);
TRACE("(%p)->(): new ref = %u\n", iface, ref);
return ref;
}
@ -1524,7 +1507,7 @@ static ULONG WINAPI ddraw_sample_Release(IDirectDrawStreamSample *iface)
struct ddraw_sample *sample = impl_from_IDirectDrawStreamSample(iface);
ULONG ref = InterlockedDecrement(&sample->ref);
TRACE("(%p)->(): new ref = %lu\n", iface, ref);
TRACE("(%p)->(): new ref = %u\n", iface, ref);
if (!ref)
{
@ -1538,7 +1521,7 @@ static ULONG WINAPI ddraw_sample_Release(IDirectDrawStreamSample *iface)
if (sample->surface)
IDirectDrawSurface_Release(sample->surface);
free(sample);
HeapFree(GetProcessHeap(), 0, sample);
}
return ref;
@ -1591,7 +1574,7 @@ static HRESULT WINAPI ddraw_sample_Update(IDirectDrawStreamSample *iface,
{
struct ddraw_sample *sample = impl_from_IDirectDrawStreamSample(iface);
TRACE("sample %p, flags %#lx, event %p, apc_func %p, apc_data %#lx.\n",
TRACE("sample %p, flags %#x, event %p, apc_func %p, apc_data %#x.\n",
sample, flags, event, apc_func, apc_data);
if (event && apc_func)
@ -1649,7 +1632,7 @@ static HRESULT WINAPI ddraw_sample_CompletionStatus(IDirectDrawStreamSample *ifa
struct ddraw_sample *sample = impl_from_IDirectDrawStreamSample(iface);
HRESULT hr;
TRACE("sample %p, flags %#lx, milliseconds %lu.\n", sample, flags, milliseconds);
TRACE("sample %p, flags %#x, milliseconds %u.\n", sample, flags, milliseconds);
EnterCriticalSection(&sample->parent->cs);
@ -1735,7 +1718,8 @@ static HRESULT ddrawstreamsample_create(struct ddraw_stream *parent, IDirectDraw
TRACE("(%p)\n", ddraw_stream_sample);
if (!(object = calloc(1, sizeof(*object))))
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
return E_OUTOFMEMORY;
object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl;
@ -1789,7 +1773,7 @@ static HRESULT ddrawstreamsample_create(struct ddraw_stream *parent, IDirectDraw
IDirectDraw_Release(ddraw);
if (FAILED(hr))
{
ERR("failed to create surface, 0x%08lx\n", hr);
ERR("failed to create surface, 0x%08x\n", hr);
IDirectDrawStreamSample_Release(&object->IDirectDrawStreamSample_iface);
return hr;
}

View File

@ -23,7 +23,7 @@
#include "wine/debug.h"
#include "wine/list.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
struct enum_pins
{
@ -61,7 +61,7 @@ static ULONG WINAPI enum_pins_AddRef(IEnumPins *iface)
{
struct enum_pins *enum_pins = impl_from_IEnumPins(iface);
ULONG refcount = InterlockedIncrement(&enum_pins->refcount);
TRACE("%p increasing refcount to %lu.\n", enum_pins, refcount);
TRACE("%p increasing refcount to %u.\n", enum_pins, refcount);
return refcount;
}
@ -71,13 +71,13 @@ static ULONG WINAPI enum_pins_Release(IEnumPins *iface)
ULONG refcount = InterlockedDecrement(&enum_pins->refcount);
unsigned int i;
TRACE("%p decreasing refcount to %lu.\n", enum_pins, refcount);
TRACE("%p decreasing refcount to %u.\n", enum_pins, refcount);
if (!refcount)
{
for (i = 0; i < enum_pins->count; ++i)
IPin_Release(enum_pins->pins[i]);
free(enum_pins->pins);
free(enum_pins);
heap_free(enum_pins->pins);
heap_free(enum_pins);
}
return refcount;
}
@ -87,7 +87,7 @@ static HRESULT WINAPI enum_pins_Next(IEnumPins *iface, ULONG count, IPin **pins,
struct enum_pins *enum_pins = impl_from_IEnumPins(iface);
unsigned int i;
TRACE("iface %p, count %lu, pins %p, ret_count %p.\n", iface, count, pins, ret_count);
TRACE("iface %p, count %u, pins %p, ret_count %p.\n", iface, count, pins, ret_count);
if (!pins || (count > 1 && !ret_count))
return E_POINTER;
@ -106,7 +106,7 @@ static HRESULT WINAPI enum_pins_Skip(IEnumPins *iface, ULONG count)
{
struct enum_pins *enum_pins = impl_from_IEnumPins(iface);
TRACE("iface %p, count %lu.\n", iface, count);
TRACE("iface %p, count %u.\n", iface, count);
enum_pins->index += count;
@ -131,16 +131,16 @@ static HRESULT WINAPI enum_pins_Clone(IEnumPins *iface, IEnumPins **out)
TRACE("iface %p, out %p.\n", iface, out);
if (!(object = calloc(1, sizeof(*object))))
if (!(object = heap_alloc(sizeof(*object))))
return E_OUTOFMEMORY;
object->IEnumPins_iface.lpVtbl = &enum_pins_vtbl;
object->refcount = 1;
object->count = enum_pins->count;
object->index = enum_pins->index;
if (!(object->pins = malloc(enum_pins->count * sizeof(*object->pins))))
if (!(object->pins = heap_alloc(enum_pins->count * sizeof(*object->pins))))
{
free(object);
heap_free(object);
return E_OUTOFMEMORY;
}
for (i = 0; i < enum_pins->count; ++i)
@ -178,7 +178,6 @@ struct filter
REFERENCE_TIME start_time;
struct list free_events;
struct list used_events;
LONG eos_count;
};
struct event
@ -222,7 +221,7 @@ static ULONG WINAPI filter_AddRef(IMediaStreamFilter *iface)
struct filter *filter = impl_from_IMediaStreamFilter(iface);
ULONG refcount = InterlockedIncrement(&filter->refcount);
TRACE("%p increasing refcount to %lu.\n", iface, refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount);
return refcount;
}
@ -233,7 +232,7 @@ static ULONG WINAPI filter_Release(IMediaStreamFilter *iface)
ULONG refcount = InterlockedDecrement(&filter->refcount);
unsigned int i;
TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
if (!refcount)
{
@ -251,11 +250,11 @@ static ULONG WINAPI filter_Release(IMediaStreamFilter *iface)
IAMMediaStream_JoinFilter(filter->streams[i], NULL);
IAMMediaStream_Release(filter->streams[i]);
}
free(filter->streams);
heap_free(filter->streams);
if (filter->clock)
IReferenceClock_Release(filter->clock);
DeleteCriticalSection(&filter->cs);
free(filter);
heap_free(filter);
}
return refcount;
@ -267,22 +266,6 @@ static HRESULT WINAPI filter_GetClassID(IMediaStreamFilter *iface, CLSID *clsid)
return S_OK;
}
static void send_ec_complete(struct filter *filter)
{
IMediaEventSink *event_sink;
if (!filter->graph)
return;
if (FAILED(IFilterGraph_QueryInterface(filter->graph, &IID_IMediaEventSink, (void **)&event_sink)))
return;
IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK,
(LONG_PTR)&filter->IMediaStreamFilter_iface);
IMediaEventSink_Release(event_sink);
}
static void set_state(struct filter *filter, FILTER_STATE state)
{
if (filter->state != state)
@ -304,9 +287,6 @@ static HRESULT WINAPI filter_Stop(IMediaStreamFilter *iface)
EnterCriticalSection(&filter->cs);
if (filter->state != State_Stopped)
filter->eos_count = 0;
set_state(filter, State_Stopped);
LIST_FOR_EACH_ENTRY(event, &filter->used_events, struct event, entry)
@ -347,10 +327,6 @@ static HRESULT WINAPI filter_Run(IMediaStreamFilter *iface, REFERENCE_TIME start
EnterCriticalSection(&filter->cs);
if (filter->state != State_Running && filter->seekable_stream
&& filter->eos_count == (LONG)filter->nb_streams)
send_ec_complete(filter);
filter->start_time = start;
set_state(filter, State_Running);
@ -363,7 +339,7 @@ static HRESULT WINAPI filter_GetState(IMediaStreamFilter *iface, DWORD timeout,
{
struct filter *filter = impl_from_IMediaStreamFilter(iface);
TRACE("iface %p, timeout %lu, state %p.\n", iface, timeout, state);
TRACE("iface %p, timeout %u, state %p.\n", iface, timeout, state);
if (!state)
return E_POINTER;
@ -424,7 +400,7 @@ static HRESULT WINAPI filter_EnumPins(IMediaStreamFilter *iface, IEnumPins **enu
if (!enum_pins)
return E_POINTER;
if (!(object = calloc(1, sizeof(*object))))
if (!(object = heap_alloc(sizeof(*object))))
return E_OUTOFMEMORY;
EnterCriticalSection(&filter->cs);
@ -433,9 +409,9 @@ static HRESULT WINAPI filter_EnumPins(IMediaStreamFilter *iface, IEnumPins **enu
object->refcount = 1;
object->count = filter->nb_streams;
object->index = 0;
if (!(object->pins = malloc(filter->nb_streams * sizeof(*object->pins))))
if (!(object->pins = heap_alloc(filter->nb_streams * sizeof(*object->pins))))
{
free(object);
heap_free(object);
LeaveCriticalSection(&filter->cs);
return E_OUTOFMEMORY;
}
@ -517,7 +493,7 @@ static HRESULT WINAPI filter_JoinFilterGraph(IMediaStreamFilter *iface,
EnterCriticalSection(&filter->cs);
if (name)
lstrcpynW(filter->name, name, ARRAY_SIZE(filter->name));
wcsncpy(filter->name, name, ARRAY_SIZE(filter->name));
else
filter->name[0] = 0;
filter->graph = graph;
@ -543,7 +519,7 @@ static HRESULT WINAPI filter_AddMediaStream(IMediaStreamFilter *iface, IAMMediaS
TRACE("(%p)->(%p)\n", iface, pAMMediaStream);
streams = realloc(This->streams, (This->nb_streams + 1) * sizeof(*streams));
streams = CoTaskMemRealloc(This->streams, (This->nb_streams + 1) * sizeof(IAMMediaStream*));
if (!streams)
return E_OUTOFMEMORY;
This->streams = streams;
@ -593,7 +569,7 @@ static HRESULT WINAPI filter_EnumMediaStreams(IMediaStreamFilter *iface, LONG in
{
struct filter *filter = impl_from_IMediaStreamFilter(iface);
TRACE("filter %p, index %ld, stream %p.\n", filter, index, stream);
TRACE("filter %p, index %d, stream %p.\n", filter, index, stream);
if (index >= filter->nb_streams)
return S_FALSE;
@ -793,9 +769,6 @@ static HRESULT WINAPI filter_Flush(IMediaStreamFilter *iface, BOOL cancel_eos)
}
}
if (cancel_eos)
--filter->eos_count;
LeaveCriticalSection(&filter->cs);
return S_OK;
@ -803,20 +776,9 @@ static HRESULT WINAPI filter_Flush(IMediaStreamFilter *iface, BOOL cancel_eos)
static HRESULT WINAPI filter_EndOfStream(IMediaStreamFilter *iface)
{
struct filter *filter = impl_from_IMediaStreamFilter(iface);
FIXME("(%p)->(): Stub!\n", iface);
TRACE("filter %p.\n", filter);
EnterCriticalSection(&filter->cs);
++filter->eos_count;
if (filter->state == State_Running && filter->seekable_stream &&
filter->eos_count == (LONG)filter->nb_streams)
send_ec_complete(filter);
LeaveCriticalSection(&filter->cs);
return S_OK;
return E_NOTIMPL;
}
static const IMediaStreamFilterVtbl filter_vtbl =
@ -1004,7 +966,7 @@ static HRESULT WINAPI filter_seeking_SetPositions(IMediaSeeking *iface, LONGLONG
IMediaSeeking *seeking;
HRESULT hr;
TRACE("iface %p, current %s, current_flags %#lx, stop %s, stop_flags %#lx.\n", iface,
TRACE("iface %p, current %s, current_flags %#x, stop %s, stop_flags %#x.\n", iface,
current_ptr ? wine_dbgstr_longlong(*current_ptr) : "<null>", current_flags,
stop_ptr ? wine_dbgstr_longlong(*stop_ptr): "<null>", stop_flags);
@ -1092,7 +1054,7 @@ HRESULT filter_create(IUnknown *outer, void **out)
if (outer)
return CLASS_E_NOAGGREGATION;
if (!(object = calloc(1, sizeof(*object))))
if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
object->IMediaStreamFilter_iface.lpVtbl = &filter_vtbl;

View File

@ -35,7 +35,21 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
static HINSTANCE instance;
/* For the moment, do nothing here. */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
instance = hInstDLL;
DisableThreadLibraryCalls(hInstDLL);
break;
}
return TRUE;
}
/******************************************************************************
* Multimedia Streams ClassFactory
@ -93,7 +107,7 @@ static ULONG WINAPI AMCF_Release(IClassFactory *iface)
ULONG ref = InterlockedDecrement(&This->ref);
if (ref == 0)
free(This);
HeapFree(GetProcessHeap(), 0, This);
return ref;
}
@ -173,8 +187,8 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return CLASS_E_CLASSNOTAVAILABLE;
}
if (!(factory = calloc(1, sizeof(*factory))))
return E_OUTOFMEMORY;
factory = HeapAlloc(GetProcessHeap(), 0, sizeof(*factory));
if (factory == NULL) return E_OUTOFMEMORY;
factory->IClassFactory_iface.lpVtbl = &DSCF_Vtbl;
factory->ref = 1;
@ -184,3 +198,27 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*ppv = &factory->IClassFactory_iface;
return S_OK;
}
/***********************************************************************
* DllCanUnloadNow (AMSTREAM.@)
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
return S_FALSE;
}
/***********************************************************************
* DllRegisterServer (AMSTREAM.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
return __wine_register_resources( instance );
}
/***********************************************************************
* DllUnregisterServer (AMSTREAM.@)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
return __wine_unregister_resources( instance );
}

View File

@ -28,7 +28,7 @@
#include "amstream_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
WINE_DEFAULT_DEBUG_CHANNEL(amstream);
struct multimedia_stream
{
@ -100,7 +100,7 @@ static ULONG WINAPI multimedia_stream_Release(IAMMultiMediaStream *iface)
IMediaControl_Release(This->media_control);
if (This->graph)
IGraphBuilder_Release(This->graph);
free(This);
HeapFree(GetProcessHeap(), 0, This);
}
return ref;
@ -132,7 +132,7 @@ static HRESULT WINAPI multimedia_stream_EnumMediaStreams(IAMMultiMediaStream *if
{
struct multimedia_stream *mmstream = impl_from_IAMMultiMediaStream(iface);
TRACE("mmstream %p, index %ld, stream %p.\n", mmstream, index, stream);
TRACE("mmstream %p, index %d, stream %p.\n", mmstream, index, stream);
return IMediaStreamFilter_EnumMediaStreams(mmstream->filter, index, stream);
}
@ -207,18 +207,13 @@ static HRESULT WINAPI multimedia_stream_Seek(IAMMultiMediaStream *iface, STREAM_
return IMediaSeeking_SetPositions(This->media_seeking, &seek_time, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);
}
static HRESULT WINAPI multimedia_stream_GetEndOfStream(IAMMultiMediaStream *iface, HANDLE *eos)
static HRESULT WINAPI multimedia_stream_GetEndOfStream(IAMMultiMediaStream *iface, HANDLE *phEOS)
{
struct multimedia_stream *mmstream = impl_from_IAMMultiMediaStream(iface);
struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("mmstream %p, eos %p.\n", mmstream, eos);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, phEOS);
if (!eos)
return E_POINTER;
*eos = (HANDLE)mmstream->event;
return S_OK;
return E_NOTIMPL;
}
static HRESULT create_graph(struct multimedia_stream *mmstream, IGraphBuilder *graph)
@ -269,7 +264,7 @@ static HRESULT WINAPI multimedia_stream_Initialize(IAMMultiMediaStream *iface,
struct multimedia_stream *mmstream = impl_from_IAMMultiMediaStream(iface);
HRESULT hr;
TRACE("mmstream %p, type %u, flags %#lx, graph %p.\n", mmstream, type, flags, graph);
TRACE("mmstream %p, type %u, flags %#x, graph %p.\n", mmstream, type, flags, graph);
if (graph && mmstream->graph)
{
@ -343,7 +338,7 @@ static HRESULT WINAPI multimedia_stream_AddMediaStream(IAMMultiMediaStream *ifac
IAMMediaStream* pStream;
IMediaStream *stream;
TRACE("mmstream %p, stream_object %p, id %s, flags %#lx, ret_stream %p.\n",
TRACE("mmstream %p, stream_object %p, id %s, flags %#x, ret_stream %p.\n",
This, stream_object, debugstr_guid(PurposeId), dwFlags, ret_stream);
if (IMediaStreamFilter_GetMediaStream(This->filter, PurposeId, &stream) == S_OK)
@ -436,7 +431,7 @@ static HRESULT WINAPI multimedia_stream_OpenFile(IAMMultiMediaStream *iface,
IPin *ipin;
PIN_DIRECTION pin_direction;
TRACE("(%p/%p)->(%s,%lx)\n", This, iface, debugstr_w(filename), flags);
TRACE("(%p/%p)->(%s,%x)\n", This, iface, debugstr_w(filename), flags);
if (!filename)
return E_POINTER;
@ -481,7 +476,7 @@ static HRESULT WINAPI multimedia_stream_OpenFile(IAMMultiMediaStream *iface,
}
else
{
FIXME("Failed to get IFilterGraph2 interface, hr %#lx.\n", ret);
FIXME("Failed to get IFilterGraph2 interface, hr %#x.\n", ret);
ret = IGraphBuilder_Render(This->graph, This->ipin);
}
}
@ -514,7 +509,7 @@ static HRESULT WINAPI multimedia_stream_OpenMoniker(IAMMultiMediaStream *iface,
{
struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p,%p,%lx) stub!\n", This, iface, pCtx, pMoniker, dwFlags);
FIXME("(%p/%p)->(%p,%p,%x) stub!\n", This, iface, pCtx, pMoniker, dwFlags);
return E_NOTIMPL;
}
@ -523,7 +518,7 @@ static HRESULT WINAPI multimedia_stream_Render(IAMMultiMediaStream *iface, DWORD
{
struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%lx) partial stub!\n", This, iface, dwFlags);
FIXME("(%p/%p)->(%x) partial stub!\n", This, iface, dwFlags);
if(dwFlags != AMMSF_NOCLOCK)
return E_INVALIDARG;
@ -562,7 +557,7 @@ HRESULT multimedia_stream_create(IUnknown *outer, void **out)
if (outer)
return CLASS_E_NOAGGREGATION;
if (!(object = calloc(1, sizeof(*object))))
if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
object->IAMMultiMediaStream_iface.lpVtbl = &multimedia_stream_vtbl;
@ -571,8 +566,8 @@ HRESULT multimedia_stream_create(IUnknown *outer, void **out)
if (FAILED(hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL,
CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (void **)&object->filter)))
{
ERR("Failed to create stream filter, hr %#lx.\n", hr);
free(object);
ERR("Failed to create stream filter, hr %#x.\n", hr);
heap_free(object);
return hr;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
MODULE = api-ms-win-appmodel-identity-l1-1-0.dll

View File

@ -0,0 +1,17 @@
@ stub AppContainerDeriveSidFromMoniker
@ stub AppContainerFreeMemory
@ stub AppContainerLookupDisplayNameMrtReference
@ stub AppContainerLookupMoniker
@ stub AppContainerRegisterSid
@ stub AppContainerUnregisterSid
@ stub AppXFreeMemory
@ stub AppXGetApplicationData
@ stub AppXGetDevelopmentMode
@ stub AppXGetOSMaxVersionTested
@ stub AppXGetOSMinVersion
@ stub AppXGetPackageCapabilities
@ stub AppXGetPackageSid
@ stub AppXGetPackageState
@ stub AppXLookupDisplayName
@ stub AppXLookupMoniker
@ stub AppXSetPackageState

View File

@ -0,0 +1 @@
MODULE = api-ms-win-appmodel-runtime-l1-1-1.dll

View File

@ -0,0 +1,27 @@
@ stub ClosePackageInfo
@ stub FindPackagesByPackageFamily
@ stub FormatApplicationUserModelId
@ stub GetApplicationUserModelId
@ stub GetCurrentApplicationUserModelId
@ stdcall GetCurrentPackageFamilyName(ptr ptr) kernel32.GetCurrentPackageFamilyName
@ stdcall GetCurrentPackageFullName(ptr ptr) kernel32.GetCurrentPackageFullName
@ stdcall GetCurrentPackageId(ptr ptr) kernel32.GetCurrentPackageId
@ stub GetCurrentPackageInfo
@ stub GetCurrentPackagePath
@ stub GetPackageApplicationIds
@ stdcall GetPackageFamilyName(long ptr ptr) kernel32.GetPackageFamilyName
@ stdcall GetPackageFullName(long ptr ptr) kernel32.GetPackageFullName
@ stub GetPackageId
@ stub GetPackageInfo
@ stub GetPackagePath
@ stub GetPackagePathByFullName
@ stub GetPackagesByPackageFamily
@ stub GetStagedPackageOrigin
@ stub GetStagedPackagePathByFullName
@ stub OpenPackageInfoByFullName
@ stub PackageFamilyNameFromFullName
@ stub PackageFamilyNameFromId
@ stub PackageFullNameFromId
@ stub PackageIdFromFullName
@ stub PackageNameAndPublisherIdFromFamilyName
@ stub ParseApplicationUserModelId

View File

@ -0,0 +1 @@
MODULE = api-ms-win-appmodel-runtime-l1-1-2.dll

View File

@ -0,0 +1,17 @@
@ stub AppPolicyGetClrCompat
@ stub AppPolicyGetCreateFileAccess
@ stub AppPolicyGetLifecycleManagement
@ stub AppPolicyGetMediaFoundationCodecLoading
@ stdcall AppPolicyGetProcessTerminationMethod(ptr ptr) kernelbase.AppPolicyGetProcessTerminationMethod
@ stdcall AppPolicyGetShowDeveloperDiagnostic(ptr ptr) kernelbase.AppPolicyGetShowDeveloperDiagnostic
@ stdcall AppPolicyGetThreadInitializationType(ptr ptr) kernelbase.AppPolicyGetThreadInitializationType
@ stdcall AppPolicyGetWindowingModel(ptr ptr) kernelbase.AppPolicyGetWindowingModel
@ stub GetApplicationUserModelIdFromToken
@ stub GetPackageFamilyNameFromToken
@ stub GetPackageFullNameFromToken
@ stub OpenPackageInfoByFullNameForUser
@ stub VerifyApplicationUserModelId
@ stub VerifyPackageFamilyName
@ stub VerifyPackageFullName
@ stub VerifyPackageId
@ stub VerifyPackageRelativeApplicationId

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-apiquery-l1-1-0.dll

View File

@ -0,0 +1 @@
@ stdcall ApiSetQueryApiSetPresence(ptr ptr) ntdll.ApiSetQueryApiSetPresence

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-appcompat-l1-1-1.dll

View File

@ -0,0 +1,10 @@
@ stub BaseCheckAppcompatCache
@ stub BaseCheckAppcompatCacheEx
@ stub BaseCleanupAppcompatCacheSupport
@ stub BaseDumpAppcompatCache
@ stdcall BaseFlushAppcompatCache() kernel32.BaseFlushAppcompatCache
@ stub BaseFreeAppCompatDataForProcess
@ stub BaseInitAppcompatCacheSupport
@ stub BaseIsAppcompatInfrastructureDisabled
@ stub BaseReadAppCompatDataForProcess
@ stub BaseUpdateAppcompatCache

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-appinit-l1-1-0.dll

View File

@ -0,0 +1 @@
@ stdcall LoadAppInitDlls() kernel32.LoadAppInitDlls

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-atoms-l1-1-0.dll

View File

@ -0,0 +1,17 @@
@ stdcall AddAtomA(str) kernel32.AddAtomA
@ stdcall AddAtomW(wstr) kernel32.AddAtomW
@ stdcall DeleteAtom(long) kernel32.DeleteAtom
@ stdcall FindAtomA(str) kernel32.FindAtomA
@ stdcall FindAtomW(wstr) kernel32.FindAtomW
@ stdcall GetAtomNameA(long ptr long) kernel32.GetAtomNameA
@ stdcall GetAtomNameW(long ptr long) kernel32.GetAtomNameW
@ stdcall GlobalAddAtomA(str) kernel32.GlobalAddAtomA
@ stub GlobalAddAtomExA
@ stub GlobalAddAtomExW
@ stdcall GlobalAddAtomW(wstr) kernel32.GlobalAddAtomW
@ stdcall GlobalDeleteAtom(long) kernel32.GlobalDeleteAtom
@ stdcall GlobalFindAtomA(str) kernel32.GlobalFindAtomA
@ stdcall GlobalFindAtomW(wstr) kernel32.GlobalFindAtomW
@ stdcall GlobalGetAtomNameA(long ptr long) kernel32.GlobalGetAtomNameA
@ stdcall GlobalGetAtomNameW(long ptr long) kernel32.GlobalGetAtomNameW
@ stdcall InitAtomTable(long) kernel32.InitAtomTable

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-bem-l1-1-0.dll

View File

@ -0,0 +1,5 @@
@ stub BemCopyReference
@ stub BemCreateContractFrom
@ stub BemCreateReference
@ stub BemFreeContract
@ stub BemFreeReference

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-com-l1-1-0.dll

View File

@ -0,0 +1,80 @@
@ stdcall CLSIDFromProgID(wstr ptr) ole32.CLSIDFromProgID
@ stdcall CLSIDFromString(wstr ptr) ole32.CLSIDFromString
@ stdcall CoAddRefServerProcess() ole32.CoAddRefServerProcess
@ stub CoAllowUnmarshalerCLSID
@ stub CoCancelCall
@ stdcall CoCopyProxy(ptr ptr) ole32.CoCopyProxy
@ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) ole32.CoCreateFreeThreadedMarshaler
@ stdcall CoCreateGuid(ptr) ole32.CoCreateGuid
@ stdcall CoCreateInstance(ptr ptr long ptr ptr) ole32.CoCreateInstance
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) ole32.CoCreateInstanceEx
@ stdcall CoCreateInstanceFromApp(ptr ptr long ptr long ptr) ole32.CoCreateInstanceFromApp
@ stub CoDecodeProxy
@ stdcall CoDecrementMTAUsage(ptr) ole32.CoDecrementMTAUsage
@ stdcall CoDisableCallCancellation(ptr) ole32.CoDisableCallCancellation
@ stub CoDisconnectContext
@ stdcall CoDisconnectObject(ptr long) ole32.CoDisconnectObject
@ stdcall CoEnableCallCancellation(ptr) ole32.CoEnableCallCancellation
@ stdcall CoFreeUnusedLibraries() ole32.CoFreeUnusedLibraries
@ stdcall CoFreeUnusedLibrariesEx(long long) ole32.CoFreeUnusedLibrariesEx
@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
@ stdcall CoGetCallContext(ptr ptr) ole32.CoGetCallContext
@ stdcall CoGetCallerTID(ptr) ole32.CoGetCallerTID
@ stub CoGetCancelObject
@ stdcall CoGetClassObject(ptr long ptr ptr ptr) ole32.CoGetClassObject
@ stdcall CoGetContextToken(ptr) ole32.CoGetContextToken
@ stdcall CoGetCurrentLogicalThreadId(ptr) ole32.CoGetCurrentLogicalThreadId
@ stdcall CoGetCurrentProcess() ole32.CoGetCurrentProcess
@ stdcall CoGetDefaultContext(long ptr ptr) ole32.CoGetDefaultContext
@ stdcall CoGetInterfaceAndReleaseStream(ptr ptr ptr) ole32.CoGetInterfaceAndReleaseStream
@ stdcall CoGetMalloc(long ptr) ole32.CoGetMalloc
@ stdcall CoGetMarshalSizeMax(ptr ptr ptr long ptr long) ole32.CoGetMarshalSizeMax
@ stdcall CoGetObjectContext(ptr ptr) ole32.CoGetObjectContext
@ stdcall CoGetPSClsid(ptr ptr) ole32.CoGetPSClsid
@ stdcall CoGetStandardMarshal(ptr ptr long ptr long ptr) ole32.CoGetStandardMarshal
@ stub CoGetStdMarshalEx
@ stdcall CoGetTreatAsClass(ptr ptr) ole32.CoGetTreatAsClass
@ stdcall CoImpersonateClient() ole32.CoImpersonateClient
@ stdcall CoIncrementMTAUsage(ptr) ole32.CoIncrementMTAUsage
@ stdcall CoInitializeEx(ptr long) ole32.CoInitializeEx
@ stdcall CoInitializeSecurity(ptr long ptr ptr long long ptr long ptr) ole32.CoInitializeSecurity
@ stub CoInvalidateRemoteMachineBindings
@ stdcall CoIsHandlerConnected(ptr) ole32.CoIsHandlerConnected
@ stdcall CoLockObjectExternal(ptr long long) ole32.CoLockObjectExternal
@ stdcall CoMarshalHresult(ptr long) ole32.CoMarshalHresult
@ stdcall CoMarshalInterThreadInterfaceInStream(ptr ptr ptr) ole32.CoMarshalInterThreadInterfaceInStream
@ stdcall CoMarshalInterface(ptr ptr ptr long ptr long) ole32.CoMarshalInterface
@ stub CoQueryAuthenticationServices
@ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr) ole32.CoQueryClientBlanket
@ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr) ole32.CoQueryProxyBlanket
@ stdcall CoRegisterClassObject(ptr ptr long long ptr) ole32.CoRegisterClassObject
@ stdcall CoRegisterPSClsid(ptr ptr) ole32.CoRegisterPSClsid
@ stdcall CoRegisterSurrogate(ptr) ole32.CoRegisterSurrogate
@ stdcall CoReleaseMarshalData(ptr) ole32.CoReleaseMarshalData
@ stdcall CoReleaseServerProcess() ole32.CoReleaseServerProcess
@ stdcall CoResumeClassObjects() ole32.CoResumeClassObjects
@ stdcall CoRevertToSelf() ole32.CoRevertToSelf
@ stdcall CoRevokeClassObject(long) ole32.CoRevokeClassObject
@ stub CoSetCancelObject
@ stdcall CoSetProxyBlanket(ptr long long ptr long long ptr long) ole32.CoSetProxyBlanket
@ stdcall CoSuspendClassObjects() ole32.CoSuspendClassObjects
@ stdcall CoSwitchCallContext(ptr ptr) ole32.CoSwitchCallContext
@ stdcall CoTaskMemAlloc(long) ole32.CoTaskMemAlloc
@ stdcall CoTaskMemFree(ptr) ole32.CoTaskMemFree
@ stdcall CoTaskMemRealloc(ptr long) ole32.CoTaskMemRealloc
@ stub CoTestCancel
@ stdcall CoUninitialize() ole32.CoUninitialize
@ stdcall CoUnmarshalHresult(ptr ptr) ole32.CoUnmarshalHresult
@ stdcall CoUnmarshalInterface(ptr ptr ptr) ole32.CoUnmarshalInterface
@ stdcall CoWaitForMultipleHandles(long long long ptr ptr) ole32.CoWaitForMultipleHandles
@ stub CoWaitForMultipleObjects
@ stdcall CreateStreamOnHGlobal(ptr long ptr) ole32.CreateStreamOnHGlobal
@ stdcall FreePropVariantArray(long ptr) ole32.FreePropVariantArray
@ stdcall GetHGlobalFromStream(ptr ptr) ole32.GetHGlobalFromStream
@ stdcall IIDFromString(wstr ptr) ole32.IIDFromString
@ stdcall ProgIDFromCLSID(ptr ptr) ole32.ProgIDFromCLSID
@ stdcall PropVariantClear(ptr) ole32.PropVariantClear
@ stdcall PropVariantCopy(ptr ptr) ole32.PropVariantCopy
@ stdcall StringFromCLSID(ptr ptr) ole32.StringFromCLSID
@ stdcall StringFromGUID2(ptr ptr long) ole32.StringFromGUID2
@ stdcall StringFromIID(ptr ptr) ole32.StringFromIID

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-com-l1-1-1.dll

View File

@ -0,0 +1,82 @@
@ stdcall CLSIDFromProgID(wstr ptr) ole32.CLSIDFromProgID
@ stdcall CLSIDFromString(wstr ptr) ole32.CLSIDFromString
@ stdcall CoAddRefServerProcess() ole32.CoAddRefServerProcess
@ stub CoAllowUnmarshalerCLSID
@ stub CoCancelCall
@ stdcall CoCopyProxy(ptr ptr) ole32.CoCopyProxy
@ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) ole32.CoCreateFreeThreadedMarshaler
@ stdcall CoCreateGuid(ptr) ole32.CoCreateGuid
@ stdcall CoCreateInstance(ptr ptr long ptr ptr) ole32.CoCreateInstance
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) ole32.CoCreateInstanceEx
@ stdcall CoCreateInstanceFromApp(ptr ptr long ptr long ptr) ole32.CoCreateInstanceFromApp
@ stub CoDecodeProxy
@ stdcall CoDecrementMTAUsage(ptr) ole32.CoDecrementMTAUsage
@ stdcall CoDisableCallCancellation(ptr) ole32.CoDisableCallCancellation
@ stub CoDisconnectContext
@ stdcall CoDisconnectObject(ptr long) ole32.CoDisconnectObject
@ stdcall CoEnableCallCancellation(ptr) ole32.CoEnableCallCancellation
@ stdcall CoFreeUnusedLibraries() ole32.CoFreeUnusedLibraries
@ stdcall CoFreeUnusedLibrariesEx(long long) ole32.CoFreeUnusedLibrariesEx
@ stdcall CoGetApartmentType(ptr ptr) ole32.CoGetApartmentType
@ stdcall CoGetCallContext(ptr ptr) ole32.CoGetCallContext
@ stdcall CoGetCallerTID(ptr) ole32.CoGetCallerTID
@ stub CoGetCancelObject
@ stdcall CoGetClassObject(ptr long ptr ptr ptr) ole32.CoGetClassObject
@ stdcall CoGetContextToken(ptr) ole32.CoGetContextToken
@ stdcall CoGetCurrentLogicalThreadId(ptr) ole32.CoGetCurrentLogicalThreadId
@ stdcall CoGetCurrentProcess() ole32.CoGetCurrentProcess
@ stdcall CoGetDefaultContext(long ptr ptr) ole32.CoGetDefaultContext
@ stdcall CoGetInterfaceAndReleaseStream(ptr ptr ptr) ole32.CoGetInterfaceAndReleaseStream
@ stdcall CoGetMalloc(long ptr) ole32.CoGetMalloc
@ stdcall CoGetMarshalSizeMax(ptr ptr ptr long ptr long) ole32.CoGetMarshalSizeMax
@ stdcall CoGetObjectContext(ptr ptr) ole32.CoGetObjectContext
@ stdcall CoGetPSClsid(ptr ptr) ole32.CoGetPSClsid
@ stdcall CoGetStandardMarshal(ptr ptr long ptr long ptr) ole32.CoGetStandardMarshal
@ stub CoGetStdMarshalEx
@ stdcall CoGetTreatAsClass(ptr ptr) ole32.CoGetTreatAsClass
@ stdcall CoImpersonateClient() ole32.CoImpersonateClient
@ stdcall CoIncrementMTAUsage(ptr) ole32.CoIncrementMTAUsage
@ stdcall CoInitializeEx(ptr long) ole32.CoInitializeEx
@ stdcall CoInitializeSecurity(ptr long ptr ptr long long ptr long ptr) ole32.CoInitializeSecurity
@ stub CoInvalidateRemoteMachineBindings
@ stdcall CoIsHandlerConnected(ptr) ole32.CoIsHandlerConnected
@ stdcall CoLockObjectExternal(ptr long long) ole32.CoLockObjectExternal
@ stdcall CoMarshalHresult(ptr long) ole32.CoMarshalHresult
@ stdcall CoMarshalInterThreadInterfaceInStream(ptr ptr ptr) ole32.CoMarshalInterThreadInterfaceInStream
@ stdcall CoMarshalInterface(ptr ptr ptr long ptr long) ole32.CoMarshalInterface
@ stub CoQueryAuthenticationServices
@ stdcall CoQueryClientBlanket(ptr ptr ptr ptr ptr ptr ptr) ole32.CoQueryClientBlanket
@ stdcall CoQueryProxyBlanket(ptr ptr ptr ptr ptr ptr ptr ptr) ole32.CoQueryProxyBlanket
@ stub CoRegisterActivationFilter
@ stdcall CoRegisterClassObject(ptr ptr long long ptr) ole32.CoRegisterClassObject
@ stdcall CoRegisterPSClsid(ptr ptr) ole32.CoRegisterPSClsid
@ stdcall CoRegisterSurrogate(ptr) ole32.CoRegisterSurrogate
@ stdcall CoReleaseMarshalData(ptr) ole32.CoReleaseMarshalData
@ stdcall CoReleaseServerProcess() ole32.CoReleaseServerProcess
@ stdcall CoResumeClassObjects() ole32.CoResumeClassObjects
@ stdcall CoRevertToSelf() ole32.CoRevertToSelf
@ stdcall CoRevokeClassObject(long) ole32.CoRevokeClassObject
@ stub CoSetCancelObject
@ stdcall CoSetProxyBlanket(ptr long long ptr long long ptr long) ole32.CoSetProxyBlanket
@ stdcall CoSuspendClassObjects() ole32.CoSuspendClassObjects
@ stdcall CoSwitchCallContext(ptr ptr) ole32.CoSwitchCallContext
@ stdcall CoTaskMemAlloc(long) ole32.CoTaskMemAlloc
@ stdcall CoTaskMemFree(ptr) ole32.CoTaskMemFree
@ stdcall CoTaskMemRealloc(ptr long) ole32.CoTaskMemRealloc
@ stub CoTestCancel
@ stdcall CoUninitialize() ole32.CoUninitialize
@ stdcall CoUnmarshalHresult(ptr ptr) ole32.CoUnmarshalHresult
@ stdcall CoUnmarshalInterface(ptr ptr ptr) ole32.CoUnmarshalInterface
@ stdcall CoWaitForMultipleHandles(long long long ptr ptr) ole32.CoWaitForMultipleHandles
@ stub CoWaitForMultipleObjects
@ stdcall CreateStreamOnHGlobal(ptr long ptr) ole32.CreateStreamOnHGlobal
@ stdcall FreePropVariantArray(long ptr) ole32.FreePropVariantArray
@ stdcall GetHGlobalFromStream(ptr ptr) ole32.GetHGlobalFromStream
@ stdcall IIDFromString(wstr ptr) ole32.IIDFromString
@ stdcall ProgIDFromCLSID(ptr ptr) ole32.ProgIDFromCLSID
@ stdcall PropVariantClear(ptr) ole32.PropVariantClear
@ stdcall PropVariantCopy(ptr ptr) ole32.PropVariantCopy
@ stub RoGetAgileReference
@ stdcall StringFromCLSID(ptr ptr) ole32.StringFromCLSID
@ stdcall StringFromGUID2(ptr ptr long) ole32.StringFromGUID2
@ stdcall StringFromIID(ptr ptr) ole32.StringFromIID

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-com-private-l1-1-0.dll

View File

@ -0,0 +1,91 @@
@ stub CLSIDFromOle1Class
@ stub CleanupOleStateInAllTls
@ stdcall CleanupTlsOleState(ptr) combase.CleanupTlsOleState
@ stub ClearCleanupFlag
@ stdcall CoCreateErrorInfo(ptr) combase.CoCreateErrorInfo
@ stub CoCreateObjectInContext
@ stub CoDeactivateObject
@ stdcall CoGetActivationState(int128 long ptr) combase.CoGetActivationState
@ stub CoGetApartmentID
@ stdcall CoGetCallState(long ptr) combase.CoGetCallState
@ stub CoGetClassVersion
@ stdcall CoGetErrorInfo(long ptr) combase.CoGetErrorInfo
@ stdcall CoGetInstanceFromFile(ptr ptr ptr long long wstr long ptr) combase.CoGetInstanceFromFile
@ stdcall CoGetInstanceFromIStorage(ptr ptr ptr long ptr long ptr) combase.CoGetInstanceFromIStorage
@ stub CoGetModuleType
@ stub CoGetProcessIdentifier
@ stub CoGetSystemSecurityPermissions
@ stdcall CoInitializeWOW(long long) combase.CoInitializeWOW
@ stub CoPopServiceDomain
@ stub CoPushServiceDomain
@ stub CoReactivateObject
@ stdcall CoRegisterInitializeSpy(ptr ptr) combase.CoRegisterInitializeSpy
@ stdcall CoRegisterMallocSpy(ptr) combase.CoRegisterMallocSpy
@ stdcall CoRegisterMessageFilter(ptr ptr) combase.CoRegisterMessageFilter
@ stdcall CoRegisterSurrogateEx(ptr ptr) combase.CoRegisterSurrogateEx
@ stub CoRetireServer
@ stdcall CoRevokeInitializeSpy(int64) combase.CoRevokeInitializeSpy
@ stdcall CoRevokeMallocSpy() combase.CoRevokeMallocSpy
@ stdcall CoSetErrorInfo(long ptr) combase.CoSetErrorInfo
@ stub CoUnloadingWOW
@ stub CoVrfCheckThreadState
@ stub CoVrfGetThreadState
@ stub CoVrfReleaseThreadState
@ stdcall DllDebugObjectRPCHook(long ptr) combase.DllDebugObjectRPCHook
@ stub EnableHookObject
@ stub FreePropVariantArrayWorker
@ stub GetCatalogHelper
@ stub GetFuncDescs
@ stub GetHookInterface
@ stub HkOleRegisterObject
@ stub InternalAppInvokeExceptionFilter
@ stub InternalCCFreeUnused
@ stub InternalCCGetClassInformationForDde
@ stub InternalCCGetClassInformationFromKey
@ stub InternalCCSetDdeServerWindow
@ stub InternalCMLSendReceive
@ stub InternalCallAsProxyExceptionFilter
@ stub InternalCallFrameExceptionFilter
@ stub InternalCallerIsAppContainer
@ stub InternalCanMakeOutCall
@ stub InternalCoIsSurrogateProcess
@ stub InternalCoRegisterDisconnectCallback
@ stub InternalCoRegisterSurrogatedObject
@ stdcall InternalCoStdMarshalObject(ptr long ptr ptr) combase.InternalCoStdMarshalObject
@ stub InternalCoUnregisterDisconnectCallback
@ stub InternalCompleteObjRef
@ stub InternalCreateCAggId
@ stub InternalCreateIdentityHandler
@ stub InternalDoATClassCreate
@ stub InternalFillLocalOXIDInfo
@ stub InternalFreeObjRef
@ stub InternalGetWindowPropInterface
@ stdcall InternalIrotEnumRunning(ptr) combase.InternalIrotEnumRunning
@ stdcall InternalIrotGetObject(ptr ptr ptr) combase.InternalIrotGetObject
@ stdcall InternalIrotGetTimeOfLastChange(ptr ptr) combase.InternalIrotGetTimeOfLastChange
@ stdcall InternalIrotIsRunning(ptr) combase.InternalIrotIsRunning
@ stdcall InternalIrotNoteChangeTime(long ptr) combase.InternalIrotNoteChangeTime
@ stdcall InternalIrotRegister(ptr ptr ptr ptr long ptr ptr) combase.InternalIrotRegister
@ stdcall InternalIrotRevoke(long ptr ptr ptr) combase.InternalIrotRevoke
@ stub InternalIsApartmentInitialized
@ stdcall InternalIsProcessInitialized() combase.InternalIsProcessInitialized
@ stub InternalMarshalObjRef
@ stub InternalNotifyDDStartOrStop
@ stub InternalOleModalLoopBlockFn
@ stub InternalRegisterWindowPropInterface
@ stub InternalReleaseMarshalObjRef
@ stub InternalSTAInvoke
@ stub InternalServerExceptionFilter
@ stub InternalSetAptCallCtrlOnTlsIfRequired
@ stub InternalSetOleThunkWowPtr
@ stub InternalStubInvoke
@ stdcall InternalTlsAllocData(ptr) combase.InternalTlsAllocData
@ stub InternalUnmarshalObjRef
@ stub NdrExtStubInitialize
@ stub NdrOleDllGetClassObject
@ stub NdrOleInitializeExtension
@ stub NdrpFindInterface
@ stub ReleaseFuncDescs
@ stub SetCleanupFlag
@ stub UpdateDCOMSettings
@ stub UpdateProcessTracing

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-comm-l1-1-0.dll

View File

@ -0,0 +1,18 @@
@ stdcall ClearCommBreak(long) kernel32.ClearCommBreak
@ stdcall ClearCommError(long ptr ptr) kernel32.ClearCommError
@ stdcall EscapeCommFunction(long long) kernel32.EscapeCommFunction
@ stdcall GetCommConfig(long ptr ptr) kernel32.GetCommConfig
@ stdcall GetCommMask(long ptr) kernel32.GetCommMask
@ stdcall GetCommModemStatus(long ptr) kernel32.GetCommModemStatus
@ stdcall GetCommProperties(long ptr) kernel32.GetCommProperties
@ stdcall GetCommState(long ptr) kernel32.GetCommState
@ stdcall GetCommTimeouts(long ptr) kernel32.GetCommTimeouts
@ stdcall PurgeComm(long long) kernel32.PurgeComm
@ stdcall SetCommBreak(long) kernel32.SetCommBreak
@ stdcall SetCommConfig(long ptr long) kernel32.SetCommConfig
@ stdcall SetCommMask(long long) kernel32.SetCommMask
@ stdcall SetCommState(long ptr) kernel32.SetCommState
@ stdcall SetCommTimeouts(long ptr) kernel32.SetCommTimeouts
@ stdcall SetupComm(long long long) kernel32.SetupComm
@ stdcall TransmitCommChar(long long) kernel32.TransmitCommChar
@ stdcall WaitCommEvent(long ptr ptr) kernel32.WaitCommEvent

View File

@ -0,0 +1 @@
MODULE = api-ms-win-core-console-l1-1-0.dll

Some files were not shown because too many files have changed in this diff Show More