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
July 2006
----- 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
5 participants
857 discussions
Start a n
N
ew thread
James Hawkins : msi: Don't display a feature if its Display value is zero.
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: cf9886e6e0a4c6a862d88d26b8eaf7b6f9b8c6a5 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=cf9886e6e0a4c6a862d88d2…
Author: James Hawkins <truiken(a)gmail.com> Date: Fri Jul 21 10:10:01 2006 -0700 msi: Don't display a feature if its Display value is zero. --- dlls/msi/dialog.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index 0543555..1c6e425 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -1608,6 +1608,9 @@ msi_seltree_add_child_features( MSIPACKA if ( !feature->Title ) continue; + if ( !feature->Display ) + continue; + memset( &tvis, 0, sizeof tvis ); tvis.hParent = hParent; tvis.hInsertAfter = TVI_LAST;
1
0
0
0
James Hawkins : msi: Set the component' s initial state based on its attributes.
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: cae3215a6fd78446fd356cb8720dd70adc734d69 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=cae3215a6fd78446fd356cb…
Author: James Hawkins <truiken(a)gmail.com> Date: Fri Jul 21 10:09:52 2006 -0700 msi: Set the component's initial state based on its attributes. --- dlls/msi/action.c | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index d7be3b5..2479f2e 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1115,8 +1115,25 @@ static MSICOMPONENT* load_component( MSI comp->KeyPath = msi_dup_record_field( row, 6 ); comp->Installed = INSTALLSTATE_ABSENT; - comp->Action = INSTALLSTATE_UNKNOWN; - comp->ActionRequest = INSTALLSTATE_UNKNOWN; + + switch (comp->Attributes) + { + case msidbComponentAttributesLocalOnly: + comp->Action = INSTALLSTATE_LOCAL; + comp->ActionRequest = INSTALLSTATE_LOCAL; + break; + case msidbComponentAttributesSourceOnly: + comp->Action = INSTALLSTATE_SOURCE; + comp->ActionRequest = INSTALLSTATE_SOURCE; + break; + case msidbComponentAttributesOptional: + comp->Action = INSTALLSTATE_LOCAL; + comp->ActionRequest = INSTALLSTATE_LOCAL; + break; + default: + comp->Action = INSTALLSTATE_UNKNOWN; + comp->ActionRequest = INSTALLSTATE_UNKNOWN; + } comp->Enabled = TRUE;
1
0
0
0
Jason Green : wined3d: Minor trace corrections in Set___ShaderConstants().
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: 3c03ae2f8478189ad7e0d8d5c00c5aa55a4ed7eb URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=3c03ae2f8478189ad7e0d8d…
Author: Jason Green <jave27(a)gmail.com> Date: Fri Jul 21 09:19:04 2006 -0400 wined3d: Minor trace corrections in Set___ShaderConstants(). --- dlls/wined3d/device.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 2f41216..2f6c46a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4631,7 +4631,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl memcpy(&This->updateStateBlock->vertexShaderConstantB[start], srcData, cnt * sizeof(BOOL)); for (i = 0; i < cnt; i++) - TRACE("Set BOOL constant %u to %s\n", i, srcData[i]? "true":"false"); + TRACE("Set BOOL constant %u to %s\n", start + i, srcData[i]? "true":"false"); for (i = start; i < cnt + start; ++i) { This->updateStateBlock->changed.vertexShaderConstantsB[i] = TRUE; @@ -4677,7 +4677,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl memcpy(&This->updateStateBlock->vertexShaderConstantI[start * 4], srcData, cnt * sizeof(int) * 4); for (i = 0; i < cnt; i++) - TRACE("Set INT constant %u to { %d, %d, %d, %d }\n", i, + TRACE("Set INT constant %u to { %d, %d, %d, %d }\n", start + i, srcData[i*4], srcData[i*4+1], srcData[i*4+2], srcData[i*4+3]); for (i = start; i < cnt + start; ++i) { @@ -4724,7 +4724,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl memcpy(&This->updateStateBlock->vertexShaderConstantF[start * 4], srcData, cnt * sizeof(float) * 4); for (i = 0; i < cnt; i++) - TRACE("Set FLOAT constant %u to { %f, %f, %f, %f }\n", i, + TRACE("Set FLOAT constant %u to { %f, %f, %f, %f }\n", start + i, srcData[i*4], srcData[i*4+1], srcData[i*4+2], srcData[i*4+3]); for (i = start; i < cnt + start; ++i) {
1
0
0
0
Stefan Dösinger : wined3d: Do not try to create a vbo more than once.
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: 9423fd2d9fb8d4def3d86be8466c80641034811f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=9423fd2d9fb8d4def3d86be…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Jul 21 14:02:44 2006 +0200 wined3d: Do not try to create a vbo more than once. --- dlls/wined3d/device.c | 6 ++++++ dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 53c4986..2f41216 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -611,6 +611,11 @@ static void CreateVBO(IWineD3DVertexBuff IWineD3DDeviceImpl *This = object->resource.wineD3DDevice; /* Needed for GL_EXTCALL */ GLenum error, glUsage; DWORD vboUsage = object->resource.usage; + if(object->Flags & VBFLAG_VBOCREATEFAIL) { + WARN("Creating a vbo failed once, not trying again\n"); + return; + } + TRACE("Creating an OpenGL vertex buffer object for IWineD3DVertexBuffer %p\n", object); ENTER_GL(); @@ -694,6 +699,7 @@ static void CreateVBO(IWineD3DVertexBuff FIXME("Failed to create a vertex buffer object. Continuing, but performance issues can occur\n"); if(object->vbo) GL_EXTCALL(glDeleteBuffersARB(1, &object->vbo)); object->vbo = 0; + object->Flags |= VBFLAG_VBOCREATEFAIL; LEAVE_GL(); return; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index daedc52..dc0644d 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -654,6 +654,7 @@ #define VBFLAG_OPTIMIZED 0x02 /* #define VBFLAG_DIRTY 0x04 /* Buffer data has been modified */ #define VBFLAG_STREAM 0x08 /* The vertex buffer is in a stream */ #define VBFLAG_HASDESC 0x10 /* A vertex description has been found */ +#define VBFLAG_VBOCREATEFAIL 0x20 /* An attempt to create a vbo has failed */ /***************************************************************************** * IWineD3DIndexBuffer implementation structure (extends IWineD3DResourceImpl)
1
0
0
0
Stefan Dösinger : wined3d: Move vertex fixups into their own function.
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: d637aa35812258fe47f881bb3b73eb43699252f8 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d637aa35812258fe47f881b…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Jul 21 13:43:22 2006 +0200 wined3d: Move vertex fixups into their own function. --- dlls/wined3d/vertexbuffer.c | 127 ++++++++++++++++++++++--------------------- 1 files changed, 66 insertions(+), 61 deletions(-) diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c index 9317b4c..b67a1ca 100644 --- a/dlls/wined3d/vertexbuffer.c +++ b/dlls/wined3d/vertexbuffer.c @@ -98,8 +98,70 @@ static DWORD WINAPI IWineD3DVertexBuf return IWineD3DResourceImpl_GetPriority((IWineD3DResource *)iface); } +static void fixup_vertices(BYTE *src, BYTE *dst, int stride, int num, BYTE *pos, BOOL haspos, BYTE *diffuse, BOOL hasdiffuse, BYTE *specular, BOOL hasspecular) { + int i; + float x, y, z, w; + + for(i = num - 1; i >= 0; i--) { + if(haspos) { + float *p = (float *) (((int) src + (int) pos) + i * stride); + + /* rhw conversion like in drawStridedSlow */ + if(p[3] == 1.0 || ((p[3] < eps) && (p[3] > -eps))) { + x = p[0]; + y = p[1]; + z = p[2]; + w = 1.0; + } else { + w = 1.0 / p[3]; + x = p[0] * w; + y = p[1] * w; + z = p[2] * w; + } + p = (float *) ((int) dst + i * stride + (int) pos); + p[0] = x; + p[1] = y; + p[2] = z; + p[3] = w; + } + if(hasdiffuse) { + DWORD srcColor, *dstColor = (DWORD *) (dst + i * stride + (int) diffuse); + srcColor = * (DWORD *) ( ((int) src + (int) diffuse) + i * stride); + + /* Color conversion like in drawStridedSlow. watch out for little endianity + * If we want that stuff to work on big endian machines too we have to consider more things + * + * 0xff000000: Alpha mask + * 0x00ff0000: Blue mask + * 0x0000ff00: Green mask + * 0x000000ff: Red mask + */ + + *dstColor = 0; + *dstColor |= (srcColor & 0xff00ff00) ; /* Alpha Green */ + *dstColor |= (srcColor & 0x00ff0000) >> 16; /* Red */ + *dstColor |= (srcColor & 0x000000ff) << 16; /* Blue */ + } + if(hasspecular) { + DWORD srcColor, *dstColor = (DWORD *) (dst + i * stride + (int) specular); + srcColor = * (DWORD *) ( ((int) src + (int) specular) + i * stride); + + /* Simmilar to diffuse + * TODO: Write the alpha value out for fog coords + */ + *dstColor = 0; + *dstColor |= (srcColor & 0xff00ff00) ; /* Alpha Green */ + *dstColor |= (srcColor & 0x00ff0000) >> 16; /* Red */ + *dstColor |= (srcColor & 0x000000ff) << 16; /* Blue */ + } + } +} + static void WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *iface) { IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *) iface; + BYTE *data; + UINT start = 0, end = 0, stride = 0; + BOOL useVertexShaderFunction = FALSE, fixup = FALSE; TRACE("(%p)->()\n", This); if(This->Flags & VBFLAG_LOAD) { @@ -114,10 +176,6 @@ static void WINAPI IWineD3DVertexBuf if(This->vbo) { WineDirect3DVertexStridedData strided; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; - BOOL useVertexShaderFunction = FALSE, fixup = FALSE; - BYTE *data; - UINT i; - UINT start = 0, end = 0, stride = 0; if(This->Flags & VBFLAG_DIRTY) { /* Update the old buffer on unlock, use the old desc */ @@ -237,63 +295,10 @@ static void WINAPI IWineD3DVertexBuf } memcpy(data, This->resource.allocatedMemory + start, end - start); - for(i = 0; i < ( end - start) / stride; i++) { - if(strided.u.s.position_transformed) { - float *p = (float *) (((int) This->resource.allocatedMemory + - (int) strided.u.s.position.lpData) + start + i * stride); - float x, y, z, w; - - /* rhw conversion like in drawStridedSlow */ - if(p[3] == 1.0 || ((p[3] < eps) && (p[3] > -eps))) { - x = p[0]; - y = p[1]; - z = p[2]; - w = 1.0; - } else { - w = 1.0 / p[3]; - x = p[0] * w; - y = p[1] * w; - z = p[2] * w; - } - p = (float *) ((int) data + i * stride + (int) strided.u.s.position.lpData); - p[0] = x; - p[1] = y; - p[2] = z; - p[3] = w; - } - if(strided.u.s.diffuse.dwType == WINED3DDECLTYPE_SHORT4 || strided.u.s.diffuse.dwType == WINED3DDECLTYPE_D3DCOLOR) { - DWORD srcColor, *dstColor = (DWORD *) (data + i * stride + (int) strided.u.s.diffuse.lpData); - srcColor = * (DWORD *) ( ((int) This->resource.allocatedMemory + (int) strided.u.s.diffuse.lpData) + start + i * stride); - - /* Color conversion like in drawStridedSlow. watch out for little endianity - * If we want that stuff to work on big endian machines too we have to consider more things - * - * 0xff000000: Alpha mask - * 0x00ff0000: Blue mask - * 0x0000ff00: Green mask - * 0x000000ff: Red mask - */ - - *dstColor = 0; - *dstColor |= (srcColor & 0xff00ff00) ; /* Alpha Green */ - *dstColor |= (srcColor & 0x00ff0000) >> 16; /* Red */ - *dstColor |= (srcColor & 0x000000ff) << 16; /* Blue */ - } else if (strided.u.s.diffuse.lpData != NULL) { - FIXME("Type is %ld\n", strided.u.s.diffuse.dwType); - } - if(strided.u.s.specular.dwType == WINED3DDECLTYPE_SHORT4 || strided.u.s.specular.dwType == WINED3DDECLTYPE_D3DCOLOR) { - DWORD srcColor, *dstColor = (DWORD *) (data + i * stride + (int) strided.u.s.specular.lpData); - srcColor = * (DWORD *) ( ((int) This->resource.allocatedMemory + (int) strided.u.s.specular.lpData) + start + i * stride); - - /* Color conversion like in drawStridedSlow. watch out for little endianity - * If we want that stuff to work on big endian machines too we have to consider more things - */ - *dstColor = 0; - *dstColor |= (srcColor & 0xff00ff00) ; /* Alpha Green */ - *dstColor |= (srcColor & 0x00ff0000) >> 16; /* Red */ - *dstColor |= (srcColor & 0x000000ff) << 16; /* Blue */ - } - } + fixup_vertices(data, data, stride, ( end - start) / stride, + strided.u.s.position.lpData, strided.u.s.position_transformed, + strided.u.s.diffuse.lpData, strided.u.s.diffuse.dwType == WINED3DDECLTYPE_SHORT4 || strided.u.s.diffuse.dwType == WINED3DDECLTYPE_D3DCOLOR, + strided.u.s.specular.lpData, strided.u.s.specular.dwType == WINED3DDECLTYPE_SHORT4 || strided.u.s.specular.dwType == WINED3DDECLTYPE_D3DCOLOR); } else { data = This->resource.allocatedMemory + start; }
1
0
0
0
Alexandre Julliard : ntdll: Use NtAllocateVirtualMemory to allocate all TEBs except the first one.
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: 0c453bc7c63ecccd1a354bdc3cc267e855b8fb00 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=0c453bc7c63ecccd1a354bd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 21 20:20:30 2006 +0200 ntdll: Use NtAllocateVirtualMemory to allocate all TEBs except the first one. --- dlls/ntdll/ntdll_misc.h | 2 +- dlls/ntdll/thread.c | 16 ++++++++++++---- dlls/ntdll/virtual.c | 16 +++------------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 128cbc9..7a0da37 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -106,7 +106,7 @@ extern NTSTATUS DIR_unmount_device( HAND extern NTSTATUS DIR_get_unix_cwd( char **cwd ); /* virtual memory */ -extern NTSTATUS VIRTUAL_alloc_teb( void **ret, size_t size, BOOL first ); +extern NTSTATUS VIRTUAL_alloc_teb( void **ret, size_t size ); extern NTSTATUS VIRTUAL_HandleFault(LPCVOID addr); extern BOOL VIRTUAL_HasMapping( LPCVOID addr ); extern void VIRTUAL_UseLargeAddressSpace(void); diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 10cb72b..cd75090 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -21,6 +21,7 @@ #include "config.h" #include "wine/port.h" +#include <assert.h> #include <sys/types.h> #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> @@ -59,6 +60,7 @@ static RTL_BITMAP tls_bitmap; static RTL_BITMAP tls_expansion_bitmap; static LIST_ENTRY tls_links; static size_t sigstack_total_size; +static ULONG sigstack_zero_bits; struct wine_pthread_functions pthread_functions = { NULL }; @@ -225,8 +227,10 @@ HANDLE thread_init(void) InitializeListHead( &tls_links ); sigstack_total_size = get_signal_stack_total_size(); + while (1 << sigstack_zero_bits < sigstack_total_size) sigstack_zero_bits++; + assert( 1 << sigstack_zero_bits == sigstack_total_size ); /* must be a power of 2 */ thread_info.teb_size = sigstack_total_size; - VIRTUAL_alloc_teb( &addr, thread_info.teb_size, TRUE ); + VIRTUAL_alloc_teb( &addr, thread_info.teb_size ); teb = addr; init_teb( teb ); thread_data = (struct ntdll_thread_data *)teb->SystemReserved2; @@ -376,7 +380,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HAN DWORD tid = 0; int request_pipe[2]; NTSTATUS status; - SIZE_T page_size = getpagesize(); + SIZE_T size, page_size = getpagesize(); if( ! is_current_process( process ) ) { @@ -411,9 +415,13 @@ NTSTATUS WINAPI RtlCreateUserThread( HAN goto error; } - info->pthread_info.teb_size = sigstack_total_size; - if ((status = VIRTUAL_alloc_teb( &addr, info->pthread_info.teb_size, FALSE ))) goto error; + addr = NULL; + size = sigstack_total_size; + if ((status = NtAllocateVirtualMemory( NtCurrentProcess(), &addr, sigstack_zero_bits, + &size, MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE ))) + goto error; teb = addr; + info->pthread_info.teb_size = size; if ((status = init_teb( teb ))) goto error; teb->ClientId.UniqueProcess = (HANDLE)GetCurrentProcessId(); diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 6227be6..0782da2 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1151,31 +1151,21 @@ #endif /* page_mask */ * * Allocate a memory view for a new TEB, properly aligned to a multiple of the size. */ -NTSTATUS VIRTUAL_alloc_teb( void **ret, size_t size, BOOL first ) +NTSTATUS VIRTUAL_alloc_teb( void **ret, size_t size ) { NTSTATUS status; struct file_view *view; - size_t align_size; - if (first) virtual_init(); + virtual_init(); *ret = NULL; - size = ROUND_SIZE( 0, size ); - align_size = page_size; - while (align_size < size) align_size *= 2; - - if (!first) RtlEnterCriticalSection( &csVirtual ); - - status = map_view( &view, NULL, align_size, align_size - 1, + status = map_view( &view, NULL, size, size - 1, VPROT_READ | VPROT_WRITE | VPROT_COMMITTED ); if (status == STATUS_SUCCESS) { view->flags |= VFLAG_VALLOC; *ret = view->base; } - - if (!first) RtlLeaveCriticalSection( &csVirtual ); - return status; }
1
0
0
0
Benjamin Arai : oleaut32: Fix missing tests and heap errors for VarCat conformance.
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: b636e4dbf43c9054fb3ce66e674d1fdc8dd6be5b URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=b636e4dbf43c9054fb3ce66…
Author: Benjamin Arai <me(a)benjaminarai.com> Date: Thu Jul 20 23:05:13 2006 -0700 oleaut32: Fix missing tests and heap errors for VarCat conformance. --- dlls/oleaut32/tests/vartest.c | 116 ++++++++++++++++------------------------- 1 files changed, 46 insertions(+), 70 deletions(-) diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index addc01c..3a14482 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -5109,6 +5109,7 @@ static void test_VarCat(void) TCHAR orig_date_format[128]; VARTYPE leftvt, rightvt, resultvt; HRESULT hres; + HRESULT expected_error_num; /* Set date format for testing */ lcid = LOCALE_USER_DEFAULT; @@ -5128,21 +5129,22 @@ static void test_VarCat(void) for (rightvt = 0; rightvt <= VT_BSTR_BLOB; rightvt++) { - BOOL bFail = FALSE; + SKIPTESTS(rightvt); + expected_error_num = S_OK; + resultvt = VT_EMPTY; if (leftvt == VT_DISPATCH || rightvt == VT_DISPATCH || leftvt == VT_UNKNOWN || rightvt == VT_UNKNOWN || leftvt == VT_RECORD || rightvt == VT_RECORD || - leftvt == VT_CLSID || rightvt == VT_CLSID || - leftvt == VT_BSTR_BLOB || rightvt == VT_BSTR_BLOB - ) - continue; + leftvt == 15 || rightvt == 15 /* Undefined type */) + continue; - if (leftvt == VT_ERROR || rightvt == VT_ERROR) - resultvt = VT_EMPTY; - else if (leftvt == VT_NULL && rightvt == VT_NULL) + if (leftvt == VT_NULL && rightvt == VT_NULL) resultvt = VT_NULL; + else if (leftvt == VT_VARIANT && (rightvt == VT_ERROR || + rightvt == VT_DATE || rightvt == VT_DECIMAL)) + expected_error_num = DISP_E_TYPEMISMATCH; else if ((leftvt == VT_I2 || leftvt == VT_I4 || leftvt == VT_R4 || leftvt == VT_R8 || leftvt == VT_CY || leftvt == VT_BOOL || @@ -5164,16 +5166,33 @@ static void test_VarCat(void) rightvt == VT_UINT || rightvt == VT_EMPTY || rightvt == VT_NULL || rightvt == VT_DECIMAL || rightvt == VT_DATE)) - { resultvt = VT_BSTR; - } + else if (rightvt == VT_ERROR && leftvt < VT_VOID) + expected_error_num = DISP_E_TYPEMISMATCH; + else if (leftvt == VT_ERROR && (rightvt == VT_DATE || + rightvt == VT_ERROR || rightvt == VT_DECIMAL)) + expected_error_num = DISP_E_TYPEMISMATCH; + else if (rightvt == VT_DATE || rightvt == VT_ERROR || + rightvt == VT_DECIMAL) + expected_error_num = DISP_E_BADVARTYPE; + else if (leftvt == VT_ERROR || rightvt == VT_ERROR) + expected_error_num = DISP_E_TYPEMISMATCH; + else if (leftvt == VT_VARIANT) + expected_error_num = DISP_E_TYPEMISMATCH; + else if (rightvt == VT_VARIANT && (leftvt == VT_EMPTY || + leftvt == VT_NULL || leftvt == VT_I2 || + leftvt == VT_I4 || leftvt == VT_R4 || + leftvt == VT_R8 || leftvt == VT_CY || + leftvt == VT_DATE || leftvt == VT_BSTR || + leftvt == VT_BOOL || leftvt == VT_DECIMAL || + leftvt == VT_I1 || leftvt == VT_UI1 || + leftvt == VT_UI2 || leftvt == VT_UI4 || + leftvt == VT_I8 || leftvt == VT_UI8 || + leftvt == VT_INT || leftvt == VT_UINT + )) + expected_error_num = DISP_E_TYPEMISMATCH; else - resultvt = VT_EMPTY; - - if (leftvt == VT_ERROR || rightvt == VT_ERROR) - { - bFail = TRUE; - } + expected_error_num = DISP_E_BADVARTYPE; V_VT(&left) = leftvt; V_VT(&right) = rightvt; @@ -5192,57 +5211,16 @@ static void test_VarCat(void) VarDecFromR8(0.0, &V_DECIMAL(&right)); hres = VarCat(&left, &right, &result); - if (bFail) { - /* Determine the error code for the vt combination */ - HRESULT expected_error_num = S_OK; - if (rightvt == VT_ERROR && leftvt <= VT_VOID) - expected_error_num = DISP_E_TYPEMISMATCH; - else if (leftvt == VT_ERROR && (rightvt == VT_DATE || - rightvt == VT_ERROR || rightvt == VT_DECIMAL)) - expected_error_num = DISP_E_TYPEMISMATCH; - else if (rightvt == VT_DATE || rightvt == VT_ERROR || - rightvt == VT_DECIMAL) - expected_error_num = DISP_E_BADVARTYPE; - else if (leftvt == VT_ERROR || rightvt == VT_ERROR) - expected_error_num = DISP_E_TYPEMISMATCH; - - ok(hres == DISP_E_BADVARTYPE || hres == E_INVALIDARG || - hres == DISP_E_TYPEMISMATCH, - "VarCat: %d, %d: Expected failure 0x%lX, got 0x%lX\n", - leftvt, rightvt, expected_error_num, hres); - } - else - { - ok(V_VT(&result) == resultvt, - "VarCat: %d, %d: expected vt %d, got vt %d\n", - leftvt, rightvt, resultvt, V_VT(&result)); - if (hres != S_OK) - { - HRESULT expected_error_num; - if (leftvt == VT_VARIANT && rightvt == VT_ERROR) - expected_error_num = DISP_E_BADVARTYPE; - else if (leftvt == VT_VARIANT) - expected_error_num = DISP_E_TYPEMISMATCH; - else if (rightvt == VT_VARIANT && (leftvt == VT_EMPTY || - leftvt == VT_NULL || leftvt == VT_I2 || - leftvt == VT_I4 || leftvt == VT_R4 || - leftvt == VT_R8 || leftvt == VT_CY || - leftvt == VT_DATE || leftvt == VT_BSTR || - leftvt == VT_BOOL || leftvt == VT_DECIMAL || - leftvt == VT_I1 || leftvt == VT_UI1 || - leftvt == VT_UI2 || leftvt == VT_UI4 || - leftvt == VT_I8 || leftvt == VT_UI8 || - leftvt == VT_INT || leftvt == VT_UINT - )) - expected_error_num = DISP_E_TYPEMISMATCH; - else - expected_error_num = DISP_E_BADVARTYPE; - ok(hres == expected_error_num, - "VarCat: %d, %d: Expected failure 0x%lX, got 0x%lX\n", - leftvt, rightvt, expected_error_num, hres); - } - } + /* Determine the error code for the vt combination */ + ok(hres == expected_error_num, + "VarCat: %d, %d returned error, 0x%lX expected 0x%lX.\n", + leftvt, rightvt, expected_error_num, hres); + + /* Check types are correct */ + ok(V_VT(&result) == resultvt, + "VarCat: %d, %d: expected vt %d, got vt %d\n", + leftvt, rightvt, resultvt, V_VT(&result)); VariantClear(&left); VariantClear(&right); @@ -5271,10 +5249,9 @@ static void test_VarCat(void) /* Test if expression is VT_ERROR */ V_VT(&left) = VT_ERROR; V_VT(&right) = VT_BSTR; + V_BSTR(&right) = SysAllocString(sz1234); hres = VarCat(&left,&right,&result); - todo_wine { ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08lx\n", hres); - } ok(V_VT(&result) == VT_EMPTY, "VarCat: VT_ERROR concat with VT_BSTR should have returned VT_EMPTY\n"); @@ -5284,10 +5261,9 @@ static void test_VarCat(void) V_VT(&left) = VT_BSTR; V_VT(&right) = VT_ERROR; + V_BSTR(&left) = SysAllocString(sz1234); hres = VarCat(&left,&right,&result); - todo_wine { ok(hres == DISP_E_TYPEMISMATCH, "VarCat should have returned DISP_E_TYPEMISMATCH instead of 0x%08lx\n", hres); - } ok(V_VT(&result) == VT_EMPTY, "VarCat: VT_BSTR concat with VT_ERROR should have returned VT_EMPTY\n");
1
0
0
0
Benjamin Arai : oleaut32: Fix temp variant initialization issues in VarCat.
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: 4026a4c0a8d47f558ce1d303a9d8b92270e16474 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4026a4c0a8d47f558ce1d30…
Author: Benjamin Arai <me(a)benjaminarai.com> Date: Thu Jul 20 23:01:08 2006 -0700 oleaut32: Fix temp variant initialization issues in VarCat. --- dlls/oleaut32/variant.c | 76 ++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 61 insertions(+), 15 deletions(-) diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index 3916b1c..ae3043a 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -2444,32 +2444,32 @@ VarNumFromParseNum_DecOverflow: */ HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out) { - VARTYPE leftvt,rightvt; + VARTYPE leftvt,rightvt,resultvt; HRESULT hres; static const WCHAR str_true[] = {'T','r','u','e','\0'}; static const WCHAR str_false[] = {'F','a','l','s','e','\0'}; + static const WCHAR sz_empty[] = {'\0'}; leftvt = V_VT(left); rightvt = V_VT(right); TRACE("(%p->(%s%s),%p->(%s%s),%p)\n", left, debugstr_VT(left), debugstr_VF(left), right, debugstr_VT(right), debugstr_VF(right), out); - /* Null and Null simply return Null */ + /* when both left and right are NULL the result is NULL */ if (leftvt == VT_NULL && rightvt == VT_NULL) { V_VT(out) = VT_NULL; return S_OK; } - /* VT_ERROR with any other value should return VT_NULL */ - else if (V_VT(left) == VT_ERROR || V_VT(right) == VT_ERROR) - { - V_VT(out) = VT_EMPTY; - return DISP_E_BADVARTYPE; - } + hres = S_OK; + resultvt = VT_EMPTY; - /* Concat all type that match conformance test */ - if ((leftvt == VT_I2 || leftvt == VT_I4 || + /* There are many special case for errors and return types */ + if (leftvt == VT_VARIANT && (rightvt == VT_ERROR || + rightvt == VT_DATE || rightvt == VT_DECIMAL)) + hres = DISP_E_TYPEMISMATCH; + else if ((leftvt == VT_I2 || leftvt == VT_I4 || leftvt == VT_R4 || leftvt == VT_R8 || leftvt == VT_CY || leftvt == VT_BOOL || leftvt == VT_BSTR || leftvt == VT_I1 || @@ -2490,14 +2490,51 @@ HRESULT WINAPI VarCat(LPVARIANT left, LP rightvt == VT_UINT || rightvt == VT_EMPTY || rightvt == VT_NULL || rightvt == VT_DATE || rightvt == VT_DECIMAL)) + resultvt = VT_BSTR; + else if (rightvt == VT_ERROR && leftvt < VT_VOID) + hres = DISP_E_TYPEMISMATCH; + else if (leftvt == VT_ERROR && (rightvt == VT_DATE || + rightvt == VT_ERROR || rightvt == VT_DECIMAL)) + hres = DISP_E_TYPEMISMATCH; + else if (rightvt == VT_DATE || rightvt == VT_ERROR || + rightvt == VT_DECIMAL) + hres = DISP_E_BADVARTYPE; + else if (leftvt == VT_ERROR || rightvt == VT_ERROR) + hres = DISP_E_TYPEMISMATCH; + else if (leftvt == VT_VARIANT) + hres = DISP_E_TYPEMISMATCH; + else if (rightvt == VT_VARIANT && (leftvt == VT_EMPTY || + leftvt == VT_NULL || leftvt == VT_I2 || + leftvt == VT_I4 || leftvt == VT_R4 || + leftvt == VT_R8 || leftvt == VT_CY || + leftvt == VT_DATE || leftvt == VT_BSTR || + leftvt == VT_BOOL || leftvt == VT_DECIMAL || + leftvt == VT_I1 || leftvt == VT_UI1 || + leftvt == VT_UI2 || leftvt == VT_UI4 || + leftvt == VT_I8 || leftvt == VT_UI8 || + leftvt == VT_INT || leftvt == VT_UINT)) + hres = DISP_E_TYPEMISMATCH; + else + hres = DISP_E_BADVARTYPE; + + /* if resutl type is not S_OK, then no need to go further */ + if (hres != S_OK) + { + V_VT(out) = resultvt; + return hres; + } + /* Else proceed with formatting inputs to strings */ + else { VARIANT bstrvar_left, bstrvar_right; V_VT(out) = VT_BSTR; + VariantInit(&bstrvar_left); + VariantInit(&bstrvar_right); + /* Convert left side variant to string */ if (leftvt != VT_BSTR) { - VariantInit(&bstrvar_left); if (leftvt == VT_BOOL) { /* Bools are handled as True/False strings instead of 0/-1 as in MSDN */ @@ -2507,6 +2544,12 @@ HRESULT WINAPI VarCat(LPVARIANT left, LP else V_BSTR(&bstrvar_left) = SysAllocString(str_false); } + /* Fill with empty string for later concat with right side */ + else if (leftvt == VT_NULL) + { + V_VT(&bstrvar_left) = VT_BSTR; + V_BSTR(&bstrvar_left) = SysAllocString(sz_empty); + } else { hres = VariantChangeTypeEx(&bstrvar_left,left,0,0,VT_BSTR); @@ -2532,7 +2575,6 @@ HRESULT WINAPI VarCat(LPVARIANT left, LP /* convert right side variant to string */ if (rightvt != VT_BSTR) { - VariantInit(&bstrvar_right); if (rightvt == VT_BOOL) { /* Bools are handled as True/False strings instead of 0/-1 as in MSDN */ @@ -2542,6 +2584,12 @@ HRESULT WINAPI VarCat(LPVARIANT left, LP else V_BSTR(&bstrvar_right) = SysAllocString(str_false); } + /* Fill with empty string for later concat with right side */ + else if (rightvt == VT_NULL) + { + V_VT(&bstrvar_right) = VT_BSTR; + V_BSTR(&bstrvar_right) = SysAllocString(sz_empty); + } else { hres = VariantChangeTypeEx(&bstrvar_right,right,0,0,VT_BSTR); @@ -2578,11 +2626,9 @@ HRESULT WINAPI VarCat(LPVARIANT left, LP VariantClear(&bstrvar_right); return S_OK; } - - V_VT(out) = VT_EMPTY; - return S_OK; } + /* Wrapper around VariantChangeTypeEx() which permits changing a variant with VT_RESERVED flag set. Needed by VarCmp. */ static HRESULT _VarChangeTypeExWrap (VARIANTARG* pvargDest,
1
0
0
0
Stefan Siebert : ntdll: Implementation of process CreationTime and ExitTime .
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: 026dd2d88ad1070cc990925a00f11fa8488fe651 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=026dd2d88ad1070cc990925…
Author: Stefan Siebert <stefan.siebert(a)web.de> Date: Thu Jul 20 23:30:04 2006 +0200 ntdll: Implementation of process CreationTime and ExitTime. --- dlls/kernel/time.c | 7 ++++++- dlls/ntdll/process.c | 13 ++++++++++++- include/wine/server_protocol.h | 4 +++- server/process.c | 4 ++++ server/protocol.def | 2 ++ server/trace.c | 7 ++++++- 6 files changed, 33 insertions(+), 4 deletions(-) diff --git a/dlls/kernel/time.c b/dlls/kernel/time.c index ae06aa3..0768266 100644 --- a/dlls/kernel/time.c +++ b/dlls/kernel/time.c @@ -575,16 +575,21 @@ static void TIME_ClockTimeToFileTime(clo * Also, there is a need to separate times used by different applications. * * BUGS - * lpCreationTime and lpExitTime are not initialised in the Wine implementation. + * KernelTime and UserTime are always for the current process */ BOOL WINAPI GetProcessTimes( HANDLE hprocess, LPFILETIME lpCreationTime, LPFILETIME lpExitTime, LPFILETIME lpKernelTime, LPFILETIME lpUserTime ) { struct tms tms; + KERNEL_USER_TIMES pti; times(&tms); TIME_ClockTimeToFileTime(tms.tms_utime,lpUserTime); TIME_ClockTimeToFileTime(tms.tms_stime,lpKernelTime); + if (NtQueryInformationProcess( hprocess, ProcessTimes, &pti, sizeof(pti), NULL)) + return FALSE; + LL2FILETIME( pti.CreateTime.QuadPart, lpCreationTime); + LL2FILETIME( pti.ExitTime.QuadPart, lpExitTime); return TRUE; } diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c index 433e6d9..c187086 100644 --- a/dlls/ntdll/process.c +++ b/dlls/ntdll/process.c @@ -228,9 +228,20 @@ NTSTATUS WINAPI NtQueryInformationProces ret = STATUS_INVALID_HANDLE; else { - /* FIXME : real data */ + /* FIXME : User- and KernelTime have to be implemented */ memset(&pti, 0, sizeof(KERNEL_USER_TIMES)); + SERVER_START_REQ(get_process_info) + { + req->handle = ProcessHandle; + if ((ret = wine_server_call( req )) == STATUS_SUCCESS) + { + NTDLL_from_server_timeout(&pti.CreateTime, &reply->start_time); + NTDLL_from_server_timeout(&pti.ExitTime, &reply->end_time); + } + } + SERVER_END_REQ; + memcpy(ProcessInformation, &pti, sizeof(KERNEL_USER_TIMES)); len = sizeof(KERNEL_USER_TIMES); diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 2755827..6186fb8 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -347,6 +347,8 @@ struct get_process_info_reply int priority; int affinity; void* peb; + abs_time_t start_time; + abs_time_t end_time; }; @@ -4383,6 +4385,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 238 +#define SERVER_PROTOCOL_VERSION 239 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/process.c b/server/process.c index 231eb2f..a73aa66 100644 --- a/server/process.c +++ b/server/process.c @@ -924,6 +924,10 @@ DECL_HANDLER(get_process_info) reply->priority = process->priority; reply->affinity = process->affinity; reply->peb = process->peb; + reply->start_time.sec = process->start_time.tv_sec; + reply->start_time.usec = process->start_time.tv_usec; + reply->end_time.sec = process->end_time.tv_sec; + reply->end_time.usec = process->end_time.tv_usec; release_object( process ); } } diff --git a/server/protocol.def b/server/protocol.def index eab3115..0b0d40f 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -317,6 +317,8 @@ struct token_groups int priority; /* priority class */ int affinity; /* process affinity mask */ void* peb; /* PEB address in process address space */ + abs_time_t start_time; /* process start time */ + abs_time_t end_time; /* process end time */ @END diff --git a/server/trace.c b/server/trace.c index b5e40b8..a30310c 100644 --- a/server/trace.c +++ b/server/trace.c @@ -737,7 +737,12 @@ static void dump_get_process_info_reply( fprintf( stderr, " exit_code=%d,", req->exit_code ); fprintf( stderr, " priority=%d,", req->priority ); fprintf( stderr, " affinity=%d,", req->affinity ); - fprintf( stderr, " peb=%p", req->peb ); + fprintf( stderr, " peb=%p,", req->peb ); + fprintf( stderr, " start_time=" ); + dump_abs_time( &req->start_time ); + fprintf( stderr, "," ); + fprintf( stderr, " end_time=" ); + dump_abs_time( &req->end_time ); } static void dump_set_process_info_request( const struct set_process_info_request *req )
1
0
0
0
Christian Gmeiner : setupapi: Implemented SetupDiCreateDeviceInfoA.
by Alexandre Julliard
21 Jul '06
21 Jul '06
Module: wine Branch: refs/heads/master Commit: 51cd07c37e56da960ab2c51b0391befeea0b6688 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=51cd07c37e56da960ab2c51…
Author: Christian Gmeiner <christian.gmeiner(a)students.fhv.at> Date: Thu Jul 20 16:08:43 2006 +0200 setupapi: Implemented SetupDiCreateDeviceInfoA. --- dlls/setupapi/devinst.c | 40 ++++++++++++++++++++++++++++++++++++++++ dlls/setupapi/setupapi.spec | 2 +- include/setupapi.h | 3 +++ 3 files changed, 44 insertions(+), 1 deletions(-) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 0b07ece..7c87b25 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -697,6 +697,46 @@ SetupDiCreateDeviceInfoListExW(const GUI } /*********************************************************************** + * SetupDiCreateDeviceInfoA (SETUPAPI.@) + */ +BOOL WINAPI SetupDiCreateDeviceInfoA( + HDEVINFO DeviceInfoSet, + PCSTR DeviceName, + CONST GUID *ClassGuid, + PCSTR DeviceDescription, + HWND hwndParent, + DWORD CreationFlags, + PSP_DEVINFO_DATA DeviceInfoData) +{ + BOOL ret = FALSE; + LPWSTR DeviceNameW = NULL; + LPWSTR DeviceDescriptionW = NULL; + + if (DeviceName) + { + DeviceNameW = MultiByteToUnicode(DeviceName, CP_ACP); + if (DeviceNameW == NULL) return FALSE; + } + if (DeviceDescription) + { + DeviceDescriptionW = MultiByteToUnicode(DeviceDescription, CP_ACP); + if (DeviceDescriptionW == NULL) + { + MyFree(DeviceNameW); + return FALSE; + } + } + + ret = SetupDiCreateDeviceInfoW(DeviceInfoSet, DeviceNameW, ClassGuid, DeviceDescriptionW, + hwndParent, CreationFlags, DeviceInfoData); + + MyFree(DeviceNameW); + MyFree(DeviceDescriptionW); + + return ret; +} + +/*********************************************************************** * SetupDiCreateDeviceInfoW (SETUPAPI.@) */ BOOL WINAPI SetupDiCreateDeviceInfoW( diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 7f8b285..36240b8 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -282,7 +282,7 @@ @ stdcall SetupDiClassNameFromGuidW(ptr wstr long ptr) @ stub SetupDiCreateDevRegKeyA @ stub SetupDiCreateDevRegKeyW -@ stub SetupDiCreateDeviceInfoA +@ stdcall SetupDiCreateDeviceInfoA(long str ptr str long long ptr) @ stdcall SetupDiCreateDeviceInfoList(ptr ptr) @ stdcall SetupDiCreateDeviceInfoListExA(ptr long str ptr) @ stdcall SetupDiCreateDeviceInfoListExW(ptr long str ptr) diff --git a/include/setupapi.h b/include/setupapi.h index 16391e3..625f15d 100644 --- a/include/setupapi.h +++ b/include/setupapi.h @@ -744,6 +744,9 @@ HDEVINFO WINAPI SetupDiCreateDeviceInfoL HDEVINFO WINAPI SetupDiCreateDeviceInfoListExA(const GUID *, HWND, PCSTR, PVOID); HDEVINFO WINAPI SetupDiCreateDeviceInfoListExW(const GUID *, HWND, PCWSTR, PVOID); #define SetupDiCreateDeviceInfoListEx WINELIB_NAME_AW(SetupDiCreateDeviceInfoListEx) +BOOL WINAPI SetupDiCreateDeviceInfoA(HDEVINFO, PCSTR, CONST GUID*, PCSTR, HWND, DWORD,PSP_DEVINFO_DATA); +BOOL WINAPI SetupDiCreateDeviceInfoW(HDEVINFO, PCWSTR, CONST GUID*, PCWSTR, HWND, DWORD,PSP_DEVINFO_DATA); +#define SetupDiCreateDeviceInfo WINELIB_NAME_AW(SetupDiCreateDeviceInfo) BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO); BOOL WINAPI SetupDiEnumDeviceInfo(HDEVINFO, DWORD, PSP_DEVINFO_DATA); BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO, PSP_DEVINFO_DATA, const GUID *, DWORD, PSP_DEVICE_INTERFACE_DATA);
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
86
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200