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 2007
----- 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
4 participants
996 discussions
Start a n
N
ew thread
Apostolos Alexiadis : comctl32: Add Greek resources.
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: 6b00b72349bb7c798222340cd96f9b17cbed805d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b00b72349bb7c798222340cd…
Author: Apostolos Alexiadis <djapal(a)gmail.com> Date: Tue Oct 16 09:14:01 2007 +0300 comctl32: Add Greek resources. --- dlls/comctl32/comctl_El.rc | 87 ++++++++++++++++++++++++++++++++++++++++++++ dlls/comctl32/rsrc.rc | 1 + 2 files changed, 88 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/comctl_El.rc b/dlls/comctl32/comctl_El.rc new file mode 100644 index 0000000..a226e37 --- /dev/null +++ b/dlls/comctl32/comctl_El.rc @@ -0,0 +1,87 @@ +/* + * Copyright 2007 Apostolos Alexiadis (djapal(a)gmail.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_GREEK, SUBLANG_DEFAULT + +IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140 +STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE +CAPTION "��������� ��� %s" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP + PUSHBUTTON "�������", IDCANCEL,58,122,50,14 + PUSHBUTTON "&��������", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED + PUSHBUTTON "�������", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP + CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114 +END + + +IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE +CAPTION "������" +FONT 8, "MS Shell Dlg" +BEGIN + PUSHBUTTON "< &�����������", IDC_BACK_BUTTON,71,138,50,14 + DEFPUSHBUTTON "&������� >", IDC_NEXT_BUTTON,121,138,50,14 + DEFPUSHBUTTON "����������", IDC_FINISH_BUTTON,121,138,50,14 + PUSHBUTTON "�������", IDCANCEL,178,138,50,14 + PUSHBUTTON "�������", IDHELP,235,138,50,14,WS_GROUP + LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN + CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5 + LTEXT "", IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE +END + + +IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125 +STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "��������������� ������ ���������" +FONT 8, "MS Shell Dlg" +BEGIN + DEFPUSHBUTTON "&��������", IDCANCEL,308,6,44,14 + PUSHBUTTON "R&eset", IDC_RESET_BTN,308,23,44,14 + PUSHBUTTON "&�������", IDC_HELP_BTN,308,40,44,14 + PUSHBUTTON "���������� &����", IDC_MOVEUP_BTN,308,74,44,14 + PUSHBUTTON "���������� &����", IDC_MOVEDN_BTN,308,91,44,14 + LTEXT "�&�������� �������:", -1,4,5,84,10 + LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP + PUSHBUTTON "&�������� ->", IDOK, 131, 42, 44, 14 + PUSHBUTTON "<- &��������", IDC_REMOVE_BTN,131,62,44,14 + LTEXT "&������� ������ ���������:", -1,182,5,78,10 + LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP +END + +STRINGTABLE DISCARDABLE +{ + IDS_CLOSE "��������" +} + +STRINGTABLE DISCARDABLE +{ + IDM_TODAY "������:" + IDM_GOTODAY "�������� ��� ��������" +} + +STRINGTABLE DISCARDABLE +{ + IDS_SEPARATOR "�����������" +} + +STRINGTABLE DISCARDABLE +{ + HKY_NONE "������" +} diff --git a/dlls/comctl32/rsrc.rc b/dlls/comctl32/rsrc.rc index adcc016..06ffd4d 100644 --- a/dlls/comctl32/rsrc.rc +++ b/dlls/comctl32/rsrc.rc @@ -94,6 +94,7 @@ IDI_TT_ERROR_SM ICON LOADONCALL DISCARDABLE idi_tt_error_sm.ico #include "comctl_Cn.rc" #include "comctl_Cs.rc" #include "comctl_De.rc" +#include "comctl_El.rc" #include "comctl_En.rc" #include "comctl_Eo.rc" #include "comctl_Es.rc"
1
0
0
0
Juan Lang : crypt32: Always return an empty list on failure from CryptGetDefaultOIDDllList.
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: 63e1ac4eac6d8de1a829b2064f8420885febd8d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=63e1ac4eac6d8de1a829b2064…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Oct 17 09:34:14 2007 -0700 crypt32: Always return an empty list on failure from CryptGetDefaultOIDDllList. --- dlls/crypt32/oid.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index f4d254d..ccc4f68 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -208,7 +208,7 @@ BOOL WINAPI CryptGetDefaultOIDDllList(HCRYPTOIDFUNCSET hFuncSet, else { /* No value, return an empty list */ - if (*pcchDllList) + if (pwszDllList && *pcchDllList) *pwszDllList = '\0'; *pcchDllList = 1; } @@ -216,8 +216,10 @@ BOOL WINAPI CryptGetDefaultOIDDllList(HCRYPTOIDFUNCSET hFuncSet, } else { - SetLastError(rc); - ret = FALSE; + /* No value, return an empty list */ + if (pwszDllList && *pcchDllList) + *pwszDllList = '\0'; + *pcchDllList = 1; } CryptMemFree(keyName);
1
0
0
0
Juan Lang : crypt32: Don' t abort early if encoding type is 0 for CryptRegisterOIDFunction/ CryptUnregisterOIDFunction.
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: 46ead27165f5ff1feec840a9b8783d7a1052ed14 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=46ead27165f5ff1feec840a9b…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Oct 17 09:33:30 2007 -0700 crypt32: Don't abort early if encoding type is 0 for CryptRegisterOIDFunction/CryptUnregisterOIDFunction. --- dlls/crypt32/oid.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index c33d7aa..f4d254d 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -602,10 +602,6 @@ BOOL WINAPI CryptRegisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName, TRACE("(%x, %s, %s, %s, %s)\n", dwEncodingType, pszFuncName, debugstr_a(pszOID), debugstr_w(pwszDll), pszOverrideFuncName); - /* This only registers functions for encoding certs, not messages */ - if (!GET_CERT_ENCODING_TYPE(dwEncodingType)) - return TRUE; - /* Native does nothing pwszDll is NULL */ if (!pwszDll) return TRUE; @@ -666,9 +662,6 @@ BOOL WINAPI CryptUnregisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName, TRACE("%x %s %s\n", dwEncodingType, debugstr_a(pszFuncName), debugstr_a(pszOID)); - if (!GET_CERT_ENCODING_TYPE(dwEncodingType)) - return TRUE; - if (!pszFuncName || !pszOID) { SetLastError(ERROR_INVALID_PARAMETER);
1
0
0
0
Juan Lang : crypt32: Implement CryptGetDefaultOIDFunctionAddress.
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: c7915134b0e4f41092a158aae6d0244abb1daea5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7915134b0e4f41092a158aae…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Oct 17 09:32:04 2007 -0700 crypt32: Implement CryptGetDefaultOIDFunctionAddress. --- dlls/crypt32/oid.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 129 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index 46c9b05..90c88c3 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -278,6 +278,8 @@ BOOL WINAPI CryptInstallOIDFunctionAddress(HMODULE hModule, struct FuncAddr { HMODULE lib; + LPWSTR dllList; + LPWSTR currentDll; }; static BOOL CRYPT_GetFuncFromReg(DWORD dwEncodingType, LPCSTR pszOID, @@ -333,6 +335,7 @@ static BOOL CRYPT_GetFuncFromReg(DWORD dwEncodingType, LPCSTR pszOID, if (addr) { addr->lib = lib; + addr->dllList = addr->currentDll = NULL; *phFuncAddr = addr; ret = TRUE; } @@ -430,19 +433,143 @@ BOOL WINAPI CryptFreeOIDFunctionAddress(HCRYPTOIDFUNCADDR hFuncAddr, { struct FuncAddr *addr = (struct FuncAddr *)hFuncAddr; + CryptMemFree(addr->dllList); FreeLibrary(addr->lib); CryptMemFree(addr); } return TRUE; } +static BOOL CRYPT_GetFuncFromDll(LPCWSTR dll, LPCSTR func, HMODULE *lib, + void **ppvFuncAddr) +{ + BOOL ret = FALSE; + + *lib = LoadLibraryW(dll); + if (*lib) + { + *ppvFuncAddr = GetProcAddress(*lib, func); + if (*ppvFuncAddr) + ret = TRUE; + else + { + FreeLibrary(*lib); + *lib = NULL; + } + } + return ret; +} + BOOL WINAPI CryptGetDefaultOIDFunctionAddress(HCRYPTOIDFUNCSET hFuncSet, DWORD dwEncodingType, LPCWSTR pwszDll, DWORD dwFlags, void **ppvFuncAddr, HCRYPTOIDFUNCADDR *phFuncAddr) { - FIXME("(%p, %d, %s, %08x, %p, %p): stub\n", hFuncSet, dwEncodingType, + struct OIDFunctionSet *set = (struct OIDFunctionSet *)hFuncSet; + BOOL ret = FALSE; + + TRACE("(%p, %d, %s, %08x, %p, %p)\n", hFuncSet, dwEncodingType, debugstr_w(pwszDll), dwFlags, ppvFuncAddr, phFuncAddr); - return FALSE; + + if (pwszDll) + { + HMODULE lib; + + *phFuncAddr = NULL; + ret = CRYPT_GetFuncFromDll(pwszDll, set->name, &lib, ppvFuncAddr); + if (ret) + { + struct FuncAddr *addr = CryptMemAlloc(sizeof(struct FuncAddr)); + + if (addr) + { + addr->lib = lib; + addr->dllList = addr->currentDll = NULL; + *phFuncAddr = addr; + } + else + { + FreeLibrary(lib); + *ppvFuncAddr = NULL; + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + } + else + SetLastError(ERROR_FILE_NOT_FOUND); + } + else + { + struct FuncAddr *addr = (struct FuncAddr *)*phFuncAddr; + + if (!addr) + { + DWORD size; + + ret = CryptGetDefaultOIDDllList(hFuncSet, dwEncodingType, NULL, + &size); + if (ret) + { + LPWSTR dllList = CryptMemAlloc(size * sizeof(WCHAR)); + + if (dllList) + { + ret = CryptGetDefaultOIDDllList(hFuncSet, dwEncodingType, + dllList, &size); + if (ret) + { + addr = CryptMemAlloc(sizeof(struct FuncAddr)); + if (addr) + { + addr->dllList = dllList; + addr->currentDll = dllList; + addr->lib = NULL; + *phFuncAddr = addr; + } + else + { + CryptMemFree(dllList); + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + } + } + else + { + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + } + } + if (addr) + { + if (!*addr->currentDll) + { + CryptFreeOIDFunctionAddress(*phFuncAddr, 0); + SetLastError(ERROR_FILE_NOT_FOUND); + *phFuncAddr = NULL; + ret = FALSE; + } + else + { + /* FIXME: as elsewhere, can't free until DllCanUnloadNow says + * it's possible, and should defer unloading for some time to + * avoid repeated LoadLibrary/FreeLibrary on the same dll. + */ + FreeLibrary(addr->lib); + ret = CRYPT_GetFuncFromDll(addr->currentDll, set->name, + &addr->lib, ppvFuncAddr); + if (ret) + { + /* Move past the current DLL */ + addr->currentDll += lstrlenW(addr->currentDll) + 1; + *phFuncAddr = addr; + } + else + SetLastError(ERROR_FILE_NOT_FOUND); + } + } + } + return ret; } /***********************************************************************
1
0
0
0
Juan Lang : crypt32: Don't crash logging numeric function names.
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: 0f29b48fa0456bb8d291a2f867b7154133f83e45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f29b48fa0456bb8d291a2f86…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Oct 17 09:32:32 2007 -0700 crypt32: Don't crash logging numeric function names. --- dlls/crypt32/oid.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index 90c88c3..c33d7aa 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -663,7 +663,8 @@ BOOL WINAPI CryptUnregisterOIDFunction(DWORD dwEncodingType, LPCSTR pszFuncName, LPSTR szKey; LONG rc; - TRACE("%x %s %s\n", dwEncodingType, pszFuncName, pszOID); + TRACE("%x %s %s\n", dwEncodingType, debugstr_a(pszFuncName), + debugstr_a(pszOID)); if (!GET_CERT_ENCODING_TYPE(dwEncodingType)) return TRUE; @@ -934,8 +935,8 @@ BOOL WINAPI CryptRegisterDefaultOIDFunction(DWORD dwEncodingType, LPCWSTR existing; BOOL ret = FALSE; - TRACE("(%x, %s, %x, %s)\n", dwEncodingType, pszFuncName, dwIndex, - debugstr_w(pwszDll)); + TRACE("(%x, %s, %d, %s)\n", dwEncodingType, debugstr_a(pszFuncName), + dwIndex, debugstr_w(pwszDll)); if (!pwszDll) {
1
0
0
0
Juan Lang : crypt32: Add basic tests for CryptGetDefaultOIDFunctionAddress.
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: ad514dbc204321c9aef81193b3f86d21fbe8b8bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad514dbc204321c9aef81193b…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Oct 17 09:31:18 2007 -0700 crypt32: Add basic tests for CryptGetDefaultOIDFunctionAddress. --- dlls/crypt32/tests/oid.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/tests/oid.c b/dlls/crypt32/tests/oid.c index c42b891..f4f11f0 100644 --- a/dlls/crypt32/tests/oid.c +++ b/dlls/crypt32/tests/oid.c @@ -414,6 +414,47 @@ static void test_registerDefaultOIDFunction(void) "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); } +static void test_getDefaultOIDFunctionAddress(void) +{ + BOOL ret; + HCRYPTOIDFUNCSET set; + void *funcAddr; + HCRYPTOIDFUNCADDR hFuncAddr; + + /* Crash + ret = CryptGetDefaultOIDFunctionAddress(0, 0, NULL, 0, NULL, NULL); + ret = CryptGetDefaultOIDFunctionAddress(0, 0, NULL, 0, &funcAddr, NULL); + ret = CryptGetDefaultOIDFunctionAddress(0, 0, NULL, 0, NULL, &hFuncAddr); + ret = CryptGetDefaultOIDFunctionAddress(0, 0, NULL, 0, &funcAddr, + &hFuncAddr); + */ + set = CryptInitOIDFunctionSet("CertDllOpenStoreProv", 0); + ok(set != 0, "CryptInitOIDFunctionSet failed: %d\n", GetLastError()); + /* This crashes if hFuncAddr is not 0 to begin with */ + hFuncAddr = 0; + ret = CryptGetDefaultOIDFunctionAddress(set, 0, NULL, 0, &funcAddr, + &hFuncAddr); + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + /* This fails with the normal encoding too, so built-in functions aren't + * returned. + */ + ret = CryptGetDefaultOIDFunctionAddress(set, X509_ASN_ENCODING, NULL, 0, + &funcAddr, &hFuncAddr); + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + + /* Even with a registered dll, this fails (since the dll doesn't exist) */ + ret = CryptRegisterDefaultOIDFunction(0, "CertDllOpenStoreProv", 0, + bogusDll); + ok(ret, "CryptRegisterDefaultOIDFunction failed: %08x\n", GetLastError()); + ret = CryptGetDefaultOIDFunctionAddress(set, 0, NULL, 0, &funcAddr, + &hFuncAddr); + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + CryptUnregisterDefaultOIDFunction(0, "CertDllOpenStoreProv", bogusDll); +} + static BOOL WINAPI countOidInfo(PCCRYPT_OID_INFO pInfo, void *pvArg) { (*(DWORD *)pvArg)++; @@ -499,4 +540,5 @@ START_TEST(oid) test_installOIDFunctionAddress(); test_registerOIDFunction(); test_registerDefaultOIDFunction(); + test_getDefaultOIDFunctionAddress(); }
1
0
0
0
Juan Lang : crypt32: Use a structure to hold function address handle.
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: 6b390b4009710bb8bc74578bf3270ce02b70359b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b390b4009710bb8bc74578bf…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed Oct 17 09:30:33 2007 -0700 crypt32: Use a structure to hold function address handle. --- dlls/crypt32/oid.c | 29 ++++++++++++++++++++++++++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index 1e2de95..46c9b05 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -275,6 +275,11 @@ BOOL WINAPI CryptInstallOIDFunctionAddress(HMODULE hModule, return ret; } +struct FuncAddr +{ + HMODULE lib; +}; + static BOOL CRYPT_GetFuncFromReg(DWORD dwEncodingType, LPCSTR pszOID, LPCSTR szFuncName, LPVOID *ppvFuncAddr, HCRYPTOIDFUNCADDR *phFuncAddr) { @@ -322,8 +327,20 @@ static BOOL CRYPT_GetFuncFromReg(DWORD dwEncodingType, LPCSTR pszOID, *ppvFuncAddr = GetProcAddress(lib, funcName); if (*ppvFuncAddr) { - *phFuncAddr = (HCRYPTOIDFUNCADDR)lib; - ret = TRUE; + struct FuncAddr *addr = + CryptMemAlloc(sizeof(struct FuncAddr)); + + if (addr) + { + addr->lib = lib; + *phFuncAddr = addr; + ret = TRUE; + } + else + { + *phFuncAddr = NULL; + FreeLibrary(lib); + } } else { @@ -409,7 +426,13 @@ BOOL WINAPI CryptFreeOIDFunctionAddress(HCRYPTOIDFUNCADDR hFuncAddr, * and only unload it if it can be unloaded. Also need to implement ref * counting on the functions. */ - FreeLibrary((HMODULE)hFuncAddr); + if (hFuncAddr) + { + struct FuncAddr *addr = (struct FuncAddr *)hFuncAddr; + + FreeLibrary(addr->lib); + CryptMemFree(addr); + } return TRUE; }
1
0
0
0
Mikolaj Zalewski : ntdll: Support for UTF-16 manifests with reverse endianness.
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: 5bfd7044ea0a25006f0a6defe1a8ab77192554e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bfd7044ea0a25006f0a6defe…
Author: Mikolaj Zalewski <mikolajz(a)google.com> Date: Wed Oct 17 13:59:07 2007 -0700 ntdll: Support for UTF-16 manifests with reverse endianness. --- dlls/kernel32/tests/actctx.c | 26 +++++++++++++++++++++++--- dlls/ntdll/actctx.c | 31 +++++++++++++++++++++++-------- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index e2e6b24..0e687b5 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -216,7 +216,7 @@ static BOOL create_manifest_file(const char *filename, const char *manifest, int return TRUE; } -static BOOL create_wide_manifest(const char *filename, const char *manifest, BOOL fBOM) +static BOOL create_wide_manifest(const char *filename, const char *manifest, BOOL fBOM, BOOL fReverse) { WCHAR *wmanifest = HeapAlloc(GetProcessHeap(), 0, (strlen(manifest)+2) * sizeof(WCHAR)); BOOL ret; @@ -224,6 +224,12 @@ static BOOL create_wide_manifest(const char *filename, const char *manifest, BOO MultiByteToWideChar(CP_ACP, 0, manifest, -1, &wmanifest[1], (strlen(manifest)+1) * sizeof(WCHAR)); wmanifest[0] = 0xfeff; + if (fReverse) + { + int i; + for (i = 0; i < strlen(manifest)+1; i++) + wmanifest[i] = (wmanifest[i] << 8) | ((wmanifest[i] >> 8) & 0xff); + } ret = create_manifest_file(filename, (char *)&wmanifest[offset], (strlen(manifest)+1-offset) * sizeof(WCHAR), NULL, NULL); HeapFree(GetProcessHeap(), 0, wmanifest); return ret; @@ -625,7 +631,7 @@ static void test_create_wide_and_fail(const char *manifest, BOOL fBOM) actctx.cbSize = sizeof(ACTCTXW); actctx.lpSource = path; - create_wide_manifest("bad.manifest", manifest, fBOM); + create_wide_manifest("bad.manifest", manifest, fBOM, FALSE); handle = pCreateActCtxW(&actctx); ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n"); ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %u\n", GetLastError()); @@ -1021,7 +1027,21 @@ static void test_actctx(void) RemoveDirectoryW(work_dir_subdir); trace("UTF-16 manifest1, with BOM\n"); - if(!create_wide_manifest("test1.manifest", manifest1, TRUE)) { + if(!create_wide_manifest("test1.manifest", manifest1, TRUE, FALSE)) { + skip("Could not create manifest file\n"); + return; + } + + handle = test_create("test1.manifest", manifest1); + DeleteFileA("test1.manifest"); + if (handle != INVALID_HANDLE_VALUE) { + test_detailed_info(handle, &detailed_info1); + test_info_in_assembly(handle, 1, &manifest1_info); + pReleaseActCtx(handle); + } + + trace("UTF-16 manifest1, reverse endian, with BOM\n"); + if(!create_wide_manifest("test1.manifest", manifest1, TRUE, TRUE)) { skip("Could not create manifest file\n"); return; } diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index e26dc02..fe83be6 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -1498,8 +1498,29 @@ static NTSTATUS parse_manifest( struct actctx_loader* acl, struct assembly_ident assembly->manifest.type = assembly->manifest.info ? ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE : ACTIVATION_CONTEXT_PATH_TYPE_NONE; - unicode_tests = IS_TEXT_UNICODE_SIGNATURE; - if (!RtlIsTextUnicode( buffer, size, &unicode_tests )) + unicode_tests = IS_TEXT_UNICODE_SIGNATURE | IS_TEXT_UNICODE_REVERSE_SIGNATURE; + if (RtlIsTextUnicode( buffer, size, &unicode_tests )) + { + xmlbuf.ptr = buffer; + xmlbuf.end = xmlbuf.ptr + size / sizeof(WCHAR); + status = parse_manifest_buffer( acl, assembly, ai, &xmlbuf ); + } + else if (unicode_tests & IS_TEXT_UNICODE_REVERSE_SIGNATURE) + { + const WCHAR *buf = buffer; + WCHAR *new_buff; + unsigned int i; + + if (!(new_buff = RtlAllocateHeap( GetProcessHeap(), 0, size ))) + return STATUS_NO_MEMORY; + for (i = 0; i < size / sizeof(WCHAR); i++) + new_buff[i] = RtlUshortByteSwap( buf[i] ); + xmlbuf.ptr = new_buff; + xmlbuf.end = xmlbuf.ptr + size / sizeof(WCHAR); + status = parse_manifest_buffer( acl, assembly, ai, &xmlbuf ); + RtlFreeHeap( GetProcessHeap(), 0, new_buff ); + } + else { /* let's assume utf-8 for now */ int len = wine_utf8_mbstowcs( 0, buffer, size, NULL, 0 ); @@ -1518,12 +1539,6 @@ static NTSTATUS parse_manifest( struct actctx_loader* acl, struct assembly_ident status = parse_manifest_buffer( acl, assembly, ai, &xmlbuf ); RtlFreeHeap( GetProcessHeap(), 0, new_buff ); } - else - { - xmlbuf.ptr = buffer; - xmlbuf.end = xmlbuf.ptr + size / sizeof(WCHAR); - status = parse_manifest_buffer( acl, assembly, ai, &xmlbuf ); - } return status; }
1
0
0
0
Mikolaj Zalewski : ntdll: Manifests should be parsed as UTF-16 only if there is a BOM (with testcase ).
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: 9f4001f7e032305990871ea8ba03113dbafd23fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f4001f7e032305990871ea8b…
Author: Mikolaj Zalewski <mikolajz(a)google.com> Date: Wed Oct 17 13:36:34 2007 -0700 ntdll: Manifests should be parsed as UTF-16 only if there is a BOM (with testcase). --- dlls/kernel32/tests/actctx.c | 76 +++++++++++++++++++++++++++++++++++------- dlls/ntdll/actctx.c | 4 ++- 2 files changed, 67 insertions(+), 13 deletions(-) diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index da1650b..e2e6b24 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -180,7 +180,7 @@ static DWORD strlen_aw(const char *str) return MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0) - 1; } -static BOOL create_manifest_file(const char *filename, const char *manifest, +static BOOL create_manifest_file(const char *filename, const char *manifest, int manifest_len, const char *depfile, const char *depmanifest) { DWORD size; @@ -190,12 +190,15 @@ static BOOL create_manifest_file(const char *filename, const char *manifest, MultiByteToWideChar( CP_ACP, 0, filename, -1, path, MAX_PATH ); GetFullPathNameW(path, sizeof(manifest_path)/sizeof(WCHAR), manifest_path, NULL); + if (manifest_len == -1) + manifest_len = strlen(manifest); + file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); ok(file != INVALID_HANDLE_VALUE, "CreateFile failed: %u\n", GetLastError()); if(file == INVALID_HANDLE_VALUE) return FALSE; - WriteFile(file, manifest, strlen(manifest), &size, NULL); + WriteFile(file, manifest, manifest_len, &size, NULL); CloseHandle(file); if (depmanifest) @@ -213,6 +216,19 @@ static BOOL create_manifest_file(const char *filename, const char *manifest, return TRUE; } +static BOOL create_wide_manifest(const char *filename, const char *manifest, BOOL fBOM) +{ + WCHAR *wmanifest = HeapAlloc(GetProcessHeap(), 0, (strlen(manifest)+2) * sizeof(WCHAR)); + BOOL ret; + int offset = (fBOM ? 0 : 1); + + MultiByteToWideChar(CP_ACP, 0, manifest, -1, &wmanifest[1], (strlen(manifest)+1) * sizeof(WCHAR)); + wmanifest[0] = 0xfeff; + ret = create_manifest_file(filename, (char *)&wmanifest[offset], (strlen(manifest)+1-offset) * sizeof(WCHAR), NULL, NULL); + HeapFree(GetProcessHeap(), 0, wmanifest); + return ret; +} + typedef struct { ULONG format_version; ULONG assembly_cnt; @@ -581,7 +597,7 @@ static void test_create_and_fail(const char *manifest, const char *depmanifest, actctx.cbSize = sizeof(ACTCTXW); actctx.lpSource = path; - create_manifest_file("bad.manifest", manifest, "testdep.manifest", depmanifest); + create_manifest_file("bad.manifest", manifest, -1, "testdep.manifest", depmanifest); handle = pCreateActCtxW(&actctx); if (todo) todo_wine { @@ -598,6 +614,26 @@ static void test_create_and_fail(const char *manifest, const char *depmanifest, DeleteFileA("testdep.manifest"); } +static void test_create_wide_and_fail(const char *manifest, BOOL fBOM) +{ + ACTCTXW actctx; + HANDLE handle; + WCHAR path[MAX_PATH]; + + MultiByteToWideChar( CP_ACP, 0, "bad.manifest", -1, path, MAX_PATH ); + memset(&actctx, 0, sizeof(ACTCTXW)); + actctx.cbSize = sizeof(ACTCTXW); + actctx.lpSource = path; + + create_wide_manifest("bad.manifest", manifest, fBOM); + handle = pCreateActCtxW(&actctx); + ok(handle == INVALID_HANDLE_VALUE, "handle != INVALID_HANDLE_VALUE\n"); + ok(GetLastError() == ERROR_SXS_CANT_GEN_ACTCTX, "GetLastError == %u\n", GetLastError()); + + if (handle != INVALID_HANDLE_VALUE) pReleaseActCtx( handle ); + DeleteFileA("bad.manifest"); +} + static void test_create_fail(void) { ACTCTXW actctx; @@ -629,6 +665,8 @@ static void test_create_fail(void) test_create_and_fail(wrong_manifest7, NULL, 1 ); trace("wrong_manifest8\n"); test_create_and_fail(wrong_manifest8, NULL, 0 ); + trace("UTF-16 manifest1 without BOM\n"); + test_create_wide_and_fail(manifest1, FALSE ); trace("manifest2\n"); test_create_and_fail(manifest2, NULL, 0 ); trace("manifest2+depmanifest1\n"); @@ -822,7 +860,7 @@ static void test_actctx(void) pReleaseActCtx(handle); } - if(!create_manifest_file("test1.manifest", manifest1, NULL, NULL)) { + if(!create_manifest_file("test1.manifest", manifest1, -1, NULL, NULL)) { skip("Could not create manifest file\n"); return; } @@ -845,7 +883,7 @@ static void test_actctx(void) pReleaseActCtx(handle); } - if(!create_manifest_file("test2.manifest", manifest2, "testdep.manifest", testdep_manifest1)) { + if(!create_manifest_file("test2.manifest", manifest2, -1, "testdep.manifest", testdep_manifest1)) { skip("Could not create manifest file\n"); return; } @@ -862,7 +900,7 @@ static void test_actctx(void) pReleaseActCtx(handle); } - if(!create_manifest_file("test3.manifest", manifest2, "testdep.manifest", testdep_manifest2)) { + if(!create_manifest_file("test3.manifest", manifest2, -1, "testdep.manifest", testdep_manifest2)) { skip("Could not create manifest file\n"); return; } @@ -891,7 +929,7 @@ static void test_actctx(void) trace("manifest2 depmanifest3\n"); - if(!create_manifest_file("test2-3.manifest", manifest2, "testdep.manifest", testdep_manifest3)) { + if(!create_manifest_file("test2-3.manifest", manifest2, -1, "testdep.manifest", testdep_manifest3)) { skip("Could not create manifest file\n"); return; } @@ -920,7 +958,7 @@ static void test_actctx(void) trace("manifest3\n"); - if(!create_manifest_file("test3.manifest", manifest3, NULL, NULL)) { + if(!create_manifest_file("test3.manifest", manifest3, -1, NULL, NULL)) { skip("Could not create manifest file\n"); return; } @@ -945,7 +983,7 @@ static void test_actctx(void) trace("manifest4\n"); - if(!create_manifest_file("test4.manifest", manifest4, NULL, NULL)) { + if(!create_manifest_file("test4.manifest", manifest4, -1, NULL, NULL)) { skip("Could not create manifest file\n"); return; } @@ -965,8 +1003,7 @@ static void test_actctx(void) CreateDirectoryW(work_dir_subdir, NULL); if (SetCurrentDirectoryW(work_dir_subdir)) { - /* the lpAddDirPath will point to the directory with the manifest */ - if(!create_manifest_file("..\\test1.manifest", manifest1, NULL, NULL)) { + if(!create_manifest_file("..\\test1.manifest", manifest1, -1, NULL, NULL)) { skip("Could not create manifest file\n"); return; } @@ -982,6 +1019,21 @@ static void test_actctx(void) else skip("Couldn't change directory\n"); RemoveDirectoryW(work_dir_subdir); + + trace("UTF-16 manifest1, with BOM\n"); + if(!create_wide_manifest("test1.manifest", manifest1, TRUE)) { + skip("Could not create manifest file\n"); + return; + } + + handle = test_create("test1.manifest", manifest1); + DeleteFileA("test1.manifest"); + if (handle != INVALID_HANDLE_VALUE) { + test_detailed_info(handle, &detailed_info1); + test_info_in_assembly(handle, 1, &manifest1_info); + pReleaseActCtx(handle); + } + } static void test_app_manifest(void) @@ -1011,7 +1063,7 @@ static void run_child_process(void) GetModuleFileNameA(NULL, path, MAX_PATH); strcat(path, ".manifest"); - if(!create_manifest_file(path, manifest1, NULL, NULL)) { + if(!create_manifest_file(path, manifest1, -1, NULL, NULL)) { skip("Could not create manifest file\n"); return; } diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 2021cb8..e26dc02 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -1484,6 +1484,7 @@ static NTSTATUS parse_manifest( struct actctx_loader* acl, struct assembly_ident xmlbuf_t xmlbuf; NTSTATUS status; struct assembly *assembly; + int unicode_tests; TRACE( "parsing manifest loaded from %s base dir %s\n", debugstr_w(filename), debugstr_w(directory) ); @@ -1497,7 +1498,8 @@ static NTSTATUS parse_manifest( struct actctx_loader* acl, struct assembly_ident assembly->manifest.type = assembly->manifest.info ? ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE : ACTIVATION_CONTEXT_PATH_TYPE_NONE; - if (!RtlIsTextUnicode( buffer, size, NULL )) + unicode_tests = IS_TEXT_UNICODE_SIGNATURE; + if (!RtlIsTextUnicode( buffer, size, &unicode_tests )) { /* let's assume utf-8 for now */ int len = wine_utf8_mbstowcs( 0, buffer, size, NULL, 0 );
1
0
0
0
Mikolaj Zalewski : kernel32/tests: Make the actctx test pass when the application is run from a different directory .
by Alexandre Julliard
18 Oct '07
18 Oct '07
Module: wine Branch: master Commit: e361c0d2847a826be8aaf6fff57ff239eb60b88d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e361c0d2847a826be8aaf6fff…
Author: Mikolaj Zalewski <mikolajz(a)google.com> Date: Wed Oct 17 12:51:39 2007 -0700 kernel32/tests: Make the actctx test pass when the application is run from a different directory. --- dlls/kernel32/tests/actctx.c | 51 ++++++++++++++++++++++++++++++++++------- 1 files changed, 42 insertions(+), 9 deletions(-) diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index d04e9ce..da1650b 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -163,7 +163,7 @@ static const WCHAR wndClass2W[] = static const WCHAR acr_manifest[] = {'a','c','r','.','m','a','n','i','f','e','s','t',0}; -static WCHAR app_dir[MAX_PATH], exe_path[MAX_PATH]; +static WCHAR app_dir[MAX_PATH], exe_path[MAX_PATH], work_dir[MAX_PATH], work_dir_subdir[MAX_PATH]; static WCHAR app_manifest_path[MAX_PATH], manifest_path[MAX_PATH], depmanifest_path[MAX_PATH]; static int strcmp_aw(LPCWSTR strw, const char *stra) @@ -230,7 +230,7 @@ static const detailed_info_t detailed_info0 = { static const detailed_info_t detailed_info1 = { 1, 1, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, manifest_path, ACTIVATION_CONTEXT_PATH_TYPE_NONE, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, - app_dir, + work_dir, }; static const detailed_info_t detailed_info1_child = { @@ -242,7 +242,7 @@ static const detailed_info_t detailed_info1_child = { static const detailed_info_t detailed_info2 = { 1, 2, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, manifest_path, ACTIVATION_CONTEXT_PATH_TYPE_NONE, ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE, - app_dir, + work_dir, }; static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo) @@ -253,7 +253,7 @@ static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo) exsize = sizeof(ACTIVATION_CONTEXT_DETAILED_INFORMATION) + (exinfo->root_manifest_path ? (lstrlenW(exinfo->root_manifest_path)+1)*sizeof(WCHAR):0) - + (exinfo->app_dir ? (lstrlenW(app_dir)+1)*sizeof(WCHAR) : 0); + + (exinfo->app_dir ? (lstrlenW(exinfo->app_dir)+1)*sizeof(WCHAR) : 0); if(exsize != sizeof(ACTIVATION_CONTEXT_DETAILED_INFORMATION)) { size = 0xdeadbeef; @@ -298,9 +298,9 @@ static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo) ok(detailed_info->ulAppDirPathType == exinfo->app_dir_type, "detailed_info->ulAppDirPathType=%u, expected %u\n", detailed_info->ulAppDirPathType, exinfo->app_dir_type); - ok(detailed_info->ulAppDirPathChars == (exinfo->app_dir ? lstrlenW(app_dir) : 0), + ok(detailed_info->ulAppDirPathChars == (exinfo->app_dir ? lstrlenW(exinfo->app_dir) : 0), "detailed_info->ulAppDirPathChars=%u, expected %u\n", - detailed_info->ulAppDirPathChars, exinfo->app_dir ? lstrlenW(app_dir) : 0); + detailed_info->ulAppDirPathChars, exinfo->app_dir ? lstrlenW(exinfo->app_dir) : 0); if(exinfo->root_manifest_path) { ok(detailed_info->lpRootManifestPath != NULL, "detailed_info->lpRootManifestPath == NULL\n"); if(detailed_info->lpRootManifestPath) @@ -314,8 +314,8 @@ static void test_detailed_info(HANDLE handle, const detailed_info_t *exinfo) if(exinfo->app_dir) { ok(detailed_info->lpAppDirPath != NULL, "detailed_info->lpAppDirPath == NULL\n"); if(detailed_info->lpAppDirPath) - ok(!lstrcmpiW(app_dir, detailed_info->lpAppDirPath), - "unexpected detailed_info->lpAppDirPath %s\n",strw(detailed_info->lpAppDirPath)); + ok(!lstrcmpiW(exinfo->app_dir, detailed_info->lpAppDirPath), + "unexpected detailed_info->lpAppDirPath\n%s\n",strw(detailed_info->lpAppDirPath)); }else { ok(detailed_info->lpAppDirPath == NULL, "detailed_info->lpAppDirPath != NULL\n"); } @@ -959,6 +959,29 @@ static void test_actctx(void) test_info_in_assembly(handle, 2, &manifest_comctrl_info); pReleaseActCtx(handle); } + + trace("manifest1 in subdir\n"); + + CreateDirectoryW(work_dir_subdir, NULL); + if (SetCurrentDirectoryW(work_dir_subdir)) + { + /* the lpAddDirPath will point to the directory with the manifest */ + if(!create_manifest_file("..\\test1.manifest", manifest1, NULL, NULL)) { + skip("Could not create manifest file\n"); + return; + } + handle = test_create("..\\test1.manifest", manifest1); + DeleteFileA("..\\test1.manifest"); + if(handle != INVALID_HANDLE_VALUE) { + test_detailed_info(handle, &detailed_info1); + test_info_in_assembly(handle, 1, &manifest1_info); + pReleaseActCtx(handle); + } + SetCurrentDirectoryW(work_dir); + } + else + skip("Couldn't change directory\n"); + RemoveDirectoryW(work_dir_subdir); } static void test_app_manifest(void) @@ -1008,14 +1031,24 @@ static void run_child_process(void) static void init_paths(void) { LPWSTR ptr; + WCHAR last; static const WCHAR dot_manifest[] = {'.','M','a','n','i','f','e','s','t',0}; + static const WCHAR backslash[] = {'\\',0}; + static const WCHAR subdir[] = {'T','e','s','t','S','u','b','d','i','r','\\',0}; GetModuleFileNameW(NULL, exe_path, sizeof(exe_path)/sizeof(WCHAR)); lstrcpyW(app_dir, exe_path); - for(ptr=app_dir+lstrlenW(app_dir); *ptr != '\\'; ptr--); + for(ptr=app_dir+lstrlenW(app_dir); *ptr != '\\' && *ptr != '/'; ptr--); ptr[1] = 0; + GetCurrentDirectoryW(MAX_PATH, work_dir); + last = work_dir[lstrlenW(work_dir) - 1]; + if (last != '\\' && last != '/') + lstrcatW(work_dir, backslash); + lstrcpyW(work_dir_subdir, work_dir); + lstrcatW(work_dir_subdir, subdir); + GetModuleFileNameW(NULL, app_manifest_path, sizeof(app_manifest_path)/sizeof(WCHAR)); lstrcpyW(app_manifest_path+lstrlenW(app_manifest_path), dot_manifest); }
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
100
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
Results per page:
10
25
50
100
200