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
October 2009
----- 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
1207 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Call context_release() for wined3d contexts made current by context_create().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 98027cb535a09749aeb27352d5220cf2152528c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98027cb535a09749aeb27352d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Oct 28 11:00:12 2009 +0100 wined3d: Call context_release() for wined3d contexts made current by context_create(). --- dlls/wined3d/context.c | 15 +++++++++------ dlls/wined3d/device.c | 22 ++++++++++++++++++---- dlls/wined3d/swapchain.c | 14 +++++++++----- dlls/wined3d/wined3d_private.h | 6 +++--- 4 files changed, 39 insertions(+), 18 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=98027cb535a09749aeb27…
1
0
0
0
Henri Verbeet : wined3d: Keep better track of where we' re using wined3d contexts.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: eeb54b992253b28430c1b902f575c7a09d4cab71 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eeb54b992253b28430c1b902f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Oct 28 11:00:11 2009 +0100 wined3d: Keep better track of where we're using wined3d contexts. The idea here is that we can restore the thread's current GL context on context_release() if it doesn't correspond to the current wined3d context on context_acquire(). --- dlls/wined3d/arb_program_shader.c | 38 +++++++--- dlls/wined3d/basetexture.c | 15 +++- dlls/wined3d/buffer.c | 34 +++++++-- dlls/wined3d/context.c | 26 ++++++- dlls/wined3d/cubetexture.c | 7 ++- dlls/wined3d/device.c | 69 +++++++++++++------ dlls/wined3d/drawprim.c | 14 +++- dlls/wined3d/glsl_shader.c | 8 ++- dlls/wined3d/query.c | 33 ++++++--- dlls/wined3d/surface.c | 139 +++++++++++++++++++++++++++--------- dlls/wined3d/swapchain.c | 6 +- dlls/wined3d/texture.c | 7 ++- dlls/wined3d/volumetexture.c | 8 +- dlls/wined3d/wined3d_private.h | 6 +- 14 files changed, 298 insertions(+), 112 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=eeb54b992253b28430c1b…
1
0
0
0
Henri Verbeet : wined3d: Restore the thread' s previous GL context in context_destroy_gl_resources().
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 401173ffde4471f93ce0cc78c79367e0a39f356a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=401173ffde4471f93ce0cc78c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Oct 28 11:00:10 2009 +0100 wined3d: Restore the thread's previous GL context in context_destroy_gl_resources(). --- dlls/wined3d/context.c | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 2cbac67..30377b8 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -659,9 +659,15 @@ static void context_destroy_gl_resources(struct wined3d_context *context) struct wined3d_occlusion_query *occlusion_query; struct wined3d_event_query *event_query; struct fbo_entry *entry, *entry2; + HGLRC restore_ctx; + HDC restore_dc; + + restore_ctx = pwglGetCurrentContext(); + restore_dc = pwglGetCurrentDC(); context_validate(context); - if (context->valid) pwglMakeCurrent(context->hdc, context->glCtx); + if (context->valid && restore_ctx != context->glCtx) pwglMakeCurrent(context->hdc, context->glCtx); + else restore_ctx = NULL; ENTER_GL(); @@ -727,7 +733,16 @@ static void context_destroy_gl_resources(struct wined3d_context *context) HeapFree(GetProcessHeap(), 0, context->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, context->free_event_queries); - if (pwglGetCurrentContext() && !pwglMakeCurrent(NULL, NULL)) + if (restore_ctx) + { + if (!pwglMakeCurrent(restore_dc, restore_ctx)) + { + DWORD err = GetLastError(); + ERR("Failed to restore GL context %p on device context %p, last error %#x.\n", + restore_ctx, restore_dc, err); + } + } + else if (pwglGetCurrentContext() && !pwglMakeCurrent(NULL, NULL)) { ERR("Failed to disable GL context.\n"); } @@ -1511,12 +1526,8 @@ void DestroyContext(IWineD3DDeviceImpl *This, struct wined3d_context *context) if (context->tid == GetCurrentThreadId() || !context->current) { context_destroy_gl_resources(context); + TlsSetValue(wined3d_context_tls_idx, NULL); destroy = TRUE; - - if (!context_set_current(NULL)) - { - ERR("Failed to clear current D3D context.\n"); - } } else {
1
0
0
0
Paul Vriens : advapi32: Add a stubbed GetEventLogInformation with input param checking.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 7cc43213d70d70a945666ae50c6c525160835493 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7cc43213d70d70a945666ae50…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Wed Oct 28 10:07:18 2009 +0100 advapi32: Add a stubbed GetEventLogInformation with input param checking. --- dlls/advapi32/advapi32.spec | 2 +- dlls/advapi32/eventlog.c | 58 ++++++++++++++++++++++++++++++++++++++++ dlls/advapi32/tests/eventlog.c | 2 +- 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 058760d..806cecf 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -236,7 +236,7 @@ @ stdcall GetCurrentHwProfileW(ptr) @ stdcall GetEffectiveRightsFromAclA(ptr ptr ptr) @ stdcall GetEffectiveRightsFromAclW(ptr ptr ptr) -# @ stub GetEventLogInformation +@ stdcall GetEventLogInformation(long long ptr long ptr) @ stdcall GetExplicitEntriesFromAclA(ptr ptr ptr) @ stdcall GetExplicitEntriesFromAclW(ptr ptr ptr) @ stdcall GetFileSecurityA(str long ptr long ptr) diff --git a/dlls/advapi32/eventlog.c b/dlls/advapi32/eventlog.c index 1074ccc..e5c7bd7 100644 --- a/dlls/advapi32/eventlog.c +++ b/dlls/advapi32/eventlog.c @@ -190,6 +190,64 @@ ULONG WINAPI EnableTrace( ULONG enable, ULONG flag, ULONG level, LPCGUID guid, T } /****************************************************************************** + * GetEventLogInformation [ADVAPI32.@] + * + * Retrieve some information about an event log. + * + * PARAMS + * hEventLog [I] Handle to an open event log. + * dwInfoLevel [I] Level of information (only EVENTLOG_FULL_INFO) + * lpBuffer [I/O] The buffer for the returned information + * cbBufSize [I] The size of the buffer + * pcbBytesNeeded [O] The needed bytes to hold the information + * + * RETURNS + * Success: TRUE. lpBuffer will hold the information and pcbBytesNeeded shows + * the needed buffer size. + * Failure: FALSE. + */ +BOOL WINAPI GetEventLogInformation( HANDLE hEventLog, DWORD dwInfoLevel, LPVOID lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded) +{ + EVENTLOG_FULL_INFORMATION *efi; + + FIXME("(%p, %d, %p, %d, %p) stub\n", hEventLog, dwInfoLevel, lpBuffer, cbBufSize, pcbBytesNeeded); + + if (dwInfoLevel != EVENTLOG_FULL_INFO) + { + SetLastError(ERROR_INVALID_LEVEL); + return FALSE; + } + + if (!hEventLog) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + if (!lpBuffer || !pcbBytesNeeded) + { + /* FIXME: This will be handled properly when eventlog is moved + * to a higher level + */ + SetLastError(RPC_X_NULL_REF_POINTER); + return FALSE; + } + + *pcbBytesNeeded = sizeof(EVENTLOG_FULL_INFORMATION); + if (cbBufSize < sizeof(EVENTLOG_FULL_INFORMATION)) + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return FALSE; + } + + /* Pretend the log is not full */ + efi = (EVENTLOG_FULL_INFORMATION *)lpBuffer; + efi->dwFull = 0; + + return TRUE; +} + +/****************************************************************************** * GetNumberOfEventLogRecords [ADVAPI32.@] * * Retrieves the number of records in an event log. diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 51d798b..628b08c 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -99,7 +99,7 @@ static void test_info(void) if (!pGetEventLogInformation) { /* NT4 */ - skip("GetEventLogInformation is not available\n"); + win_skip("GetEventLogInformation is not available\n"); return; } SetLastError(0xdeadbeef);
1
0
0
0
Paul Vriens : advapi32/tests: Add some GetEventLogInformation tests.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 400d62167f2aa9a4ff82aa07dd0ec5bbb42e1914 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=400d62167f2aa9a4ff82aa07d…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Wed Oct 28 10:05:39 2009 +0100 advapi32/tests: Add some GetEventLogInformation tests. --- dlls/advapi32/tests/eventlog.c | 72 ++++++++++++++++++++++++++++++++++++++++ include/winbase.h | 10 +++++ 2 files changed, 82 insertions(+), 0 deletions(-) diff --git a/dlls/advapi32/tests/eventlog.c b/dlls/advapi32/tests/eventlog.c index 2823f17..51d798b 100644 --- a/dlls/advapi32/tests/eventlog.c +++ b/dlls/advapi32/tests/eventlog.c @@ -27,6 +27,15 @@ #include "wine/test.h" +static BOOL (WINAPI *pGetEventLogInformation)(HANDLE,DWORD,LPVOID,DWORD,LPDWORD); + +static void init_function_pointers(void) +{ + HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); + + pGetEventLogInformation = (void*)GetProcAddress(hadvapi32, "GetEventLogInformation"); +} + static void test_open_close(void) { HANDLE handle; @@ -80,6 +89,66 @@ static void test_open_close(void) CloseEventLog(handle); } +static void test_info(void) +{ + HANDLE handle; + BOOL ret; + DWORD needed; + EVENTLOG_FULL_INFORMATION efi; + + if (!pGetEventLogInformation) + { + /* NT4 */ + skip("GetEventLogInformation is not available\n"); + return; + } + SetLastError(0xdeadbeef); + ret = pGetEventLogInformation(NULL, 1, NULL, 0, NULL); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INVALID_LEVEL, "Expected ERROR_INVALID_LEVEL, got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pGetEventLogInformation(NULL, EVENTLOG_FULL_INFO, NULL, 0, NULL); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + + handle = OpenEventLogA(NULL, "Application"); + + SetLastError(0xdeadbeef); + ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, NULL); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, NULL, 0, &needed); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, 0, NULL); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == RPC_X_NULL_REF_POINTER, "Expected RPC_X_NULL_REF_POINTER, got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + needed = 0xdeadbeef; + efi.dwFull = 0xdeadbeef; + ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, 0, &needed); + ok(!ret, "Expected failure\n"); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed); + ok(efi.dwFull == 0xdeadbeef, "Expected no change to the dwFull member\n"); + + /* Not that we care, but on success last error is set to ERROR_IO_PENDING */ + efi.dwFull = 0xdeadbeef; + needed *= 2; + ret = pGetEventLogInformation(handle, EVENTLOG_FULL_INFO, (LPVOID)&efi, needed, &needed); + ok(ret, "Expected succes\n"); + ok(needed == sizeof(EVENTLOG_FULL_INFORMATION), "Expected sizeof(EVENTLOG_FULL_INFORMATION), got %d\n", needed); + ok(efi.dwFull == 0 || efi.dwFull == 1, "Expected 0 (not full) or 1 (full), got %d\n", efi.dwFull); + + CloseEventLog(handle); +} + START_TEST(eventlog) { SetLastError(0xdeadbeef); @@ -90,6 +159,9 @@ START_TEST(eventlog) return; } + init_function_pointers(); + /* Parameters only */ test_open_close(); + test_info(); } diff --git a/include/winbase.h b/include/winbase.h index 8117430..0b4ee17 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1223,6 +1223,15 @@ typedef struct tagHW_PROFILE_INFOW { DECL_WINELIB_TYPE_AW(HW_PROFILE_INFO) DECL_WINELIB_TYPE_AW(LPHW_PROFILE_INFO) +/* Event Logging */ + +#define EVENTLOG_FULL_INFO 0 + +typedef struct _EVENTLOG_FULL_INFORMATION { + DWORD dwFull; +} EVENTLOG_FULL_INFORMATION, *LPEVENTLOG_FULL_INFORMATION; + + /* Stream data structures and defines */ /*the types of backup data -- WIN32_STREAM_ID.dwStreamId below*/ #define BACKUP_INVALID 0 @@ -1615,6 +1624,7 @@ WINBASEAPI DWORD WINAPI GetEnvironmentVariableA(LPCSTR,LPSTR,DWORD); WINBASEAPI DWORD WINAPI GetEnvironmentVariableW(LPCWSTR,LPWSTR,DWORD); #define GetEnvironmentVariable WINELIB_NAME_AW(GetEnvironmentVariable) WINBASEAPI UINT WINAPI GetErrorMode(void); +WINADVAPI BOOL WINAPI GetEventLogInformation(HANDLE,DWORD,LPVOID,DWORD,LPDWORD); WINBASEAPI BOOL WINAPI GetExitCodeProcess(HANDLE,LPDWORD); WINBASEAPI BOOL WINAPI GetExitCodeThread(HANDLE,LPDWORD); WINBASEAPI DWORD WINAPI GetFileAttributesA(LPCSTR);
1
0
0
0
Dan Kegel : crypt32/tests: CryptUnprotectData: test zero-length payload.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 5e25a234091dac615a5ea9bd5cf60335acb099e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e25a234091dac615a5ea9bd5…
Author: Dan Kegel <dank(a)kegel.com> Date: Tue Oct 27 18:40:31 2009 -0700 crypt32/tests: CryptUnprotectData: test zero-length payload. --- dlls/crypt32/tests/protectdata.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/tests/protectdata.c b/dlls/crypt32/tests/protectdata.c index 82cf1aa..08ab72a 100644 --- a/dlls/crypt32/tests/protectdata.c +++ b/dlls/crypt32/tests/protectdata.c @@ -213,6 +213,34 @@ static void test_cryptunprotectdata(void) plain.cbData=0; } +static void test_simpleroundtrip(const char *plaintext, int wine_fails) +{ + DATA_BLOB input; + DATA_BLOB encrypted; + DATA_BLOB output; + int res; + WCHAR emptyW[1]; + + emptyW[0] = 0; + input.pbData = (unsigned char *)plaintext; + input.cbData = strlen(plaintext); + res = pCryptProtectData(&input, emptyW, NULL, NULL, NULL, 0, &encrypted); + ok(res != 0, "can't protect\n"); + + res = pCryptUnprotectData(&encrypted, NULL, NULL, NULL, NULL, 0, &output); + if (wine_fails) { + todo_wine + ok(res != 0, "can't unprotect; last error %u\n", GetLastError()); + } else { + ok(res != 0, "can't unprotect; last error %u\n", GetLastError()); + } + + if (res) { + ok(output.cbData == strlen(plaintext), "output wrong length %d for input '%s', wanted %d\n", output.cbData, plaintext, strlen(plaintext)); + ok(!memcmp(plaintext, (char *)output.pbData, output.cbData), "output wrong contents for input '%s'\n", plaintext); + } +} + START_TEST(protectdata) { HMODULE hCrypt32 = GetModuleHandleA("crypt32.dll"); @@ -228,6 +256,8 @@ START_TEST(protectdata) protected=FALSE; test_cryptprotectdata(); test_cryptunprotectdata(); + test_simpleroundtrip("", 1); + test_simpleroundtrip("hello", 0); /* deinit globals here */ if (cipher.pbData) LocalFree(cipher.pbData);
1
0
0
0
Jacek Caban : jscript: Store a copy of code in parser_ctx_t.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: d7edf0162dd7c5d1ed77312ab065b528da6fc716 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7edf0162dd7c5d1ed77312ab…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 27 22:47:20 2009 +0100 jscript: Store a copy of code in parser_ctx_t. --- dlls/jscript/engine.h | 4 ++-- dlls/jscript/parser.y | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 0cd4c40..7dcfc13 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -43,9 +43,9 @@ typedef struct _func_stack { typedef struct _parser_ctx_t { LONG ref; - const WCHAR *ptr; - const WCHAR *begin; + WCHAR *begin; const WCHAR *end; + const WCHAR *ptr; script_ctx_t *script; source_elements_t *source; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 9cae524..0683ab6 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -1594,6 +1594,7 @@ void parser_release(parser_ctx_t *ctx) if(--ctx->ref) return; + heap_free(ctx->begin); jsheap_free(&ctx->heap); heap_free(ctx); } @@ -1615,8 +1616,14 @@ HRESULT script_parse(script_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite parser_ctx->hres = JSCRIPT_ERROR|IDS_SYNTAX_ERROR; parser_ctx->is_html = delimiter && !strcmpiW(delimiter, html_tagW); - parser_ctx->begin = parser_ctx->ptr = code; - parser_ctx->end = code + strlenW(code); + parser_ctx->begin = heap_strdupW(code); + if(!parser_ctx->begin) { + heap_free(parser_ctx); + return E_OUTOFMEMORY; + } + + parser_ctx->ptr = parser_ctx->begin; + parser_ctx->end = parser_ctx->begin + strlenW(parser_ctx->begin); script_addref(ctx); parser_ctx->script = ctx;
1
0
0
0
Vincent Povirk : ole32: Don' t use IEnumSTATSTGImpl to search for a parent directory entry.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 911e923fbcadeca93dae505e6e7c3cc0711ec2d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=911e923fbcadeca93dae505e6…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Oct 27 15:31:01 2009 -0500 ole32: Don't use IEnumSTATSTGImpl to search for a parent directory entry. Use a binary search to find the parent of a storage object being deleted. We currently use IEnumSTATSTGImpl to do a linear search, which is unnecessary. --- dlls/ole32/storage32.c | 187 +++++++++++++++++++----------------------------- 1 files changed, 74 insertions(+), 113 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index ca2287f..fe74fb9 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -204,6 +204,14 @@ static ULONG findElement( const OLECHAR *name, StgProperty *data); +static HRESULT findTreeParent( + StorageImpl *storage, + ULONG storageEntry, + const OLECHAR *childName, + StgProperty *parentData, + ULONG *parentEntry, + ULONG *relation); + /*********************************************************************** * Declaration of miscellaneous functions... */ @@ -249,8 +257,6 @@ static IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(StorageImpl* This, ULONG fir static void IEnumSTATSTGImpl_Destroy(IEnumSTATSTGImpl* This); static void IEnumSTATSTGImpl_PushSearchNode(IEnumSTATSTGImpl* This, ULONG nodeToPush); static ULONG IEnumSTATSTGImpl_PopSearchNode(IEnumSTATSTGImpl* This, BOOL remove); -static INT IEnumSTATSTGImpl_FindParentProperty(IEnumSTATSTGImpl *This, ULONG childProperty, - StgProperty *currentProperty, ULONG *propertyId); /************************************************************************ ** Block Functions @@ -1444,6 +1450,67 @@ static ULONG findElement(StorageImpl *storage, ULONG storageEntry, return currentEntry; } +/**************************************************************************** + * + * Internal Method + * + * Find and read the binary tree parent of the element with the given name. + * + * If there is no such element, find a place where it could be inserted and + * return STG_E_FILENOTFOUND. + */ +static HRESULT findTreeParent(StorageImpl *storage, ULONG storageEntry, + const OLECHAR *childName, StgProperty *parentData, ULONG *parentEntry, + ULONG *relation) +{ + ULONG childEntry; + StgProperty childData; + + /* Read the storage entry to find the root of the tree. */ + StorageImpl_ReadProperty(storage, storageEntry, parentData); + + *parentEntry = storageEntry; + *relation = PROPERTY_RELATION_DIR; + + childEntry = parentData->dirProperty; + + while (childEntry != PROPERTY_NULL) + { + LONG cmp; + + StorageImpl_ReadProperty(storage, childEntry, &childData); + + cmp = propertyNameCmp(childName, childData.name); + + if (cmp == 0) + /* found it */ + break; + + else if (cmp < 0) + { + *parentData = childData; + *parentEntry = childEntry; + *relation = PROPERTY_RELATION_PREVIOUS; + + childEntry = parentData->leftChild; + } + + else if (cmp > 0) + { + *parentData = childData; + *parentEntry = childEntry; + *relation = PROPERTY_RELATION_NEXT; + + childEntry = parentData->rightChild; + } + } + + if (childEntry == PROPERTY_NULL) + return STG_E_FILENOTFOUND; + else + return S_OK; +} + /************************************************************************* * CopyTo (IStorage) @@ -1702,7 +1769,6 @@ static HRESULT WINAPI StorageImpl_DestroyElement( StorageImpl* const This=(StorageImpl*)iface; HRESULT hr = S_OK; - BOOL res; StgProperty propertyToDelete; StgProperty parentProperty; ULONG foundPropertyIndexToDelete; @@ -1730,53 +1796,13 @@ static HRESULT WINAPI StorageImpl_DestroyElement( } /* - * Find the parent property of the property to delete (the one that - * link to it). If This->dirProperty == foundPropertyIndexToDelete, - * the parent is This. Otherwise, the parent is one of its sibling... + * Find the property that links to the one we want to delete. */ + hr = findTreeParent(This->base.ancestorStorage, This->base.rootPropertySetIndex, + pwcsName, &parentProperty, &parentPropertyId, &typeOfRelation); - /* - * First, read This's StgProperty.. - */ - res = StorageImpl_ReadProperty( - This->base.ancestorStorage, - This->base.rootPropertySetIndex, - &parentProperty); - - assert(res); - - /* - * Second, check to see if by any chance the actual storage (This) is not - * the parent of the property to delete... We never know... - */ - if ( parentProperty.dirProperty == foundPropertyIndexToDelete ) - { - /* - * Set data as it would have been done in the else part... - */ - typeOfRelation = PROPERTY_RELATION_DIR; - parentPropertyId = This->base.rootPropertySetIndex; - } - else - { - /* - * Create a property enumeration to search the parent properties, and - * delete it once done. - */ - IEnumSTATSTGImpl* propertyEnumeration2; - - propertyEnumeration2 = IEnumSTATSTGImpl_Construct( - This->base.ancestorStorage, - This->base.rootPropertySetIndex); - - typeOfRelation = IEnumSTATSTGImpl_FindParentProperty( - propertyEnumeration2, - foundPropertyIndexToDelete, - &parentProperty, - &parentPropertyId); - - IEnumSTATSTGImpl_Destroy(propertyEnumeration2); - } + if (hr != S_OK) + return hr; if ( propertyToDelete.propertyType == PROPTYPE_STORAGE ) { @@ -3906,71 +3932,6 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Clone( return S_OK; } -static INT IEnumSTATSTGImpl_FindParentProperty( - IEnumSTATSTGImpl *This, - ULONG childProperty, - StgProperty *currentProperty, - ULONG *thisNodeId) -{ - ULONG currentSearchNode; - ULONG foundNode; - - /* - * To avoid the special case, get another pointer to a ULONG value if - * the caller didn't supply one. - */ - if (thisNodeId==0) - thisNodeId = &foundNode; - - /* - * Start with the node at the top of the stack. - */ - currentSearchNode = IEnumSTATSTGImpl_PopSearchNode(This, FALSE); - - - while (currentSearchNode!=PROPERTY_NULL) - { - /* - * Store the current node in the returned parameters - */ - *thisNodeId = currentSearchNode; - - /* - * Remove the top node from the stack - */ - IEnumSTATSTGImpl_PopSearchNode(This, TRUE); - - /* - * Read the property from the storage. - */ - StorageImpl_ReadProperty( - This->parentStorage, - currentSearchNode, - currentProperty); - - if (currentProperty->leftChild == childProperty) - return PROPERTY_RELATION_PREVIOUS; - - else if (currentProperty->rightChild == childProperty) - return PROPERTY_RELATION_NEXT; - - else if (currentProperty->dirProperty == childProperty) - return PROPERTY_RELATION_DIR; - - /* - * Push the next search node in the search stack. - */ - IEnumSTATSTGImpl_PushSearchNode(This, currentProperty->rightChild); - - /* - * continue the iteration. - */ - currentSearchNode = IEnumSTATSTGImpl_PopSearchNode(This, FALSE); - } - - return PROPERTY_NULL; -} - static void IEnumSTATSTGImpl_PushSearchNode( IEnumSTATSTGImpl* This, ULONG nodeToPush)
1
0
0
0
Jacek Caban : mshtml: Added HTML frames support.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: 67e6c7f1f3c8353de580d92f4e253577275a4d34 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67e6c7f1f3c8353de580d92f4…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 27 21:17:08 2009 +0100 mshtml: Added HTML frames support. --- dlls/mshtml/mutation.c | 72 +++++++++++++++++++++++++++++++++++++++-------- dlls/mshtml/nsiface.idl | 27 +++++++++++++++++ 2 files changed, 87 insertions(+), 12 deletions(-) diff --git a/dlls/mshtml/mutation.c b/dlls/mshtml/mutation.c index e2e88f4..4999e26 100644 --- a/dlls/mshtml/mutation.c +++ b/dlls/mshtml/mutation.c @@ -37,6 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); enum { MUTATION_COMMENT, + MUTATION_FRAME, MUTATION_IFRAME, MUTATION_SCRIPT }; @@ -245,10 +246,30 @@ static void pop_mutation_queue(HTMLDocumentNode *doc) heap_free(tmp); } +static nsresult init_nsdoc_window(HTMLDocumentNode *doc, nsIDOMDocument *nsdoc) +{ + nsIDOMWindow *nswindow; + + nswindow = get_nsdoc_window(nsdoc); + if(!nswindow) + return NS_ERROR_FAILURE; + + if(!nswindow_to_window(nswindow)) { + HTMLWindow *window; + HRESULT hres; + + hres = HTMLWindow_Create(doc->basedoc.doc_obj, nswindow, doc->basedoc.window, &window); + if(SUCCEEDED(hres)) + IHTMLWindow2_Release(HTMLWINDOW2(window)); + } + + nsIDOMWindow_Release(nswindow); + return NS_OK; +} + static nsresult init_iframe_window(HTMLDocumentNode *doc, nsISupports *nsunk) { nsIDOMHTMLIFrameElement *nsiframe; - nsIDOMWindow *nswindow; nsIDOMDocument *nsdoc; nsresult nsres; @@ -265,22 +286,35 @@ static nsresult init_iframe_window(HTMLDocumentNode *doc, nsISupports *nsunk) return nsres; } - nswindow = get_nsdoc_window(nsdoc); + nsres = init_nsdoc_window(doc, nsdoc); + nsIDOMDocument_Release(nsdoc); - if(!nswindow) - return NS_ERROR_FAILURE; + return nsres; +} - if(!nswindow_to_window(nswindow)) { - HTMLWindow *window; - HRESULT hres; +static nsresult init_frame_window(HTMLDocumentNode *doc, nsISupports *nsunk) +{ + nsIDOMHTMLFrameElement *nsframe; + nsIDOMDocument *nsdoc; + nsresult nsres; - hres = HTMLWindow_Create(doc->basedoc.doc_obj, nswindow, doc->basedoc.window, &window); - if(SUCCEEDED(hres)) - IHTMLWindow2_Release(HTMLWINDOW2(window)); + nsres = nsISupports_QueryInterface(nsunk, &IID_nsIDOMHTMLFrameElement, (void**)&nsframe); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMHTMLFrameElement: %08x\n", nsres); + return nsres; } - nsIDOMWindow_Release(nswindow); - return NS_OK; + nsres = nsIDOMHTMLFrameElement_GetContentDocument(nsframe, &nsdoc); + nsIDOMHTMLFrameElement_Release(nsframe); + if(NS_FAILED(nsres) || !nsdoc) { + ERR("GetContentDocument failed: %08x\n", nsres); + return nsres; + } + + nsres = init_nsdoc_window(doc, nsdoc); + + nsIDOMDocument_Release(nsdoc); + return nsres; } static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface) @@ -339,6 +373,10 @@ static nsresult NSAPI nsRunnable_Run(nsIRunnable *iface) break; } + case MUTATION_FRAME: + init_frame_window(This, This->mutation_queue->nsiface); + break; + case MUTATION_IFRAME: init_iframe_window(This, This->mutation_queue->nsiface); break; @@ -562,6 +600,7 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface, { HTMLDocumentNode *This = NSDOCOBS_THIS(iface); nsIDOMHTMLIFrameElement *nsiframe; + nsIDOMHTMLFrameElement *nsframe; nsIDOMComment *nscomment; nsIDOMElement *nselem; nsresult nsres; @@ -591,6 +630,15 @@ static void NSAPI nsDocumentObserver_BindToDocument(nsIDocumentObserver *iface, nsIDOMHTMLIFrameElement_Release(nsiframe); add_script_runner(This); } + + nsres = nsISupports_QueryInterface(aContent, &IID_nsIDOMHTMLFrameElement, (void**)&nsframe); + if(NS_SUCCEEDED(nsres)) { + TRACE("frame node\n"); + + push_mutation_queue(This, MUTATION_FRAME, (nsISupports*)nsframe); + nsIDOMHTMLFrameElement_Release(nsframe); + add_script_runner(This); + } } static void NSAPI nsDocumentObserver_DoneAddingChildren(nsIDocumentObserver *iface, nsIContent *aContent, diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 6143963..19f29b0 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -1513,6 +1513,33 @@ interface nsIDOMHTMLIFrameElement : nsIDOMHTMLElement [ object, + uuid(a6cf90b9-15b3-11d2-932e-00805f8add32), + local + /* FROZEN */ +] +interface nsIDOMHTMLFrameElement : nsIDOMHTMLElement +{ + nsresult GetFrameBorder(nsAString *aFrameBorder); + nsresult SetFrameBorder(const nsAString *aFrameBorder); + nsresult GetLongDesc(nsAString *aLongDesc); + nsresult SetLongDesc(const nsAString *aLongDesc); + nsresult GetMarginHeight(nsAString *aMarginHeight); + nsresult SetMarginHeight(const nsAString *aMarginHeight); + nsresult GetMarginWidth(nsAString *aMarginWidth); + nsresult SetMarginWidth(const nsAString *aMarginWidth); + nsresult GetName(nsAString *aName); + nsresult SetName(const nsAString *aName); + nsresult GetNoResize(PRBool *aNoResize); + nsresult SetNoResize(PRBool aNoResize); + nsresult GetScrolling(nsAString *aScrolling); + nsresult SetScrolling(const nsAString *aScrolling); + nsresult GetSrc(nsAString *aSrc); + nsresult SetSrc(const nsAString *aSrc); + nsresult GetContentDocument(nsIDOMDocument **aContentDocument); +} + +[ + object, uuid(94928ab3-8b63-11d3-989d-001083010e9b), local /* FROZEN */
1
0
0
0
Jacek Caban : mshtml: Avoid crash in nsIURI:Equals if other_url is NULL.
by Alexandre Julliard
28 Oct '09
28 Oct '09
Module: wine Branch: master Commit: faf0b6bb2ae6de9796d3be58bcf4ca0c82d120b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=faf0b6bb2ae6de9796d3be58b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 27 21:10:22 2009 +0100 mshtml: Avoid crash in nsIURI:Equals if other_url is NULL. --- dlls/mshtml/nsio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 94004ab..b36f3fc 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1754,7 +1754,7 @@ static nsresult NSAPI nsURI_Equals(nsIWineURI *iface, nsIURI *other, PRBool *_re } nsIWineURI_GetWineURL(wine_uri, &other_url); - *_retval = !UrlCompareW(This->wine_url, other_url, TRUE); + *_retval = other_url && !UrlCompareW(This->wine_url, other_url, TRUE); nsIWineURI_Release(wine_uri); return NS_OK;
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
121
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200