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
August 2013
----- 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
461 discussions
Start a n
N
ew thread
Stefan Dösinger : wined3d: Free volume sysmem after upload.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: 5ff1237563bdb8723c368ceca63385fe1227cf55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5ff1237563bdb8723c368ceca…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Aug 22 23:22:46 2013 +0200 wined3d: Free volume sysmem after upload. --- dlls/wined3d/volume.c | 30 ++++++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index e2adf05..d95fd91 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -113,6 +113,26 @@ static void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DW } /* Context activation is done by the caller. */ +static void wined3d_volume_download_data(struct wined3d_volume *volume, + const struct wined3d_context *context) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_format *format = volume->resource.format; + + gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_3D, volume->texture_level, + format->glFormat, format->glType, volume->resource.allocatedMemory); + checkGLcall("glGetTexImage"); +} + +static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume) +{ + wined3d_resource_free_sysmem(volume->resource.heap_memory); + volume->resource.heap_memory = NULL; + volume->resource.allocatedMemory = NULL; + wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_SYSMEM); +} + +/* Context activation is done by the caller. */ static void wined3d_volume_load_location(struct wined3d_volume *volume, struct wined3d_context *context, DWORD location) { @@ -160,6 +180,10 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume, return; } wined3d_volume_validate_location(volume, WINED3D_LOCATION_TEXTURE_RGB); + + if (volume->resource.pool == WINED3D_POOL_MANAGED && volume->download_count < 10) + wined3d_volume_evict_sysmem(volume); + break; case WINED3D_LOCATION_SYSMEM: @@ -174,6 +198,12 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume, TRACE("Volume previously discarded, nothing to do.\n"); wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED); } + else if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB) + { + volume_bind_and_dirtify(volume, context); + volume->download_count++; + wined3d_volume_download_data(volume, context); + } else { FIXME("Implement WINED3D_LOCATION_SYSMEM loading from %s.\n", diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a09ee80..0bc84bf 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2067,6 +2067,7 @@ struct wined3d_volume DWORD flags, locations; GLint texture_level; + DWORD download_count; }; static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource)
1
0
0
0
Stefan Dösinger : wined3d: Move volume sysmem allocation into a separate function.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: a89f2e6301c22cb6b76df1500946cd9582706988 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a89f2e6301c22cb6b76df1500…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Aug 22 23:22:45 2013 +0200 wined3d: Move volume sysmem allocation into a separate function. --- dlls/wined3d/volume.c | 46 ++++++++++++++++++++++++++++++---------------- 1 files changed, 30 insertions(+), 16 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 8ef841d..e2adf05 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -203,6 +203,19 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context * wined3d_volume_load_location(volume, context, WINED3D_LOCATION_TEXTURE_RGB); } +static BOOL volume_prepare_system_memory(struct wined3d_volume *volume) +{ + if (volume->resource.allocatedMemory) + return TRUE; + + volume->resource.heap_memory = wined3d_resource_allocate_sysmem(volume->resource.size); + if (!volume->resource.heap_memory) + return FALSE; + volume->resource.allocatedMemory = volume->resource.heap_memory; + return TRUE; +} + + static void volume_unload(struct wined3d_resource *resource) { struct wined3d_volume *volume = volume_from_resource(resource); @@ -214,13 +227,19 @@ static void volume_unload(struct wined3d_resource *resource) TRACE("texture %p.\n", resource); - context = context_acquire(device, NULL); - - wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM); - - context_release(context); - - wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM); + if (volume_prepare_system_memory(volume)) + { + context = context_acquire(device, NULL); + wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM); + context_release(context); + wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM); + } + else + { + ERR("Out of memory when unloading volume %p.\n", volume); + wined3d_volume_validate_location(volume, WINED3D_LOCATION_DISCARDED); + wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_DISCARDED); + } /* The texture name is managed by the container. */ volume->flags &= ~WINED3D_VFLAG_ALLOCATED; @@ -306,16 +325,11 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, TRACE("volume %p, map_desc %p, box %p, flags %#x.\n", volume, map_desc, box, flags); - if (!volume->resource.allocatedMemory) + if (!volume_prepare_system_memory(volume)) { - volume->resource.heap_memory = wined3d_resource_allocate_sysmem(volume->resource.size); - if (!volume->resource.heap_memory) - { - WARN("Out of memory.\n"); - map_desc->data = NULL; - return E_OUTOFMEMORY; - } - volume->resource.allocatedMemory = volume->resource.heap_memory; + WARN("Out of memory.\n"); + map_desc->data = NULL; + return E_OUTOFMEMORY; } if (!(volume->locations & WINED3D_LOCATION_SYSMEM))
1
0
0
0
Gediminas Jakutis : wined3d: Recognize Nvidia GeForce GTX 770.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: 6ca8b274bbe3525e8c32135856743987809fa5f8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ca8b274bbe3525e8c3213585…
Author: Gediminas Jakutis <gediminas(a)varciai.lt> Date: Thu Aug 22 23:30:36 2013 +0300 wined3d: Recognize Nvidia GeForce GTX 770. --- dlls/wined3d/directx.c | 2 ++ dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 6e96233..6aba6a3 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1257,6 +1257,7 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670MX, "NVIDIA GeForce GTX 670MX", DRIVER_NVIDIA_GEFORCE6, 3072}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX680, "NVIDIA GeForce GTX 680", DRIVER_NVIDIA_GEFORCE6, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770M, "NVIDIA GeForce GTX 770M", DRIVER_NVIDIA_GEFORCE6, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770, "NVIDIA GeForce GTX 770", DRIVER_NVIDIA_GEFORCE6, 2048}, /* AMD cards */ {HW_VENDOR_AMD, CARD_AMD_RAGE_128PRO, "ATI Rage Fury", DRIVER_AMD_RAGE_128PRO, 16 }, @@ -1660,6 +1661,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl cards[] = { {"GTX 770M", CARD_NVIDIA_GEFORCE_GTX770M}, /* Geforce 700 - midend high mobile */ + {"GTX 770", CARD_NVIDIA_GEFORCE_GTX770}, /* Geforce 700 - highend */ {"GTX 680", CARD_NVIDIA_GEFORCE_GTX680}, /* Geforce 600 - highend */ {"GTX 670MX", CARD_NVIDIA_GEFORCE_GTX670MX}, /* Geforce 600 - highend */ {"GTX 670", CARD_NVIDIA_GEFORCE_GTX670}, /* Geforce 600 - midend high */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 46b0fdd..a09ee80 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1466,6 +1466,7 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX670MX = 0x11a1, CARD_NVIDIA_GEFORCE_GTX680 = 0x1180, CARD_NVIDIA_GEFORCE_GTX770M = 0x11e0, + CARD_NVIDIA_GEFORCE_GTX770 = 0x1184, CARD_INTEL_830M = 0x3577, CARD_INTEL_855GM = 0x3582,
1
0
0
0
Nikolay Sivov : ntdll: Implement compatible typelib section.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: 36acd61447904f5b59fe1df45161a19935abd547 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36acd61447904f5b59fe1df45…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Aug 23 09:48:34 2013 +0400 ntdll: Implement compatible typelib section. --- dlls/kernel32/tests/actctx.c | 2 - dlls/ntdll/actctx.c | 311 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 296 insertions(+), 17 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=36acd61447904f5b59fe1…
1
0
0
0
Nikolay Sivov : ntdll: Parse 'flags' and 'version' attributes of typelib sections.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: 1ca7eb649c5065cedaa86d6a9393cd6a9c912a5d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1ca7eb649c5065cedaa86d6a9…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Aug 23 09:38:29 2013 +0400 ntdll: Parse 'flags' and 'version' attributes of typelib sections. --- dlls/ntdll/actctx.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 89 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 56a28fa..37ab11b 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -57,6 +57,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(actctx); #define RT_MANIFEST ((ULONG_PTR)24) #define CREATEPROCESS_MANIFEST_RESOURCE_ID ((ULONG_PTR)1) +/* from oaidl.h */ +typedef enum tagLIBFLAGS { + LIBFLAG_FRESTRICTED = 0x1, + LIBFLAG_FCONTROL = 0x2, + LIBFLAG_FHIDDEN = 0x4, + LIBFLAG_FHASDISKIMAGE = 0x8 +} LIBFLAGS; + typedef struct { const WCHAR *ptr; @@ -179,8 +187,10 @@ struct entity struct { WCHAR *tlbid; - WCHAR *version; WCHAR *helpdir; + WORD flags; + WORD major; + WORD minor; } typelib; struct { @@ -311,6 +321,11 @@ static const WCHAR xmlnsW[] = {'x','m','l','n','s',0}; static const WCHAR versionedW[] = {'v','e','r','s','i','o','n','e','d',0}; static const WCHAR yesW[] = {'y','e','s',0}; static const WCHAR noW[] = {'n','o',0}; +static const WCHAR restrictedW[] = {'R','E','S','T','R','I','C','T','E','D',0}; +static const WCHAR controlW[] = {'C','O','N','T','R','O','L',0}; +static const WCHAR hiddenW[] = {'H','I','D','D','E','N',0}; +static const WCHAR hasdiskimageW[] = {'H','A','S','D','I','S','K','I','M','A','G','E',0}; +static const WCHAR flagsW[] = {'f','l','a','g','s',0}; static const WCHAR xmlW[] = {'?','x','m','l',0}; static const WCHAR manifestv1W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','1',0}; @@ -503,7 +518,6 @@ static void free_entity_array(struct entity_array *array) break; case ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION: RtlFreeHeap(GetProcessHeap(), 0, entity->u.typelib.tlbid); - RtlFreeHeap(GetProcessHeap(), 0, entity->u.typelib.version); RtlFreeHeap(GetProcessHeap(), 0, entity->u.typelib.helpdir); break; case ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION: @@ -1076,6 +1090,72 @@ static BOOL parse_cominterface_proxy_stub_elem(xmlbuf_t* xmlbuf, struct dll_redi return parse_expect_end_elem(xmlbuf, comInterfaceProxyStubW, asmv1W); } +static BOOL parse_typelib_flags(const xmlstr_t *value, struct entity *entity) +{ + WORD *flags = &entity->u.typelib.flags; + const WCHAR *str = value->ptr, *start; + int i = 0; + + *flags = 0; + + /* it's comma separated list of flags */ + while (i < value->len) + { + start = str; + while (*str != ',' && (i++ < value->len)) str++; + + if (!strncmpW(start, restrictedW, str-start)) + *flags |= LIBFLAG_FRESTRICTED; + else if (!strncmpW(start, controlW, str-start)) + *flags |= LIBFLAG_FCONTROL; + else if (!strncmpW(start, hiddenW, str-start)) + *flags |= LIBFLAG_FHIDDEN; + else if (!strncmpW(start, hasdiskimageW, str-start)) + *flags |= LIBFLAG_FHASDISKIMAGE; + else + { + WARN("unknown flags value %s\n", debugstr_xmlstr(value)); + return FALSE; + } + + /* skip separator */ + str++; + i++; + } + + return TRUE; +} + +static BOOL parse_typelib_version(const xmlstr_t *str, struct entity *entity) +{ + unsigned int ver[2]; + unsigned int pos; + const WCHAR *curr; + + /* major.minor */ + ver[0] = ver[1] = pos = 0; + for (curr = str->ptr; curr < str->ptr + str->len; curr++) + { + if (*curr >= '0' && *curr <= '9') + { + ver[pos] = ver[pos] * 10 + *curr - '0'; + if (ver[pos] >= 0x10000) goto error; + } + else if (*curr == '.') + { + if (++pos >= 2) goto error; + } + else goto error; + } + entity->u.typelib.major = ver[0]; + entity->u.typelib.minor = ver[1]; + return TRUE; + +error: + FIXME("wrong typelib version value (%s)\n", debugstr_xmlstr(str)); + return FALSE; +} + static BOOL parse_typelib_elem(xmlbuf_t* xmlbuf, struct dll_redirect* dll) { xmlstr_t attr_name, attr_value; @@ -1091,14 +1171,18 @@ static BOOL parse_typelib_elem(xmlbuf_t* xmlbuf, struct dll_redirect* dll) { if (!(entity->u.typelib.tlbid = xmlstrdupW(&attr_value))) return FALSE; } - if (xmlstr_cmp(&attr_name, versionW)) + else if (xmlstr_cmp(&attr_name, versionW)) { - if (!(entity->u.typelib.version = xmlstrdupW(&attr_value))) return FALSE; + if (!parse_typelib_version(&attr_value, entity)) return FALSE; } - if (xmlstr_cmp(&attr_name, helpdirW)) + else if (xmlstr_cmp(&attr_name, helpdirW)) { if (!(entity->u.typelib.helpdir = xmlstrdupW(&attr_value))) return FALSE; } + else if (xmlstr_cmp(&attr_name, flagsW)) + { + if (!parse_typelib_flags(&attr_value, entity)) return FALSE; + } else { WARN("unknown attr %s=%s\n", debugstr_xmlstr(&attr_name), debugstr_xmlstr(&attr_value));
1
0
0
0
Nikolay Sivov : kernel32/tests: Some tests for typelib sections.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: 1faebbd20299aa44f35ec1a40f400cfbe142b2f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1faebbd20299aa44f35ec1a40…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Aug 23 09:20:16 2013 +0400 kernel32/tests: Some tests for typelib sections. --- dlls/kernel32/tests/actctx.c | 113 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 111 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index ed38571..bd8ab13 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -24,6 +24,7 @@ #include <winnls.h> #include <stdio.h> +#include "oaidl.h" #include "initguid.h" static BOOL (WINAPI *pActivateActCtx)(HANDLE,ULONG_PTR*); @@ -85,6 +86,9 @@ static const char manifest2[] = DEFINE_GUID(IID_CoTest, 0x12345678, 0x1234, 0x5678, 0x12, 0x34, 0x11, 0x11, 0x22, 0x22, 0x33, 0x33); DEFINE_GUID(IID_TlibTest, 0x99999999, 0x8888, 0x7777, 0x66, 0x66, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55); +DEFINE_GUID(IID_TlibTest2, 0x99999999, 0x8888, 0x7777, 0x66, 0x66, 0x55, 0x55, 0x55, 0x55, 0x55, 0x56); +DEFINE_GUID(IID_TlibTest3, 0x99999999, 0x8888, 0x7777, 0x66, 0x66, 0x55, 0x55, 0x55, 0x55, 0x55, 0x57); +DEFINE_GUID(IID_TlibTest4, 0x99999999, 0x8888, 0x7777, 0x66, 0x66, 0x55, 0x55, 0x55, 0x55, 0x55, 0x58); static const char manifest3[] = "<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">" @@ -107,6 +111,7 @@ static const char manifest_wndcls1[] = "<file name=\"testlib1.dll\">" "<windowClass versioned=\"yes\">wndClass1</windowClass>" "<windowClass>wndClass2</windowClass>" +" <typelib tlbid=\"{99999999-8888-7777-6666-555555555558}\" version=\"1.0\" helpdir=\"\" />" "</file>" "<file name=\"testlib1_2.dll\" />" "</assembly>"; @@ -115,8 +120,12 @@ static const char manifest_wndcls2[] = "<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">" "<assemblyIdentity version=\"4.3.2.1\" name=\"testdep2\" type=\"win32\" processorArchitecture=\"" ARCH "\" />" "<file name=\"testlib2.dll\">" -"<windowClass versioned=\"no\">wndClass3</windowClass>" -"<windowClass>wndClass4</windowClass>" +" <windowClass versioned=\"no\">wndClass3</windowClass>" +" <windowClass>wndClass4</windowClass>" +" <typelib tlbid=\"{99999999-8888-7777-6666-555555555555}\" version=\"1.0\" helpdir=\"help\" resourceid=\"409\"" +" flags=\"HIDDEN,CONTROL,RESTRICTED\" />" +" <typelib tlbid=\"{99999999-8888-7777-6666-555555555556}\" version=\"1.0\" helpdir=\"help1\" resourceid=\"409\" />" +" <typelib tlbid=\"{99999999-8888-7777-6666-555555555557}\" version=\"1.0\" helpdir=\"\" />" "</file>" "<file name=\"testlib2_2.dll\" />" "</assembly>"; @@ -776,6 +785,26 @@ struct string_index ULONG rosterindex; }; +struct guidsection_header +{ + DWORD magic; + ULONG size; + DWORD unk[3]; + ULONG count; + ULONG index_offset; + DWORD unk2; + ULONG names_offset; + ULONG names_len; +}; + +struct guid_index +{ + GUID guid; + ULONG data_offset; + ULONG data_len; + ULONG rosterindex; +}; + struct wndclass_redirect_data { ULONG size; @@ -793,6 +822,20 @@ struct dllredirect_data DWORD res[3]; }; +struct tlibredirect_data +{ + ULONG size; + DWORD res; + ULONG name_len; + ULONG name_offset; + LANGID langid; + WORD flags; + ULONG help_len; + ULONG help_offset; + WORD major_version; + WORD minor_version; +}; + static void test_find_dll_redirection(HANDLE handle, LPCWSTR libname, ULONG exid, int line) { ACTCTX_SECTION_KEYED_DATA data; @@ -1244,6 +1287,71 @@ static void test_dllredirect_section(void) pReleaseActCtx(handle); } +static void test_typelib_section(void) +{ + static const WCHAR helpW[] = {'h','e','l','p'}; + ACTCTX_SECTION_KEYED_DATA data, data2; + struct guidsection_header *section; + struct tlibredirect_data *tlib; + ULONG_PTR cookie; + HANDLE handle; + BOOL ret; + + /* use two dependent manifests, 4 'files' total */ + create_manifest_file("testdep1.manifest", manifest_wndcls1, -1, NULL, NULL); + create_manifest_file("testdep2.manifest", manifest_wndcls2, -1, NULL, NULL); + create_manifest_file("main_wndcls.manifest", manifest_wndcls_main, -1, NULL, NULL); + + handle = test_create("main_wndcls.manifest"); + DeleteFileA("testdep1.manifest"); + DeleteFileA("testdep2.manifest"); + DeleteFileA("main_wndcls.manifest"); + + ret = pActivateActCtx(handle, &cookie); + ok(ret, "ActivateActCtx failed: %u\n", GetLastError()); + + memset(&data, 0, sizeof(data)); + memset(&data2, 0, sizeof(data2)); + data.cbSize = sizeof(data); + data2.cbSize = sizeof(data2); + + /* get data for two typelibs from different assemblies */ + ret = pFindActCtxSectionGuid(0, NULL, + ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION, + &IID_TlibTest, &data); +todo_wine + ok(ret, "got %d\n", ret); + if (!ret) return; + + ret = pFindActCtxSectionGuid(0, NULL, + ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION, + &IID_TlibTest4, &data2); + ok(ret, "got %d\n", ret); + + section = (struct guidsection_header*)data.lpSectionBase; + ok(section->count == 4, "got %d\n", section->count); + ok(section->size == sizeof(*section), "got %d\n", section->size); + + /* For both GUIDs same section is returned */ + ok(data.lpSectionBase == data2.lpSectionBase, "got %p, %p\n", data.lpSectionBase, data2.lpSectionBase); + ok(data.ulSectionTotalLength == data2.ulSectionTotalLength, "got %u, %u\n", data.ulSectionTotalLength, + data2.ulSectionTotalLength); + + /* test some actual data */ + tlib = (struct tlibredirect_data*)data.lpData; + ok(tlib->size == sizeof(*tlib), "got %d\n", tlib->size); + ok(tlib->major_version == 1, "got %d\n", tlib->major_version); + ok(tlib->minor_version == 0, "got %d\n", tlib->minor_version); + ok(tlib->help_offset > 0, "got %d\n", tlib->help_offset); + ok(tlib->help_len == sizeof(helpW), "got %d\n", tlib->help_len); + ok(tlib->flags == (LIBFLAG_FHIDDEN|LIBFLAG_FCONTROL|LIBFLAG_FRESTRICTED), "got %x\n", tlib->flags); + + ret = pDeactivateActCtx(0, cookie); + ok(ret, "DeactivateActCtx failed: %u\n", GetLastError()); + + pReleaseActCtx(handle); +} + static void test_actctx(void) { ULONG_PTR cookie; @@ -1464,6 +1572,7 @@ static void test_actctx(void) test_wndclass_section(); test_dllredirect_section(); + test_typelib_section(); } static void test_app_manifest(void)
1
0
0
0
Dmitry Timoshkov : ntdll/tests: Use WAIT_OBJECT_0 instead of 0.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: 42cad0ebb1075842b73cd4b45bb5e0a9f8221da4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=42cad0ebb1075842b73cd4b45…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Aug 23 15:03:45 2013 +0900 ntdll/tests: Use WAIT_OBJECT_0 instead of 0. --- dlls/ntdll/tests/file.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 99e769e..9ce3834 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -81,7 +81,7 @@ static NTSTATUS (WINAPI *pNtQueryVolumeInformationFile)(HANDLE,PIO_STATUS_BLOCK, static inline BOOL is_signaled( HANDLE obj ) { - return WaitForSingleObject( obj, 0 ) == 0; + return WaitForSingleObject( obj, 0 ) == WAIT_OBJECT_0; } #define PIPENAME "\\\\.\\pipe\\ntdll_tests_file.c"
1
0
0
0
Dmitry Timoshkov : ntdll/tests: Fix one more place regarding temp path usage.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: b126d7c7ce1626e8440b7fef83947fa2de5444c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b126d7c7ce1626e8440b7fef8…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Aug 23 13:59:55 2013 +0900 ntdll/tests: Fix one more place regarding temp path usage. --- dlls/ntdll/tests/file.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 240c627..99e769e 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -101,10 +101,11 @@ static BOOL create_pipe( HANDLE *read, HANDLE *write, ULONG flags, ULONG size ) static HANDLE create_temp_file( ULONG flags ) { - char buffer[MAX_PATH]; + char path[MAX_PATH], buffer[MAX_PATH]; HANDLE handle; - GetTempFileNameA( ".", "foo", 0, buffer ); + GetTempPathA( MAX_PATH, path ); + GetTempFileNameA( path, "foo", 0, buffer ); handle = CreateFileA(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, flags | FILE_FLAG_DELETE_ON_CLOSE, 0); ok( handle != INVALID_HANDLE_VALUE, "failed to create temp file\n" );
1
0
0
0
Dmitry Timoshkov : ntdll/tests: Mark the NtReadFile call which doesn' t return STATUS_PENDING for an overlapped IO call as broken, and don' t test returned values in broken case.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: 8eb9ffb3fa095783f2ddbd48c7b0daf51248f48f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8eb9ffb3fa095783f2ddbd48c…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Aug 23 13:35:45 2013 +0900 ntdll/tests: Mark the NtReadFile call which doesn't return STATUS_PENDING for an overlapped IO call as broken, and don't test returned values in broken case. --- dlls/ntdll/tests/file.c | 12 ++---------- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 58bcdb1..240c627 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -781,6 +781,8 @@ static void read_file_test(void) iosb.Information = 0xdeadbeef; offset.QuadPart = strlen(text) + 2; status = pNtReadFile( handle, event, apc, &apc_count, &iosb, buffer, 2, &offset, NULL ); +todo_wine + ok(status == STATUS_PENDING || broken(status == STATUS_END_OF_FILE) /* before Vista */, "expected STATUS_PENDING, got %#x\n", status); if (status == STATUS_PENDING) /* vista */ { WaitForSingleObject( event, 1000 ); @@ -791,16 +793,6 @@ static void read_file_test(void) SleepEx( 1, TRUE ); /* alertable sleep */ ok( apc_count == 1, "apc was not called\n" ); } - else - { - ok( status == STATUS_END_OF_FILE, "wrong status %x\n", status ); - ok( U(iosb).Status == 0xdeadbabe, "wrong status %x\n", U(iosb).Status ); - ok( iosb.Information == 0xdeadbeef, "wrong info %lu\n", iosb.Information ); - ok( !is_signaled( event ), "event is signaled\n" ); - ok( !apc_count, "apc was called\n" ); - SleepEx( 1, TRUE ); /* alertable sleep */ - ok( !apc_count, "apc was called\n" ); - } CloseHandle( handle ); /* now a non-overlapped file */
1
0
0
0
Dmitry Timoshkov : ntdll/tests: Add some tests for FILE_USE_FILE_POINTER_POSITION.
by Alexandre Julliard
23 Aug '13
23 Aug '13
Module: wine Branch: master Commit: 49e31d29ca96892e462f6c4a53582f6796505ade URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49e31d29ca96892e462f6c4a5…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Aug 23 13:35:04 2013 +0900 ntdll/tests: Add some tests for FILE_USE_FILE_POINTER_POSITION. --- dlls/ntdll/tests/file.c | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index e30ada0..58bcdb1 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -2001,7 +2001,8 @@ static void test_read_write(void) iob.Status = -1; iob.Information = -1; - status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, "DCBA", 4, NULL, NULL); + offset.QuadPart = (LONGLONG)-2 /* FILE_USE_FILE_POINTER_POSITION */; + status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, "DCBA", 4, &offset, NULL); ok(status == STATUS_SUCCESS, "NtWriteFile error %#x\n", status); ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#x\n", iob.Status); ok(iob.Information == 4, "expected 4, got %lu\n", iob.Information); @@ -2035,7 +2036,7 @@ todo_wine iob.Status = -1; iob.Information = -1; - offset.QuadPart = sizeof(contents); + offset.QuadPart = (LONGLONG)-2 /* FILE_USE_FILE_POINTER_POSITION */; status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL); ok(status == STATUS_END_OF_FILE, "expected STATUS_END_OF_FILE, got %#x\n", status); todo_wine @@ -2139,6 +2140,17 @@ todo_wine iob.Status = -1; iob.Information = -1; + offset.QuadPart = (LONGLONG)-2 /* FILE_USE_FILE_POINTER_POSITION */; + status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, contents, sizeof(contents), &offset, NULL); +todo_wine + ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#x\n", status); +todo_wine + ok(iob.Status == -1, "expected -1, got %#x\n", iob.Status); +todo_wine + ok(iob.Information == -1, "expected -1, got %ld\n", iob.Information); + + iob.Status = -1; + iob.Information = -1; offset.QuadPart = 0; status = pNtWriteFile(hfile, 0, NULL, NULL, &iob, contents, sizeof(contents), &offset, NULL); todo_wine @@ -2175,8 +2187,15 @@ todo_wine ok(iob.Status == -1, "expected -1, got %#x\n", iob.Status); ok(iob.Information == -1, "expected -1, got %ld\n", iob.Information); + iob.Status = -1; + iob.Information = -1; offset.QuadPart = (LONGLONG)-2 /* FILE_USE_FILE_POINTER_POSITION */; - offset.QuadPart = sizeof(contents); /* magic -2 doen't seem to work under win7 */ + status = pNtReadFile(hfile, 0, NULL, NULL, &iob, buf, sizeof(buf), &offset, NULL); + ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#x\n", status); + ok(iob.Status == -1, "expected -1, got %#x\n", iob.Status); + ok(iob.Information == -1, "expected -1, got %ld\n", iob.Information); + + offset.QuadPart = sizeof(contents); S(U(ovl)).Offset = offset.u.LowPart; S(U(ovl)).OffsetHigh = offset.u.HighPart; ovl.Internal = -1;
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
47
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Results per page:
10
25
50
100
200