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
June 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
5 participants
1115 discussions
Start a n
N
ew thread
André Hentschel : winex11: Fix Ctrl+Shift+Tab translation.
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: ef016c32c16af11e54c55d294849b6c9127eb3a0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef016c32c16af11e54c55d294…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon Jun 1 20:10:21 2009 +0200 winex11: Fix Ctrl+Shift+Tab translation. --- dlls/user32/tests/input.c | 2 ++ dlls/winex11.drv/keyboard.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 00d344b..d100610 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -1285,6 +1285,8 @@ static void test_ToUnicode(void) state[VK_SHIFT] |= HIGHEST_BIT; state[VK_LSHIFT] |= HIGHEST_BIT; + ret = ToUnicode(VK_TAB, SC_TAB, state, wStr, 2, 0); + ok(ret == 0, "ToUnicode for CTRL + SHIFT + Tab didn't return 0 (was %i)\n", ret); ret = ToUnicode(VK_RETURN, SC_RETURN, state, wStr, 2, 0); todo_wine ok(ret == 0, "ToUnicode for CTRL + SHIFT + Return didn't return 0 (was %i)\n", ret); } diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index ad41c84..05b3b53 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -2618,7 +2618,7 @@ INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState #endif /* Special case: X turns shift-tab into ISO_Left_Tab. */ /* Here we change it back. */ - if (keysym == XK_ISO_Left_Tab) + if (keysym == XK_ISO_Left_Tab && !(e.state & ControlMask)) { bufW[0] = 0x09; ret = 1;
1
0
0
0
Vitaly Perov : mpr: Don't set LastError if no error occured.
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: d7098d0f4fa829ab14fda359284aaecab506533a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7098d0f4fa829ab14fda3592…
Author: Vitaly Perov <vitperov(a)etersoft.ru> Date: Mon Jun 1 20:57:16 2009 +0400 mpr: Don't set LastError if no error occured. --- dlls/mpr/wnet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c index 241ea2f..cffa340 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c @@ -1949,7 +1949,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel, break; } - SetLastError(err); + if (err != WN_NO_ERROR) SetLastError(err); return err; }
1
0
0
0
Huw Davies : ole32: In simple mode keep the stream size above the small block limit.
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: 16dc0378594804ffa926b13cf0df6eeed133eeaf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=16dc0378594804ffa926b13cf…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jun 1 11:36:19 2009 +0100 ole32: In simple mode keep the stream size above the small block limit. --- dlls/ole32/stg_stream.c | 4 ++++ dlls/ole32/tests/storage32.c | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index 3fde160..9acd414 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -575,6 +575,10 @@ static HRESULT WINAPI StgStreamImpl_SetSize( return STG_E_ACCESSDENIED; } + /* In simple mode keep the stream size above the small block limit */ + if (This->parentStorage->ancestorStorage->base.openFlags & STGM_SIMPLE) + libNewSize.u.LowPart = max(libNewSize.u.LowPart, LIMIT_TO_USE_SMALL_BLOCK); + if (This->streamSize.u.LowPart == libNewSize.u.LowPart) return S_OK; diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index fa5d46c..438913c 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -1354,6 +1354,7 @@ static void test_simple(void) HRESULT r; IStream *stm; static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; + static const WCHAR stmname2[] = { 'S','m','a','l','l',0 }; LARGE_INTEGER pos; ULARGE_INTEGER upos; DWORD count; @@ -1400,6 +1401,19 @@ static void test_simple(void) IStream_Release(stm); + r = IStorage_CreateStream(stg, stmname2, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); + ok(r == S_OK, "got %08x\n", r); + + upos.QuadPart = 100; + r = IStream_SetSize(stm, upos); + ok(r == S_OK, "got %08x\n", r); + + r = IStream_Write(stm, "foo", 3, &count); + ok(r == S_OK, "got %08x\n", r); + ok(count == 3, "got %d\n", count); + + IStream_Release(stm); + IStorage_Commit(stg, STGC_DEFAULT); IStorage_Release(stg); @@ -1415,6 +1429,16 @@ static void test_simple(void) IStream_Release(stm); + r = IStorage_OpenStream(stg, stmname2, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); + ok(r == S_OK, "got %08x\n", r); + + r = IStream_Stat(stm, &stat, STATFLAG_NONAME); + ok(r == S_OK, "got %08x\n", r); + ok(stat.cbSize.QuadPart == 4096, "got %d\n", stat.cbSize.u.LowPart); + + IStream_Release(stm); + + IStorage_Release(stg); DeleteFileW(filename);
1
0
0
0
Huw Davies : ole32: In simple create mode the size returned by IStream_Stat is actually the current stream position .
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: 02fc79b2c920412579e55e4c3d390ca487ee1e49 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02fc79b2c920412579e55e4c3…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jun 1 11:26:12 2009 +0100 ole32: In simple create mode the size returned by IStream_Stat is actually the current stream position. --- dlls/ole32/stg_stream.c | 6 +++++ dlls/ole32/tests/storage32.c | 44 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/dlls/ole32/stg_stream.c b/dlls/ole32/stg_stream.c index d0e0613..3fde160 100644 --- a/dlls/ole32/stg_stream.c +++ b/dlls/ole32/stg_stream.c @@ -841,12 +841,18 @@ static HRESULT WINAPI StgStreamImpl_Stat( if (readSuccessful) { + StorageImpl *root = This->parentStorage->ancestorStorage; + StorageUtl_CopyPropertyToSTATSTG(pstatstg, &curProperty, grfStatFlag); pstatstg->grfMode = This->grfMode; + /* In simple create mode cbSize is the current pos */ + if((root->base.openFlags & STGM_SIMPLE) && root->create) + pstatstg->cbSize = This->currentPosition; + return S_OK; } diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index b426d94..fa5d46c 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -1354,6 +1354,10 @@ static void test_simple(void) HRESULT r; IStream *stm; static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; + LARGE_INTEGER pos; + ULARGE_INTEGER upos; + DWORD count; + STATSTG stat; if(!GetTempFileNameW(szDot, szPrefix, 0, filename)) return; @@ -1368,11 +1372,51 @@ static void test_simple(void) r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); ok(r == S_OK, "got %08x\n", r); + upos.QuadPart = 6000; + r = IStream_SetSize(stm, upos); + ok(r == S_OK, "got %08x\n", r); + + r = IStream_Write(stm, "foo", 3, &count); + ok(r == S_OK, "got %08x\n", r); + ok(count == 3, "got %d\n", count); + + pos.QuadPart = 0; + r = IStream_Seek(stm, pos, STREAM_SEEK_CUR, &upos); + ok(r == S_OK, "got %08x\n", r); + ok(upos.QuadPart == 3, "got %d\n", upos.u.LowPart); + + r = IStream_Stat(stm, &stat, STATFLAG_NONAME); + ok(r == S_OK, "got %08x\n", r); + ok(stat.cbSize.QuadPart == 3, "got %d\n", stat.cbSize.u.LowPart); + + pos.QuadPart = 1; + r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &upos); + ok(r == S_OK, "got %08x\n", r); + ok(upos.QuadPart == 1, "got %d\n", upos.u.LowPart); + + r = IStream_Stat(stm, &stat, STATFLAG_NONAME); + ok(r == S_OK, "got %08x\n", r); + ok(stat.cbSize.QuadPart == 1, "got %d\n", stat.cbSize.u.LowPart); + IStream_Release(stm); IStorage_Commit(stg, STGC_DEFAULT); IStorage_Release(stg); + r = StgOpenStorage( filename, NULL, STGM_SIMPLE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, NULL, 0, &stg); + ok(r == S_OK, "got %08x\n", r); + + r = IStorage_OpenStream(stg, stmname, NULL, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stm); + ok(r == S_OK, "got %08x\n", r); + + r = IStream_Stat(stm, &stat, STATFLAG_NONAME); + ok(r == S_OK, "got %08x\n", r); + ok(stat.cbSize.QuadPart == 6000, "got %d\n", stat.cbSize.u.LowPart); + + IStream_Release(stm); + + IStorage_Release(stg); + DeleteFileW(filename); }
1
0
0
0
Huw Davies : ole32: In simple mode, CreateStream with the STGM_CREATE flag should fail.
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: cc8c36c44c7b761eaa4bf3e1c461999f12e5a48b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc8c36c44c7b761eaa4bf3e1c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Jun 1 11:06:10 2009 +0100 ole32: In simple mode, CreateStream with the STGM_CREATE flag should fail. --- dlls/ole32/storage32.c | 3 +++ dlls/ole32/tests/storage32.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 670d751..212c1ff 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -992,6 +992,9 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream( return STG_E_ACCESSDENIED; } + if(This->ancestorStorage->base.openFlags & STGM_SIMPLE) + if(grfMode & STGM_CREATE) return STG_E_INVALIDFLAG; + /* * Initialize the out parameter */ diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index 55f7145..b426d94 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -1343,6 +1343,39 @@ void test_readonly(void) DeleteFileA("winetest"); } +static void test_simple(void) +{ + /* Tests for STGM_SIMPLE mode */ + + static const WCHAR szPrefix[] = { 's','t','g',0 }; + static const WCHAR szDot[] = { '.',0 }; + WCHAR filename[MAX_PATH]; + IStorage *stg; + HRESULT r; + IStream *stm; + static const WCHAR stmname[] = { 'C','O','N','T','E','N','T','S',0 }; + + if(!GetTempFileNameW(szDot, szPrefix, 0, filename)) + return; + + DeleteFileW(filename); + + r = StgCreateDocfile( filename, STGM_SIMPLE | STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, &stg); + ok(r == S_OK, "got %08x\n", r); + + r = IStorage_CreateStream(stg, stmname, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); + ok(r == STG_E_INVALIDFLAG, "got %08x\n", r); + r = IStorage_CreateStream(stg, stmname, STGM_SHARE_EXCLUSIVE | STGM_READWRITE, 0, 0, &stm); + ok(r == S_OK, "got %08x\n", r); + + IStream_Release(stm); + + IStorage_Commit(stg, STGC_DEFAULT); + IStorage_Release(stg); + + DeleteFileW(filename); +} + START_TEST(storage32) { test_hglobal_storage_stat(); @@ -1357,4 +1390,5 @@ START_TEST(storage32) test_access(); test_writeclassstg(); test_readonly(); + test_simple(); }
1
0
0
0
Huw Davies : ole32: Store the creation flag - STGM_SIMPLE depends on this.
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: 0faf155887b704b82d23a58c91dbf6578c1335ae URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0faf155887b704b82d23a58c9…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri May 29 17:14:41 2009 +0100 ole32: Store the creation flag - STGM_SIMPLE depends on this. --- dlls/ole32/storage32.c | 14 +------------- dlls/ole32/storage32.h | 2 ++ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 91f1f36..670d751 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2407,19 +2407,13 @@ static HRESULT StorageImpl_Construct( memset(This, 0, sizeof(StorageImpl)); - /* - * Initialize stream list - */ - list_init(&This->base.strmHead); - /* - * Initialize the virtual function table. - */ This->base.lpVtbl = &Storage32Impl_Vtbl; This->base.pssVtbl = &IPropertySetStorage_Vtbl; This->base.v_destructor = StorageImpl_Destroy; This->base.openFlags = (openFlags & ~STGM_CREATE); + This->create = create; /* * This is the top-level storage so initialize the ancestor pointer @@ -2427,14 +2421,8 @@ static HRESULT StorageImpl_Construct( */ This->base.ancestorStorage = This; - /* - * Initialize the physical support of the storage. - */ This->hFile = hFile; - /* - * Store copy of file path. - */ if(pwcsName) { This->pwcsName = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(pwcsName)+1)*sizeof(WCHAR)); diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index 1e42afb..4be0631 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -255,6 +255,8 @@ struct StorageImpl */ HANDLE hFile; /* Physical support for the Docfile */ LPOLESTR pwcsName; /* Full path of the document file */ + BOOL create; /* Was the storage created or opened. + The behaviour of STGM_SIMPLE depends on this */ /* FIXME: should this be in Storage32BaseImpl ? */ WCHAR filename[PROPERTY_NAME_BUFFER_LEN];
1
0
0
0
Huw Davies : ole32: Rename a parameter to better reflect its use.
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: 8b7b67712fc399239ba29217205926a41d02bc63 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b7b67712fc399239ba292172…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri May 29 16:51:22 2009 +0100 ole32: Rename a parameter to better reflect its use. --- dlls/ole32/storage32.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 9266bb7..91f1f36 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2395,7 +2395,7 @@ static HRESULT StorageImpl_Construct( ILockBytes* pLkbyt, DWORD openFlags, BOOL fileBased, - BOOL fileCreate) + BOOL create) { HRESULT hr = S_OK; StgProperty currentProperty; @@ -2457,7 +2457,7 @@ static HRESULT StorageImpl_Construct( if (This->bigBlockFile == 0) return E_FAIL; - if (fileCreate) + if (create) { ULARGE_INTEGER size; BYTE bigBlockBuffer[BIG_BLOCK_SIZE]; @@ -2538,7 +2538,7 @@ static HRESULT StorageImpl_Construct( /* * Write the root property (memory only) */ - if (fileCreate) + if (create) { StgProperty rootProp; /*
1
0
0
0
Ken Sharp : shell32: Add stub for InitNetworkAddressControl.
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: 6ed93bf82408e3a3c3ee918e0786e88e6cea8d22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ed93bf82408e3a3c3ee918e0…
Author: Ken Sharp <kennybobs(a)o2.co.uk> Date: Mon Jun 1 08:51:50 2009 +0100 shell32: Add stub for InitNetworkAddressControl. --- dlls/shell32/shell32.spec | 1 + dlls/shell32/shell32_main.c | 9 +++++++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec index 9c4e1ed..9d4808f 100644 --- a/dlls/shell32/shell32.spec +++ b/dlls/shell32/shell32.spec @@ -304,6 +304,7 @@ @ stdcall FindExecutableW(wstr wstr ptr) @ stub FixupOptionalComponents @ stdcall FreeIconList(long) +@ stdcall InitNetworkAddressControl() @ stub InternalExtractIconListA @ stub InternalExtractIconListW @ stub OCInstall diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 6a4848f..41c2d59 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -1203,3 +1203,12 @@ BOOL WINAPI ExtractVersionResource16W(LPWSTR s, DWORD d) FIXME("(%s %x) stub!\n", debugstr_w(s), d); return FALSE; } + +/*********************************************************************** + * InitNetworkAddressControl (SHELL32.@) + */ +BOOL WINAPI InitNetworkAddressControl(void) +{ + FIXME("stub\n"); + return FALSE; +}
1
0
0
0
Alexandre Julliard : rpcrt4: Retrieve the stubless information for the thunks directly from the virtual table pointer .
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: 449a82866dcfaca83d469838e3b15e3838186671 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=449a82866dcfaca83d469838e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 1 21:32:56 2009 +0200 rpcrt4: Retrieve the stubless information for the thunks directly from the virtual table pointer. --- dlls/rpcrt4/cproxy.c | 14 ++++---------- 1 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 9854e81..887de87 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -46,7 +46,6 @@ typedef struct { const IRpcProxyBufferVtbl *lpVtbl; LPVOID *PVtbl; LONG RefCount; - const MIDL_STUBLESS_PROXY_INFO *stubless; const IID* piid; LPUNKNOWN pUnkOuter; PCInterfaceName name; @@ -83,11 +82,9 @@ __ASM_GLOBAL_FUNC(call_stubless_func, HRESULT WINAPI ObjectStubless(DWORD *args) { DWORD index = args[0]; - LPVOID iface = (LPVOID)args[2]; - - ICOM_THIS_MULTI(StdProxyImpl,PVtbl,iface); - - const MIDL_STUBLESS_PROXY_INFO *stubless = This->stubless; + void **iface = (void **)args[2]; + const void **vtbl = (const void **)*iface; + const MIDL_STUBLESS_PROXY_INFO *stubless = *(const MIDL_STUBLESS_PROXY_INFO **)(vtbl - 2); const PFORMAT_STRING fs = stubless->ProcFormatString + stubless->FormatStringOffset[index]; /* store bytes to remove from stack */ @@ -162,7 +159,6 @@ HRESULT StdProxy_Construct(REFIID riid, LPVOID *ppvObj) { StdProxyImpl *This; - const MIDL_STUBLESS_PROXY_INFO *stubless = NULL; PCInterfaceName name = ProxyInfo->pNamesArray[Index]; CInterfaceProxyVtbl *vtbl = ProxyInfo->pProxyVtblList[Index]; @@ -171,9 +167,8 @@ HRESULT StdProxy_Construct(REFIID riid, /* TableVersion = 2 means it is the stubless version of CInterfaceProxyVtbl */ if (ProxyInfo->TableVersion > 1) { ULONG count = ProxyInfo->pStubVtblList[Index]->header.DispatchTableCount; - stubless = *(const void **)vtbl; vtbl = (CInterfaceProxyVtbl *)((const void **)vtbl + 1); - TRACE("stubless %p vtbl %p: count=%d\n", stubless, vtbl->Vtbl, count ); + TRACE("stubless vtbl %p: count=%d\n", vtbl->Vtbl, count ); fill_stubless_table( (IUnknownVtbl *)vtbl->Vtbl, count ); } @@ -192,7 +187,6 @@ HRESULT StdProxy_Construct(REFIID riid, This->PVtbl = vtbl->Vtbl; /* one reference for the proxy */ This->RefCount = 1; - This->stubless = stubless; This->piid = vtbl->header.piid; This->pUnkOuter = pUnkOuter; This->name = name;
1
0
0
0
Alexandre Julliard : rpcrt4: Use the same allocation technique as delegated stubs for the stubless thunks .
by Alexandre Julliard
02 Jun '09
02 Jun '09
Module: wine Branch: master Commit: acfebea667ca88ed3871ab58dcb595104896422c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=acfebea667ca88ed3871ab58d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 1 21:19:56 2009 +0200 rpcrt4: Use the same allocation technique as delegated stubs for the stubless thunks. This avoids allocating them on the heap, and avoids the need for a separate vtbl. --- dlls/rpcrt4/cproxy.c | 102 ++++++++++++++++++++++++++++---------------------- 1 files changed, 57 insertions(+), 45 deletions(-) diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 22af343..9854e81 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -40,8 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); -struct StublessThunk; - /* I don't know what MS's std proxy structure looks like, so this probably doesn't match, but that shouldn't matter */ typedef struct { @@ -54,7 +52,6 @@ typedef struct { PCInterfaceName name; LPPSFACTORYBUFFER pPSFactory; LPRPCCHANNELBUFFER pChannel; - struct StublessThunk *thunks; } StdProxyImpl; static const IRpcProxyBufferVtbl StdProxy_Vtbl; @@ -65,7 +62,7 @@ static const IRpcProxyBufferVtbl StdProxy_Vtbl; #include "pshpack1.h" -struct StublessThunk { +struct thunk { BYTE push; DWORD index; BYTE jmp; @@ -74,12 +71,6 @@ struct StublessThunk { #include "poppack.h" -#define FILL_STUBLESS(x,idx) \ - x->push = 0x68; /* pushl [immediate] */ \ - x->index = (idx); \ - x->jmp = 0xe9; /* jmp */ \ - x->handler = (char*)call_stubless_func - (char*)(&x->handler + 1); - extern void call_stubless_func(void); __ASM_GLOBAL_FUNC(call_stubless_func, "pushl %esp\n\t" /* pointer to index */ @@ -106,12 +97,59 @@ HRESULT WINAPI ObjectStubless(DWORD *args) return NdrClientCall2(stubless->pStubDesc, fs, args + 2); } +#define BLOCK_SIZE 1024 +#define MAX_BLOCKS 64 /* 64k methods should be enough for anybody */ + +static const struct thunk *method_blocks[MAX_BLOCKS]; + +static const struct thunk *allocate_block( unsigned int num ) +{ + unsigned int i; + struct thunk *prev, *block; + + block = VirtualAlloc( NULL, BLOCK_SIZE * sizeof(*block), + MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE ); + if (!block) return NULL; + + for (i = 0; i < BLOCK_SIZE; i++) + { + block[i].push = 0x68; /* pushl */ + block[i].index = BLOCK_SIZE * num + i + 3; + block[i].jmp = 0xe9; /* jmp */ + block[i].handler = (char *)call_stubless_func - (char *)(&block[i].handler + 1); + } + VirtualProtect( block, BLOCK_SIZE * sizeof(*block), PAGE_EXECUTE_READ, NULL ); + prev = InterlockedCompareExchangePointer( (void **)&method_blocks[num], block, NULL ); + if (prev) /* someone beat us to it */ + { + VirtualFree( block, 0, MEM_RELEASE ); + block = prev; + } + return block; +} + +static BOOL fill_stubless_table( IUnknownVtbl *vtbl, DWORD num ) +{ + const void **entry = (const void **)(vtbl + 1); + DWORD i, j; + + for (i = 0; i < (num - 3 + BLOCK_SIZE - 1) / BLOCK_SIZE; i++) + { + const struct thunk *block = method_blocks[i]; + if (!block && !(block = allocate_block( i ))) return FALSE; + for (j = 0; j < BLOCK_SIZE && j < num - 3 - i * BLOCK_SIZE; j++, entry++) + if (*entry == (LPVOID)-1) *entry = &block[j]; + } + return TRUE; +} + #else /* __i386__ */ -/* can't do that on this arch */ -struct StublessThunk { int dummy; }; -#define FILL_STUBLESS(x,idx) \ - ERR("stubless proxies are not supported on this architecture\n"); +static BOOL fill_stubless_table( IUnknownVtbl *vtbl, DWORD num ) +{ + ERR("stubless proxies are not supported on this architecture\n"); + return FALSE; +} #endif /* __i386__ */ @@ -132,13 +170,14 @@ HRESULT StdProxy_Construct(REFIID riid, /* TableVersion = 2 means it is the stubless version of CInterfaceProxyVtbl */ if (ProxyInfo->TableVersion > 1) { + ULONG count = ProxyInfo->pStubVtblList[Index]->header.DispatchTableCount; stubless = *(const void **)vtbl; vtbl = (CInterfaceProxyVtbl *)((const void **)vtbl + 1); - TRACE("stubless=%p\n", stubless); + TRACE("stubless %p vtbl %p: count=%d\n", stubless, vtbl->Vtbl, count ); + fill_stubless_table( (IUnknownVtbl *)vtbl->Vtbl, count ); } - TRACE("iid=%s\n", debugstr_guid(vtbl->header.piid)); - TRACE("vtbl=%p\n", vtbl->Vtbl); + TRACE("iid=%s vtbl=%p\n", debugstr_guid(vtbl->header.piid), vtbl->Vtbl); if (!IsEqualGUID(vtbl->header.piid, riid)) { ERR("IID mismatch during proxy creation\n"); @@ -148,32 +187,9 @@ HRESULT StdProxy_Construct(REFIID riid, This = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(StdProxyImpl)); if (!This) return E_OUTOFMEMORY; - if (stubless) { - CInterfaceStubVtbl *svtbl = ProxyInfo->pStubVtblList[Index]; - ULONG i, count = svtbl->header.DispatchTableCount; - /* Maybe the original vtbl is just modified directly to point at - * ObjectStublessClientXXX thunks in real Windows, but I don't like it - */ - TRACE("stubless thunks: count=%d\n", count); - This->thunks = HeapAlloc(GetProcessHeap(),0,sizeof(struct StublessThunk)*count); - This->PVtbl = HeapAlloc(GetProcessHeap(),0,sizeof(LPVOID)*count); - for (i=0; i<count; i++) { - struct StublessThunk *thunk = &This->thunks[i]; - if (vtbl->Vtbl[i] == (LPVOID)-1) { - FILL_STUBLESS(thunk, i) - This->PVtbl[i] = thunk; - } - else { - memset(thunk, 0, sizeof(struct StublessThunk)); - This->PVtbl[i] = vtbl->Vtbl[i]; - } - } - } - else - This->PVtbl = vtbl->Vtbl; - if (!pUnkOuter) pUnkOuter = (IUnknown *)This; This->lpVtbl = &StdProxy_Vtbl; + This->PVtbl = vtbl->Vtbl; /* one reference for the proxy */ This->RefCount = 1; This->stubless = stubless; @@ -198,10 +214,6 @@ static void StdProxy_Destruct(LPRPCPROXYBUFFER iface) IRpcProxyBuffer_Disconnect(iface); IPSFactoryBuffer_Release(This->pPSFactory); - if (This->thunks) { - HeapFree(GetProcessHeap(),0,This->PVtbl); - HeapFree(GetProcessHeap(),0,This->thunks); - } HeapFree(GetProcessHeap(),0,This); }
1
0
0
0
← Newer
1
...
102
103
104
105
106
107
108
...
112
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
Results per page:
10
25
50
100
200