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
May 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
3 participants
863 discussions
Start a n
N
ew thread
Jacek Caban : kernel: Remove no longer needed includes.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: 9e61d70a00f7e697220dbc68c1bb312a06aac0b5 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=9e61d70a00f7e697220dbc6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 21 16:24:54 2006 +0200 kernel: Remove no longer needed includes. --- dlls/kernel/kernel_main.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/dlls/kernel/kernel_main.c b/dlls/kernel/kernel_main.c index ed9fe60..07dcb82 100644 --- a/dlls/kernel/kernel_main.c +++ b/dlls/kernel/kernel_main.c @@ -25,13 +25,6 @@ #include <assert.h> #include <ctype.h> #include <stdarg.h> #include <string.h> -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif -#include <time.h> -#ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -#endif #include <signal.h> #include "windef.h"
1
0
0
0
Robert Reif : advapi32: Add some lsa tests.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: 1ed98cc7eb5c7a1ab865482232393b9b076aa0a1 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1ed98cc7eb5c7a1ab865482…
Author: Robert Reif <reif(a)earthlink.net> Date: Fri Apr 21 10:06:38 2006 -0400 advapi32: Add some lsa tests. --- dlls/advapi32/tests/.gitignore | 1 dlls/advapi32/tests/Makefile.in | 1 dlls/advapi32/tests/lsa.c | 87 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 0 deletions(-) create mode 100644 dlls/advapi32/tests/lsa.c diff --git a/dlls/advapi32/tests/.gitignore b/dlls/advapi32/tests/.gitignore index a3d91be..ce363d3 100644 --- a/dlls/advapi32/tests/.gitignore +++ b/dlls/advapi32/tests/.gitignore @@ -4,6 +4,7 @@ crypt_lmhash.ok crypt_md4.ok crypt_md5.ok crypt_sha.ok +lsa.ok registry.ok security.ok testlist.c diff --git a/dlls/advapi32/tests/Makefile.in b/dlls/advapi32/tests/Makefile.in index 590a709..4c7739c 100644 --- a/dlls/advapi32/tests/Makefile.in +++ b/dlls/advapi32/tests/Makefile.in @@ -11,6 +11,7 @@ CTESTS = \ crypt_md4.c \ crypt_md5.c \ crypt_sha.c \ + lsa.c \ registry.c \ security.c diff --git a/dlls/advapi32/tests/lsa.c b/dlls/advapi32/tests/lsa.c new file mode 100644 index 0000000..aeeba73 --- /dev/null +++ b/dlls/advapi32/tests/lsa.c @@ -0,0 +1,87 @@ +/* + * Unit tests for lsa functions + * + * Copyright (c) 2006 Robert Reif + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include <stdarg.h> +#include <stdio.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "winternl.h" +#include "ntsecapi.h" + +#include "wine/test.h" + +static HMODULE hadvapi32; +static NTSTATUS (WINAPI *pLsaClose)(LSA_HANDLE); +static NTSTATUS (WINAPI *pLsaFreeMemory)(PVOID); +static NTSTATUS (WINAPI *pLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE); +static NTSTATUS (WINAPI *pLsaQueryInformationPolicy)(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*); + +static BOOL init(void) +{ + hadvapi32 = GetModuleHandle("advapi32.dll"); + + if (hadvapi32) { + pLsaClose = (void*)GetProcAddress(hadvapi32, "LsaClose"); + pLsaFreeMemory = (void*)GetProcAddress(hadvapi32, "LsaFreeMemory"); + pLsaOpenPolicy = (void*)GetProcAddress(hadvapi32, "LsaOpenPolicy"); + pLsaQueryInformationPolicy = (void*)GetProcAddress(hadvapi32, "LsaQueryInformationPolicy"); + + if (pLsaClose && pLsaFreeMemory && pLsaOpenPolicy && pLsaQueryInformationPolicy) + return TRUE; + } + + return FALSE; +} + +static void test_lsa(void) +{ + NTSTATUS status; + LSA_HANDLE handle; + LSA_OBJECT_ATTRIBUTES object_attributes; + + ZeroMemory(&object_attributes, sizeof(object_attributes)); + + status = pLsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle); + ok(status == STATUS_SUCCESS, "LsaOpenPolicy() returned 0x%08lx\n", status); + + if (status == STATUS_SUCCESS) { + PPOLICY_PRIMARY_DOMAIN_INFO domain_info; + + status = pLsaQueryInformationPolicy(handle, PolicyPrimaryDomainInformation, (PVOID*)&domain_info); + ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy() failed, returned 0x%08lx\n", status); + if (status == STATUS_SUCCESS) + pLsaFreeMemory((LPVOID)domain_info); + + status = pLsaClose(handle); + ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status); + } +} + +START_TEST(lsa) +{ + if (!init()) + return; + + test_lsa(); +}
1
0
0
0
Robert Reif : advapi32: Fix LsaClose return value.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: b871ac4ff1963eecfb2dfbdfc54c940c8aea4b6f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=b871ac4ff1963eecfb2dfbd…
Author: Robert Reif <reif(a)earthlink.net> Date: Fri Apr 21 09:31:12 2006 -0400 advapi32: Fix LsaClose return value. --- dlls/advapi32/lsa.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c index fef3a43..de3a289 100644 --- a/dlls/advapi32/lsa.c +++ b/dlls/advapi32/lsa.c @@ -107,7 +107,7 @@ NTSTATUS WINAPI LsaAddAccountRights( NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle) { FIXME("(%p) stub\n", ObjectHandle); - return 0xc0000000; + return STATUS_SUCCESS; } /******************************************************************************
1
0
0
0
Robert Reif : netapi32: Implement NetUserModalsGet level 2.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: 357713473bf71fb0231843a06a81eb1f71fd06f6 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=357713473bf71fb0231843a…
Author: Robert Reif <reif(a)earthlink.net> Date: Sat Apr 29 15:35:27 2006 -0400 netapi32: Implement NetUserModalsGet level 2. --- dlls/netapi32/access.c | 130 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 121 insertions(+), 9 deletions(-) diff --git a/dlls/netapi32/access.c b/dlls/netapi32/access.c index 614e2a4..84d9ed6 100644 --- a/dlls/netapi32/access.c +++ b/dlls/netapi32/access.c @@ -20,6 +20,8 @@ #include <stdarg.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "winerror.h" @@ -27,6 +29,9 @@ #include "lmcons.h" #include "lmaccess.h" #include "lmapibuf.h" #include "lmerr.h" +#include "winreg.h" +#include "winternl.h" +#include "ntsecapi.h" #include "netapi32_misc.h" #include "wine/debug.h" #include "wine/unicode.h" @@ -548,19 +553,126 @@ NetGetDCName(LPCWSTR servername, LPCWSTR } -/************************************************************ - * NetUserModalsGet (NETAPI32.@) +/****************************************************************************** + * NetUserModalsGet (NETAPI32.@) + * + * Retrieves global information for all users and global groups in the security + * database. + * + * PARAMS + * szServer [I] Specifies the DNS or the NetBIOS name of the remote server + * on which the function is to execute. + * level [I] Information level of the data. + * 0 Return global passwords parameters. bufptr points to a + * USER_MODALS_INFO_0 struct. + * 1 Return logon server and domain controller information. bufptr + * points to a USER_MODALS_INFO_1 struct. + * 2 Return domain name and identifier. bufptr points to a + * USER_MODALS_INFO_2 struct. + * 3 Return lockout information. bufptr points to a USER_MODALS_INFO_3 + * struct. + * pbuffer [I] Buffer that receives the data. + * + * RETURNS + * Success: NERR_Success. + * Failure: + * ERROR_ACCESS_DENIED - the user does not have access to the info. + * NERR_InvalidComputer - computer name is invalid. */ -NET_API_STATUS WINAPI NetUserModalsGet(LPCWSTR szServer, DWORD level, LPBYTE *pbuffer) +NET_API_STATUS WINAPI NetUserModalsGet( + LPCWSTR szServer, DWORD level, LPBYTE *pbuffer) { - FIXME("(%s %ld %p) stub!\n", debugstr_w(szServer), level, pbuffer); - - if (level == 2) + TRACE("(%s %ld %p)\n", debugstr_w(szServer), level, pbuffer); + + switch (level) { - *pbuffer = NULL; - return NERR_Success; + case 0: + /* return global passwords parameters */ + FIXME("level 0 not implemented!\n"); + *pbuffer = NULL; + return NERR_InternalError; + case 1: + /* return logon server and domain controller info */ + FIXME("level 1 not implemented!\n"); + *pbuffer = NULL; + return NERR_InternalError; + case 2: + { + /* return domain name and identifier */ + PUSER_MODALS_INFO_2 umi; + LSA_HANDLE policyHandle; + LSA_OBJECT_ATTRIBUTES objectAttributes; + PPOLICY_ACCOUNT_DOMAIN_INFO domainInfo; + NTSTATUS ntStatus; + PSID domainIdentifier = NULL; + int domainNameLen; + + ZeroMemory(&objectAttributes, sizeof(objectAttributes)); + + ntStatus = LsaOpenPolicy(NULL, &objectAttributes, + POLICY_VIEW_LOCAL_INFORMATION, + &policyHandle); + if (ntStatus != STATUS_SUCCESS) + { + WARN("LsaOpenPolicy failed with NT status %lx\n", + LsaNtStatusToWinError(ntStatus)); + return ntStatus; + } + + ntStatus = LsaQueryInformationPolicy(policyHandle, + PolicyAccountDomainInformation, + (PVOID *)&domainInfo); + if (ntStatus != STATUS_SUCCESS) + { + WARN("LsaQueryInformationPolicy failed with NT status %lx\n", + LsaNtStatusToWinError(ntStatus)); + return ntStatus; + } + + domainIdentifier = domainInfo->DomainSid; + domainNameLen = lstrlenW(domainInfo->DomainName.Buffer) + 1; + LsaClose(policyHandle); + + ntStatus = NetApiBufferAllocate(sizeof(USER_MODALS_INFO_2) + + GetLengthSid(domainIdentifier) + + domainNameLen * sizeof(WCHAR), + (LPVOID *)pbuffer); + + if (ntStatus != NERR_Success) + { + WARN("NetApiBufferAllocate() failed\n"); + LsaFreeMemory(domainInfo); + return ntStatus; + } + + umi = (USER_MODALS_INFO_2 *) *pbuffer; + umi->usrmod2_domain_id = (PSID)(*pbuffer + + sizeof(USER_MODALS_INFO_2)); + umi->usrmod2_domain_name = (LPWSTR)(*pbuffer + + sizeof(USER_MODALS_INFO_2) + GetLengthSid(domainIdentifier)); + + lstrcpynW(umi->usrmod2_domain_name, + domainInfo->DomainName.Buffer, + domainNameLen); + CopySid(GetLengthSid(domainIdentifier), umi->usrmod2_domain_id, + domainIdentifier); + + LsaFreeMemory(domainInfo); + + break; + } + case 3: + /* return lockout information */ + FIXME("level 3 not implemented!\n"); + *pbuffer = NULL; + return NERR_InternalError; + default: + WARN("Invalid level %ld is specified\n", level); + *pbuffer = NULL; + return ERROR_INVALID_LEVEL; } - return NERR_InternalError; + + return NERR_Success; } /************************************************************
1
0
0
0
Robert Reif : dsound: Add DirectSoundBuffer_Lock tests.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: a15ef7b18aef382c5f12bf26df277bc42d54472b URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=a15ef7b18aef382c5f12bf2…
Author: Robert Reif <reif(a)earthlink.net> Date: Sat Apr 29 10:14:40 2006 -0400 dsound: Add DirectSoundBuffer_Lock tests. --- dlls/dsound/tests/ds3d.c | 16 ++++++++++++++++ dlls/dsound/tests/ds3d8.c | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c index 0825d68..988e703 100644 --- a/dlls/dsound/tests/ds3d.c +++ b/dlls/dsound/tests/ds3d.c @@ -436,6 +436,8 @@ void test_buffer(LPDIRECTSOUND dso, LPDI LPDIRECTSOUND3DBUFFER buffer=NULL; DS3DBUFFER buffer_param; DWORD start_time,now; + LPVOID buffer1; + DWORD length1; if (winetest_interactive) { if (set_frequency) @@ -559,6 +561,20 @@ void test_buffer(LPDIRECTSOUND dso, LPDI } } + /* try an offset past the end of the buffer */ + rc = IDirectSoundBuffer_Lock(*dsbo, state.buffer_size, 0, &buffer1, + &length1, NULL, NULL, + DSBLOCK_ENTIREBUFFER); + ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " + "returned DSERR_INVALIDPARAM, returned %s\n", DXGetErrorString8(rc)); + + /* try a size larger than the buffer */ + rc = IDirectSoundBuffer_Lock(*dsbo, 0, state.buffer_size + 1, + &buffer1, &length1, NULL, NULL, + DSBLOCK_FROMWRITECURSOR); + ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " + "returned DSERR_INVALIDPARAM, returned %s\n", DXGetErrorString8(rc)); + if (set_frequency) state.wave=wave_generate_la(&wfx,(duration*frequency)/wfx.nSamplesPerSec,&state.wave_len); else diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index c0c5d51..1db0ad7 100644 --- a/dlls/dsound/tests/ds3d8.c +++ b/dlls/dsound/tests/ds3d8.c @@ -328,6 +328,8 @@ void test_buffer8(LPDIRECTSOUND8 dso, LP LPDIRECTSOUND3DBUFFER buffer=NULL; DS3DBUFFER buffer_param; DWORD start_time,now; + LPVOID buffer1; + DWORD length1; if (winetest_interactive) { trace(" Playing %g second 440Hz tone at %ldx%dx%d\n", duration, @@ -445,6 +447,20 @@ void test_buffer8(LPDIRECTSOUND8 dso, LP } } + /* try an offset past the end of the buffer */ + rc = IDirectSoundBuffer_Lock(*dsbo, state.buffer_size, 0, &buffer1, + &length1, NULL, NULL, + DSBLOCK_ENTIREBUFFER); + ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " + "returned DSERR_INVALIDPARAM, returned %s\n", DXGetErrorString8(rc)); + + /* try a size larger than the buffer */ + rc = IDirectSoundBuffer_Lock(*dsbo, 0, state.buffer_size + 1, + &buffer1, &length1, NULL, NULL, + DSBLOCK_FROMWRITECURSOR); + ok(rc==DSERR_INVALIDPARAM, "IDirectSoundBuffer_Lock() should have " + "returned DSERR_INVALIDPARAM, returned %s\n", DXGetErrorString8(rc)); + state.wave=wave_generate_la(&wfx,duration,&state.wave_len); state.dsbo=*dsbo;
1
0
0
0
Robert Reif : dsound: Check DirectSoundBuffer_Lock parameters.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: b06a06090a91a136a7cdd10dd36dbbb149d81a0a URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=b06a06090a91a136a7cdd10…
Author: Robert Reif <reif(a)earthlink.net> Date: Fri Apr 28 23:40:09 2006 -0400 dsound: Check DirectSoundBuffer_Lock parameters. Check DirectSoundBuffer_Lock parameters and return an error (like Windows) rather than fixing up the parameters. --- dlls/dsound/buffer.c | 23 +++++++++++++++++------ dlls/dsound/primary.c | 26 +++++++++++++++++--------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index 1470f84..68c6169 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -567,21 +567,31 @@ static HRESULT WINAPI IDirectSoundBuffer GetTickCount() ); + /* when this flag is set, writecursor is meaningless and must be calculated */ if (flags & DSBLOCK_FROMWRITECURSOR) { - DWORD writepos; /* GetCurrentPosition does too much magic to duplicate here */ - hres = IDirectSoundBufferImpl_GetCurrentPosition(iface, NULL, &writepos); + hres = IDirectSoundBufferImpl_GetCurrentPosition(iface, NULL, &writecursor); if (hres != DS_OK) { WARN("IDirectSoundBufferImpl_GetCurrentPosition failed\n"); return hres; } - writecursor += writepos; } - writecursor %= This->buflen; + + /* when this flag is set, writebytes is meaningless and must be set */ if (flags & DSBLOCK_ENTIREBUFFER) writebytes = This->buflen; - if (writebytes > This->buflen) - writebytes = This->buflen; + + if (writecursor >= This->buflen) { + WARN("Invalid parameter, writecursor: %lu >= buflen: %lu\n", + writecursor, This->buflen); + return DSERR_INVALIDPARAM; + } + + if (writebytes > This->buflen) { + WARN("Invalid parameter, writebytes: %lu > buflen: %lu\n", + writebytes, This->buflen); + return DSERR_INVALIDPARAM; + } EnterCriticalSection(&(This->lock)); @@ -648,6 +658,7 @@ static HRESULT WINAPI IDirectSoundBuffer } LeaveCriticalSection(&(This->lock)); + return DS_OK; } diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index e3cd3a2..304e962 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -665,6 +665,7 @@ static HRESULT WINAPI PrimaryBufferImpl_ static HRESULT WINAPI PrimaryBufferImpl_Lock( LPDIRECTSOUNDBUFFER8 iface,DWORD writecursor,DWORD writebytes,LPVOID lplpaudioptr1,LPDWORD audiobytes1,LPVOID lplpaudioptr2,LPDWORD audiobytes2,DWORD flags ) { + HRESULT hres; DirectSoundDevice *device = ((PrimaryBufferImpl *)iface)->device; TRACE("(%p,%ld,%ld,%p,%p,%p,%p,0x%08lx) at %ld\n", iface, @@ -683,26 +684,33 @@ static HRESULT WINAPI PrimaryBufferImpl_ return DSERR_PRIOLEVELNEEDED; } + /* when this flag is set, writecursor is meaningless and must be calculated */ if (flags & DSBLOCK_FROMWRITECURSOR) { - DWORD writepos; - HRESULT hres; /* GetCurrentPosition does too much magic to duplicate here */ - hres = IDirectSoundBuffer_GetCurrentPosition(iface, NULL, &writepos); + hres = IDirectSoundBuffer_GetCurrentPosition(iface, NULL, &writecursor); if (hres != DS_OK) { WARN("IDirectSoundBuffer_GetCurrentPosition failed\n"); return hres; } - writecursor += writepos; } - while (writecursor >= device->buflen) - writecursor -= device->buflen; + + /* when this flag is set, writebytes is meaningless and must be set */ if (flags & DSBLOCK_ENTIREBUFFER) writebytes = device->buflen; - if (writebytes > device->buflen) - writebytes = device->buflen; + + if (writecursor >= device->buflen) { + WARN("Invalid parameter, writecursor: %lu >= buflen: %lu\n", + writecursor, device->buflen); + return DSERR_INVALIDPARAM; + } + + if (writebytes > device->buflen) { + WARN("Invalid parameter, writebytes: %lu > buflen: %lu\n", + writebytes, device->buflen); + return DSERR_INVALIDPARAM; + } if (!(device->drvdesc.dwFlags & DSDDESC_DONTNEEDPRIMARYLOCK) && device->hwbuf) { - HRESULT hres; hres = IDsDriverBuffer_Lock(device->hwbuf, lplpaudioptr1, audiobytes1, lplpaudioptr2, audiobytes2,
1
0
0
0
Jacek Caban : mshtml: Added test of connection points.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: 79e2f0c4ff392f425f2a5978a2ef429e66712cb1 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=79e2f0c4ff392f425f2a597…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 28 20:07:03 2006 +0200 mshtml: Added test of connection points. --- dlls/mshtml/tests/htmldoc.c | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 9b99c62..704e9e0 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -1255,6 +1255,53 @@ static LRESULT WINAPI wnd_proc(HWND hwnd return DefWindowProc(hwnd, msg, wParam, lParam); } +static void test_ConnectionPoint(IConnectionPointContainer *container, REFIID riid) +{ + IConnectionPointContainer *tmp_container = NULL; + IConnectionPoint *cp; + IID iid; + HRESULT hres; + + hres = IConnectionPointContainer_FindConnectionPoint(container, riid, &cp); + ok(hres == S_OK, "FindConnectionPoint failed: %08lx\n", hres); + if(FAILED(hres)) + return; + + hres = IConnectionPoint_GetConnectionInterface(cp, &iid); + ok(hres == S_OK, "GetConnectionInterface failed: %08lx\n", hres); + ok(IsEqualGUID(riid, &iid), "wrong iid\n"); + + hres = IConnectionPoint_GetConnectionInterface(cp, NULL); + ok(hres == E_POINTER, "GetConnectionInterface failed: %08lx, expected E_POINTER\n", hres); + + hres = IConnectionPoint_GetConnectionPointContainer(cp, &tmp_container); + ok(hres == S_OK, "GetConnectionPointContainer failed: %08lx\n", hres); + ok(tmp_container == container, "container != tmp_container\n"); + if(SUCCEEDED(hres)) + IConnectionPointContainer_Release(tmp_container); + + hres = IConnectionPoint_GetConnectionPointContainer(cp, NULL); + ok(hres == E_POINTER, "GetConnectionPointContainer failed: %08lx, expected E_POINTER\n", hres); + + IConnectionPoint_Release(cp); +} + +static void test_ConnectionPointContainer(IUnknown *unk) +{ + IConnectionPointContainer *container; + HRESULT hres; + + hres = IUnknown_QueryInterface(unk, &IID_IConnectionPointContainer, (void**)&container); + ok(hres == S_OK, "QueryInterface(IID_IConnectionPointContainer) failed: %08lx\n", hres); + if(FAILED(hres)) + return; + + test_ConnectionPoint(container, &DIID_HTMLDocumentEvents); + test_ConnectionPoint(container, &DIID_HTMLDocumentEvents2); + + IConnectionPointContainer_Release(container); +} + static void test_Load(IPersistMoniker *persist) { IMoniker *mon; @@ -1927,6 +1974,7 @@ static void test_HTMLDocument(void) if(FAILED(hres)) return; + test_ConnectionPointContainer(unk); test_Persist(unk); if(load_state == LD_NO) test_OnAmbientPropertyChange2(unk);
1
0
0
0
Jacek Caban : mshtml: Added GetConnectionInterface implementation.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: bde8aa58fb3572e8779ab1d293328e4c9c73cec5 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=bde8aa58fb3572e8779ab1d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 28 20:04:22 2006 +0200 mshtml: Added GetConnectionInterface implementation. --- dlls/mshtml/conpoint.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/conpoint.c b/dlls/mshtml/conpoint.c index a2eaf57..0581cb4 100644 --- a/dlls/mshtml/conpoint.c +++ b/dlls/mshtml/conpoint.c @@ -40,6 +40,7 @@ struct ConnectionPoint { const IConnectionPointVtbl *lpConnectionPointVtbl; HTMLDocument *doc; + IID iid; }; #define CONPOINT_THIS(iface) DEFINE_THIS(ConnectionPoint, ConnectionPoint, iface) @@ -83,8 +84,14 @@ static ULONG WINAPI ConnectionPoint_Rele static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *pIID) { ConnectionPoint *This = CONPOINT_THIS(iface); - FIXME("(%p)->(%p)\n", This, pIID); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, pIID); + + if(!pIID) + return E_POINTER; + + memcpy(pIID, &This->iid, sizeof(IID)); + return S_OK; } static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface, @@ -145,6 +152,7 @@ static void ConnectionPoint_Create(HTMLD ret->lpConnectionPointVtbl = &ConnectionPointVtbl; ret->doc = doc; + memcpy(&ret->iid, riid, sizeof(IID)); *cp = ret; }
1
0
0
0
Jacek Caban : mshtml: Added GetConnectionPointContainer implementation.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: a9cdfa99527197ec102dfcee92179bab4a4f59e9 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=a9cdfa99527197ec102dfce…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 28 20:02:14 2006 +0200 mshtml: Added GetConnectionPointContainer implementation. --- dlls/mshtml/conpoint.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/conpoint.c b/dlls/mshtml/conpoint.c index 0ea47d0..a2eaf57 100644 --- a/dlls/mshtml/conpoint.c +++ b/dlls/mshtml/conpoint.c @@ -91,8 +91,15 @@ static HRESULT WINAPI ConnectionPoint_Ge IConnectionPointContainer **ppCPC) { ConnectionPoint *This = CONPOINT_THIS(iface); - FIXME("(%p)->(%p)\n", This, ppCPC); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, ppCPC); + + if(!ppCPC) + return E_POINTER; + + *ppCPC = CONPTCONT(This->doc); + IConnectionPointContainer_AddRef(*ppCPC); + return S_OK; } static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *pUnkSink,
1
0
0
0
Jacek Caban : mshtml: Added stub implementation of connection points.
by Alexandre Julliard
05 May '06
05 May '06
Module: wine Branch: refs/heads/master Commit: 1cfcbb3010ca81ea21dffcd6a7d5c39ca9264a0a URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1cfcbb3010ca81ea21dffcd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Apr 28 20:01:07 2006 +0200 mshtml: Added stub implementation of connection points. --- dlls/mshtml/conpoint.c | 125 +++++++++++++++++++++++++++++++++++++++++- dlls/mshtml/mshtml_private.h | 4 + 2 files changed, 127 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/conpoint.c b/dlls/mshtml/conpoint.c index 0436aa6..0ea47d0 100644 --- a/dlls/mshtml/conpoint.c +++ b/dlls/mshtml/conpoint.c @@ -38,8 +38,110 @@ #define CONPOINT(x) ((IConnectionPoint*) struct ConnectionPoint { const IConnectionPointVtbl *lpConnectionPointVtbl; + + HTMLDocument *doc; }; +#define CONPOINT_THIS(iface) DEFINE_THIS(ConnectionPoint, ConnectionPoint, iface) + +static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface, + REFIID riid, LPVOID *ppv) +{ + ConnectionPoint *This = CONPOINT_THIS(iface); + + *ppv = NULL; + + if(IsEqualGUID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); + *ppv = CONPOINT(This); + }else if(IsEqualGUID(&IID_IConnectionPoint, riid)) { + TRACE("(%p)->(IID_IConnectionPoint %p)\n", This, ppv); + *ppv = CONPOINT(This); + } + + if(*ppv) { + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; + } + + WARN("Unsupported interface %s\n", debugstr_guid(riid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface) +{ + ConnectionPoint *This = CONPOINT_THIS(iface); + return IHTMLDocument2_AddRef(HTMLDOC(This->doc)); +} + +static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface) +{ + ConnectionPoint *This = CONPOINT_THIS(iface); + return IHTMLDocument2_Release(HTMLDOC(This->doc)); +} + +static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *pIID) +{ + ConnectionPoint *This = CONPOINT_THIS(iface); + FIXME("(%p)->(%p)\n", This, pIID); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface, + IConnectionPointContainer **ppCPC) +{ + ConnectionPoint *This = CONPOINT_THIS(iface); + FIXME("(%p)->(%p)\n", This, ppCPC); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *pUnkSink, + DWORD *pdwCookie) +{ + ConnectionPoint *This = CONPOINT_THIS(iface); + FIXME("(%p)->(%p %p)\n", This, pUnkSink, pdwCookie); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dwCookie) +{ + ConnectionPoint *This = CONPOINT_THIS(iface); + FIXME("(%p)->(%ld)\n", This, dwCookie); + return E_NOTIMPL; +} + +static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface, + IEnumConnections **ppEnum) +{ + ConnectionPoint *This = CONPOINT_THIS(iface); + FIXME("(%p)->(%p)\n", This, ppEnum); + return E_NOTIMPL; +} + +#undef CONPOINT_THIS + +static const IConnectionPointVtbl ConnectionPointVtbl = +{ + ConnectionPoint_QueryInterface, + ConnectionPoint_AddRef, + ConnectionPoint_Release, + ConnectionPoint_GetConnectionInterface, + ConnectionPoint_GetConnectionPointContainer, + ConnectionPoint_Advise, + ConnectionPoint_Unadvise, + ConnectionPoint_EnumConnections +}; + +static void ConnectionPoint_Create(HTMLDocument *doc, REFIID riid, ConnectionPoint **cp) +{ + ConnectionPoint *ret = HeapAlloc(GetProcessHeap(), 0, sizeof(ConnectionPoint)); + + ret->lpConnectionPointVtbl = &ConnectionPointVtbl; + ret->doc = doc; + + *cp = ret; +} + #define CONPTCONT_THIS(iface) DEFINE_THIS(HTMLDocument, ConnectionPointContainer, iface) static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, @@ -73,8 +175,24 @@ static HRESULT WINAPI ConnectionPointCon REFIID riid, IConnectionPoint **ppCP) { HTMLDocument *This = CONPTCONT_THIS(iface); - FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppCP); - return E_NOTIMPL; + + *ppCP = NULL; + + if(IsEqualGUID(&DIID_HTMLDocumentEvents, riid)) { + TRACE("(%p)->(DIID_HTMLDocumentEvents %p)\n", This, ppCP); + *ppCP = CONPOINT(This->cp_htmldocevents); + }else if(IsEqualGUID(&DIID_HTMLDocumentEvents2, riid)) { + TRACE("(%p)->(DIID_HTMLDocumentEvents2 %p)\n", This, ppCP); + *ppCP = CONPOINT(This->cp_htmldocevents2); + } + + if(*ppCP) { + IConnectionPoint_AddRef(*ppCP); + return S_OK; + } + + FIXME("(%p)->(%s %p) unsupported riid\n", This, debugstr_guid(riid), ppCP); + return CONNECT_E_NOCONNECTION; } static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl = { @@ -90,4 +208,7 @@ #undef CONPTCONT_THIS void HTMLDocument_ConnectionPoints_Init(HTMLDocument *This) { This->lpConnectionPointContainerVtbl = &ConnectionPointContainerVtbl; + + ConnectionPoint_Create(This, &DIID_HTMLDocumentEvents, &This->cp_htmldocevents); + ConnectionPoint_Create(This, &DIID_HTMLDocumentEvents2, &This->cp_htmldocevents2); } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 3ebe445..3124a96 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -45,6 +45,7 @@ #define NS_DOCUMENT_NODE 9 typedef struct BindStatusCallback BindStatusCallback; typedef struct HTMLDOMNode HTMLDOMNode; +typedef struct ConnectionPoint ConnectionPoint; typedef struct { const IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl; @@ -84,6 +85,9 @@ typedef struct { BindStatusCallback *status_callback; + ConnectionPoint *cp_htmldocevents; + ConnectionPoint *cp_htmldocevents2; + HTMLDOMNode *nodes; } HTMLDocument;
1
0
0
0
← Newer
1
...
80
81
82
83
84
85
86
87
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
87
Results per page:
10
25
50
100
200