winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2006
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
5 participants
746 discussions
Start a n
N
ew thread
Dan Hipschman : user: Add a test for CreateWindowEx.
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: 50486859706d01f5d639d8029a5cba71bdd9ccae URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=50486859706d01f5d639d80…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Fri Aug 4 10:08:00 2006 -0700 user: Add a test for CreateWindowEx. --- dlls/user/tests/win.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/user/tests/win.c b/dlls/user/tests/win.c index a1c7539..9d37253 100644 --- a/dlls/user/tests/win.c +++ b/dlls/user/tests/win.c @@ -137,8 +137,10 @@ static void test_parent_owner(void) trace( "main window %p main2 %p desktop %p child %p\n", hwndMain, hwndMain2, desktop, child ); /* child without parent, should fail */ + SetLastError(0xdeadbeef); test = CreateWindowExA(0, "ToolWindowClass", "Tool window 1", WS_CHILD, 0, 0, 100, 100, 0, 0, 0, NULL ); + todo_wine ok( GetLastError() == ERROR_TLW_WITH_WSCHILD, "CreateWindowExA should call SetLastError\n" ); ok( !test, "WS_CHILD without parent created\n" ); /* desktop window */
1
0
0
0
Alexandre Julliard : user: Don' t bother checking the WS_VISIBLE style on the desktop window.
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: 121f9c7e5525d6f28fa3c9781c0ab0e76d87d3bf URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=121f9c7e5525d6f28fa3c97…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 4 20:45:55 2006 +0200 user: Don't bother checking the WS_VISIBLE style on the desktop window. --- dlls/user/win.c | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dlls/user/win.c b/dlls/user/win.c index 68d6bb0..592eeac 100644 --- a/dlls/user/win.c +++ b/dlls/user/win.c @@ -249,7 +249,6 @@ static HWND *list_window_children( HWND * * Build an array of all parents of a given window, starting with * the immediate parent. The array must be freed with HeapFree. - * Returns NULL if window is a top-level window. */ static HWND *list_window_parents( HWND hwnd ) { @@ -2611,14 +2610,17 @@ BOOL WINAPI IsChild( HWND parent, HWND c BOOL WINAPI IsWindowVisible( HWND hwnd ) { HWND *list; - BOOL retval; + BOOL retval = TRUE; int i; if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE)) return FALSE; if (!(list = list_window_parents( hwnd ))) return TRUE; - for (i = 0; list[i]; i++) - if (!(GetWindowLongW( list[i], GWL_STYLE ) & WS_VISIBLE)) break; - retval = !list[i]; + if (list[0] && list[1]) /* desktop window is considered always visible so we don't check it */ + { + for (i = 0; list[i+1]; i++) + if (!(GetWindowLongW( list[i], GWL_STYLE ) & WS_VISIBLE)) break; + retval = !list[i+1]; + } HeapFree( GetProcessHeap(), 0, list ); return retval; } @@ -2634,7 +2636,7 @@ BOOL WINAPI IsWindowVisible( HWND hwnd ) BOOL WIN_IsWindowDrawable( HWND hwnd, BOOL icon ) { HWND *list; - BOOL retval; + BOOL retval = TRUE; int i; LONG style = GetWindowLongW( hwnd, GWL_STYLE ); @@ -2642,10 +2644,13 @@ BOOL WIN_IsWindowDrawable( HWND hwnd, BO if ((style & WS_MINIMIZE) && icon && GetClassLongPtrW( hwnd, GCLP_HICON )) return FALSE; if (!(list = list_window_parents( hwnd ))) return TRUE; - for (i = 0; list[i]; i++) - if ((GetWindowLongW( list[i], GWL_STYLE ) & (WS_VISIBLE|WS_MINIMIZE)) != WS_VISIBLE) - break; - retval = !list[i]; + if (list[0] && list[1]) /* desktop window is considered always visible so we don't check it */ + { + for (i = 0; list[i+1]; i++) + if ((GetWindowLongW( list[i], GWL_STYLE ) & (WS_VISIBLE|WS_MINIMIZE)) != WS_VISIBLE) + break; + retval = !list[i+1]; + } HeapFree( GetProcessHeap(), 0, list ); return retval; }
1
0
0
0
Hans Leidekker : usp10: Implement ScriptGetGlyphABCWidth.
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: 0c0ab500b9e7b71034e26c55dda47f778bf42aac URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=0c0ab500b9e7b71034e26c5…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Fri Aug 4 14:55:30 2006 +0200 usp10: Implement ScriptGetGlyphABCWidth. Add a test for ScriptGetGlyphABCWidth and ScriptCacheGetHeight. --- dlls/usp10/tests/usp10.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/usp10/usp10.c | 44 +++++++++++++++++++++++++++++++++++++ dlls/usp10/usp10.spec | 2 +- 3 files changed, 99 insertions(+), 1 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 6a8f0bb..85546b1 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -626,6 +626,58 @@ static void test_ScriptString(void) } } +void test_ScriptCacheGetHeight(HDC hdc) +{ + HRESULT hr; + SCRIPT_CACHE sc = NULL; + LONG height; + + hr = ScriptCacheGetHeight(NULL, NULL, NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr); + + hr = ScriptCacheGetHeight(NULL, &sc, NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr); + + hr = ScriptCacheGetHeight(NULL, &sc, &height); + ok(hr == E_PENDING, "expected E_PENDING, got 0x%08lx\n", hr); + + height = 0; + + hr = ScriptCacheGetHeight(hdc, &sc, &height); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); + + ok(height > 0, "expected height > 0\n"); +} + +void test_ScriptGetGlyphABCWidth(HDC hdc) +{ + HRESULT hr; + LOGFONTA lf; + HFONT hfont; + SCRIPT_CACHE sc = NULL; + ABC abc; + + memset(&lf, 0, sizeof(lf)); + + lstrcpyA(lf.lfFaceName, "Symbol"); + hfont = CreateFontIndirectA(&lf); + hfont = SelectObject(hdc, hfont); + + hr = ScriptGetGlyphABCWidth(NULL, NULL, 'a', NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr); + + hr = ScriptGetGlyphABCWidth(NULL, &sc, 'a', NULL); + ok(hr == E_PENDING, "expected E_PENDING, got 0x%08lx\n", hr); + + if (0) { /* crashes on WinXP */ + hr = ScriptGetGlyphABCWidth(hdc, &sc, 'a', NULL); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got 0x%08lx\n", hr); + } + + hr = ScriptGetGlyphABCWidth(hdc, &sc, 'a', &abc); + ok(hr == S_OK, "expected S_OK, got 0x%08lx\n", hr); +} + START_TEST(usp10) { HWND hwnd; @@ -646,6 +698,8 @@ START_TEST(usp10) test_ScriptItemIzeShapePlace(hdc,pwOutGlyphs); test_ScriptGetCMap(hdc, pwOutGlyphs); + test_ScriptCacheGetHeight(hdc); + test_ScriptGetGlyphABCWidth(hdc); ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 7a13acd..7d76a81 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -914,3 +914,47 @@ HRESULT WINAPI ScriptCacheGetHeight(HDC *height = metric.tmHeight; return S_OK; } + +/*********************************************************************** + * ScriptGetGlyphABCWidth (USP10.@) + * + * Retrieve the width of a glyph. + * + * PARAMS + * hdc [I] Device context. + * psc [I/O] Opaque pointer to a script cache. + * glyph [I] Glyph to retrieve the width for. + * abc [O] ABC widths of the glyph. + * + * RETURNS + * Success: S_OK + * Failure: Non-zero HRESULT value. + */ +HRESULT WINAPI ScriptGetGlyphABCWidth(HDC hdc, SCRIPT_CACHE *psc, WORD glyph, ABC *abc) +{ + HDC phdc; + Scriptcache *pScriptcache; + + TRACE("(%p, %p, 0x%04x, %p)\n", hdc, psc, glyph, abc); + + if (!psc) + return E_INVALIDARG; + + if (!hdc) return E_PENDING; + + if (!*psc) { + pScriptcache = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(Scriptcache)); + pScriptcache->hdc = hdc; + phdc = hdc; + *psc = pScriptcache; + } else { + pScriptcache = *psc; + phdc = pScriptcache->hdc; + } + + /* FIXME: get this from the cache */ + if (!GetCharABCWidthsW(phdc, glyph, glyph, abc)) + return E_HANDLE; + + return S_OK; +} diff --git a/dlls/usp10/usp10.spec b/dlls/usp10/usp10.spec index 3d0e1ce..0c9ab51 100644 --- a/dlls/usp10/usp10.spec +++ b/dlls/usp10/usp10.spec @@ -7,7 +7,7 @@ @ stdcall ScriptFreeCache(ptr) @ stdcall ScriptGetCMap(ptr ptr ptr long long ptr) @ stdcall ScriptGetFontProperties(long ptr ptr) -@ stub ScriptGetGlyphABCWidth +@ stdcall ScriptGetGlyphABCWidth(ptr ptr long ptr) @ stub ScriptGetLogicalWidths @ stdcall ScriptGetProperties(ptr long) @ stdcall ScriptIsComplex(wstr long long)
1
0
0
0
Robert Reif : advapi32: Add more SID tests.
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: 08484ba498f2d6f9082cf24d3b16a637a7abfbbe URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=08484ba498f2d6f9082cf24…
Author: Robert Reif <reif(a)earthlink.net> Date: Fri Aug 4 08:17:58 2006 -0400 advapi32: Add more SID tests. --- dlls/advapi32/tests/security.c | 134 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 126 insertions(+), 8 deletions(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index 3b0ff83..3663738 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -18,15 +18,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdarg.h> #include <stdio.h> -#include "wine/test.h" +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "winerror.h" #include "aclapi.h" #include "winnt.h" +#include "winternl.h" #include "sddl.h" +#include "ntsecapi.h" + +#include "wine/test.h" typedef VOID (WINAPI *fnBuildTrusteeWithSidA)( PTRUSTEEA pTrustee, PSID pSid ); typedef VOID (WINAPI *fnBuildTrusteeWithNameA)( PTRUSTEEA pTrustee, LPSTR pName ); @@ -49,6 +55,11 @@ typedef BOOL (WINAPI *fnGetFileSecurityA typedef DWORD (WINAPI *fnRtlAdjustPrivilege)(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN); typedef BOOL (WINAPI *fnCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*); +typedef NTSTATUS (WINAPI *fnLsaQueryInformationPolicy)(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*); +typedef NTSTATUS (WINAPI *fnLsaClose)(LSA_HANDLE); +typedef NTSTATUS (WINAPI *fnLsaFreeMemory)(PVOID); +typedef NTSTATUS (WINAPI *fnLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE); + static HMODULE hmod; fnBuildTrusteeWithSidA pBuildTrusteeWithSidA; @@ -61,6 +72,10 @@ fnConvertStringSidToSidA pConvertStringS fnGetFileSecurityA pGetFileSecurityA; fnRtlAdjustPrivilege pRtlAdjustPrivilege; fnCreateWellKnownSid pCreateWellKnownSid; +fnLsaQueryInformationPolicy pLsaQueryInformationPolicy; +fnLsaClose pLsaClose; +fnLsaFreeMemory pLsaFreeMemory; +fnLsaOpenPolicy pLsaOpenPolicy; struct sidRef { @@ -87,7 +102,7 @@ static void test_str_sid(char *str_sid) } } else - trace("%s couldn't be converted\n", str_sid); + trace("%s couldn't be converted, returned %ld\n", str_sid, GetLastError()); } static void test_sid(void) @@ -180,7 +195,6 @@ static void test_sid(void) LocalFree( psid ); } - trace("String SIDs:\n"); test_str_sid("AO"); test_str_sid("RU"); test_str_sid("AN"); @@ -799,6 +813,7 @@ static void test_token_attr(void) trace("\t%s, %s\\%s use: %d attr: 0x%08lx\n", SidString, Domain, Name, SidNameUse, Groups->Groups[i].Attributes); LocalFree(SidString); } + HeapFree(GetProcessHeap(), 0, Groups); /* user */ ret = GetTokenInformation(Token, TokenUser, NULL, 0, &Size); @@ -852,19 +867,19 @@ static void test_LookupAccountSid(void) ret = AllocateAndInitializeSid(&SIDAuthNT, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &pUsersSid); - ok(ret, "AllocateAndInitializeSid failed with error %ld\n", GetLastError()); + ok(ret, "AllocateAndInitializeSid failed with error %ld\n", GetLastError()); /* try NULL account */ acc_size = MAX_PATH; dom_size = MAX_PATH; ret = LookupAccountSid(NULL, pUsersSid, NULL, &acc_size, domain, &dom_size, &use); - ok(ret, "Expected TRUE, got FALSE\n"); + ok(ret, "LookupAccountSid() Expected TRUE, got FALSE\n"); /* try NULL domain */ acc_size = MAX_PATH; dom_size = MAX_PATH; ret = LookupAccountSid(NULL, pUsersSid, account, &acc_size, NULL, &dom_size, &use); - ok(ret, "Expected TRUE, got FALSE\n"); + ok(ret, "LookupAccountSid() Expected TRUE, got FALSE\n"); pCreateWellKnownSid = (fnCreateWellKnownSid)GetProcAddress( hmod, "CreateWellKnownSid" ); @@ -882,11 +897,114 @@ static void test_LookupAccountSid(void) dom_size = MAX_PATH; if (LookupAccountSid(NULL, &max_sid.sid, account, &acc_size, domain, &dom_size, &use)) trace(" %d: %s %s\\%s %d\n", i, str_sid, domain, account, use); - LocalFree(str_sid); + LocalFree(str_sid); } } else - trace(" CreateWellKnownSid(%d) failed: %ld\n", i, GetLastError()); + trace(" CreateWellKnownSid(%d) failed: %ld\n", i, GetLastError()); + } + + pLsaQueryInformationPolicy = (fnLsaQueryInformationPolicy)GetProcAddress( hmod, "LsaQueryInformationPolicy"); + pLsaOpenPolicy = (fnLsaOpenPolicy)GetProcAddress( hmod, "LsaOpenPolicy"); + pLsaFreeMemory = (fnLsaFreeMemory)GetProcAddress( hmod, "LsaFreeMemory"); + pLsaClose = (fnLsaClose)GetProcAddress( hmod, "LsaClose"); + + if (pLsaQueryInformationPolicy && pLsaOpenPolicy && pLsaFreeMemory && pLsaClose) + { + 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_ACCOUNT_DOMAIN_INFO info; + status = pLsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (PVOID*)&info); + ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy() failed, returned 0x%08lx\n", status); + if (status == STATUS_SUCCESS) + { + ok(info->DomainSid!=0, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) missing SID\n"); + if (info->DomainSid) + { + int count = *GetSidSubAuthorityCount(info->DomainSid); + int len = GetSidLengthRequired(count); + + CopySid(len, &max_sid, info->DomainSid); + + ret = pConvertSidToStringSidA(&max_sid.sid, &str_sid); + ok(ret, "ConvertSidToStringSidA() failed: %ld\n", GetLastError()); + if (ret) + { + acc_size = MAX_PATH; + dom_size = MAX_PATH; + ret = LookupAccountSid(NULL, &max_sid.sid, account, &acc_size, domain, &dom_size, &use); + ok(ret, "LookupAccountSid(%s) failed: %ld\n", str_sid, GetLastError()); + if (ret) + trace(" %s %s\\%s %d\n", str_sid, domain, account, use); + LocalFree(str_sid); + } + + max_sid.sid.SubAuthority[count] = DOMAIN_USER_RID_ADMIN; + max_sid.sid.SubAuthorityCount = count + 1; + + ret = pConvertSidToStringSidA(&max_sid.sid, &str_sid); + ok(ret, "ConvertSidToStringSidA() failed: %ld\n", GetLastError()); + if (ret) + { + acc_size = MAX_PATH; + dom_size = MAX_PATH; + ret = LookupAccountSid(NULL, &max_sid.sid, account, &acc_size, domain, &dom_size, &use); + ok(ret, "LookupAccountSid(%s) failed: %ld\n", str_sid, GetLastError()); + if (ret) + trace(" %s %s\\%s %d\n", str_sid, domain, account, use); + LocalFree(str_sid); + } + + max_sid.sid.SubAuthority[count] = DOMAIN_USER_RID_GUEST; + max_sid.sid.SubAuthorityCount = count + 1; + + ret = pConvertSidToStringSidA(&max_sid.sid, &str_sid); + ok(ret, "ConvertSidToStringSidA() failed: %ld\n", GetLastError()); + if (ret) + { + acc_size = MAX_PATH; + dom_size = MAX_PATH; + ret = LookupAccountSid(NULL, &max_sid.sid, account, &acc_size, domain, &dom_size, &use); + ok(ret, "LookupAccountSid(%s) failed: %ld\n", str_sid, GetLastError()); + if (ret) + trace(" %s %s\\%s %d\n", str_sid, domain, account, use); + LocalFree(str_sid); + } + + max_sid.sid.SubAuthority[count] = 1000; + max_sid.sid.SubAuthorityCount = count + 1; + + ret = pConvertSidToStringSidA(&max_sid.sid, &str_sid); + ok(ret, "ConvertSidToStringSidA() failed: %ld\n", GetLastError()); + if (ret) + { + acc_size = MAX_PATH; + dom_size = MAX_PATH; + ret = LookupAccountSid(NULL, &max_sid.sid, account, &acc_size, domain, &dom_size, &use); + /* this can fail if no user accounts exist */ + if (ret) + trace(" %s %s\\%s %d\n", str_sid, domain, account, use); + else + trace("LookupAccountSid(%s) failed: %ld\n", str_sid, GetLastError()); + LocalFree(str_sid); + } + } + + pLsaFreeMemory((LPVOID)info); + } + + status = pLsaClose(handle); + ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status); + } } } }
1
0
0
0
Robert Shearman : rpcrt4: Make the error output on a failed binding more informative
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: 488c0a0423d68add919566a61a28e43520ac68f8 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=488c0a0423d68add919566a…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Aug 4 12:55:44 2006 +0100 rpcrt4: Make the error output on a failed binding more informative by dumping information about the interface it is trying to bind to. --- dlls/rpcrt4/rpc_binding.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index 363ee90..0cd81ad 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -293,7 +293,10 @@ RPC_STATUS RPCRT4_OpenBinding(RpcBinding if (response_hdr->common.ptype != PKT_BIND_ACK || response_hdr->bind_ack.max_tsize < RPC_MIN_PACKET_SIZE) { - ERR("failed to bind\n"); + ERR("failed to bind for interface %s, %d.%d\n", + debugstr_guid(&InterfaceId->SyntaxGUID), + InterfaceId->SyntaxVersion.MajorVersion, + InterfaceId->SyntaxVersion.MinorVersion); RPCRT4_FreeHeader(response_hdr); RPCRT4_DestroyConnection(NewConnection); return RPC_S_PROTOCOL_ERROR;
1
0
0
0
Robert Shearman : urlmon: Delay-load cabinet.dll as native urlmon doesn' t import it.
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: 4582a2bb8e43937bb5a5f555b40c0b744a2d45fd URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=4582a2bb8e43937bb5a5f55…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Aug 4 12:55:37 2006 +0100 urlmon: Delay-load cabinet.dll as native urlmon doesn't import it. --- dlls/urlmon/Makefile.in | 2 +- dlls/urlmon/urlmon.spec | 2 +- dlls/urlmon/urlmon_main.c | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/Makefile.in b/dlls/urlmon/Makefile.in index b54592d..0546bdb 100644 --- a/dlls/urlmon/Makefile.in +++ b/dlls/urlmon/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = urlmon.dll IMPORTLIB = liburlmon.$(IMPLIBEXT) -IMPORTS = cabinet ole32 shlwapi wininet user32 advapi32 kernel32 ntdll +IMPORTS = ole32 shlwapi wininet user32 advapi32 kernel32 ntdll EXTRALIBS = -luuid C_SRCS = \ diff --git a/dlls/urlmon/urlmon.spec b/dlls/urlmon/urlmon.spec index 46e5f28..7821486 100644 --- a/dlls/urlmon/urlmon.spec +++ b/dlls/urlmon/urlmon.spec @@ -32,7 +32,7 @@ #3 stub IsJITInProgress @ stdcall -private DllRegisterServer() @ stdcall -private DllRegisterServerEx() @ stdcall -private DllUnregisterServer() -@ stdcall Extract(long ptr) cabinet.Extract +@ stdcall Extract(long ptr) @ stdcall FaultInIEFeature(long ptr ptr long) @ stub FindMediaType @ stub FindMediaTypeClass diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c index f4c51d8..953553d 100644 --- a/dlls/urlmon/urlmon_main.c +++ b/dlls/urlmon/urlmon_main.c @@ -41,6 +41,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); LONG URLMON_refCount = 0; HINSTANCE URLMON_hInstance = 0; +static HMODULE hCabinet = NULL; DWORD urlmon_tls = 0; @@ -63,6 +64,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, case DLL_PROCESS_DETACH: if(urlmon_tls) TlsFree(urlmon_tls); + if (hCabinet) + FreeLibrary(hCabinet); + hCabinet = NULL; init_session(FALSE); URLMON_hInstance = 0; break; @@ -597,3 +601,20 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC return E_FAIL; } + +/*********************************************************************** + * Extract (URLMON.@) + */ +HRESULT WINAPI Extract(void *dest, LPCSTR szCabName) +{ + HRESULT (WINAPI *pExtract)(void *, LPCSTR); + + if (!hCabinet) + hCabinet = LoadLibraryA("cabinet.dll"); + + if (!hCabinet) return HRESULT_FROM_WIN32(GetLastError()); + pExtract = (void *)GetProcAddress(hCabinet, "Extract"); + if (!pExtract) return HRESULT_FROM_WIN32(GetLastError()); + + return pExtract(dest, szCabName); +}
1
0
0
0
Hans Leidekker : usp10: Implement ScriptIsComplex.
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: c340ddd310f59ed03295a1291d59dea61c9020d5 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=c340ddd310f59ed03295a12…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Fri Aug 4 11:41:58 2006 +0200 usp10: Implement ScriptIsComplex. --- dlls/usp10/usp10.c | 186 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 183 insertions(+), 3 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 9e02007..7a13acd 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -443,13 +443,193 @@ HRESULT WINAPI ScriptBreak(const WCHAR * return S_OK; } +static const struct +{ + WCHAR start; + WCHAR end; + DWORD flag; +} +complex_ranges[] = +{ + { 0, 0x0b, SIC_COMPLEX }, + { 0x0c, 0x0c, SIC_NEUTRAL }, + { 0x0d, 0x1f, SIC_COMPLEX }, + { 0x20, 0x2f, SIC_NEUTRAL }, + { 0x30, 0x39, SIC_ASCIIDIGIT }, + { 0x3a, 0x40, SIC_NEUTRAL }, + { 0x5b, 0x60, SIC_NEUTRAL }, + { 0x7b, 0x7e, SIC_NEUTRAL }, + { 0x7f, 0x9f, SIC_COMPLEX }, + { 0xa0, 0xa5, SIC_NEUTRAL }, + { 0xa7, 0xa8, SIC_NEUTRAL }, + { 0xab, 0xab, SIC_NEUTRAL }, + { 0xad, 0xad, SIC_NEUTRAL }, + { 0xaf, 0xaf, SIC_NEUTRAL }, + { 0xb0, 0xb1, SIC_NEUTRAL }, + { 0xb4, 0xb4, SIC_NEUTRAL }, + { 0xb6, 0xb8, SIC_NEUTRAL }, + { 0xbb, 0xbf, SIC_NEUTRAL }, + { 0xd7, 0xd7, SIC_NEUTRAL }, + { 0xf7, 0xf7, SIC_NEUTRAL }, + { 0x2b9, 0x2ba, SIC_NEUTRAL }, + { 0x2c2, 0x2cf, SIC_NEUTRAL }, + { 0x2d2, 0x2df, SIC_NEUTRAL }, + { 0x2e5, 0x2e9, SIC_COMPLEX }, + { 0x2ea, 0x2ed, SIC_NEUTRAL }, + { 0x300, 0x362, SIC_COMPLEX }, + { 0x530, 0x60b, SIC_COMPLEX }, + { 0x60c, 0x60d, SIC_NEUTRAL }, + { 0x60e, 0x669, SIC_COMPLEX }, + { 0x66a, 0x66a, SIC_NEUTRAL }, + { 0x66b, 0x6e8, SIC_COMPLEX }, + { 0x6e9, 0x6e9, SIC_NEUTRAL }, + { 0x6ea, 0x7bf, SIC_COMPLEX }, + { 0x900, 0x1360, SIC_COMPLEX }, + { 0x137d, 0x137f, SIC_COMPLEX }, + { 0x1680, 0x1680, SIC_NEUTRAL }, + { 0x1780, 0x18af, SIC_COMPLEX }, + { 0x2000, 0x200a, SIC_NEUTRAL }, + { 0x200b, 0x200f, SIC_COMPLEX }, + { 0x2010, 0x2016, SIC_NEUTRAL }, + { 0x2018, 0x2022, SIC_NEUTRAL }, + { 0x2024, 0x2028, SIC_NEUTRAL }, + { 0x2029, 0x202e, SIC_COMPLEX }, + { 0x202f, 0x2037, SIC_NEUTRAL }, + { 0x2039, 0x203c, SIC_NEUTRAL }, + { 0x2044, 0x2046, SIC_NEUTRAL }, + { 0x206a, 0x206f, SIC_COMPLEX }, + { 0x207a, 0x207e, SIC_NEUTRAL }, + { 0x208a, 0x20aa, SIC_NEUTRAL }, + { 0x20ac, 0x20cf, SIC_NEUTRAL }, + { 0x20d0, 0x20ff, SIC_COMPLEX }, + { 0x2103, 0x2103, SIC_NEUTRAL }, + { 0x2105, 0x2105, SIC_NEUTRAL }, + { 0x2109, 0x2109, SIC_NEUTRAL }, + { 0x2116, 0x2116, SIC_NEUTRAL }, + { 0x2121, 0x2122, SIC_NEUTRAL }, + { 0x212e, 0x212e, SIC_NEUTRAL }, + { 0x2153, 0x2154, SIC_NEUTRAL }, + { 0x215b, 0x215e, SIC_NEUTRAL }, + { 0x2190, 0x2199, SIC_NEUTRAL }, + { 0x21b8, 0x21b9, SIC_NEUTRAL }, + { 0x21d2, 0x21d2, SIC_NEUTRAL }, + { 0x21d4, 0x21d4, SIC_NEUTRAL }, + { 0x21e7, 0x21e7, SIC_NEUTRAL }, + { 0x2200, 0x2200, SIC_NEUTRAL }, + { 0x2202, 0x2203, SIC_NEUTRAL }, + { 0x2207, 0x2208, SIC_NEUTRAL }, + { 0x220b, 0x220b, SIC_NEUTRAL }, + { 0x220f, 0x220f, SIC_NEUTRAL }, + { 0x2211, 0x2213, SIC_NEUTRAL }, + { 0x2215, 0x2215, SIC_NEUTRAL }, + { 0x221a, 0x221a, SIC_NEUTRAL }, + { 0x221d, 0x2220, SIC_NEUTRAL }, + { 0x2223, 0x2223, SIC_NEUTRAL }, + { 0x2225, 0x2225, SIC_NEUTRAL }, + { 0x2227, 0x222c, SIC_NEUTRAL }, + { 0x222e, 0x222e, SIC_NEUTRAL }, + { 0x2234, 0x2237, SIC_NEUTRAL }, + { 0x223c, 0x223d, SIC_NEUTRAL }, + { 0x2248, 0x2248, SIC_NEUTRAL }, + { 0x224c, 0x224c, SIC_NEUTRAL }, + { 0x2252, 0x2252, SIC_NEUTRAL }, + { 0x2260, 0x2261, SIC_NEUTRAL }, + { 0x2264, 0x2267, SIC_NEUTRAL }, + { 0x226a, 0x226b, SIC_NEUTRAL }, + { 0x226e, 0x226f, SIC_NEUTRAL }, + { 0x2282, 0x2283, SIC_NEUTRAL }, + { 0x2286, 0x2287, SIC_NEUTRAL }, + { 0x2295, 0x2295, SIC_NEUTRAL }, + { 0x2299, 0x2299, SIC_NEUTRAL }, + { 0x22a5, 0x22a5, SIC_NEUTRAL }, + { 0x22bf, 0x22bf, SIC_NEUTRAL }, + { 0x2312, 0x2312, SIC_NEUTRAL }, + { 0x24ea, 0x24ea, SIC_COMPLEX }, + { 0x2500, 0x254b, SIC_NEUTRAL }, + { 0x2550, 0x256d, SIC_NEUTRAL }, + { 0x256e, 0x2574, SIC_NEUTRAL }, + { 0x2581, 0x258f, SIC_NEUTRAL }, + { 0x2592, 0x2595, SIC_NEUTRAL }, + { 0x25a0, 0x25a1, SIC_NEUTRAL }, + { 0x25a3, 0x25a9, SIC_NEUTRAL }, + { 0x25b2, 0x25b3, SIC_NEUTRAL }, + { 0x25b6, 0x25b7, SIC_NEUTRAL }, + { 0x25bc, 0x25bd, SIC_NEUTRAL }, + { 0x25c0, 0x25c1, SIC_NEUTRAL }, + { 0x25c6, 0x25c8, SIC_NEUTRAL }, + { 0x25cb, 0x25cb, SIC_NEUTRAL }, + { 0x25ce, 0x25d1, SIC_NEUTRAL }, + { 0x25e2, 0x25e5, SIC_NEUTRAL }, + { 0x25ef, 0x25ef, SIC_NEUTRAL }, + { 0x2605, 0x2606, SIC_NEUTRAL }, + { 0x2609, 0x2609, SIC_NEUTRAL }, + { 0x260e, 0x260f, SIC_NEUTRAL }, + { 0x261c, 0x261c, SIC_NEUTRAL }, + { 0x261e, 0x261e, SIC_NEUTRAL }, + { 0x2640, 0x2640, SIC_NEUTRAL }, + { 0x2642, 0x2642, SIC_NEUTRAL }, + { 0x2660, 0x2661, SIC_NEUTRAL }, + { 0x2663, 0x2665, SIC_NEUTRAL }, + { 0x2667, 0x266a, SIC_NEUTRAL }, + { 0x266c, 0x266d, SIC_NEUTRAL }, + { 0x266f, 0x266f, SIC_NEUTRAL }, + { 0x273d, 0x273d, SIC_NEUTRAL }, + { 0x2e80, 0x312f, SIC_COMPLEX }, + { 0x3190, 0x31bf, SIC_COMPLEX }, + { 0x31f0, 0x31ff, SIC_COMPLEX }, + { 0x3220, 0x325f, SIC_COMPLEX }, + { 0x3280, 0xa4ff, SIC_COMPLEX }, + { 0xd800, 0xdfff, SIC_COMPLEX }, + { 0xe000, 0xf8ff, SIC_NEUTRAL }, + { 0xf900, 0xfaff, SIC_COMPLEX }, + { 0xfb13, 0xfb28, SIC_COMPLEX }, + { 0xfb29, 0xfb29, SIC_NEUTRAL }, + { 0xfb2a, 0xfb4f, SIC_COMPLEX }, + { 0xfd3e, 0xfd3f, SIC_NEUTRAL }, + { 0xfdd0, 0xfdef, SIC_COMPLEX }, + { 0xfe20, 0xfe6f, SIC_COMPLEX }, + { 0xfeff, 0xfeff, SIC_COMPLEX }, + { 0xff01, 0xff5e, SIC_COMPLEX }, + { 0xff61, 0xff9f, SIC_COMPLEX }, + { 0xffe0, 0xffe6, SIC_COMPLEX }, + { 0xffe8, 0xffee, SIC_COMPLEX }, + { 0xfff9, 0xfffb, SIC_COMPLEX }, + { 0xfffe, 0xfffe, SIC_COMPLEX } +}; + /*********************************************************************** * ScriptIsComplex (USP10.@) + * + * Determine if a string is complex. + * + * PARAMS + * chars [I] Array of characters to test. + * len [I] Length in characters. + * flag [I] Flag. + * + * RETURNS + * Success: S_OK + * Failure: S_FALSE * + * NOTES + * Behaviour matches that of WinXP. */ -HRESULT WINAPI ScriptIsComplex(const WCHAR* pwcInChars, int cInChars, DWORD dwFlags) { - FIXME("(%s,%d,0x%lx): stub\n", debugstr_wn(pwcInChars, cInChars), cInChars, dwFlags); - return E_NOTIMPL; +HRESULT WINAPI ScriptIsComplex(const WCHAR *chars, int len, DWORD flag) +{ + unsigned int i, j; + + TRACE("(%s,%d,0x%lx)\n", debugstr_wn(chars, len), len, flag); + + for (i = 0; i < len; i++) + { + for (j = 0; j < sizeof(complex_ranges)/sizeof(complex_ranges[0]); j++) + { + if (chars[i] >= complex_ranges[j].start && + chars[i] <= complex_ranges[j].end && + (flag & complex_ranges[j].flag)) return S_OK; + } + } + return S_FALSE; } /***********************************************************************
1
0
0
0
Dan Hipschman : widl: Generate GUID (infile_i.c) files.
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: df91150e10c093933bd4fd685a68885f38067b8e URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=df91150e10c093933bd4fd6…
Author: Dan Hipschman <dsh(a)linux.ucla.edu> Date: Thu Aug 3 17:48:45 2006 -0700 widl: Generate GUID (infile_i.c) files. --- tools/widl/header.c | 12 ++++++----- tools/widl/header.h | 2 ++ tools/widl/parser.y | 39 ++++++++++++++++++++++++++++++++++++- tools/widl/widl.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++---- tools/widl/widl.h | 2 ++ 5 files changed, 98 insertions(+), 11 deletions(-) diff --git a/tools/widl/header.c b/tools/widl/header.c index c807691..6344fb3 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -80,10 +80,10 @@ int is_void(const type_t *t, const var_t return 0; } -static void write_guid(const char *guid_prefix, const char *name, const UUID *uuid) +void write_guid(FILE *f, const char *guid_prefix, const char *name, const UUID *uuid) { if (!uuid) return; - fprintf(header, "DEFINE_GUID(%s_%s, 0x%08lx, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x," + fprintf(f, "DEFINE_GUID(%s_%s, 0x%08lx, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x," "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n", guid_prefix, name, uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0], uuid->Data4[1], uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], @@ -503,7 +503,7 @@ void write_externdef(const var_t *v) void write_library(const char *name, const attr_t *attr) { const UUID *uuid = get_attrp(attr, ATTR_UUID); fprintf(header, "\n"); - write_guid("LIBID", name, uuid); + write_guid(header, "LIBID", name, uuid); fprintf(header, "\n"); } @@ -846,19 +846,19 @@ void write_forward(type_t *iface) static void write_iface_guid(const type_t *iface) { const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); - write_guid("IID", iface->name, uuid); + write_guid(header, "IID", iface->name, uuid); } static void write_dispiface_guid(const type_t *iface) { const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); - write_guid("DIID", iface->name, uuid); + write_guid(header, "DIID", iface->name, uuid); } static void write_coclass_guid(type_t *cocl) { const UUID *uuid = get_attrp(cocl->attrs, ATTR_UUID); - write_guid("CLSID", cocl->name, uuid); + write_guid(header, "CLSID", cocl->name, uuid); } static void write_com_interface(type_t *iface) diff --git a/tools/widl/header.h b/tools/widl/header.h index 5863f3b..6358d98 100644 --- a/tools/widl/header.h +++ b/tools/widl/header.h @@ -46,6 +46,8 @@ extern void write_library(const char *na extern void write_user_types(void); extern const var_t* get_explicit_handle_var(const func_t* func); extern int has_out_arg_or_return(const func_t *func); +extern void write_guid(FILE *f, const char *guid_prefix, const char *name, + const UUID *uuid); static inline int is_string_type(const attr_t *attrs, int ptr_level, const expr_t *array) { diff --git a/tools/widl/parser.y b/tools/widl/parser.y index b9f858e..ca5db5c 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -96,6 +96,11 @@ static int get_struct_type(var_t *fields static var_t *reg_const(var_t *var); static var_t *find_const(char *name, int f); +static void write_libid(const char *name, const attr_t *attr); +static void write_clsid(type_t *cls); +static void write_diid(type_t *iface); +static void write_iid(type_t *iface); + #define tsENUM 1 #define tsSTRUCT 2 #define tsUNION 3 @@ -299,7 +304,9 @@ importlib: tIMPORTLIB '(' aSTRING ')' { libraryhdr: tLIBRARY aIDENTIFIER { $$ = $2; } ; library_start: attributes libraryhdr '{' { start_typelib($2, $1); - if (!parse_only && do_header) write_library($2, $1); } + if (!parse_only && do_header) write_library($2, $1); + if (!parse_only && do_idfile) write_libid($2, $1); + } ; librarydef: library_start imp_statements '}' { end_typelib(); } ; @@ -649,6 +656,8 @@ coclasshdr: attributes coclass { $$ = $$->attrs = $1; if (!parse_only && do_header) write_coclass($$); + if (!parse_only && do_idfile) + write_clsid($$); } ; @@ -698,10 +707,12 @@ dispinterfacedef: dispinterfacehdr '{' $$->fields = $3; $$->funcs = $4; if (!parse_only && do_header) write_dispinterface($$); + if (!parse_only && do_idfile) write_diid($$); } /* FIXME: not sure how to handle this yet | dispinterfacehdr '{' interface '}' { $$ = $1; if (!parse_only && do_header) write_interface($$); + if (!parse_only && do_idfile) write_iid($$); } */ ; @@ -727,6 +738,7 @@ interfacedef: interfacehdr inherit $$->ref = $2; $$->funcs = $4; if (!parse_only && do_header) write_interface($$); + if (!parse_only && do_idfile) write_iid($$); } /* MIDL is able to import the definition of a base class from inside the * definition of a derived class, I'll try to support it with this rule */ @@ -736,6 +748,7 @@ interfacedef: interfacehdr inherit if (!$$->ref) yyerror("base class '%s' not found in import", $3); $$->funcs = $6; if (!parse_only && do_header) write_interface($$); + if (!parse_only && do_idfile) write_iid($$); } | dispinterfacedef { $$ = $1; } ; @@ -1505,3 +1518,27 @@ static var_t *find_const(char *name, int } return cur->var; } + +static void write_libid(const char *name, const attr_t *attr) +{ + const UUID *uuid = get_attrp(attr, ATTR_UUID); + write_guid(idfile, "LIBID", name, uuid); +} + +static void write_clsid(type_t *cls) +{ + const UUID *uuid = get_attrp(cls->attrs, ATTR_UUID); + write_guid(idfile, "CLSID", cls->name, uuid); +} + +static void write_diid(type_t *iface) +{ + const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); + write_guid(idfile, "DIID", iface->name, uuid); +} + +static void write_iid(type_t *iface) +{ + const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID); + write_guid(idfile, "IID", iface->name, uuid); +} diff --git a/tools/widl/widl.c b/tools/widl/widl.c index c6c4a1c..152d35f 100644 --- a/tools/widl/widl.c +++ b/tools/widl/widl.c @@ -46,8 +46,6 @@ #include "header.h" /* A = ACF input filename */ /* J = do not search standard include path */ /* O = generate interpreted stubs */ -/* u = UUID file only? */ -/* U = UUID filename */ /* w = select win16/win32 output (?) */ static char usage[] = @@ -68,6 +66,8 @@ static char usage[] = " -S file Name of server stub file (default is infile_s.c)\n" " -t Generate typelib\n" " -T file Name of typelib file (default is infile.tlb)\n" +" -u Generate interface identifiers file\n" +" -U file Name of interface identifiers file (default is infile_i.c)\n" " -V Print version and exit\n" " -W Enable pedantic warnings\n" "Debug level 'n' is a bitmask with following meaning:\n" @@ -94,6 +94,7 @@ int do_typelib = 0; int do_proxies = 0; int do_client = 0; int do_server = 0; +int do_idfile = 0; int no_preprocess = 0; int old_names = 0; @@ -107,17 +108,20 @@ char *client_name; char *client_token; char *server_name; char *server_token; +char *idfile_name; +char *idfile_token; char *temp_name; int line_number = 1; FILE *header; FILE *proxy; +FILE *idfile; time_t now; static const char *short_options = - "cC:d:D:EhH:I:NpP:sS:tT:VW"; + "cC:d:D:EhH:I:NpP:sS:tT:uU:VW"; static struct option long_options[] = { { "oldnames", 0, 0, 1 }, { 0, 0, 0, 0 } @@ -231,6 +235,13 @@ #endif case 'T': typelib_name = strdup(optarg); break; + case 'u': + do_everything = 0; + do_idfile = 1; + break; + case 'U': + idfile_name = strdup(optarg); + break; case 'V': printf(version_string); return 0; @@ -244,7 +255,7 @@ #endif } if(do_everything) { - do_header = do_typelib = do_proxies = do_client = do_server = 1; + do_header = do_typelib = do_proxies = do_client = do_server = do_idfile = 1; } if(optind < argc) { input_name = xstrdup(argv[optind]); @@ -292,6 +303,11 @@ #endif strcat(server_name, "_s.c"); } + if (!idfile_name && do_idfile) { + idfile_name = dup_basename(input_name, ".idl"); + strcat(idfile_name, "_i.c"); + } + if (do_proxies) proxy_token = dup_basename_token(proxy_name,"_p.c"); if (do_client) client_token = dup_basename_token(client_name,"_c.c"); if (do_server) server_token = dup_basename_token(server_name,"_s.c"); @@ -343,6 +359,26 @@ #endif fprintf(header, "#endif\n"); } + if (do_idfile) { + idfile_token = make_token(idfile_name); + + idfile = fopen(idfile_name, "w"); + if (! idfile) { + fprintf(stderr, "Could not open %s for output\n", idfile_name); + return 1; + } + + fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION); + fprintf(idfile, "from %s - Do not edit ***/\n\n", input_name); + fprintf(idfile, "#include <rpc.h>\n"); + fprintf(idfile, "#include <rpcndr.h>\n\n"); + fprintf(idfile, "#define INITGUID\n"); + fprintf(idfile, "#include <guiddef.h>\n\n"); + fprintf(idfile, "#ifdef __cplusplus\n"); + fprintf(idfile, "extern \"C\" {\n"); + fprintf(idfile, "#endif\n\n"); + } + ret = yyparse(); if(do_header) { @@ -359,6 +395,15 @@ #endif fclose(header); } + if (do_idfile) { + fprintf(idfile, "\n"); + fprintf(idfile, "#ifdef __cplusplus\n"); + fprintf(idfile, "}\n"); + fprintf(idfile, "#endif\n"); + + fclose(idfile); + } + fclose(yyin); if(ret) { @@ -367,6 +412,7 @@ #endif header_name = NULL; client_name = NULL; server_name = NULL; + idfile_name = NULL; return 0; } diff --git a/tools/widl/widl.h b/tools/widl/widl.h index d41ca70..9357450 100644 --- a/tools/widl/widl.h +++ b/tools/widl/widl.h @@ -43,6 +43,7 @@ extern int do_typelib; extern int do_proxies; extern int do_client; extern int do_server; +extern int do_idfile; extern int old_names; extern char *input_name; @@ -60,6 +61,7 @@ extern int line_number; extern int char_number; extern FILE* header; +extern FILE* idfile; extern void write_proxies(ifref_t *ifaces); extern void write_client(ifref_t *ifaces);
1
0
0
0
James Hawkins : msi: Use the initial dialog position values in the database when creating the dialog window .
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: 23027f54356286907f5fec525059222a243284fd URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=23027f54356286907f5fec5…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Aug 3 17:42:05 2006 -0700 msi: Use the initial dialog position values in the database when creating the dialog window. --- dlls/msi/dialog.c | 55 ++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 41 insertions(+), 14 deletions(-) diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index ae4f044..77f8b94 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -26,9 +26,9 @@ #include <stdarg.h> #include "windef.h" #include "winbase.h" +#include "wingdi.h" #include "winuser.h" #include "winnls.h" -#include "wingdi.h" #include "msi.h" #include "msipriv.h" #include "msidefs.h" @@ -2058,20 +2058,44 @@ static MSIRECORD *msi_get_dialog_record( return rec; } -static void msi_dialog_adjust_dialog_size( msi_dialog *dialog, LPSIZE sz ) +static void msi_get_screen_resolution( msi_dialog *dialog, UINT *xres, UINT *yres ) { - RECT rect; + WCHAR num[10]; + DWORD sz = 10; + + static const WCHAR szScreenX[] = {'S','c','r','e','e','n','X',0}; + static const WCHAR szScreenY[] = {'S','c','r','e','e','n','Y',0}; + + *xres = 0; + *yres = 0; + + MSI_GetPropertyW( dialog->package, szScreenX, num, &sz ); + *xres = atolW( num ); + + sz = 10; + MSI_GetPropertyW( dialog->package, szScreenY, num, &sz ); + *yres = atolW( num ); +} + +static void msi_dialog_adjust_dialog_pos( msi_dialog *dialog, LPRECT pos, LPSIZE sz ) +{ + UINT xres, yres; LONG style; + + sz->cx = msi_dialog_scale_unit( dialog, sz->cx ); + sz->cy = msi_dialog_scale_unit( dialog, sz->cy ); + + msi_get_screen_resolution( dialog, &xres, &yres ); + pos->left = MulDiv( pos->left, xres, 100 ); + pos->top = MulDiv( pos->top, yres, 100 ); - /* turn the client size into the window rectangle */ - rect.left = 0; - rect.top = 0; - rect.right = msi_dialog_scale_unit( dialog, sz->cx ); - rect.bottom = msi_dialog_scale_unit( dialog, sz->cy ); + /* turn the client pos into the window rectangle */ + pos->right = pos->left + sz->cx; + pos->bottom = pos->top + sz->cy; style = GetWindowLongPtrW( dialog->hwnd, GWL_STYLE ); - AdjustWindowRect( &rect, style, FALSE ); - sz->cx = rect.right - rect.left; - sz->cy = rect.bottom - rect.top; + AdjustWindowRect( pos, style, FALSE ); + sz->cx = pos->right - pos->left; + sz->cy = pos->bottom - pos->top; } static BOOL msi_control_set_next( msi_control *control, msi_control *next ) @@ -2117,6 +2141,7 @@ static LRESULT msi_dialog_oncreate( HWND MSIRECORD *rec = NULL; LPWSTR title = NULL; SIZE size; + RECT pos; TRACE("%p %p\n", dialog, dialog->package); @@ -2132,9 +2157,11 @@ static LRESULT msi_dialog_oncreate( HWND dialog->scale = msi_dialog_get_sans_serif_height(dialog->hwnd); + pos.left = MSI_RecordGetInteger( rec, 2 ); + pos.top = MSI_RecordGetInteger( rec, 3 ); size.cx = MSI_RecordGetInteger( rec, 4 ); size.cy = MSI_RecordGetInteger( rec, 5 ); - msi_dialog_adjust_dialog_size( dialog, &size ); + msi_dialog_adjust_dialog_pos( dialog, &pos, &size ); dialog->attributes = MSI_RecordGetInteger( rec, 6 ); @@ -2149,8 +2176,8 @@ static LRESULT msi_dialog_oncreate( HWND SetWindowTextW( hwnd, title ); msi_free( title ); - SetWindowPos( hwnd, 0, 0, 0, size.cx, size.cy, - SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOREDRAW ); + SetWindowPos( hwnd, 0, pos.left, pos.top, size.cx, size.cy, + SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOREDRAW ); msi_dialog_build_font_list( dialog ); msi_dialog_fill_controls( dialog );
1
0
0
0
Jeff Latimer : usp10: Fix glyph comparsion between tests.
by Alexandre Julliard
04 Aug '06
04 Aug '06
Module: wine Branch: refs/heads/master Commit: 34f3e88b883714faa8c70b82e5d75fed7688ca51 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=34f3e88b883714faa8c70b8…
Author: Jeff Latimer <lats(a)yless4u.com.au> Date: Fri Aug 4 19:47:37 2006 +1000 usp10: Fix glyph comparsion between tests. --- dlls/usp10/tests/usp10.c | 77 +++++++++++++++++++++------------------------- 1 files changed, 35 insertions(+), 42 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 2a3d9c4..6a8f0bb 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -32,20 +32,18 @@ #include <winuser.h> #include <winerror.h> #include <usp10.h> -static void test_ScriptItemIzeShapePlace(unsigned short pwOutGlyphs[256]) +static void test_ScriptItemIzeShapePlace(HDC hdc, unsigned short pwOutGlyphs[256]) { HRESULT hr; int iMaxProps; const SCRIPT_PROPERTIES **ppSp; - HWND hwnd; - HDC hdc; int cInChars; int cMaxItems; SCRIPT_ITEM pItem[255]; int pcItems; - WCHAR TestItem1[6] = {'T', 'e', 's', 't', 'a', 0}; - WCHAR TestItem2[6] = {'T', 'e', 's', 't', 'b', 0}; + WCHAR TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; + WCHAR TestItem2[] = {'T', 'e', 's', 't', 'b', 0}; SCRIPT_CACHE psc; int cChars; @@ -58,22 +56,12 @@ static void test_ScriptItemIzeShapePlace int piAdvance[256]; GOFFSET pGoffset[256]; ABC pABC[256]; - LOGFONTW lf; + LOGFONTA lf; HFONT zfont; int cnt; - /* We need a valid HDC to drive a lot of Script functions which requires the following * - * to set up for the tests. */ - hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100, - 0, 0, 0, NULL); - assert(hwnd != 0); - ShowWindow(hwnd, SW_SHOW); - UpdateWindow(hwnd); - - hdc = GetDC(hwnd); /* We now have a hdc */ - ok( hdc != NULL, "HDC failed to be created %p\n", hdc); - lstrcpyW(lf.lfFaceName, (WCHAR *) "Courier"); + lstrcpyA(lf.lfFaceName, "Symbol"); lf.lfHeight = 10; lf.lfItalic = 0; lf.lfEscapement = 0; @@ -83,7 +71,7 @@ static void test_ScriptItemIzeShapePlace lf.lfWeight = 3; lf.lfWidth = 10; - zfont = (HFONT) SelectObject(hdc, CreateFontIndirectW(&lf)); + zfont = (HFONT) SelectObject(hdc, CreateFontIndirectA(&lf)); /* Start testing usp10 functions */ /* This test determines that the pointer returned by ScriptGetProperties is valid @@ -205,34 +193,20 @@ static void test_ScriptItemIzeShapePlace hr = ScriptFreeCache( &psc); ok (!psc, "psc is not null after ScriptFreeCache\n"); - } - ReleaseDC(hwnd, hdc); - DestroyWindow(hwnd); } -void test_ScriptGetCMap(unsigned short pwOutGlyphs[256]) +void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256]) { HRESULT hr; - HWND hwnd; - HDC hdc; SCRIPT_CACHE psc = NULL; int cInChars; int cChars; unsigned short pwOutGlyphs3[256]; - WCHAR TestItem1[6] = {'T', 'e', 's', 't', 'a', 0}; + WCHAR TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; DWORD dwFlags; int cnt; - /* We need a valid HDC to drive a lot of Script functions which requires the following * - * to set up for the tests. */ - hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100, - 0, 0, 0, NULL); - assert(hwnd != 0); - - hdc = GetDC(hwnd); - ok( hdc != NULL, "HDC failed to be created %p\n", hdc); - /* Check to make sure that SCRIPT_CACHE gets allocated ok */ dwFlags = 0; cInChars = cChars = 5; @@ -275,6 +249,7 @@ void test_ScriptGetCMap(unsigned short p hr = ScriptFreeCache( &psc); ok (!psc, "psc is not null after ScriptFreeCache\n"); + } void test_ScriptGetFontProperties(void) @@ -363,7 +338,7 @@ void test_ScriptTextOut(void) int cMaxItems; SCRIPT_ITEM pItem[255]; int pcItems; - WCHAR TestItem1[6] = {'T', 'e', 's', 't', 'a', 0}; + WCHAR TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; SCRIPT_CACHE psc; int cChars; @@ -582,7 +557,7 @@ static void test_ScriptString(void) HRESULT hr; HWND hwnd; HDC hdc = 0; - WCHAR teststr[6] = {'T', 'e', 's', 't', 'a', '\0'}; + WCHAR teststr[] = {'T', 'e', 's', 't', 'a', '\0'}; void *pString = (WCHAR *) &teststr; int cString = 5; int cGlyphs = cString * 2 + 16; @@ -604,7 +579,7 @@ static void test_ScriptString(void) int iMaxSel = 0; BOOL fDisabled = FALSE; - LOGFONTW lf; + LOGFONTA lf; HFONT zfont; /* We need a valid HDC to drive a lot of Script functions which requires the following * @@ -616,7 +591,7 @@ static void test_ScriptString(void) hdc = GetDC(hwnd); /* We now have a hdc */ ok( hdc != NULL, "HDC failed to be created %p\n", hdc); - lstrcpyW(lf.lfFaceName, (WCHAR *) "Courier"); + lstrcpyA(lf.lfFaceName, "Symbol"); lf.lfHeight = 10; lf.lfItalic = 0; lf.lfEscapement = 0; @@ -626,8 +601,8 @@ static void test_ScriptString(void) lf.lfWeight = 3; lf.lfWidth = 10; - zfont = (HFONT) SelectObject(hdc, CreateFontIndirectW(&lf)); - + zfont = (HFONT) SelectObject(hdc, CreateFontIndirectA(&lf)); + /* Test without hdc to get E_INVALIDARG */ hr = ScriptStringAnalyse( NULL, pString, cString, cGlyphs, iCharset, dwFlags, iReqWidth, &psControl, &psState, piDx, &pTabdef, @@ -653,10 +628,28 @@ static void test_ScriptString(void) START_TEST(usp10) { + HWND hwnd; + HDC hdc; + unsigned short pwOutGlyphs[256]; - test_ScriptItemIzeShapePlace(pwOutGlyphs); - test_ScriptGetCMap(pwOutGlyphs); + /* We need a valid HDC to drive a lot of Script functions which requires the following * + * to set up for the tests. */ + hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0,100,100, + 0, 0, 0, NULL); + assert(hwnd != 0); + ShowWindow(hwnd, SW_SHOW); + UpdateWindow(hwnd); + + hdc = GetDC(hwnd); /* We now have a hdc */ + ok( hdc != NULL, "HDC failed to be created %p\n", hdc); + + test_ScriptItemIzeShapePlace(hdc,pwOutGlyphs); + test_ScriptGetCMap(hdc, pwOutGlyphs); + + ReleaseDC(hwnd, hdc); + DestroyWindow(hwnd); + test_ScriptGetFontProperties(); test_ScriptTextOut(); test_ScriptXtoX();
1
0
0
0
← Newer
1
...
61
62
63
64
65
66
67
...
75
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200