winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2015
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
318 discussions
Start a n
N
ew thread
Nikolay Sivov : libwine: Fix double byte default char initialization.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: a7e294c064ac443a4351d1cbe84e7f52e0775d6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7e294c064ac443a4351d1cbe…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 8 23:45:20 2015 +0300 libwine: Fix double byte default char initialization. --- dlls/kernel32/tests/codepage.c | 9 ++++++++- libs/wine/wctomb.c | 16 +++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c index 71bedb7..54f62ae 100644 --- a/dlls/kernel32/tests/codepage.c +++ b/dlls/kernel32/tests/codepage.c @@ -276,12 +276,14 @@ static void test_overlapped_buffers(void) static void test_string_conversion(LPBOOL bUsedDefaultChar) { char mbc; - char mbs[5]; + char mbs[15]; int ret; WCHAR wc1 = 228; /* Western Windows-1252 character */ WCHAR wc2 = 1088; /* Russian Windows-1251 character not displayable for Windows-1252 */ static const WCHAR wcs[] = {'T', 'h', 1088, 'i', 0}; /* String with ASCII characters and a Russian character */ static const WCHAR dbwcs[] = {28953, 25152, 0}; /* String with Chinese (codepage 950) characters */ + static const WCHAR dbwcs2[] = {0x7bb8, 0x3d, 0xc813, 0xac00, 0xb77d, 0}; + static const char default_char[] = {0xa3, 0xbf, 0}; SetLastError(0xdeadbeef); ret = WideCharToMultiByte(1252, 0, &wc1, 1, &mbc, 1, NULL, bUsedDefaultChar); @@ -358,6 +360,11 @@ static void test_string_conversion(LPBOOL bUsedDefaultChar) ok(!strcmp(mbs, "??"), "mbs is %s\n", mbs); if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); + ret = WideCharToMultiByte(936, WC_COMPOSITECHECK, dbwcs2, -1, mbs, sizeof(mbs), (const char *)default_char, bUsedDefaultChar); + ok(ret == 10, "ret is %d\n", ret); + ok(!strcmp(mbs, "\xf3\xe7\x3d\xa3\xbf\xa3\xbf\xa3\xbf"), "mbs is %s\n", mbs); + if(bUsedDefaultChar) ok(*bUsedDefaultChar == TRUE, "bUsedDefaultChar is %d\n", *bUsedDefaultChar); + /* Length-only tests */ SetLastError(0xdeadbeef); ret = WideCharToMultiByte(1252, 0, &wc2, 1, NULL, 0, NULL, bUsedDefaultChar); diff --git a/libs/wine/wctomb.c b/libs/wine/wctomb.c index 3b081d4..29a3d92 100644 --- a/libs/wine/wctomb.c +++ b/libs/wine/wctomb.c @@ -275,6 +275,14 @@ static inline int is_valid_dbcs_mapping( const struct dbcs_table *table, int fla return 1; } +/* compute the default char for the dbcs case */ +static inline WCHAR get_defchar_dbcs( const struct dbcs_table *table, const char *defchar ) +{ + if (!defchar) return table->info.def_char; + if (!defchar[1]) return (unsigned char)defchar[0]; + return ((unsigned char)defchar[0] << 8) | (unsigned char)defchar[1]; +} + /* query necessary dst length for src string */ static int get_length_dbcs( const struct dbcs_table *table, int flags, const WCHAR *src, unsigned int srclen, @@ -282,8 +290,7 @@ static int get_length_dbcs( const struct dbcs_table *table, int flags, { const unsigned short * const uni2cp_low = table->uni2cp_low; const unsigned short * const uni2cp_high = table->uni2cp_high; - WCHAR defchar_value = table->info.def_char; - WCHAR composed; + WCHAR defchar_value, composed; int len, tmp; if (!defchar && !used && !(flags & WC_COMPOSITECHECK)) @@ -295,7 +302,7 @@ static int get_length_dbcs( const struct dbcs_table *table, int flags, return len; } - if (defchar) defchar_value = defchar[1] ? ((defchar[0] << 8) | defchar[1]) : defchar[0]; + defchar_value = get_defchar_dbcs( table, defchar ); if (!used) used = &tmp; /* avoid checking on every char */ *used = 0; for (len = 0; srclen; len++, srclen--, src++) @@ -376,11 +383,10 @@ static int wcstombs_dbcs_slow( const struct dbcs_table *table, int flags, { const unsigned short * const uni2cp_low = table->uni2cp_low; const unsigned short * const uni2cp_high = table->uni2cp_high; - WCHAR defchar_value = table->info.def_char; + WCHAR defchar_value = get_defchar_dbcs( table, defchar ); WCHAR composed; int len, tmp; - if (defchar) defchar_value = defchar[1] ? ((defchar[0] << 8) | defchar[1]) : defchar[0]; if (!used) used = &tmp; /* avoid checking on every char */ *used = 0;
1
0
0
0
Aric Stewart : hidclass.sys: Add Plug-and-play and AddDevice.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: 43888392fac7d926ddcad13298cbb4ef74108482 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43888392fac7d926ddcad1329…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Sep 9 10:20:11 2015 -0500 hidclass.sys: Add Plug-and-play and AddDevice. --- dlls/hidclass.sys/Makefile.in | 3 +- dlls/hidclass.sys/hid.h | 11 ++++ dlls/hidclass.sys/main.c | 50 ++++++++++++++- dlls/hidclass.sys/pnp.c | 146 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 208 insertions(+), 2 deletions(-) diff --git a/dlls/hidclass.sys/Makefile.in b/dlls/hidclass.sys/Makefile.in index 6b474f6..c5c9eb7 100644 --- a/dlls/hidclass.sys/Makefile.in +++ b/dlls/hidclass.sys/Makefile.in @@ -5,4 +5,5 @@ DELAYIMPORTS = setupapi hid C_SRCS = \ device.c \ - main.c + main.c \ + pnp.c diff --git a/dlls/hidclass.sys/hid.h b/dlls/hidclass.sys/hid.h index 7114312..efa4712 100644 --- a/dlls/hidclass.sys/hid.h +++ b/dlls/hidclass.sys/hid.h @@ -33,6 +33,8 @@ #define DEFAULT_POLL_INTERVAL 200 #define MAX_POLL_INTERVAL_MSEC 10000 +typedef NTSTATUS (WINAPI *pAddDevice)(DRIVER_OBJECT *DriverObject, DEVICE_OBJECT *PhysicalDeviceObject); + typedef struct _BASE_DEVICE_EXTENSTION { HID_DEVICE_EXTENSION deviceExtension; @@ -57,9 +59,18 @@ typedef struct _minidriver HID_MINIDRIVER_REGISTRATION minidriver; PDRIVER_UNLOAD DriverUnload; + + pAddDevice AddDevice; } minidriver; +NTSTATUS call_minidriver(ULONG code, DEVICE_OBJECT *device, void *in_buff, ULONG in_size, void *out_buff, ULONG out_size) DECLSPEC_HIDDEN; +minidriver* find_minidriver(DRIVER_OBJECT* driver) DECLSPEC_HIDDEN; + /* Internal device functions */ NTSTATUS HID_CreateDevice(DEVICE_OBJECT *native_device, HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT **device) DECLSPEC_HIDDEN; NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device, LPCWSTR serial, LPCWSTR index) DECLSPEC_HIDDEN; void HID_DeleteDevice(HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT *device) DECLSPEC_HIDDEN; + +/* Pseudo-Plug and Play support*/ +NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT* PDO) DECLSPEC_HIDDEN; +void PNP_CleanupPNP(DRIVER_OBJECT *driver) DECLSPEC_HIDDEN; diff --git a/dlls/hidclass.sys/main.c b/dlls/hidclass.sys/main.c index e4844862..a58d9834 100644 --- a/dlls/hidclass.sys/main.c +++ b/dlls/hidclass.sys/main.c @@ -30,7 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(hid); static struct list minidriver_list = LIST_INIT(minidriver_list); -static minidriver* find_minidriver(DRIVER_OBJECT *driver) +minidriver* find_minidriver(DRIVER_OBJECT *driver) { minidriver *md; LIST_FOR_EACH_ENTRY(md, &minidriver_list, minidriver, entry) @@ -51,6 +51,7 @@ static VOID WINAPI UnloadDriver(DRIVER_OBJECT *driver) { if (md->DriverUnload) md->DriverUnload(md->minidriver.DriverObject); + PNP_CleanupPNP(md->minidriver.DriverObject); list_remove(&md->entry); HeapFree( GetProcessHeap(), 0, md ); } @@ -67,8 +68,55 @@ NTSTATUS WINAPI HidRegisterMinidriver(HID_MINIDRIVER_REGISTRATION *registration) driver->DriverUnload = registration->DriverObject->DriverUnload; registration->DriverObject->DriverUnload = UnloadDriver; + driver->AddDevice = registration->DriverObject->DriverExtension->AddDevice; + registration->DriverObject->DriverExtension->AddDevice = PNP_AddDevice; + driver->minidriver = *registration; list_add_tail(&minidriver_list, &driver->entry); return STATUS_SUCCESS; } + +static NTSTATUS WINAPI internalComplete(DEVICE_OBJECT *deviceObject, IRP *irp, + void *context ) +{ + SetEvent(irp->UserEvent); + return STATUS_MORE_PROCESSING_REQUIRED; +} + +NTSTATUS call_minidriver(ULONG code, DEVICE_OBJECT *device, void *in_buff, ULONG in_size, void *out_buff, ULONG out_size) +{ + IRP *irp; + IO_STATUS_BLOCK irp_status; + IO_STACK_LOCATION *irpsp; + NTSTATUS status; + void *buffer = NULL; + + HANDLE event = CreateEventA(NULL, FALSE, FALSE, NULL); + + if (out_size) + { + buffer = HeapAlloc(GetProcessHeap(), 0, out_size); + memcpy(buffer, out_buff, out_size); + } + + irp = IoBuildDeviceIoControlRequest(code, device, in_buff, in_size, + buffer, out_size, TRUE, event, &irp_status); + + irpsp = IoGetNextIrpStackLocation(irp); + irpsp->CompletionRoutine = internalComplete; + irpsp->Control = SL_INVOKE_ON_SUCCESS | SL_INVOKE_ON_ERROR; + + IoCallDriver(device, irp); + + if (irp->IoStatus.u.Status == STATUS_PENDING) + WaitForSingleObject(event, INFINITE); + + memcpy(out_buff, buffer, out_size); + status = irp->IoStatus.u.Status; + + IoCompleteRequest(irp, IO_NO_INCREMENT ); + CloseHandle(event); + + return status; +} diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c new file mode 100644 index 0000000..0fb06a2 --- /dev/null +++ b/dlls/hidclass.sys/pnp.c @@ -0,0 +1,146 @@ +/* + * WINE HID Pseudo-Plug and Play support + * + * Copyright 2015 Aric Stewart + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define NONAMELESSUNION +#include <unistd.h> +#include <stdarg.h> +#include "hid.h" +#include "ddk/hidtypes.h" +#include "wine/debug.h" +#include "wine/unicode.h" +#include "wine/list.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hid); + +typedef struct _NATIVE_DEVICE { + struct list entry; + + DWORD vidpid; + DEVICE_OBJECT *PDO; + DEVICE_OBJECT *FDO; + HID_MINIDRIVER_REGISTRATION *minidriver; + +} NATIVE_DEVICE; + +static struct list tracked_devices = LIST_INIT(tracked_devices); + +NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO) +{ + DEVICE_OBJECT *device = NULL; + NTSTATUS status; + minidriver *minidriver; + HID_DEVICE_ATTRIBUTES attr; + BASE_DEVICE_EXTENSION *ext = NULL; + WCHAR serial[256]; + WCHAR interface[256]; + DWORD index = HID_STRING_ID_ISERIALNUMBER; + NATIVE_DEVICE *tracked_device, *ptr; + INT interface_index = 1; + + static const WCHAR ig_fmtW[] = {'I','G','_','%','i',0}; + static const WCHAR im_fmtW[] = {'I','M','_','%','i',0}; + + + TRACE("PDO add device(%p)\n", PDO); + minidriver = find_minidriver(driver); + + status = HID_CreateDevice(PDO, &minidriver->minidriver, &device); + if (status != STATUS_SUCCESS) + { + ERR("Failed to create HID object (%x)\n",status); + return status; + } + + TRACE("Created device %p\n",device); + status = minidriver->AddDevice(minidriver->minidriver.DriverObject, device); + if (status != STATUS_SUCCESS) + { + ERR("Minidriver AddDevice failed (%x)\n",status); + HID_DeleteDevice(&minidriver->minidriver, device); + return status; + } + + status = call_minidriver(IOCTL_HID_GET_DEVICE_ATTRIBUTES, device, + NULL, 0, &attr, sizeof(attr)); + + if (status != STATUS_SUCCESS) + { + ERR("Minidriver failed to get Attributes(%x)\n",status); + HID_DeleteDevice(&minidriver->minidriver, device); + return status; + } + + ext = device->DeviceExtension; + ext->information.VendorID = attr.VendorID; + ext->information.ProductID = attr.ProductID; + ext->information.VersionNumber = attr.VersionNumber; + ext->information.Polled = minidriver->minidriver.DevicesArePolled; + + tracked_device = HeapAlloc(GetProcessHeap(), 0, sizeof(*tracked_device)); + tracked_device->vidpid = MAKELONG(attr.VendorID, attr.ProductID); + tracked_device->PDO = PDO; + tracked_device->FDO = device; + tracked_device->minidriver = &minidriver->minidriver; + + LIST_FOR_EACH_ENTRY(ptr, &tracked_devices, NATIVE_DEVICE, entry) + if (ptr->vidpid == tracked_device->vidpid) interface_index++; + + list_add_tail(&tracked_devices, &tracked_device->entry); + + serial[0] = 0; + status = call_minidriver(IOCTL_HID_GET_STRING, device, + &index, sizeof(DWORD), serial, sizeof(serial)); + + if (serial[0] == 0) + { + static const WCHAR wZeroSerial[]= {'0','0','0','0',0}; + lstrcpyW(serial, wZeroSerial); + } + + if (ext->preparseData->caps.UsagePage == HID_USAGE_PAGE_GENERIC && + (ext->preparseData->caps.Usage == HID_USAGE_GENERIC_GAMEPAD || + ext->preparseData->caps.Usage == HID_USAGE_GENERIC_JOYSTICK)) + sprintfW(interface, ig_fmtW, interface_index); + else + sprintfW(interface, im_fmtW, interface_index); + + HID_LinkDevice(device, serial, interface); + + ext->poll_interval = DEFAULT_POLL_INTERVAL; + InitializeListHead(&ext->irp_queue); + + return STATUS_SUCCESS; +} + +void PNP_CleanupPNP(DRIVER_OBJECT *driver) +{ + NATIVE_DEVICE *tracked_device, *ptr; + + LIST_FOR_EACH_ENTRY_SAFE(tracked_device, ptr, &tracked_devices, + NATIVE_DEVICE, entry) + { + if (tracked_device->minidriver->DriverObject == driver) + { + list_remove(&tracked_device->entry); + HID_DeleteDevice(tracked_device->minidriver, tracked_device->FDO); + HeapFree(GetProcessHeap(), 0, tracked_device); + } + } +}
1
0
0
0
Hans Leidekker : advapi32/tests: Avoid more test failures.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: a5b4ed75cf77c42313c691ba8f415f3a6e2c48d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a5b4ed75cf77c42313c691ba8…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Sep 11 10:58:33 2015 +0200 advapi32/tests: Avoid more test failures. --- dlls/advapi32/tests/security.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index ae9dd92..a5c98df 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -3789,7 +3789,8 @@ static void test_GetNamedSecurityInfoA(void) ok(bret, "Failed to get Builtin Admins ACE.\n"); flags = ((ACE_HEADER *)ace)->AceFlags; ok(flags == 0x0 - || broken(flags == (INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE|INHERITED_ACE)) /* w2k8 */, + || broken(flags == (INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE|INHERITED_ACE)) /* w2k8 */ + || broken(flags == (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE)), /* win7 */ "Builtin Admins ACE has unexpected flags (0x%x != 0x0)\n", flags); ok(ace->Mask == KEY_ALL_ACCESS || broken(ace->Mask == GENERIC_ALL) /* w2k8 */, "Builtin Admins ACE has unexpected mask (0x%x != 0x%x)\n", ace->Mask, KEY_ALL_ACCESS); @@ -5884,13 +5885,13 @@ static void test_system_security_access(void) /* ACCESS_SYSTEM_SECURITY requires special privilege */ res = RegCreateKeyExW( HKEY_LOCAL_MACHINE, testkeyW, 0, NULL, 0, KEY_READ|ACCESS_SYSTEM_SECURITY, NULL, &hkey, NULL ); - todo_wine ok( res == ERROR_PRIVILEGE_NOT_HELD, "got %d\n", res ); if (res == ERROR_ACCESS_DENIED) { skip( "unprivileged user\n" ); CloseHandle( token ); return; } + todo_wine ok( res == ERROR_PRIVILEGE_NOT_HELD, "got %d\n", res ); priv.PrivilegeCount = 1; priv.Privileges[0].Luid = luid; @@ -5901,7 +5902,6 @@ static void test_system_security_access(void) ok( ret, "got %u\n", GetLastError()); res = RegCreateKeyExW( HKEY_LOCAL_MACHINE, testkeyW, 0, NULL, 0, KEY_READ|ACCESS_SYSTEM_SECURITY, NULL, &hkey, NULL ); - ok( !res, "got %d\n", res ); if (res == ERROR_PRIVILEGE_NOT_HELD) { win_skip( "privilege not held\n" ); @@ -5909,6 +5909,7 @@ static void test_system_security_access(void) CloseHandle( token ); return; } + ok( !res, "got %d\n", res ); /* restore privileges */ ret = AdjustTokenPrivileges( token, FALSE, priv_prev, 0, NULL, NULL );
1
0
0
0
Hans Leidekker : webservices: Add tests.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: 0194595d9ad1c3037a33d102230b0131fca78622 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0194595d9ad1c3037a33d1022…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Sep 11 11:00:20 2015 +0200 webservices: Add tests. --- configure | 1 + configure.ac | 1 + dlls/webservices/tests/Makefile.in | 5 ++ dlls/webservices/tests/reader.c | 118 +++++++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+) diff --git a/configure b/configure index 15a122b..aeec729 100755 --- a/configure +++ b/configure @@ -17823,6 +17823,7 @@ wine_fn_config_test dlls/wbemdisp/tests wbemdisp_test wine_fn_config_dll wbemprox enable_wbemprox clean wine_fn_config_test dlls/wbemprox/tests wbemprox_test wine_fn_config_dll webservices enable_webservices implib +wine_fn_config_test dlls/webservices/tests webservices_test wine_fn_config_dll wer enable_wer implib wine_fn_config_test dlls/wer/tests wer_test wine_fn_config_dll wevtapi enable_wevtapi diff --git a/configure.ac b/configure.ac index aec53f6..ed7030f 100644 --- a/configure.ac +++ b/configure.ac @@ -3375,6 +3375,7 @@ WINE_CONFIG_TEST(dlls/wbemdisp/tests) WINE_CONFIG_DLL(wbemprox,,[clean]) WINE_CONFIG_TEST(dlls/wbemprox/tests) WINE_CONFIG_DLL(webservices,,[implib]) +WINE_CONFIG_TEST(dlls/webservices/tests) WINE_CONFIG_DLL(wer,,[implib]) WINE_CONFIG_TEST(dlls/wer/tests) WINE_CONFIG_DLL(wevtapi) diff --git a/dlls/webservices/tests/Makefile.in b/dlls/webservices/tests/Makefile.in new file mode 100644 index 0000000..d19fdc2 --- /dev/null +++ b/dlls/webservices/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = webservices.dll +IMPORTS = webservices + +C_SRCS = \ + reader.c diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c new file mode 100644 index 0000000..0db68a0 --- /dev/null +++ b/dlls/webservices/tests/reader.c @@ -0,0 +1,118 @@ +/* + * Copyright 2015 Hans Leidekker 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 <stdio.h> +#include "windows.h" +#include "webservices.h" +#include "wine/test.h" + +static void test_WsCreateError(void) +{ + HRESULT hr; + WS_ERROR *error; + WS_ERROR_PROPERTY prop; + ULONG size, code, count; + LANGID langid; + + hr = WsCreateError( NULL, 0, NULL ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + error = NULL; + hr = WsCreateError( NULL, 0, &error ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( error != NULL, "error not set\n" ); + + count = 0xdeadbeef; + size = sizeof(count); + hr = WsGetErrorProperty( error, WS_ERROR_PROPERTY_STRING_COUNT, &count, size ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !count, "got %u\n", count ); + + hr = WsSetErrorProperty( error, WS_ERROR_PROPERTY_STRING_COUNT, &count, size ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + code = 0xdeadbeef; + size = sizeof(code); + hr = WsGetErrorProperty( error, WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE, &code, size ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( !code, "got %u\n", code ); + + code = 0xdeadbeef; + hr = WsSetErrorProperty( error, WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE, &code, size ); + ok( hr == S_OK, "got %08x\n", hr ); + hr = WsGetErrorProperty( error, WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE, &code, size ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( code == 0xdeadbeef, "got %u\n", code ); + + langid = 0xdead; + size = sizeof(langid); + hr = WsGetErrorProperty( error, WS_ERROR_PROPERTY_LANGID, &langid, size ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( langid == GetUserDefaultUILanguage(), "got %u\n", langid ); + + langid = MAKELANGID( LANG_DUTCH, SUBLANG_DEFAULT ); + hr = WsSetErrorProperty( error, WS_ERROR_PROPERTY_LANGID, &langid, size ); + ok( hr == WS_E_INVALID_OPERATION, "got %08x\n", hr ); + + count = 0xdeadbeef; + size = sizeof(count); + hr = WsGetErrorProperty( error, WS_ERROR_PROPERTY_LANGID + 1, &count, size ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + ok( count == 0xdeadbeef, "got %u\n", count ); + WsFreeError( error ); + + count = 1; + prop.id = WS_ERROR_PROPERTY_STRING_COUNT; + prop.value = &count; + prop.valueSize = sizeof(count); + hr = WsCreateError( &prop, 1, &error ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + code = 0xdeadbeef; + prop.id = WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE; + prop.value = &code; + prop.valueSize = sizeof(code); + hr = WsCreateError( &prop, 1, &error ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); + + langid = MAKELANGID( LANG_DUTCH, SUBLANG_DEFAULT ); + prop.id = WS_ERROR_PROPERTY_LANGID; + prop.value = &langid; + prop.valueSize = sizeof(langid); + hr = WsCreateError( &prop, 1, &error ); + ok( hr == S_OK, "got %08x\n", hr ); + + langid = 0xdead; + size = sizeof(langid); + hr = WsGetErrorProperty( error, WS_ERROR_PROPERTY_LANGID, &langid, size ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( langid == MAKELANGID( LANG_DUTCH, SUBLANG_DEFAULT ), "got %u\n", langid ); + WsFreeError( error ); + + count = 0xdeadbeef; + prop.id = WS_ERROR_PROPERTY_LANGID + 1; + prop.value = &count; + prop.valueSize = sizeof(count); + hr = WsCreateError( &prop, 1, &error ); + ok( hr == E_INVALIDARG, "got %08x\n", hr ); +} + +START_TEST(reader) +{ + test_WsCreateError(); +}
1
0
0
0
Hans Leidekker : webservices: Implement WsGetErrorProperty and WsSetErrorProperty.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: a1d2f213925ccfe6af9c5730aad8f384bea44586 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a1d2f213925ccfe6af9c5730a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Sep 11 10:59:51 2015 +0200 webservices: Implement WsGetErrorProperty and WsSetErrorProperty. --- dlls/webservices/reader.c | 35 +++++++++++++++++++++++++++++++++++ dlls/webservices/webservices.spec | 4 ++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c index 08dae6d..ac7de65 100644 --- a/dlls/webservices/reader.c +++ b/dlls/webservices/reader.c @@ -95,6 +95,15 @@ static HRESULT set_error_prop( struct error *error, WS_ERROR_PROPERTY_ID id, con return S_OK; } +static HRESULT get_error_prop( struct error *error, WS_ERROR_PROPERTY_ID id, void *buf, ULONG size ) +{ + if (id >= error->prop_count || size != error_props[id].size) + return E_INVALIDARG; + + memcpy( buf, error->prop[id].value, error->prop[id].valueSize ); + return S_OK; +} + /************************************************************************** * WsCreateError [webservices.@] */ @@ -140,3 +149,29 @@ void WINAPI WsFreeError( WS_ERROR *handle ) TRACE( "%p\n", handle ); heap_free( error ); } + +/************************************************************************** + * WsGetErrorProperty [webservices.@] + */ +HRESULT WINAPI WsGetErrorProperty( WS_ERROR *handle, WS_ERROR_PROPERTY_ID id, void *buf, + ULONG size ) +{ + struct error *error = (struct error *)handle; + + TRACE( "%p %u %p %u\n", handle, id, buf, size ); + return get_error_prop( error, id, buf, size ); +} + +/************************************************************************** + * WsSetErrorProperty [webservices.@] + */ +HRESULT WINAPI WsSetErrorProperty( WS_ERROR *handle, WS_ERROR_PROPERTY_ID id, const void *value, + ULONG size ) +{ + struct error *error = (struct error *)handle; + + TRACE( "%p %u %p %u\n", handle, id, value, size ); + + if (id == WS_ERROR_PROPERTY_LANGID) return WS_E_INVALID_OPERATION; + return set_error_prop( error, id, value, size ); +} diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 9bf6496..0ff3c0d 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -62,7 +62,7 @@ @ stub WsGetChannelProperty @ stub WsGetCustomHeader @ stub WsGetDictionary -@ stub WsGetErrorProperty +@ stdcall WsGetErrorProperty(ptr long ptr long) @ stub WsGetErrorString @ stub WsGetFaultErrorDetail @ stub WsGetFaultErrorProperty @@ -146,7 +146,7 @@ @ stub WsSendMessage @ stub WsSendReplyMessage @ stub WsSetChannelProperty -@ stub WsSetErrorProperty +@ stdcall WsSetErrorProperty(ptr long ptr long) @ stub WsSetFaultErrorDetail @ stub WsSetFaultErrorProperty @ stub WsSetHeader
1
0
0
0
Hans Leidekker : webservices: Implement WsCreateError and WsFreeError.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: 60f1b8514e2b0a3a51a88633ec25746db89e67ae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60f1b8514e2b0a3a51a88633e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Sep 11 10:59:21 2015 +0200 webservices: Implement WsCreateError and WsFreeError. --- dlls/webservices/Makefile.in | 3 +- dlls/webservices/main.c | 10 --- dlls/webservices/reader.c | 142 ++++++++++++++++++++++++++++++++++++++ dlls/webservices/webservices.spec | 2 +- 4 files changed, 145 insertions(+), 12 deletions(-) diff --git a/dlls/webservices/Makefile.in b/dlls/webservices/Makefile.in index faac996..e11a2e7 100644 --- a/dlls/webservices/Makefile.in +++ b/dlls/webservices/Makefile.in @@ -2,4 +2,5 @@ MODULE = webservices.dll IMPORTLIB = webservices C_SRCS = \ - main.c + main.c \ + reader.c diff --git a/dlls/webservices/main.c b/dlls/webservices/main.c index e221d57..f99c5cd 100644 --- a/dlls/webservices/main.c +++ b/dlls/webservices/main.c @@ -42,13 +42,3 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) return TRUE; } - -/************************************************************************** - * WsCreateError [webservices.@] - */ -HRESULT WINAPI WsCreateError(const WS_ERROR_PROPERTY *properties, ULONG count, WS_ERROR **error) -{ - FIXME("%p %u %p: stub\n", properties, count, error); - if (error) *error = NULL; - return E_NOTIMPL; -} diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c new file mode 100644 index 0000000..08dae6d --- /dev/null +++ b/dlls/webservices/reader.c @@ -0,0 +1,142 @@ +/* + * Copyright 2015 Hans Leidekker 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 "winnls.h" +#include "webservices.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(webservices); + +static inline void *heap_alloc( SIZE_T size ) +{ + return HeapAlloc( GetProcessHeap(), 0, size ); +} + +static inline void *heap_alloc_zero( SIZE_T size ) +{ + return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, size ); +} + +static inline void *heap_realloc( void *mem, SIZE_T size ) +{ + return HeapReAlloc( GetProcessHeap(), 0, mem, size ); +} + +static inline BOOL heap_free( void *mem ) +{ + return HeapFree( GetProcessHeap(), 0, mem ); +} + +static const struct +{ + ULONG size; + BOOL readonly; +} +error_props[] = +{ + { sizeof(ULONG), TRUE }, /* WS_ERROR_PROPERTY_STRING_COUNT */ + { sizeof(ULONG), FALSE }, /* WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE */ + { sizeof(LANGID), FALSE } /* WS_ERROR_PROPERTY_LANGID */ +}; + +struct error +{ + ULONG prop_count; + WS_ERROR_PROPERTY prop[sizeof(error_props)/sizeof(error_props[0])]; +}; + +static struct error *alloc_error(void) +{ + static const ULONG count = sizeof(error_props)/sizeof(error_props[0]); + struct error *ret; + ULONG i, size = sizeof(*ret) + count * sizeof(WS_ERROR_PROPERTY); + char *ptr; + + for (i = 0; i < count; i++) size += error_props[i].size; + if (!(ret = heap_alloc_zero( size ))) return NULL; + + ptr = (char *)&ret->prop[count]; + for (i = 0; i < count; i++) + { + ret->prop[i].value = ptr; + ret->prop[i].valueSize = error_props[i].size; + ptr += ret->prop[i].valueSize; + } + ret->prop_count = count; + return ret; +} + +static HRESULT set_error_prop( struct error *error, WS_ERROR_PROPERTY_ID id, const void *value, ULONG size ) +{ + if (id >= error->prop_count || size != error_props[id].size || error_props[id].readonly) + return E_INVALIDARG; + + memcpy( error->prop[id].value, value, size ); + return S_OK; +} + +/************************************************************************** + * WsCreateError [webservices.@] + */ +HRESULT WINAPI WsCreateError( const WS_ERROR_PROPERTY *properties, ULONG count, WS_ERROR **handle ) +{ + struct error *error; + LANGID langid = GetUserDefaultUILanguage(); + HRESULT hr; + ULONG i; + + TRACE( "%p %u %p\n", properties, count, handle ); + + if (!handle) return E_INVALIDARG; + if (!(error = alloc_error())) return E_OUTOFMEMORY; + + set_error_prop( error, WS_ERROR_PROPERTY_LANGID, &langid, sizeof(langid) ); + for (i = 0; i < count; i++) + { + if (properties[i].id == WS_ERROR_PROPERTY_ORIGINAL_ERROR_CODE) + { + heap_free( error ); + return E_INVALIDARG; + } + hr = set_error_prop( error, properties[i].id, properties[i].value, properties[i].valueSize ); + if (hr != S_OK) + { + heap_free( error ); + return hr; + } + } + + *handle = (WS_ERROR *)error; + return S_OK; +} + +/************************************************************************** + * WsFreeError [webservices.@] + */ +void WINAPI WsFreeError( WS_ERROR *handle ) +{ + struct error *error = (struct error *)handle; + + TRACE( "%p\n", handle ); + heap_free( error ); +} diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 386207c..9bf6496 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -49,7 +49,7 @@ @ stub WsFlushBody @ stub WsFlushWriter @ stub WsFreeChannel -@ stub WsFreeError +@ stdcall WsFreeError(ptr) @ stub WsFreeHeap @ stub WsFreeListener @ stub WsFreeMessage
1
0
0
0
Hans Leidekker : include: Add missing Web Services declarations.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: dccb4293f3904df6fc11b595e7dc6f804ec48a24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dccb4293f3904df6fc11b595e…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Sep 11 10:58:54 2015 +0200 include: Add missing Web Services declarations. --- include/webservices.h | 381 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 381 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=dccb4293f3904df6fc11b…
1
0
0
0
Dmitry Timoshkov : msvideo: Add support for 16-bit MCIWndProc.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: 70161bc134ce8e7198d41c65ff147630a397f095 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70161bc134ce8e7198d41c65f…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Sep 11 12:27:54 2015 +0800 msvideo: Add support for 16-bit MCIWndProc. --- dlls/msvideo.dll16/Makefile.in | 2 +- dlls/msvideo.dll16/msvideo16.c | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/dlls/msvideo.dll16/Makefile.in b/dlls/msvideo.dll16/Makefile.in index e08205e..5f7a9a4 100644 --- a/dlls/msvideo.dll16/Makefile.in +++ b/dlls/msvideo.dll16/Makefile.in @@ -1,5 +1,5 @@ MODULE = msvideo.dll16 -IMPORTS = msvfw32 version advapi32 +IMPORTS = msvfw32 version advapi32 user32 EXTRADLLFLAGS = -m16 -Wb,--main-module,msvfw32.dll diff --git a/dlls/msvideo.dll16/msvideo16.c b/dlls/msvideo.dll16/msvideo16.c index e6c6c1e..1b715e4 100644 --- a/dlls/msvideo.dll16/msvideo16.c +++ b/dlls/msvideo.dll16/msvideo16.c @@ -981,11 +981,31 @@ BOOL CDECL MCIWndRegisterClass16(void) return MCIWndRegisterClass(); } +static LRESULT (WINAPI *pMCIWndProc)(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); + +static LRESULT WINAPI MCIWndProc16(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) +{ + switch (msg) + { + case MCIWNDM_SENDSTRINGA: + lparam = (ULONG_PTR)MapSL(lparam); + break; + + default: + break; + } + + return CallWindowProcA(pMCIWndProc, hwnd, msg, wparam, lparam); +} + /*********************************************************************** * MCIWndCreate(MSVIDEO.250) */ -HWND16 CDECL MCIWndCreate16(HWND16 hwnd, HINSTANCE16 hinst16, - DWORD style, LPSTR file) +HWND16 CDECL MCIWndCreate16(HWND16 parent, HINSTANCE16 hinst16, + DWORD style, LPSTR file) { - return HWND_16(MCIWndCreateA(HWND_32(hwnd), 0, style, file)); + HWND hwnd = MCIWndCreateA(HWND_32(parent), 0, style, file); + if (hwnd) + pMCIWndProc = (void *)SetWindowLongPtrA(hwnd, GWLP_WNDPROC, (ULONG_PTR)MCIWndProc16); + return HWND_16(hwnd); }
1
0
0
0
Dmitry Timoshkov : msvideo: Implement MCIWndRegisterClass.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: 303172e332625a913373a7cf9d7107e63273c2dc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=303172e332625a913373a7cf9…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Sep 11 12:27:41 2015 +0800 msvideo: Implement MCIWndRegisterClass. --- dlls/msvideo.dll16/msvideo.dll16.spec | 2 +- dlls/msvideo.dll16/msvideo16.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/msvideo.dll16/msvideo.dll16.spec b/dlls/msvideo.dll16/msvideo.dll16.spec index 894fc9c..f45f644 100644 --- a/dlls/msvideo.dll16/msvideo.dll16.spec +++ b/dlls/msvideo.dll16/msvideo.dll16.spec @@ -63,6 +63,6 @@ 245 stub ICSEQCOMPRESSFRAMEEND 246 stub ICSEQCOMPRESSFRAME 250 cdecl _MCIWndCreate(word word long str) MCIWndCreate16 -251 stub _MCIWNDREGISTERCLASS +251 cdecl _MCIWndRegisterClass() MCIWndRegisterClass16 252 stub GETOPENFILENAMEPREVIEW 253 stub GETSAVEFILENAMEPREVIEW diff --git a/dlls/msvideo.dll16/msvideo16.c b/dlls/msvideo.dll16/msvideo16.c index 12833c9..e6c6c1e 100644 --- a/dlls/msvideo.dll16/msvideo16.c +++ b/dlls/msvideo.dll16/msvideo16.c @@ -974,6 +974,14 @@ BOOL WINAPI VIDEO_LibMain(DWORD fdwReason, HINSTANCE hinstDLL, WORD ds, } /*********************************************************************** + * MCIWndRegisterClass(MSVIDEO.251) + */ +BOOL CDECL MCIWndRegisterClass16(void) +{ + return MCIWndRegisterClass(); +} + +/*********************************************************************** * MCIWndCreate(MSVIDEO.250) */ HWND16 CDECL MCIWndCreate16(HWND16 hwnd, HINSTANCE16 hinst16,
1
0
0
0
Nikolay Sivov : gdi32/tests: Avoid excessive traces for fonts with OS/ 2 version 4 tables.
by Alexandre Julliard
11 Sep '15
11 Sep '15
Module: wine Branch: master Commit: efb8afcfdcda88c8664641495e2adb05ca9a3319 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=efb8afcfdcda88c8664641495…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Sep 10 14:47:11 2015 +0300 gdi32/tests: Avoid excessive traces for fonts with OS/2 version 4 tables. --- dlls/gdi32/tests/font.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 6b0da1f..cdc7726 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -3188,9 +3188,14 @@ typedef struct USHORT usDefaultChar; USHORT usBreakChar; USHORT usMaxContext; -} TT_OS2_V2; + /* version 4 (OpenType 1.6) */ + USHORT usLowerOpticalPointSize; + USHORT usUpperOpticalPointSize; +} TT_OS2_V4; #include "poppack.h" +#define TT_OS2_V0_SIZE (FIELD_OFFSET(TT_OS2_V4, ulCodePageRange1)) + typedef struct { USHORT version; @@ -3242,7 +3247,7 @@ typedef struct USHORT id_range_offset; } cmap_format_4_seg; -static void expect_ff(const TEXTMETRICA *tmA, const TT_OS2_V2 *os2, WORD family, const char *name) +static void expect_ff(const TEXTMETRICA *tmA, const TT_OS2_V4 *os2, WORD family, const char *name) { ok((tmA->tmPitchAndFamily & 0xf0) == family || broken(PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH), @@ -3662,7 +3667,7 @@ static void test_text_metrics(const LOGFONTA *lf, const NEWTEXTMETRICA *ntm) HDC hdc; HFONT hfont, hfont_old; TEXTMETRICA tmA; - TT_OS2_V2 tt_os2; + TT_OS2_V4 tt_os2; LONG size, ret; const char *font_name = lf->lfFaceName; DWORD cmap_first = 0, cmap_last = 0; @@ -3693,7 +3698,8 @@ static void test_text_metrics(const LOGFONTA *lf, const NEWTEXTMETRICA *ntm) memset(&tt_os2, 0, sizeof(tt_os2)); ret = GetFontData(hdc, MS_OS2_TAG, 0, &tt_os2, size); - ok(ret == size, "GetFontData should return %u not %u\n", size, ret); + ok(ret >= TT_OS2_V0_SIZE && ret <= size, "GetFontData should return size from [%u,%u] not %u\n", TT_OS2_V0_SIZE, + size, ret); SetLastError(0xdeadbeef); ret = GetTextMetricsA(hdc, &tmA);
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
32
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Results per page:
10
25
50
100
200