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 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
746 discussions
Start a n
N
ew thread
Stefan Dösinger : wined3d: Silence WINED3DRS_DEBUGMONITORTOKEN.
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: ce5c4d38c4b3d2152dec404bc2a1d8da1295d52b URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=ce5c4d38c4b3d2152dec404…
Author: Stefan Dösinger <stefandoesinger(a)gmx.at> Date: Wed Aug 16 13:53:50 2006 +0200 wined3d: Silence WINED3DRS_DEBUGMONITORTOKEN. --- dlls/wined3d/device.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index eb84173..84b2645 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4495,8 +4495,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl if(0xbaadcafe != Value) { /* MSDN says the default is D3DDMT_ENABLE but our tests confirm 0xbaadcafe is the default. */ /* MSDN says anything other than D3DDMT_ENABLE or DISABLE does not change the state, - * but our tests disagree. */ - ERR("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value); + * but our tests disagree. + * We do not claim to implement a debugging lib, so do not write an ERR + */ + WARN("(%p)->(%s,%ld) not yet implemented\n", This, debug_d3drenderstate(State), Value); } break; }
1
0
0
0
Robert Reif : secur32: Fix GetComputerObjectName tests based on feedback from Paul Vriens.
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: 51c7c030eedebc40b07c8cd868f4b15df3fb5df3 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=51c7c030eedebc40b07c8cd…
Author: Robert Reif <reif(a)earthlink.net> Date: Wed Aug 16 07:42:23 2006 -0400 secur32: Fix GetComputerObjectName tests based on feedback from Paul Vriens. --- dlls/secur32/tests/secur32.c | 51 +++++++++++++++++++++++++++++++++++------- 1 files changed, 42 insertions(+), 9 deletions(-) diff --git a/dlls/secur32/tests/secur32.c b/dlls/secur32/tests/secur32.c index 5c681cd..77e47ce 100644 --- a/dlls/secur32/tests/secur32.c +++ b/dlls/secur32/tests/secur32.c @@ -27,22 +27,28 @@ #include <schannel.h> #include "wine/test.h" -static void testGetComputerObjectName() +static HMODULE secdll; + +static BOOLEAN (WINAPI * pGetComputerObjectNameA)(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG lpnSize); +static BOOLEAN (WINAPI * pGetComputerObjectNameW)(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG lpnSize); + +static EXTENDED_NAME_FORMAT formats[] = { + NameUnknown, NameFullyQualifiedDN, NameSamCompatible, NameDisplay, + NameUniqueId, NameCanonical, NameUserPrincipal, NameCanonicalEx, + NameServicePrincipal, NameDnsDomain +}; + +static void testGetComputerObjectNameA(void) { char name[256]; - WCHAR nameW[256]; ULONG size; BOOLEAN rc; int i; - EXTENDED_NAME_FORMAT formats[] = { NameUnknown, NameFullyQualifiedDN, - NameSamCompatible, NameDisplay, NameUniqueId, NameCanonical, - NameUserPrincipal, NameCanonicalEx, NameServicePrincipal, - NameDnsDomain }; for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { size = sizeof(name); ZeroMemory(name, sizeof(name)); - rc = GetComputerObjectNameA(formats[i], name, &size); + rc = pGetComputerObjectNameA(formats[i], name, &size); ok(rc || ((formats[i] == NameUnknown) && (GetLastError() == ERROR_INVALID_PARAMETER)) || (GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO), @@ -50,10 +56,20 @@ static void testGetComputerObjectName() formats[i], GetLastError()); if (rc) trace("GetComputerObjectNameA() returned %s\n", name); + } +} + +static void testGetComputerObjectNameW(void) +{ + WCHAR nameW[256]; + ULONG size; + BOOLEAN rc; + int i; + for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); i++) { size = sizeof(nameW)/sizeof(nameW[0]); ZeroMemory(nameW, sizeof(nameW)); - rc = GetComputerObjectNameW(formats[i], nameW, &size); + rc = pGetComputerObjectNameW(formats[i], nameW, &size); ok(rc || ((formats[i] == NameUnknown) && (GetLastError() == ERROR_INVALID_PARAMETER)) || (GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO), @@ -64,5 +80,22 @@ static void testGetComputerObjectName() START_TEST(secur32) { - testGetComputerObjectName(); + secdll = LoadLibraryA("secur32.dll"); + + if (!secdll) + secdll = LoadLibraryA("security.dll"); + + if (secdll) + { + pGetComputerObjectNameA = (PVOID)GetProcAddress(secdll, "GetComputerObjectNameA"); + pGetComputerObjectNameW = (PVOID)GetProcAddress(secdll, "GetComputerObjectNameW"); + + if (pGetComputerObjectNameA) + testGetComputerObjectNameA(); + + if (pGetComputerObjectNameW) + testGetComputerObjectNameW(); + + FreeLibrary(secdll); + } }
1
0
0
0
Alexandre Julliard : user: Explicitly load explorer. exe from the system directory.
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: 7814420f2f075a88d9f9dd476c86927029943b1a URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=7814420f2f075a88d9f9dd4…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 16 16:43:08 2006 +0200 user: Explicitly load explorer.exe from the system directory. --- dlls/user/win.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/user/win.c b/dlls/user/win.c index a4f2c26..362f18d 100644 --- a/dlls/user/win.c +++ b/dlls/user/win.c @@ -1613,13 +1613,16 @@ HWND WINAPI GetDesktopWindow(void) if (!thread_info->desktop) { + static const WCHAR command_line[] = {'\\','e','x','p','l','o','r','e','r','.','e','x','e',' ','/','d','e','s','k','t','o','p',0}; STARTUPINFOW si; PROCESS_INFORMATION pi; - WCHAR command_line[] = {'e','x','p','l','o','r','e','r','.','e','x','e',' ','/','d','e','s','k','t','o','p',0}; + WCHAR cmdline[MAX_PATH + sizeof(command_line)/sizeof(WCHAR)]; memset( &si, 0, sizeof(si) ); si.cb = sizeof(si); - if (CreateProcessW( NULL, command_line, NULL, NULL, FALSE, DETACHED_PROCESS, + GetSystemDirectoryW( cmdline, MAX_PATH ); + lstrcatW( cmdline, command_line ); + if (CreateProcessW( NULL, cmdline, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &si, &pi )) { TRACE( "started explorer pid %04lx tid %04lx\n", pi.dwProcessId, pi.dwThreadId );
1
0
0
0
Alexandre Julliard : wine.inf: Create a fake exe for explorer.exe.
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: 1787c9e9d2f2874da26c4675aab661a72c7eab3e URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1787c9e9d2f2874da26c467…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 16 16:42:55 2006 +0200 wine.inf: Create a fake exe for explorer.exe. --- tools/wine.inf | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/wine.inf b/tools/wine.inf index fb01c5c..a9d0e93 100644 --- a/tools/wine.inf +++ b/tools/wine.inf @@ -2123,6 +2123,7 @@ HKLM,%CurrentVersion%\Telephony\Country 11,,urlmon.dll,1 [FakeDllsSection] +11,,explorer.exe 10,,notepad.exe 10,,regedit.exe 10,,rundll32.exe
1
0
0
0
Robert Shearman : ole32: Move some functions out of compobj.c that don' t belong there and update the copyright statement.
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: f42d61df0d6432eb83d602b139e61d934b75fa6f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f42d61df0d6432eb83d602b…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Wed Aug 16 13:00:02 2006 +0100 ole32: Move some functions out of compobj.c that don't belong there and update the copyright statement. --- dlls/ole32/compobj.c | 87 +----------------------------------------------- dlls/ole32/ole2.c | 27 +++++++++++++++ dlls/ole32/storage32.c | 57 +++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 86 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 314411d..e049563 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -7,6 +7,7 @@ * Copyright 1999 Sylvain St-Germain * Copyright 2002 Marcus Meissner * Copyright 2004 Mike Hearn + * Copyright 2005-2006 Robert Shearman (for CodeWeavers) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1321,65 +1322,6 @@ HRESULT WINAPI CoRegisterPSClsid(REFIID } - -/*********************************************************************** - * WriteClassStm (OLE32.@) - * - * Writes a CLSID to a stream. - * - * PARAMS - * pStm [I] Stream to write to. - * rclsid [I] CLSID to write. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - */ -HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid) -{ - TRACE("(%p,%p)\n",pStm,rclsid); - - if (rclsid==NULL) - return E_INVALIDARG; - - return IStream_Write(pStm,rclsid,sizeof(CLSID),NULL); -} - -/*********************************************************************** - * ReadClassStm (OLE32.@) - * - * Reads a CLSID from a stream. - * - * PARAMS - * pStm [I] Stream to read from. - * rclsid [O] CLSID to read. - * - * RETURNS - * Success: S_OK. - * Failure: HRESULT code. - */ -HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid) -{ - ULONG nbByte; - HRESULT res; - - TRACE("(%p,%p)\n",pStm,pclsid); - - if (pclsid==NULL) - return E_INVALIDARG; - - res = IStream_Read(pStm,(void*)pclsid,sizeof(CLSID),&nbByte); - - if (FAILED(res)) - return res; - - if (nbByte != sizeof(CLSID)) - return S_FALSE; - else - return S_OK; -} - - /*** * COM_GetRegisteredClassObject * @@ -2377,33 +2319,6 @@ HRESULT WINAPI CoSetState(IUnknown * pv) /****************************************************************************** - * OleGetAutoConvert [OLE32.@] - */ -HRESULT WINAPI OleGetAutoConvert(REFCLSID clsidOld, LPCLSID pClsidNew) -{ - static const WCHAR wszAutoConvertTo[] = {'A','u','t','o','C','o','n','v','e','r','t','T','o',0}; - HKEY hkey = NULL; - WCHAR buf[CHARS_IN_GUID]; - LONG len; - HRESULT res = S_OK; - - res = COM_OpenKeyForCLSID(clsidOld, wszAutoConvertTo, KEY_READ, &hkey); - if (FAILED(res)) - goto done; - - len = sizeof(buf); - if (RegQueryValueW(hkey, NULL, buf, &len)) - { - res = REGDB_E_KEYMISSING; - goto done; - } - res = CLSIDFromString(buf, pClsidNew); -done: - if (hkey) RegCloseKey(hkey); - return res; -} - -/****************************************************************************** * CoTreatAsClass [OLE32.@] * * Sets the TreatAs value of a class. diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index e04095a..bf6847c 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -2334,6 +2334,33 @@ HRESULT WINAPI OleCreate( } /****************************************************************************** + * OleGetAutoConvert [OLE32.@] + */ +HRESULT WINAPI OleGetAutoConvert(REFCLSID clsidOld, LPCLSID pClsidNew) +{ + static const WCHAR wszAutoConvertTo[] = {'A','u','t','o','C','o','n','v','e','r','t','T','o',0}; + HKEY hkey = NULL; + WCHAR buf[CHARS_IN_GUID]; + LONG len; + HRESULT res = S_OK; + + res = COM_OpenKeyForCLSID(clsidOld, wszAutoConvertTo, KEY_READ, &hkey); + if (FAILED(res)) + goto done; + + len = sizeof(buf); + if (RegQueryValueW(hkey, NULL, buf, &len)) + { + res = REGDB_E_KEYMISSING; + goto done; + } + res = CLSIDFromString(buf, pClsidNew); +done: + if (hkey) RegCloseKey(hkey); + return res; +} + +/****************************************************************************** * OleSetAutoConvert [OLE32.@] */ HRESULT WINAPI OleSetAutoConvert(REFCLSID clsidOld, REFCLSID clsidNew) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index d44d381..cae44c4 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -7871,3 +7871,60 @@ StgIsStorageFile(LPCOLESTR fn) WARN(" -> Invalid header.\n"); return S_FALSE; } + +/*********************************************************************** + * WriteClassStm (OLE32.@) + * + * Writes a CLSID to a stream. + * + * PARAMS + * pStm [I] Stream to write to. + * rclsid [I] CLSID to write. + * + * RETURNS + * Success: S_OK. + * Failure: HRESULT code. + */ +HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid) +{ + TRACE("(%p,%p)\n",pStm,rclsid); + + if (rclsid==NULL) + return E_INVALIDARG; + + return IStream_Write(pStm,rclsid,sizeof(CLSID),NULL); +} + +/*********************************************************************** + * ReadClassStm (OLE32.@) + * + * Reads a CLSID from a stream. + * + * PARAMS + * pStm [I] Stream to read from. + * rclsid [O] CLSID to read. + * + * RETURNS + * Success: S_OK. + * Failure: HRESULT code. + */ +HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid) +{ + ULONG nbByte; + HRESULT res; + + TRACE("(%p,%p)\n",pStm,pclsid); + + if (pclsid==NULL) + return E_INVALIDARG; + + res = IStream_Read(pStm,(void*)pclsid,sizeof(CLSID),&nbByte); + + if (FAILED(res)) + return res; + + if (nbByte != sizeof(CLSID)) + return S_FALSE; + else + return S_OK; +}
1
0
0
0
Robert Shearman : ole32: Add some more tests for failure cases of Co* functions and make builtin ole32 pass them .
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: 0e99d795b71454f131d8992368e64b9ca93833ca URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=0e99d795b71454f131d8992…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Wed Aug 16 12:29:17 2006 +0100 ole32: Add some more tests for failure cases of Co* functions and make builtin ole32 pass them. --- dlls/ole32/compobj.c | 27 +++++++++++++++++++++------ dlls/ole32/tests/compobj.c | 37 +++++++++++++++++++++++++++++++++++++ dlls/ole32/tests/marshal.c | 17 ----------------- 3 files changed, 58 insertions(+), 23 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 0537b2c..314411d 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -915,6 +915,9 @@ HRESULT WINAPI CLSIDFromString(LPOLESTR { HRESULT ret; + if (!id) + return E_INVALIDARG; + ret = __CLSIDFromString(idstr, id); if(ret != S_OK) { /* It appears a ProgID is also valid */ ret = CLSIDFromProgID(idstr, id); @@ -1057,21 +1060,27 @@ HRESULT COM_OpenKeyForCLSID(REFCLSID cls * * PARAMS * clsid [I] Class ID, as found in registry. - * lplpszProgID [O] Associated ProgID. + * ppszProgID [O] Associated ProgID. * * RETURNS * S_OK * E_OUTOFMEMORY * REGDB_E_CLASSNOTREG if the given clsid has no associated ProgID */ -HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *lplpszProgID) +HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *ppszProgID) { static const WCHAR wszProgID[] = {'P','r','o','g','I','D',0}; HKEY hkey; HRESULT ret; LONG progidlen = 0; - *lplpszProgID = NULL; + if (!ppszProgID) + { + ERR("ppszProgId isn't optional\n"); + return E_INVALIDARG; + } + + *ppszProgID = NULL; ret = COM_OpenKeyForCLSID(clsid, wszProgID, KEY_READ, &hkey); if (FAILED(ret)) return ret; @@ -1081,10 +1090,10 @@ HRESULT WINAPI ProgIDFromCLSID(REFCLSID if (ret == S_OK) { - *lplpszProgID = CoTaskMemAlloc(progidlen * sizeof(WCHAR)); - if (*lplpszProgID) + *ppszProgID = CoTaskMemAlloc(progidlen * sizeof(WCHAR)); + if (*ppszProgID) { - if (RegQueryValueW(hkey, NULL, *lplpszProgID, &progidlen)) + if (RegQueryValueW(hkey, NULL, *ppszProgID, &progidlen)) ret = REGDB_E_CLASSNOTREG; } else @@ -1200,6 +1209,12 @@ HRESULT WINAPI CoGetPSClsid(REFIID riid, return CO_E_NOTINITIALIZED; } + if (!pclsid) + { + ERR("pclsid isn't optional\n"); + return E_INVALIDARG; + } + EnterCriticalSection(&apt->cs); LIST_FOR_EACH_ENTRY(registered_psclsid, &apt->psclsids, struct registered_psclsid, entry) diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 6f2247d..326d9c6 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -73,6 +73,9 @@ static void test_ProgIDFromCLSID(void) hr = ProgIDFromCLSID(&CLSID_non_existent, &progid); ok(hr == REGDB_E_CLASSNOTREG, "ProgIDFromCLSID returned %08lx\n", hr); ok(progid == NULL, "ProgIDFromCLSID returns with progid %p\n", progid); + + hr = ProgIDFromCLSID(&CLSID_CDeviceMoniker, NULL); + ok(hr == E_INVALIDARG, "ProgIDFromCLSID should return E_INVALIDARG instead of 0x%08lx\n", hr); } static void test_CLSIDFromProgID(void) @@ -106,6 +109,10 @@ static void test_CLSIDFromString(void) HRESULT hr = CLSIDFromString((LPOLESTR)wszCLSID_CDeviceMoniker, &clsid); ok_ole_success(hr, "CLSIDFromString"); ok(IsEqualCLSID(&clsid, &CLSID_CDeviceMoniker), "clsid wasn't equal to CLSID_CDeviceMoniker\n"); + + hr = CLSIDFromString(NULL, &clsid); + ok_ole_success(hr, "CLSIDFromString"); + ok(IsEqualCLSID(&clsid, &CLSID_NULL), "clsid wasn't equal to CLSID_NULL\n"); } static void test_CoCreateInstance(void) @@ -418,6 +425,35 @@ static void test_CoRegisterPSClsid(void) CoUninitialize(); } +static void test_CoGetPSClsid(void) +{ + HRESULT hr; + CLSID clsid; + + hr = CoGetPSClsid(&IID_IClassFactory, &clsid); + ok(hr == CO_E_NOTINITIALIZED, + "CoGetPSClsid should have returned CO_E_NOTINITIALIZED instead of 0x%08lx\n", + hr); + + pCoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + hr = CoGetPSClsid(&IID_IClassFactory, &clsid); + ok_ole_success(hr, "CoGetPSClsid"); + + hr = CoGetPSClsid(&IID_IWineTest, &clsid); + ok(hr == REGDB_E_IIDNOTREG, + "CoGetPSClsid for random IID returned 0x%08lx instead of REGDB_E_IIDNOTREG\n", + hr); + + hr = CoGetPSClsid(&IID_IClassFactory, NULL); + ok(hr == E_INVALIDARG, + "CoGetPSClsid for null clsid returned 0x%08lx instead of E_INVALIDARG\n", + hr); + + CoUninitialize(); +} + + START_TEST(compobj) { HMODULE hOle32 = GetModuleHandle("ole32"); @@ -435,4 +471,5 @@ START_TEST(compobj) test_CoGetClassObject(); test_CoRegisterMessageFilter(); test_CoRegisterPSClsid(); + test_CoGetPSClsid(); } diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index fc7c205..13d3d1b 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -46,20 +46,6 @@ static const IID IID_IWineTest = {0xa1, 0xa2, 0x5d, 0x5a, 0x36, 0x54, 0xd3, 0xbd} }; /* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */ -static void test_CoGetPSClsid(void) -{ - HRESULT hr; - CLSID clsid; - - hr = CoGetPSClsid(&IID_IClassFactory, &clsid); - ok_ole_success(hr, CoGetPSClsid); - - hr = CoGetPSClsid(&IID_IWineTest, &clsid); - ok(hr == REGDB_E_IIDNOTREG, - "CoGetPSClsid for random IID returned 0x%08lx instead of REGDB_E_IIDNOTREG\n", - hr); -} - static void test_cocreateinstance_proxy(void) { IUnknown *pProxy; @@ -2281,9 +2267,6 @@ START_TEST(marshal) /* FIXME: test CoCreateInstanceEx */ - /* helper function tests */ - test_CoGetPSClsid(); - /* lifecycle management and marshaling tests */ test_no_marshaler(); test_normal_marshal_and_release();
1
0
0
0
Robert Shearman : ole32: Add tests for the failure cases of CLSIDFromProgID and fix the function to conform to these .
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: 31726e3823f822ec107f899003729287930dcbdf URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=31726e3823f822ec107f899…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Wed Aug 16 12:29:07 2006 +0100 ole32: Add tests for the failure cases of CLSIDFromProgID and fix the function to conform to these. --- dlls/ole32/compobj.c | 18 ++++++++++++++---- dlls/ole32/tests/compobj.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 8857fcc..0537b2c 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1102,20 +1102,30 @@ HRESULT WINAPI ProgIDFromCLSID(REFCLSID * * PARAMS * progid [I] Unicode program ID, as found in registry. - * riid [O] Associated CLSID. + * clsid [O] Associated CLSID. * * RETURNS * Success: S_OK * Failure: CO_E_CLASSSTRING - the given ProgID cannot be found. */ -HRESULT WINAPI CLSIDFromProgID(LPCOLESTR progid, LPCLSID riid) +HRESULT WINAPI CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid) { static const WCHAR clsidW[] = { '\\','C','L','S','I','D',0 }; WCHAR buf2[CHARS_IN_GUID]; LONG buf2len = sizeof(buf2); HKEY xhkey; + WCHAR *buf; - WCHAR *buf = HeapAlloc( GetProcessHeap(),0,(strlenW(progid)+8) * sizeof(WCHAR) ); + if (!progid || !clsid) + { + ERR("neither progid (%p) nor clsid (%p) are optional\n", progid, clsid); + return E_INVALIDARG; + } + + /* initialise clsid in case of failure */ + memset(clsid, 0, sizeof(*clsid)); + + buf = HeapAlloc( GetProcessHeap(),0,(strlenW(progid)+8) * sizeof(WCHAR) ); strcpyW( buf, progid ); strcatW( buf, clsidW ); if (RegOpenKeyW(HKEY_CLASSES_ROOT,buf,&xhkey)) @@ -1131,7 +1141,7 @@ HRESULT WINAPI CLSIDFromProgID(LPCOLESTR return CO_E_CLASSSTRING; } RegCloseKey(xhkey); - return CLSIDFromString(buf2,riid); + return CLSIDFromString(buf2,clsid); } diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index bcce10a..6f2247d 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -37,6 +37,7 @@ #define ok_ole_success(hr, func) ok(hr = static const CLSID CLSID_non_existent = { 0x12345678, 0x1234, 0x1234, { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0 } }; static const CLSID CLSID_CDeviceMoniker = { 0x4315d437, 0x5b8c, 0x11d0, { 0xbd, 0x3b, 0x00, 0xa0, 0xc9, 0x11, 0xce, 0x86 } }; static const WCHAR devicedotone[] = {'d','e','v','i','c','e','.','1',0}; +static const WCHAR wszNonExistant[] = {'N','o','n','E','x','i','s','t','a','n','t',0}; static const WCHAR wszCLSID_CDeviceMoniker[] = { '{', @@ -84,6 +85,19 @@ static void test_CLSIDFromProgID(void) hr = CLSIDFromString((LPOLESTR)devicedotone, &clsid); ok_ole_success(hr, "CLSIDFromString"); ok(IsEqualCLSID(&clsid, &CLSID_CDeviceMoniker), "clsid wasn't equal to CLSID_CDeviceMoniker\n"); + + /* test some failure cases */ + + hr = CLSIDFromProgID(wszNonExistant, NULL); + ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08lx\n", hr); + + hr = CLSIDFromProgID(NULL, &clsid); + ok(hr == E_INVALIDARG, "CLSIDFromProgID should have returned E_INVALIDARG instead of 0x%08lx\n", hr); + + memset(&clsid, 0xcc, sizeof(clsid)); + hr = CLSIDFromProgID(wszNonExistant, &clsid); + ok(hr == CO_E_CLASSSTRING, "CLSIDFromProgID on non-existant ProgID should have returned CO_E_CLASSSTRING instead of 0x%08lx\n", hr); + ok(IsEqualCLSID(&clsid, &CLSID_NULL), "CLSIDFromProgID should have set clsid to all-zeros on failure\n"); } static void test_CLSIDFromString(void)
1
0
0
0
Robert Shearman : rpcrt4: Move processing of the arguments from NdrClientCall2 to two new functions.
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: 4bbc3ca8dca526c9f922a71181d62c38dc43ff52 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4bbc3ca8dca526c9f922a71…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Wed Aug 16 12:29:12 2006 +0100 rpcrt4: Move processing of the arguments from NdrClientCall2 to two new functions. --- dlls/rpcrt4/ndr_stubless.c | 452 +++++++++++++++++++++++--------------------- 1 files changed, 234 insertions(+), 218 deletions(-) Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=4bbc3ca8dca526c9f92…
1
0
0
0
Hans Leidekker : wldap32: Support setting server controls.
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: 1219fa5806291a04f413cbfe5307428103ad6583 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1219fa5806291a04f413cbf…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Wed Aug 16 12:53:21 2006 +0200 wldap32: Support setting server controls. --- dlls/wldap32/option.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/dlls/wldap32/option.c b/dlls/wldap32/option.c index d5206f5..d6cc36d 100644 --- a/dlls/wldap32/option.c +++ b/dlls/wldap32/option.c @@ -150,6 +150,7 @@ #ifdef HAVE_LDAP case LDAP_OPT_SECURITY_CONTEXT: case LDAP_OPT_SEND_TIMEOUT: case LDAP_OPT_SERVER_CERTIFICATE: + case LDAP_OPT_SERVER_CONTROLS: case LDAP_OPT_SERVER_ERROR: case LDAP_OPT_SERVER_EXT_ERROR: case LDAP_OPT_SIGN: @@ -288,6 +289,7 @@ #ifdef HAVE_LDAP case LDAP_OPT_SECURITY_CONTEXT: case LDAP_OPT_SEND_TIMEOUT: case LDAP_OPT_SERVER_CERTIFICATE: + case LDAP_OPT_SERVER_CONTROLS: case LDAP_OPT_SERVER_ERROR: case LDAP_OPT_SERVER_EXT_ERROR: case LDAP_OPT_SIGN: @@ -323,6 +325,17 @@ #ifdef HAVE_LDAP switch (option) { + case LDAP_OPT_SERVER_CONTROLS: + { + LDAPControlW **ctrlsW; + + ctrlsW = controlarrayAtoW( (LDAPControlA **)value ); + if (!ctrlsW) return WLDAP32_LDAP_NO_MEMORY; + + ret = ldap_set_optionW( ld, option, ctrlsW ); + controlarrayfreeW( ctrlsW ); + return ret; + } case LDAP_OPT_DEREF: case LDAP_OPT_DESC: case LDAP_OPT_ERROR_NUMBER: @@ -415,6 +428,17 @@ #ifdef HAVE_LDAP switch (option) { + case LDAP_OPT_SERVER_CONTROLS: + { + LDAPControl **ctrlsU; + + ctrlsU = controlarrayWtoU( (LDAPControlW **)value ); + if (!ctrlsU) return WLDAP32_LDAP_NO_MEMORY; + + ret = ldap_set_option( ld, option, ctrlsU ); + controlarrayfreeU( ctrlsU ); + return ret; + } case LDAP_OPT_DEREF: case LDAP_OPT_DESC: case LDAP_OPT_ERROR_NUMBER:
1
0
0
0
Hans Leidekker : wldap32: Document ldap_{get, set}_option and the parsing functions.
by Alexandre Julliard
16 Aug '06
16 Aug '06
Module: wine Branch: master Commit: 9744cdbc2279b3079cca5c01981a025f375620e5 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=9744cdbc2279b3079cca5c0…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Wed Aug 16 12:53:09 2006 +0200 wldap32: Document ldap_{get,set}_option and the parsing functions. --- dlls/wldap32/option.c | 41 ++++++++++++++++ dlls/wldap32/parse.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+), 0 deletions(-) diff --git a/dlls/wldap32/option.c b/dlls/wldap32/option.c index 1b2ca78..d5206f5 100644 --- a/dlls/wldap32/option.c +++ b/dlls/wldap32/option.c @@ -40,6 +40,11 @@ #include "wldap32.h" WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +/*********************************************************************** + * ldap_get_optionA (WLDAP32.@) + * + * See ldap_get_optionW. + */ ULONG CDECL ldap_get_optionA( WLDAP32_LDAP *ld, int option, void *value ) { ULONG ret = LDAP_NOT_SUPPORTED; @@ -164,6 +169,20 @@ #endif return ret; } +/*********************************************************************** + * ldap_get_optionW (WLDAP32.@) + * + * Retrieve option values for a given LDAP context. + * + * PARAMS + * ld [I] Pointer to an LDAP context. + * option [I] Option to get values for. + * value [O] Pointer to option values. + * + * RETURNS + * Success: LDAP_SUCCESS + * Failure: An LDAP error code. + */ ULONG CDECL ldap_get_optionW( WLDAP32_LDAP *ld, int option, void *value ) { ULONG ret = LDAP_NOT_SUPPORTED; @@ -288,6 +307,11 @@ #endif return ret; } +/*********************************************************************** + * ldap_set_optionA (WLDAP32.@) + * + * See ldap_set_optionW. + */ ULONG CDECL ldap_set_optionA( WLDAP32_LDAP *ld, int option, void *value ) { ULONG ret = LDAP_NOT_SUPPORTED; @@ -363,6 +387,23 @@ #endif return ret; } +/*********************************************************************** + * ldap_set_optionW (WLDAP32.@) + * + * Set option values for a given LDAP context. + * + * PARAMS + * ld [I] Pointer to an LDAP context. + * option [I] Option to set values for. + * value [I] Pointer to option values. + * + * RETURNS + * Success: LDAP_SUCCESS + * Failure: An LDAP error code. + * + * NOTES + * Set value to LDAP_OPT_ON or LDAP_OPT_OFF for on/off options. + */ ULONG CDECL ldap_set_optionW( WLDAP32_LDAP *ld, int option, void *value ) { ULONG ret = LDAP_NOT_SUPPORTED; diff --git a/dlls/wldap32/parse.c b/dlls/wldap32/parse.c index c56632d..c8742a0 100644 --- a/dlls/wldap32/parse.c +++ b/dlls/wldap32/parse.c @@ -40,6 +40,11 @@ #include "wldap32.h" WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +/*********************************************************************** + * ldap_parse_extended_resultA (WLDAP32.@) + * + * See ldap_parse_extended_resultW. + */ ULONG CDECL ldap_parse_extended_resultA( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *result, PCHAR *oid, struct WLDAP32_berval **data, BOOLEAN free ) { @@ -64,6 +69,26 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_extended_resultW (WLDAP32.@) + * + * Parse the result of an extended operation. + * + * PARAMS + * ld [I] Pointer to an LDAP context. + * result [I] Result message from an extended operation. + * oid [O] OID of the extended operation. + * data [O] Result data. + * free [I] Free the result message? + * + * RETURNS + * Success: LDAP_SUCCESS + * Failure: An LDAP error code. + * + * NOTES + * Free the OID and result data with ldap_memfree. Pass a nonzero + * value for 'free' or call ldap_msgfree to free the result message. + */ ULONG CDECL ldap_parse_extended_resultW( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *result, PWCHAR *oid, struct WLDAP32_berval **data, BOOLEAN free ) { @@ -88,6 +113,11 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_referenceA (WLDAP32.@) + * + * See ldap_parse_referenceW. + */ ULONG CDECL ldap_parse_referenceA( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *message, PCHAR **referrals ) { @@ -108,6 +138,23 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_referenceW (WLDAP32.@) + * + * Return any referrals from a result message. + * + * PARAMS + * ld [I] Pointer to an LDAP context. + * result [I] Result message. + * referrals [O] Array of referral URLs. + * + * RETURNS + * Success: LDAP_SUCCESS + * Failure: An LDAP error code. + * + * NOTES + * Free the referrals with ldap_value_free. + */ ULONG CDECL ldap_parse_referenceW( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *message, PWCHAR **referrals ) { @@ -128,6 +175,11 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_resultA (WLDAP32.@) + * + * See ldap_parse_resultW. + */ ULONG CDECL ldap_parse_resultA( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *result, ULONG *retcode, PCHAR *matched, PCHAR *error, PCHAR **referrals, PLDAPControlA **serverctrls, BOOLEAN free ) @@ -160,6 +212,31 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_resultW (WLDAP32.@) + * + * Parse a result message. + * + * PARAMS + * ld [I] Pointer to an LDAP context. + * result [I] Result message. + * retcode [O] Return code for the server operation. + * matched [O] DNs matched in the operation. + * error [O] Error message for the operation. + * referrals [O] Referrals found in the result message. + * serverctrls [O] Controls used in the operation. + * free [I] Free the result message? + * + * RETURNS + * Success: LDAP_SUCCESS + * Failure: An LDAP error code. + * + * NOTES + * Free the DNs and error message with ldap_memfree. Free + * the referrals with ldap_value_free and the controls with + * ldap_controls_free. Pass a nonzero value for 'free' or call + * ldap_msgfree to free the result message. + */ ULONG CDECL ldap_parse_resultW( WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *result, ULONG *retcode, PWCHAR *matched, PWCHAR *error, PWCHAR **referrals, PLDAPControlW **serverctrls, BOOLEAN free ) @@ -192,6 +269,11 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_sort_controlA (WLDAP32.@) + * + * See ldap_parse_sort_controlW. + */ ULONG CDECL ldap_parse_sort_controlA( WLDAP32_LDAP *ld, PLDAPControlA *control, ULONG *result, PCHAR *attr ) { @@ -218,6 +300,24 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_sort_controlW (WLDAP32.@) + * + * Parse a sort control. + * + * PARAMS + * ld [I] Pointer to an LDAP context. + * control [I] Control obtained from a result message. + * result [O] Result code. + * attr [O] Failing attribute. + * + * RETURNS + * Success: LDAP_SUCCESS + * Failure: An LDAP error code. + * + * NOTES + * If the function fails, free the failing attribute with ldap_memfree. + */ ULONG CDECL ldap_parse_sort_controlW( WLDAP32_LDAP *ld, PLDAPControlW *control, ULONG *result, PWCHAR *attr ) { @@ -244,6 +344,11 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_vlv_controlA (WLDAP32.@) + * + * See ldap_parse_vlv_controlW. + */ INT CDECL ldap_parse_vlv_controlA( WLDAP32_LDAP *ld, PLDAPControlA *control, PULONG targetpos, PULONG listcount, struct WLDAP32_berval **context, PINT errcode ) @@ -271,6 +376,26 @@ #endif return ret; } +/*********************************************************************** + * ldap_parse_vlv_controlW (WLDAP32.@) + * + * Parse a virtual list view control. + * + * PARAMS + * ld [I] Pointer to an LDAP context. + * control [I] Controls obtained from a result message. + * targetpos [O] Positition of the target in the result list. + * listcount [O] Estimate of the number of results in the list. + * context [O] Server side context. + * errcode [O] Error code from the listview operation. + * + * RETURNS + * Success: LDAP_SUCCESS + * Failure: An LDAP error code. + * + * NOTES + * Free the server context with ber_bvfree. + */ INT CDECL ldap_parse_vlv_controlW( WLDAP32_LDAP *ld, PLDAPControlW *control, PULONG targetpos, PULONG listcount, struct WLDAP32_berval **context, PINT errcode )
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
75
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
Results per page:
10
25
50
100
200