ReactOS.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
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
List overview
Download
Ros-diffs
November 2007
----- 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
ros-diffs@reactos.org
20 participants
888 discussions
Start a n
N
ew thread
[winesync] 30872: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:55:24 2007 New Revision: 30872 URL:
http://svn.reactos.org/svn/reactos?rev=30872&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/msimg32/msimg32.rbuild Modified: trunk/reactos/dll/win32/msimg32/msimg32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msimg32/msimg32.…
============================================================================== --- trunk/reactos/dll/win32/msimg32/msimg32.rbuild (original) +++ trunk/reactos/dll/win32/msimg32/msimg32.rbuild Thu Nov 29 13:55:24 2007 @@ -1,13 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="msimg32" type="win32dll" baseaddress="${BASEADDRESS_MSIMG32}" installbase="system32" installname="msimg32.dll" allowwarnings="true"> <importlibrary definition="msimg32.spec.def" /> <include base="msimg32">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> <library>gdi32</library> <library>kernel32</library>
17 years
1
0
0
0
[winesync] 30871: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:50:33 2007 New Revision: 30871 URL:
http://svn.reactos.org/svn/reactos?rev=30871&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/mpr/mpr.rbuild trunk/reactos/dll/win32/mpr/mpr_Bg.rc trunk/reactos/dll/win32/mpr/mpr_Ko.rc trunk/reactos/dll/win32/mpr/mpr_No.rc trunk/reactos/dll/win32/mpr/mpr_Pl.rc trunk/reactos/dll/win32/mpr/mpr_Sv.rc trunk/reactos/dll/win32/mpr/mpr_ros.diff trunk/reactos/dll/win32/mpr/nps.c trunk/reactos/dll/win32/mpr/pwcache.c trunk/reactos/dll/win32/mpr/wnet.c Modified: trunk/reactos/dll/win32/mpr/mpr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr.rbuild?r…
============================================================================== --- trunk/reactos/dll/win32/mpr/mpr.rbuild (original) +++ trunk/reactos/dll/win32/mpr/mpr.rbuild Thu Nov 29 13:50:33 2007 @@ -1,13 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="mpr" type="win32dll" baseaddress="${BASEADDRESS_MPR}" installbase="system32" installname="mpr.dll" allowwarnings="true"> <importlibrary definition="mpr.spec.def" /> <include base="mpr">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> <library>user32</library> <library>advapi32</library> Modified: trunk/reactos/dll/win32/mpr/mpr_Bg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_Bg.rc?re…
============================================================================== --- trunk/reactos/dll/win32/mpr/mpr_Bg.rc (original) +++ trunk/reactos/dll/win32/mpr/mpr_Bg.rc Thu Nov 29 13:50:33 2007 @@ -1,7 +1,7 @@ /* - * MPR dll resources + * MPR Bulgarian resource * - * Copyright (C) 2004 Juan Lang + * Copyright 2005 Milko Krachounov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,20 +27,20 @@ IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Âúâåäåòå ïàðîëà çà ìðåæàòà" +CAPTION "Âúâåäåòå ìðåæîâà ïàðîëà" FONT 8, "MS Shell Dlg" { - LTEXT "Âúâåäåòå ñâîèòå ïîòðåáèòåëñêî èìå è ïàðîëà:", IDC_EXPLAIN, 40, 6, 150, 15 - LTEXT "Ïðåçñúðâúð", -1, 40, 26, 50, 10 -/* LTEXT "Ñòðàíà", -1, 40, 46, 50, 10 */ + LTEXT "Âúâåäåòå âàøåòî ïîòðåáèòåëñêî èìå è ïàðîëà:", IDC_EXPLAIN, 40, 6, 150, 15 + LTEXT "Ïðîêñè", -1, 40, 26, 50, 10 +/* LTEXT "Realm", -1, 40, 46, 50, 10 */ LTEXT "Ïîòðåáèòåë", -1, 40, 66, 50, 10 LTEXT "Ïàðîëà", -1, 40, 86, 50, 10 LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD - CHECKBOX "&Ñúõðàíÿâàíå íà ïàðîëàòà (íåáåçîïàñíî)", IDC_SAVEPASSWORD, + CHECKBOX "&Save this password (Insecure)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Äîáðå", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON - PUSHBUTTON "Îòêàç", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Îòìåíè", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP } Modified: trunk/reactos/dll/win32/mpr/mpr_Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_Ko.rc?re…
============================================================================== --- trunk/reactos/dll/win32/mpr/mpr_Ko.rc (original) +++ trunk/reactos/dll/win32/mpr/mpr_Ko.rc Thu Nov 29 13:50:33 2007 @@ -2,7 +2,7 @@ * MPR dll resources * * Copyright (C) 2004 Juan Lang - * Copyright 2005 YunSong Hwang + * Copyright 2005,2007 YunSong Hwang * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -40,7 +40,7 @@ LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD - CHECKBOX "¾ÏÈ£ ÀúÀå(&S) (Insecure)", IDC_SAVEPASSWORD, + CHECKBOX "¾ÏÈ£ ÀúÀå(&S) (º¸¾È¿¡ ÁÖÀÇ)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "È®ÀÎ", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Ãë¼Ò", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP Modified: trunk/reactos/dll/win32/mpr/mpr_No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_No.rc?re…
============================================================================== --- trunk/reactos/dll/win32/mpr/mpr_No.rc (original) +++ trunk/reactos/dll/win32/mpr/mpr_No.rc Thu Nov 29 13:50:33 2007 @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL +LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL STRINGTABLE DISCARDABLE { Modified: trunk/reactos/dll/win32/mpr/mpr_Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_Pl.rc?re…
============================================================================== --- trunk/reactos/dll/win32/mpr/mpr_Pl.rc (original) +++ trunk/reactos/dll/win32/mpr/mpr_Pl.rc Thu Nov 29 13:50:33 2007 @@ -28,7 +28,7 @@ IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Wprowad has³o do sieci" +CAPTION "Wpisz has³o sieci" FONT 8, "MS Shell Dlg" { LTEXT "Proszê wprowadziæ nazwê u¿ytkownika i has³o:", IDC_EXPLAIN, 40, 6, 150, 15 @@ -40,7 +40,7 @@ LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD - CHECKBOX "&Zapamiêtaj to has³o (nie bezpieczne)", IDC_SAVEPASSWORD, + CHECKBOX "&Zapisz to has³o (niebezpieczne)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Anuluj", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP Modified: trunk/reactos/dll/win32/mpr/mpr_Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_Sv.rc?re…
============================================================================== --- trunk/reactos/dll/win32/mpr/mpr_Sv.rc (original) +++ trunk/reactos/dll/win32/mpr/mpr_Sv.rc Thu Nov 29 13:50:33 2007 @@ -1,7 +1,7 @@ /* - * MPR dll Swedish resources + * MPR dll resources * - * Copyright (C) 2005 Andreas Bjerkeholt + * Copyright (C) 2007 Daniel Nylander * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,10 +15,10 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL +LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT STRINGTABLE DISCARDABLE { @@ -39,7 +39,7 @@ LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD - CHECKBOX "&Spara detta lösenord (Osäkert)", IDC_SAVEPASSWORD, + CHECKBOX "&Spara detta lösenord (osäkert)", IDC_SAVEPASSWORD, 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON PUSHBUTTON "Avbryt", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP Modified: trunk/reactos/dll/win32/mpr/mpr_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/mpr_ros.diff…
============================================================================== --- trunk/reactos/dll/win32/mpr/mpr_ros.diff (original) +++ trunk/reactos/dll/win32/mpr/mpr_ros.diff Thu Nov 29 13:50:33 2007 @@ -2,12 +2,12 @@ =================================================================== --- mpr.rc (revision 23782) +++ mpr.rc (working copy) -@@ -39,4 +39,7 @@ +@@ -39,5 +39,7 @@ #include "mpr_No.rc" #include "mpr_Pl.rc" #include "mpr_Pt.rc" +#include "mpr_Ru.rc" -+#include "mpr_Sv.rc" + #include "mpr_Sv.rc" #include "mpr_Tr.rc" +#include "mpr_Uk.rc" Index: mpr_Ru.rc @@ -61,57 +61,6 @@ + PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON + PUSHBUTTON "Îòìåíà", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP +} -Index: mpr_Sv.rc -=================================================================== ---- mpr_Sv.rc (revision 23782) -+++ mpr_Sv.rc (working copy) -@@ -0,0 +1,46 @@ -+/* -+ * MPR dll Swedish resources -+ * -+ * Copyright (C) 2005 Andreas Bjerkeholt -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -+ -+STRINGTABLE DISCARDABLE -+{ -+ IDS_ENTIRENETWORK "Hela nätverket" -+} -+ -+IDD_PROXYDLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 36, 24, 250, 154 -+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -+CAPTION "Ange nätverkslösenord" -+FONT 8, "MS Shell Dlg" -+{ -+ LTEXT "Ange ditt användarnamn och lösenord:", IDC_EXPLAIN, 40, 6, 150, 15 -+ LTEXT "Proxy", -1, 40, 26, 50, 10 -+/* LTEXT "Realm", -1, 40, 46, 50, 10 */ -+ LTEXT "Användare", -1, 40, 66, 50, 10 -+ LTEXT "Lösenord", -1, 40, 86, 50, 10 -+ LTEXT "" IDC_PROXY, 80, 26, 150, 14, 0 -+ LTEXT "" IDC_REALM, 80, 46, 150, 14, 0 -+ EDITTEXT IDC_USERNAME, 80, 66, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP -+ EDITTEXT IDC_PASSWORD, 80, 86, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP | ES_PASSWORD -+ CHECKBOX "&Spara detta lösenord (Osäkert)", IDC_SAVEPASSWORD, -+ 80, 106, 150, 12, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP -+ PUSHBUTTON "OK", IDOK, 98, 126, 56, 14, WS_GROUP | WS_TABSTOP | BS_DEFPUSHBUTTON -+ PUSHBUTTON "Avbryt", IDCANCEL, 158, 126, 56, 14, WS_GROUP | WS_TABSTOP -+} Index: mpr_Uk.rc =================================================================== --- mpr_Uk.rc (revision 23782) Modified: trunk/reactos/dll/win32/mpr/nps.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/nps.c?rev=30…
============================================================================== --- trunk/reactos/dll/win32/mpr/nps.c (original) +++ trunk/reactos/dll/win32/mpr/nps.c Thu Nov 29 13:50:33 2007 @@ -82,7 +82,7 @@ hitem = GetDlgItem( hdlg, IDC_USERNAME ); if( hitem ) GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername ); - + password[0] = 0; hitem = GetDlgItem( hdlg, IDC_PASSWORD ); if( hitem ) @@ -119,7 +119,7 @@ lpAuthDlgStruct->lpOUTitle, lpAuthDlgStruct->lpExplainText); return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ), - lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog, + lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog, (LPARAM) lpAuthDlgStruct ); } Modified: trunk/reactos/dll/win32/mpr/pwcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/pwcache.c?re…
============================================================================== --- trunk/reactos/dll/win32/mpr/pwcache.c (original) +++ trunk/reactos/dll/win32/mpr/pwcache.c Thu Nov 29 13:50:33 2007 @@ -56,8 +56,9 @@ DWORD i; name = HeapAlloc( GetProcessHeap(), 0, 6+cbResource*2 ); - if( name ) - sprintf( name, "X-%02X-", nType ); + if( !name ) return NULL; + + sprintf( name, "X-%02X-", nType ); for(i=0; i<cbResource; i++) { name[5+i*2]=hex((pbResource[i]&0xf0)>>4); @@ -107,7 +108,7 @@ valname = MPR_GetValueName( pbResource, cbResource, nType ); if( valname ) { - r = RegSetValueExA( hkey, valname, 0, REG_BINARY, + r = RegSetValueExA( hkey, valname, 0, REG_BINARY, (LPBYTE)pbPassword, cbPassword ); if( r ) r = WN_CANCEL; @@ -221,9 +222,9 @@ * * NOTES * the parameter count is verifyed - * + * * This function is a huge security risk, as virii and such can use - * it to grab all the passwords in the cache. It's bad enough to + * it to grab all the passwords in the cache. It's bad enough to * store the passwords (insecurely). * * bpPrefix and cbPrefix are used to filter the returned passwords @@ -306,7 +307,7 @@ entry->cbPassword = data_sz; entry->iEntry = i; entry->nType = nType; - r = RegEnumValueA( hkey, i, NULL, &val_sz, NULL, &type, + r = RegEnumValueA( hkey, i, NULL, &val_sz, NULL, &type, &entry->abResource[val_sz], &data_sz ); if( r == ERROR_SUCCESS ) enumPasswordProc( entry, param ); Modified: trunk/reactos/dll/win32/mpr/wnet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mpr/wnet.c?rev=3…
============================================================================== --- trunk/reactos/dll/win32/mpr/wnet.c (original) +++ trunk/reactos/dll/win32/mpr/wnet.c Thu Nov 29 13:50:33 2007 @@ -52,6 +52,7 @@ PF_NPOpenEnum openEnum; PF_NPEnumResource enumResource; PF_NPCloseEnum closeEnum; + PF_NPGetResourceInformation getResourceInformation; } WNetProvider, *PWNetProvider; typedef struct _WNetProviderTable @@ -133,7 +134,7 @@ { static const WCHAR szProviderName[] = { 'N','a','m','e',0 }; PWSTR name = NULL; - + size = 0; RegQueryValueExW(hKey, szProviderName, NULL, NULL, NULL, &size); if (size) @@ -182,6 +183,10 @@ provider->closeEnum = (PF_NPCloseEnum) GetProcAddress(hLib, "NPCloseEnum"); TRACE("closeEnum is %p\n", provider->closeEnum); + provider->getResourceInformation = (PF_NPGetResourceInformation) + GetProcAddress(hLib, "NPGetResourceInformation"); + TRACE("getResourceInformation is %p\n", + provider->getResourceInformation); if (!provider->openEnum || !provider->enumResource || !provider->closeEnum) { @@ -731,7 +736,7 @@ if (index != BAD_PROVIDER_INDEX) { if (providerTable->table[index].openEnum && - providerTable->table[index].dwEnumScopes & dwScope) + providerTable->table[index].dwEnumScopes & WNNC_ENUM_GLOBAL) { HANDLE handle; @@ -893,7 +898,7 @@ if (*lpBufferSize < sizeof(NETRESOURCEA)) return WN_MORE_DATA; - if (!providerTable || enumerator->providerIndex >= + if (!providerTable || enumerator->providerIndex >= providerTable->numProviders) ret = WN_NO_MORE_ENTRIES; else @@ -964,6 +969,7 @@ if (enumerator->providerDone) { + DWORD dwEnum = 0; enumerator->providerDone = FALSE; if (enumerator->handle) { @@ -972,10 +978,15 @@ enumerator->handle = NULL; enumerator->providerIndex++; } + if (enumerator->dwScope == RESOURCE_CONNECTED) + dwEnum = WNNC_ENUM_LOCAL; + else if (enumerator->dwScope == RESOURCE_GLOBALNET) + dwEnum = WNNC_ENUM_GLOBAL; + else if (enumerator->dwScope == RESOURCE_CONTEXT) + dwEnum = WNNC_ENUM_CONTEXT; for (; enumerator->providerIndex < providerTable->numProviders && - !(enumerator->dwScope & providerTable->table - [enumerator->providerIndex].dwEnumScopes); - enumerator->providerIndex++) + !(providerTable->table[enumerator->providerIndex].dwEnumScopes + & dwEnum); enumerator->providerIndex++) ; } return enumerator->providerIndex < providerTable->numProviders ? @@ -1275,30 +1286,157 @@ /********************************************************************* * WNetGetResourceInformationA [MPR.@] + * + * See WNetGetResourceInformationW */ DWORD WINAPI WNetGetResourceInformationA( LPNETRESOURCEA lpNetResource, LPVOID lpBuffer, LPDWORD cbBuffer, LPSTR *lplpSystem ) { - FIXME( "(%p, %p, %p, %p): stub\n", + DWORD ret; + + TRACE( "(%p, %p, %p, %p)\n", lpNetResource, lpBuffer, cbBuffer, lplpSystem ); - SetLastError(WN_NO_NETWORK); - return WN_NO_NETWORK; + if (!providerTable || providerTable->numProviders == 0) + ret = WN_NO_NETWORK; + else if (lpNetResource) + { + LPNETRESOURCEW lpNetResourceW = NULL; + DWORD size = 1024, count = 1; + DWORD len; + + lpNetResourceW = HeapAlloc(GetProcessHeap(), 0, size); + ret = _thunkNetResourceArrayAToW(lpNetResource, &count, lpNetResourceW, &size); + if (ret == WN_MORE_DATA) + { + lpNetResourceW = HeapAlloc(GetProcessHeap(), 0, size); + if (lpNetResourceW) + ret = _thunkNetResourceArrayAToW(lpNetResource, + &count, lpNetResourceW, &size); + else + ret = WN_OUT_OF_MEMORY; + } + if (ret == WN_SUCCESS) + { + LPWSTR lpSystemW = NULL; + LPVOID lpBufferW; + size = 1024; + lpBufferW = HeapAlloc(GetProcessHeap(), 0, size); + if (lpBufferW) + { + ret = WNetGetResourceInformationW(lpNetResourceW, + lpBufferW, &size, &lpSystemW); + if (ret == WN_MORE_DATA) + { + HeapFree(GetProcessHeap(), 0, lpBufferW); + lpBufferW = HeapAlloc(GetProcessHeap(), 0, size); + if (lpBufferW) + ret = WNetGetResourceInformationW(lpNetResourceW, + lpBufferW, &size, &lpSystemW); + else + ret = WN_OUT_OF_MEMORY; + } + if (ret == WN_SUCCESS) + { + ret = _thunkNetResourceArrayWToA(lpBufferW, + &count, lpBuffer, cbBuffer); + lpNetResourceW = lpBufferW; + size = sizeof(NETRESOURCEA); + size += WideCharToMultiByte(CP_ACP, 0, lpNetResourceW->lpRemoteName, + -1, NULL, 0, NULL, NULL); + size += WideCharToMultiByte(CP_ACP, 0, lpNetResourceW->lpProvider, + -1, NULL, 0, NULL, NULL); + + len = WideCharToMultiByte(CP_ACP, 0, lpSystemW, + -1, NULL, 0, NULL, NULL); + if ((len) && ( size + len < *cbBuffer)) + { + *lplpSystem = (char*)lpBuffer + *cbBuffer - len; + WideCharToMultiByte(CP_ACP, 0, lpSystemW, -1, + *lplpSystem, len, NULL, NULL); + ret = WN_SUCCESS; + } + else + ret = WN_MORE_DATA; + } + else + ret = WN_OUT_OF_MEMORY; + HeapFree(GetProcessHeap(), 0, lpBufferW); + } + else + ret = WN_OUT_OF_MEMORY; + HeapFree(GetProcessHeap(), 0, lpSystemW); + } + HeapFree(GetProcessHeap(), 0, lpNetResourceW); + } + else + ret = WN_NO_NETWORK; + + if (ret) + SetLastError(ret); + TRACE("Returning %d\n", ret); + return ret; } /********************************************************************* * WNetGetResourceInformationW [MPR.@] - */ + * + * WNetGetResourceInformationW function identifies the network provider + * that owns the resource and gets information about the type of the resource. + * + * PARAMS: + * lpNetResource [ I] the pointer to NETRESOURCEW structure, that + * defines a network resource. + * lpBuffer [ O] the pointer to buffer, containing result. It + * contains NETRESOURCEW structure and strings to + * which the members of the NETRESOURCEW structure + * point. + * cbBuffer [I/O] the pointer to DWORD number - size of buffer + * in bytes. + * lplpSystem [ O] the pointer to string in the output buffer, + * containing the part of the resource name without + * names of the server and share. + * + * RETURNS: + * NO_ERROR if the function succeeds. System error code if the function fails. + */ + DWORD WINAPI WNetGetResourceInformationW( LPNETRESOURCEW lpNetResource, LPVOID lpBuffer, LPDWORD cbBuffer, LPWSTR *lplpSystem ) { - FIXME( "(%p, %p, %p, %p): stub\n", - lpNetResource, lpBuffer, cbBuffer, lplpSystem ); - - SetLastError(WN_NO_NETWORK); - return WN_NO_NETWORK; + DWORD ret = WN_NO_NETWORK; + DWORD index; + + TRACE( "(%p, %p, %p, %p)\n", + lpNetResource, lpBuffer, cbBuffer, lplpSystem); + + if (!(lpBuffer)) + ret = WN_OUT_OF_MEMORY; + else + { + /* FIXME: For function value of a variable is indifferent, it does + * search of all providers in a network. + */ + for (index = 0; index < providerTable->numProviders; index++) + { + if(providerTable->table[index].getCaps(WNNC_DIALOG) & + WNNC_DLG_GETRESOURCEINFORMATION) + { + if (providerTable->table[index].getResourceInformation) + ret = providerTable->table[index].getResourceInformation( + lpNetResource, lpBuffer, cbBuffer, lplpSystem); + else + ret = WN_NO_NETWORK; + if (ret == WN_SUCCESS) + break; + } + } + } + if (ret) + SetLastError(ret); + return ret; } /*********************************************************************
17 years
1
0
0
0
[winesync] 30870: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:48:50 2007 New Revision: 30870 URL:
http://svn.reactos.org/svn/reactos?rev=30870&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/mlang/mlang.c trunk/reactos/dll/win32/mlang/mlang.rbuild trunk/reactos/dll/win32/mlang/regsvr.c Modified: trunk/reactos/dll/win32/mlang/mlang.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mlang/mlang.c?re…
============================================================================== --- trunk/reactos/dll/win32/mlang/mlang.c (original) +++ trunk/reactos/dll/win32/mlang/mlang.c Thu Nov 29 13:48:50 2007 @@ -530,7 +530,7 @@ *pcDstSize = MultiByteToWideChar(dwEncoding, 0, pSrcStr, *pcSrcSize, NULL, 0); break; } - + if (!*pcDstSize) return E_FAIL; @@ -634,10 +634,9 @@ pDstStrW = HeapAlloc(GetProcessHeap(), 0, cDstSizeW * sizeof(WCHAR)); hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, pDstStrW, &cDstSizeW); - if (hr != S_OK) - return hr; - - hr = ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, pDstStrW, &cDstSizeW, pDstStr, pcDstSize); + if (hr == S_OK) + hr = ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, pDstStrW, &cDstSizeW, pDstStr, pcDstSize); + HeapFree(GetProcessHeap(), 0, pDstStrW); return hr; } @@ -694,7 +693,7 @@ if (n) { rfc1766[n - 1] = '-'; - n += GetLocaleInfoA( lcid, LOCALE_SISO3166CTRYNAME, rfc1766 + n, len - n ) + 1; + n += GetLocaleInfoA( lcid, LOCALE_SISO3166CTRYNAME, rfc1766 + n, len - n ); LCMapStringA( LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, rfc1766, n, rfc1766, len ); return n; } @@ -707,7 +706,7 @@ if (n) { rfc1766[n - 1] = '-'; - n += GetLocaleInfoW( lcid, LOCALE_SISO3166CTRYNAME, rfc1766 + n, len - n ) + 1; + n += GetLocaleInfoW( lcid, LOCALE_SISO3166CTRYNAME, rfc1766 + n, len - n ); LCMapStringW( LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, rfc1766, n, rfc1766, len ); return n; } @@ -830,7 +829,7 @@ IClassFactoryImpl *This = (IClassFactoryImpl *)iface; HRESULT hres; LPUNKNOWN punk; - + TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj); *ppobj = NULL; @@ -1217,6 +1216,7 @@ if (ref == 0) { TRACE("Destroying %p\n", This); + HeapFree(GetProcessHeap(), 0, This->script_info); HeapFree(GetProcessHeap(), 0, This); } @@ -1384,7 +1384,7 @@ { ICOM_THIS_MULTI(MLang_impl, vtbl_IMLangFontLink, iface); CHARSETINFO cs; - BOOL rc; + BOOL rc; TRACE("(%p) Seeking %u\n",This, uCodePage); memset(&cs, 0, sizeof(cs)); @@ -1412,7 +1412,7 @@ DWORD mask = 0x00000000; UINT i; CHARSETINFO cs; - BOOL rc; + BOOL rc; TRACE("(%p) scanning 0x%x default page %u\n",This, dwCodePages, uDefaultCodePage); @@ -1420,7 +1420,7 @@ *puCodePage = 0x00000000; rc = TranslateCharsetInfo((DWORD*)uDefaultCodePage, &cs, TCI_SRCCODEPAGE); - + if (rc && (dwCodePages & cs.fs.fsCsb[0])) { TRACE("Found Default Codepage\n"); @@ -1428,7 +1428,7 @@ return S_OK; } - + for (i = 0; i < 32; i++) { @@ -1862,7 +1862,7 @@ info->wszLocaleName[0] = 0; GetLocaleInfoW(info->lcid, LOCALE_SLANGUAGE, info->wszLocaleName, MAX_LOCALE_NAME); TRACE("ISO639: %s SLANGUAGE: %s\n", wine_dbgstr_w(info->wszRfc1766), wine_dbgstr_w(info->wszLocaleName)); - + data->total++; return TRUE; @@ -1885,7 +1885,11 @@ data.total = 0; data.allocated = 32; data.info = HeapAlloc(GetProcessHeap(), 0, data.allocated * sizeof(RFC1766INFO)); - if (!data.info) return S_FALSE; + if (!data.info) + { + HeapFree(GetProcessHeap(), 0, rfc); + return S_FALSE; + } TlsSetValue(MLANG_tls_index, &data); EnumSystemLocalesW(enum_locales_proc, 0/*LOCALE_SUPPORTED*/); @@ -1893,7 +1897,12 @@ TRACE("enumerated %d rfc1766 structures\n", data.total); - if (!data.total) return FALSE; + if (!data.total) + { + HeapFree(GetProcessHeap(), 0, data.info); + HeapFree(GetProcessHeap(), 0, rfc); + return FALSE; + } rfc->info = data.info; rfc->total = data.total; @@ -2298,7 +2307,7 @@ * * PARAMS * see ConvertStringToUnicode - * dwFlag + * dwFlag * lpFallBack if dwFlag contains MLCONVCHARF_USEDEFCHAR, lpFallBack string used * instead unconvertible characters. * Modified: trunk/reactos/dll/win32/mlang/mlang.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mlang/mlang.rbui…
============================================================================== --- trunk/reactos/dll/win32/mlang/mlang.rbuild (original) +++ trunk/reactos/dll/win32/mlang/mlang.rbuild Thu Nov 29 13:48:50 2007 @@ -1,14 +1,13 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="mlang" type="win32dll" baseaddress="${BASEADDRESS_MLANG}" installbase="system32" installname="mlang.dll" allowwarnings="true"> <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="mlang.spec.def" /> <include base="mlang">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> <library>ole32</library> <library>user32</library> Modified: trunk/reactos/dll/win32/mlang/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mlang/regsvr.c?r…
============================================================================== --- trunk/reactos/dll/win32/mlang/regsvr.c (original) +++ trunk/reactos/dll/win32/mlang/regsvr.c Thu Nov 29 13:48:50 2007 @@ -121,9 +121,6 @@ static LONG register_progid(WCHAR const *clsid, char const *progid, char const *curver_progid, char const *name, char const *extra); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); /*********************************************************************** * register_interfaces @@ -212,7 +209,8 @@ WCHAR buf[39]; StringFromGUID2(list->iid, buf, 39); - res = recursive_delete_keyW(interface_key, buf); + res = RegDeleteTreeW(interface_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; } RegCloseKey(interface_key); @@ -319,16 +317,19 @@ WCHAR buf[39]; StringFromGUID2(list->clsid, buf, 39); - res = recursive_delete_keyW(coclass_key, buf); + res = RegDeleteTreeW(coclass_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; if (list->progid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } if (list->viprogid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } } @@ -437,70 +438,6 @@ error_close_progid_key: RegCloseKey(progid_key); - return res; -} - -/*********************************************************************** - * recursive_delete_key - */ -static LONG recursive_delete_key(HKEY key) -{ - LONG res; - WCHAR subkey_name[MAX_PATH]; - DWORD cName; - HKEY subkey; - - for (;;) { - cName = sizeof(subkey_name) / sizeof(WCHAR); - res = RegEnumKeyExW(key, 0, subkey_name, &cName, - NULL, NULL, NULL, NULL); - if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { - res = ERROR_SUCCESS; /* presumably we're done enumerating */ - break; - } - res = RegOpenKeyExW(key, subkey_name, 0, - KEY_READ | KEY_WRITE, &subkey); - if (res == ERROR_FILE_NOT_FOUND) continue; - if (res != ERROR_SUCCESS) break; - - res = recursive_delete_key(subkey); - RegCloseKey(subkey); - if (res != ERROR_SUCCESS) break; - } - - if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0); - return res; -} - -/*********************************************************************** - * recursive_delete_keyA - */ -static LONG recursive_delete_keyA(HKEY base, char const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * recursive_delete_keyW - */ -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); return res; }
17 years
1
0
0
0
[winesync] 30869: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:48:07 2007 New Revision: 30869 URL:
http://svn.reactos.org/svn/reactos?rev=30869&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/mapi32/mapi32.rbuild trunk/reactos/dll/win32/mapi32/mapi32.spec trunk/reactos/dll/win32/mapi32/mapi32_main.c trunk/reactos/dll/win32/mapi32/sendmail.c trunk/reactos/dll/win32/mapi32/util.c Modified: trunk/reactos/dll/win32/mapi32/mapi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mapi32/mapi32.rb…
============================================================================== --- trunk/reactos/dll/win32/mapi32/mapi32.rbuild (original) +++ trunk/reactos/dll/win32/mapi32/mapi32.rbuild Thu Nov 29 13:48:07 2007 @@ -1,13 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="mapi32" type="win32dll" baseaddress="${BASEADDRESS_MAPI32}" installbase="system32" installname="mapi32.dll" allowwarnings="true"> <importlibrary definition="mapi32.spec.def" /> <include base="mapi32">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> <library>shlwapi</library> <library>shell32</library> Modified: trunk/reactos/dll/win32/mapi32/mapi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mapi32/mapi32.sp…
============================================================================== --- trunk/reactos/dll/win32/mapi32/mapi32.spec (original) +++ trunk/reactos/dll/win32/mapi32/mapi32.spec Thu Nov 29 13:48:07 2007 @@ -16,7 +16,7 @@ 24 stub PRProviderInit 25 stub LAUNCHWIZARD 26 stub LaunchWizard@20 - 27 stub DllGetClassObject + 27 stdcall -private DllGetClassObject(ptr ptr ptr) 28 stdcall -private DllCanUnloadNow() 29 stub MAPIOpenFormMgr 30 stub MAPIOpenFormMgr@8 Modified: trunk/reactos/dll/win32/mapi32/mapi32_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mapi32/mapi32_ma…
============================================================================== --- trunk/reactos/dll/win32/mapi32/mapi32_main.c (original) +++ trunk/reactos/dll/win32/mapi32/mapi32_main.c Thu Nov 29 13:48:07 2007 @@ -25,6 +25,7 @@ #include "winerror.h" #include "objbase.h" #include "mapix.h" +#include "mapiform.h" #include "mapi.h" #include "wine/debug.h" @@ -49,6 +50,16 @@ break; } return TRUE; +} + +/*********************************************************************** + * DllGetClassObject (MAPI32.27) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) +{ + *ppv = NULL; + FIXME("\n\tCLSID:\t%s,\n\tIID:\t%s\n", debugstr_guid(rclsid), debugstr_guid(iid)); + return CLASS_E_CLASSNOTAVAILABLE; } /*********************************************************************** Modified: trunk/reactos/dll/win32/mapi32/sendmail.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mapi32/sendmail.…
============================================================================== --- trunk/reactos/dll/win32/mapi32/sendmail.c (original) +++ trunk/reactos/dll/win32/mapi32/sendmail.c Thu Nov 29 13:48:07 2007 @@ -53,7 +53,7 @@ * Failure: MAPI_E_FAILURE * * NOTES - * This is a temporary hack. + * This is a temporary hack. */ ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam, lpMapiMessage message, FLAGS flags, ULONG reserved ) @@ -169,7 +169,7 @@ } ret = MAPI_E_FAILURE; size = sizeof(format) + to_size + cc_size + bcc_size + subj_size + body_size; - + mailto = HeapAlloc( GetProcessHeap(), 0, size ); if (!mailto) goto exit; Modified: trunk/reactos/dll/win32/mapi32/util.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mapi32/util.c?re…
============================================================================== --- trunk/reactos/dll/win32/mapi32/util.c (original) +++ trunk/reactos/dll/win32/mapi32/util.c Thu Nov 29 13:48:07 2007 @@ -806,7 +806,7 @@ * * PARAMS * session [I] MAPI session handle - * item [I] Enumerated variable that identifies which + * item [I] Enumerated variable that identifies which * configuration information is being requested * reference [O] Buffer where configuration information is written * config_extensions[I/O] Path of file to create stream on
17 years
1
0
0
0
[winesync] 30868: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:47:25 2007 New Revision: 30868 URL:
http://svn.reactos.org/svn/reactos?rev=30868&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/lz32/lz32.rbuild Modified: trunk/reactos/dll/win32/lz32/lz32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lz32/lz32.rbuild…
============================================================================== --- trunk/reactos/dll/win32/lz32/lz32.rbuild (original) +++ trunk/reactos/dll/win32/lz32/lz32.rbuild Thu Nov 29 13:47:25 2007 @@ -1,13 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="lz32" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_LZ32}" installbase="system32" installname="lz32.dll" allowwarnings="true"> <importlibrary definition="lz32.spec.def" /> <include base="lz32">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> <library>kernel32</library> <library>ntdll</library>
17 years
1
0
0
0
[winesync] 30867: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:46:56 2007 New Revision: 30867 URL:
http://svn.reactos.org/svn/reactos?rev=30867&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/imm32/imm.c trunk/reactos/dll/win32/imm32/imm32.rbuild trunk/reactos/dll/win32/imm32/imm32.spec Modified: trunk/reactos/dll/win32/imm32/imm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm.c?rev=…
============================================================================== --- trunk/reactos/dll/win32/imm32/imm.c (original) +++ trunk/reactos/dll/win32/imm32/imm.c Thu Nov 29 13:46:56 2007 @@ -970,7 +970,7 @@ else { FIXME("Unhandled index 0x%x\n",dwIndex); - } + } ImmUnlockIMCC(data->IMC.hCompStr); @@ -1057,7 +1057,12 @@ */ HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd) { - FIXME("(%p - %p %p ): semi-stub\n", hWnd,hwndDefault, root_context); + static int shown = 0; + + if (!shown) { + FIXME("(%p - %p %p ): semi-stub\n", hWnd,hwndDefault, root_context); + shown = 1; + } if (hwndDefault == NULL) { @@ -1517,9 +1522,13 @@ */ BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC) { - FIXME("(%p, %p): stub\n", hWnd, hIMC); - - return TRUE; + static int shown = 0; + + if (!shown) { + FIXME("(%p, %p): stub\n", hWnd, hIMC); + shown = 1; + } + return TRUE; } /*********************************************************************** @@ -1731,9 +1740,14 @@ BOOL WINAPI ImmSetConversionStatus( HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence) { - FIXME("(%p, %d, %d): stub\n", - hIMC, fdwConversion, fdwSentence - ); + static int shown = 0; + + if (!shown) { + FIXME("(%p, %d, %d): stub\n", + hIMC, fdwConversion, fdwSentence + ); + shown = 1; + } SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } Modified: trunk/reactos/dll/win32/imm32/imm32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm32.rbui…
============================================================================== --- trunk/reactos/dll/win32/imm32/imm32.rbuild (original) +++ trunk/reactos/dll/win32/imm32/imm32.rbuild Thu Nov 29 13:46:56 2007 @@ -1,13 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="imm32" type="win32dll" baseaddress="${BASEADDRESS_IMM32}" installbase="system32" installname="imm32.dll" allowwarnings="true"> <importlibrary definition="imm32.spec.def" /> <include base="imm32">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> <library>user32</library> <library>gdi32</library> Modified: trunk/reactos/dll/win32/imm32/imm32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm32.spec…
============================================================================== --- trunk/reactos/dll/win32/imm32/imm32.spec (original) +++ trunk/reactos/dll/win32/imm32/imm32.spec Thu Nov 29 13:46:56 2007 @@ -10,7 +10,7 @@ @ stdcall ImmDestroyIMCC(long) @ stub ImmDestroySoftKeyboard @ stdcall ImmDisableIME(long) -@ stub ImmDisableIme +@ stdcall ImmDisableIme(long) ImmDisableIME @ stub ImmEnumInputContext @ stdcall ImmEnumRegisterWordA(long ptr str long str ptr) @ stdcall ImmEnumRegisterWordW(long ptr wstr long wstr ptr)
17 years
1
0
0
0
[winesync] 30866: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:36:22 2007 New Revision: 30866 URL:
http://svn.reactos.org/svn/reactos?rev=30866&view=rev
Log: Autosyncing with Wine HEAD Added: trunk/reactos/dll/win32/hhctrl.ocx/Sv.rc (with props) Modified: trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc trunk/reactos/dll/win32/hhctrl.ocx/Pl.rc trunk/reactos/dll/win32/hhctrl.ocx/chm.c trunk/reactos/dll/win32/hhctrl.ocx/help.c trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx_ros.diff trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.rc trunk/reactos/dll/win32/hhctrl.ocx/regsvr.c trunk/reactos/dll/win32/hhctrl.ocx/version.rc Modified: trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc Thu Nov 29 13:36:22 2007 @@ -4,7 +4,7 @@ * * Copyright 2005 James Hawkins * Copyright 2005 YunSong Hwang - + * 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 Modified: trunk/reactos/dll/win32/hhctrl.ocx/Pl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/Pl.rc…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/Pl.rc (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/Pl.rc Thu Nov 29 13:36:22 2007 @@ -38,7 +38,7 @@ IDTB_REFRESH "Odwie¿" IDTB_BACK "Wstecz" IDTB_HOME "Start" - IDTB_SYNC "Sync" + IDTB_SYNC "Synchronizuj" IDTB_PRINT "Drukuj" IDTB_OPTIONS "Opcje" IDTB_FORWARD "Dalej" Added: trunk/reactos/dll/win32/hhctrl.ocx/Sv.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/Sv.rc…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/Sv.rc (added) +++ trunk/reactos/dll/win32/hhctrl.ocx/Sv.rc Thu Nov 29 13:36:22 2007 @@ -1,0 +1,58 @@ +/* + * HTML Help resources + * Swedish Language Support + * + * Copyright 2007 Daniel Nylander + * + * 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_SWEDISH, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_CONTENTS "&Innehåll" + IDS_INDEX "I&ndex" + IDS_SEARCH "&Sök" + IDS_FAVORITES "Favor&iter" +END + +STRINGTABLE +BEGIN + IDTB_EXPAND "Visa" + IDTB_CONTRACT "Dölj" + IDTB_STOP "Stoppa" + IDTB_REFRESH "Uppdatera" + IDTB_BACK "Bakåt" + IDTB_HOME "Hem" + IDTB_SYNC "Synkronisera" + IDTB_PRINT "Skriv ut" + IDTB_OPTIONS "Alternativ" + IDTB_FORWARD "Framåt" + IDTB_NOTES "IDTB_NOTES" + IDTB_BROWSE_FWD "IDTB_BROWSE_FWD" + IDTB_BROWSE_BACK "IDT_BROWSE_BACK" + IDTB_CONTENTS "IDTB_CONTENTS" + IDTB_INDEX "IDTB_INDEX" + IDTB_SEARCH "IDTB_SEARCH" + IDTB_HISTORY "IDTB_HISTORY" + IDTB_FAVORITES "IDTB_FAVORITES" + IDTB_JUMP1 "Jump1" + IDTB_JUMP2 "Jump2" + IDTB_CUSTOMIZE "Anpassa" + IDTB_ZOOM "Zoom" + IDTB_TOC_NEXT "IDTB_TOC_NEXT" + IDTB_TOC_PREV "IDTB_TOC_PREV" +END Propchange: trunk/reactos/dll/win32/hhctrl.ocx/Sv.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/win32/hhctrl.ocx/chm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/chm.c…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/chm.c (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/chm.c Thu Nov 29 13:36:22 2007 @@ -235,7 +235,7 @@ pHHWinType->pszJump2 = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszJump2)); pHHWinType->pszUrlJump1 = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszUrlJump1)); pHHWinType->pszUrlJump2 = strdupAtoW(GetChmString(pChmInfo, (DWORD)pHHWinType->pszUrlJump2)); - + /* FIXME: pszCustomTabs is a list of multiple zero-terminated strings so ReadString won't * work in this case */ Modified: trunk/reactos/dll/win32/hhctrl.ocx/help.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/help.…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/help.c (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/help.c Thu Nov 29 13:36:22 2007 @@ -143,7 +143,7 @@ PAINTSTRUCT ps; HDC hdc; RECT rc; - + hdc = BeginPaint(hWnd, &ps); GetClientRect(hWnd, &rc); @@ -159,7 +159,7 @@ LineTo(hdc, 1, 1); LineTo(hdc, 1, rc.bottom - 1); - + MoveToEx(hdc, 0, rc.bottom, NULL); LineTo(hdc, rc.right, rc.bottom); Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctr…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c Thu Nov 29 13:36:22 2007 @@ -151,6 +151,16 @@ return NULL; /* FIXME */ } + case HH_PRETRANSLATEMESSAGE: { + static BOOL warned = FALSE; + + if (!warned) + { + FIXME("HH_PRETRANSLATEMESSAGE unimplemented\n"); + warned = TRUE; + } + return 0; + } default: FIXME("HH case %s not handled.\n", command_to_string( command )); } Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctr…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild Thu Nov 29 13:36:22 2007 @@ -1,15 +1,14 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="hhctrl" type="win32ocx" baseaddress="${BASEADDRESS_HHCTRL}" installbase="system32" installname="hhctrl.ocx" allowwarnings="true"> <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="hhctrl.ocx.spec.def" /> <include base="hhctrl">.</include> <include base="ReactOS">include/reactos/wine</include> <include base="ReactOS" root="intermediate">include/reactos</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <dependency>wineheaders</dependency> <library>wine</library> <library>advapi32</library> Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctr…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx_ros.diff (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx_ros.diff Thu Nov 29 13:36:22 2007 @@ -2,17 +2,14 @@ =================================================================== --- hhctrl.ocx.rbuild (revision 27782) +++ hhctrl.ocx.rbuild (working copy) -@@ -3,12 +3,14 @@ +@@ -5,9 +5,11 @@ <importlibrary definition="hhctrl.ocx.spec.def" /> <include base="hhctrl">.</include> <include base="ReactOS">include/reactos/wine</include> + <include base="ReactOS" root="intermediate">include/reactos</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> + <dependency>wineheaders</dependency> <library>wine</library> <library>advapi32</library> Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctr…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.rc (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.rc Thu Nov 29 13:36:22 2007 @@ -39,4 +39,5 @@ #include "Nl.rc" #include "No.rc" #include "Pl.rc" +#include "Sv.rc" #include "Tr.rc" Modified: trunk/reactos/dll/win32/hhctrl.ocx/regsvr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/regsv…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/regsvr.c (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/regsvr.c Thu Nov 29 13:36:22 2007 @@ -115,9 +115,6 @@ static LONG register_progid(WCHAR const *clsid, char const *progid, char const *curver_progid, char const *name, char const *extra); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); /*********************************************************************** * register_interfaces @@ -206,7 +203,8 @@ WCHAR buf[39]; StringFromGUID2(list->iid, buf, 39); - res = recursive_delete_keyW(interface_key, buf); + res = RegDeleteTreeW(interface_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; } RegCloseKey(interface_key); @@ -313,16 +311,19 @@ WCHAR buf[39]; StringFromGUID2(list->clsid, buf, 39); - res = recursive_delete_keyW(coclass_key, buf); + res = RegDeleteTreeW(coclass_key, buf); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; if (list->progid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } if (list->viprogid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid); + res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid); + if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; if (res != ERROR_SUCCESS) goto error_close_coclass_key; } } @@ -431,70 +432,6 @@ error_close_progid_key: RegCloseKey(progid_key); - return res; -} - -/*********************************************************************** - * recursive_delete_key - */ -static LONG recursive_delete_key(HKEY key) -{ - LONG res; - WCHAR subkey_name[MAX_PATH]; - DWORD cName; - HKEY subkey; - - for (;;) { - cName = sizeof(subkey_name) / sizeof(WCHAR); - res = RegEnumKeyExW(key, 0, subkey_name, &cName, - NULL, NULL, NULL, NULL); - if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { - res = ERROR_SUCCESS; /* presumably we're done enumerating */ - break; - } - res = RegOpenKeyExW(key, subkey_name, 0, - KEY_READ | KEY_WRITE, &subkey); - if (res == ERROR_FILE_NOT_FOUND) continue; - if (res != ERROR_SUCCESS) break; - - res = recursive_delete_key(subkey); - RegCloseKey(subkey); - if (res != ERROR_SUCCESS) break; - } - - if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0); - return res; -} - -/*********************************************************************** - * recursive_delete_keyA - */ -static LONG recursive_delete_keyA(HKEY base, char const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * recursive_delete_keyW - */ -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); return res; } Modified: trunk/reactos/dll/win32/hhctrl.ocx/version.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/versi…
============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/version.rc (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/version.rc Thu Nov 29 13:36:22 2007 @@ -21,9 +21,9 @@ #define WINE_FILEDESCRIPTION_STR "Wine htmlhelp OCX" #define WINE_FILENAME_STR "hhctrl.ocx" -#define WINE_FILEVERSION 4,72,7325,0 -#define WINE_FILEVERSION_STR "4.72.7325.0" -#define WINE_PRODUCTVERSION 4,72,7325,0 -#define WINE_PRODUCTVERSION_STR "4.72.7325.0" +#define WINE_FILEVERSION 5,2,3790,2744 +#define WINE_FILEVERSION_STR "5.2.3790.2744" +#define WINE_PRODUCTVERSION 5,2,3790,2744 +#define WINE_PRODUCTVERSION_STR "5.2.3790.2744" #include <wine/wine_common_ver.rc>
17 years
1
0
0
0
[janderwald] 30865: - registry keys for open with
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Nov 29 13:35:23 2007 New Revision: 30865 URL:
http://svn.reactos.org/svn/reactos?rev=30865&view=rev
Log: - registry keys for open with Modified: trunk/reactos/boot/bootdata/hivecls.inf trunk/reactos/boot/bootdata/hivedef.inf Modified: trunk/reactos/boot/bootdata/hivecls.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivecls.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivecls.inf (original) +++ trunk/reactos/boot/bootdata/hivecls.inf Thu Nov 29 13:35:23 2007 @@ -244,7 +244,7 @@ HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\InProcServer32","ThreadingModel",0x00000000,"Apartment" HKCR,"CLSID\{09799AFB-AD67-11d1-ABCD-00C04FC30936}\shellex\MayChangeDefaultMenu","",0x00000000,"" HKCR,"SystemFileAssociations","",0x00000000,"" - +HKCR,"Applications","",0x00000000,"" ; Recycle bin is not implemented ;HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}","",0x00000000,"Recycle Bin" Modified: trunk/reactos/boot/bootdata/hivedef.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivedef.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivedef.inf (original) +++ trunk/reactos/boot/bootdata/hivedef.inf Thu Nov 29 13:35:23 2007 @@ -38,8 +38,9 @@ HKCU,"SOFTWARE\Microsoft\DirectX","RC",0x00010001,0x00000000 HKCU,"SOFTWARE\Microsoft\DirectX","Version",0x00000000,"5.03.2600.2180" - - +; Open With settings +HKCU,"SOFTWARE\Classes",,0x00000012 +HKCU,"SOFTWARE\Classes\Applications",,0x00000012 ; Current user shell folder settings HKCU,"SOFTWARE\Microsoft\Windows",,0x00000012
17 years
1
0
0
0
[winesync] 30864: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:28:12 2007 New Revision: 30864 URL:
http://svn.reactos.org/svn/reactos?rev=30864&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/cryptnet/cryptnet.rbuild trunk/reactos/dll/win32/cryptnet/cryptnet.spec trunk/reactos/dll/win32/cryptnet/cryptnet_main.c Modified: trunk/reactos/dll/win32/cryptnet/cryptnet.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptnet/cryptne…
============================================================================== --- trunk/reactos/dll/win32/cryptnet/cryptnet.rbuild (original) +++ trunk/reactos/dll/win32/cryptnet/cryptnet.rbuild Thu Nov 29 13:28:12 2007 @@ -1,16 +1,17 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="cryptnet" type="win32dll" baseaddress="${BASEADDRESS_CRYPTNET}" installbase="system32" installname="cryptnet.dll" allowwarnings="true"> <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="cryptnet.spec.def" /> <include base="cryptnet">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> + <library>crypt32</library> <library>kernel32</library> + <library>wininet</library> <library>ntdll</library> <file>cryptnet_main.c</file> <file>cryptnet.spec</file> Modified: trunk/reactos/dll/win32/cryptnet/cryptnet.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptnet/cryptne…
============================================================================== --- trunk/reactos/dll/win32/cryptnet/cryptnet.spec (original) +++ trunk/reactos/dll/win32/cryptnet/cryptnet.spec Thu Nov 29 13:28:12 2007 @@ -1,14 +1,14 @@ @ stub CertDllVerifyCTLUsage -@ stub CertDllVerifyRevocation +@ stdcall CertDllVerifyRevocation(long long long ptr long ptr ptr) @ stub CryptnetWlxLogoffEvent @ stub LdapProvOpenStore @ stub CryptCancelAsyncRetrieval @ stub CryptFlushTimeValidObject -@ stub CryptGetObjectUrl +@ stdcall CryptGetObjectUrl(ptr ptr long ptr ptr ptr ptr ptr) @ stub CryptGetTimeValidObject @ stub CryptInstallCancelRetrieval -@ stub CryptRetrieveObjectByUrlA -@ stub CryptRetrieveObjectByUrlW +@ stdcall CryptRetrieveObjectByUrlA(str str long long ptr ptr ptr ptr ptr) +@ stdcall CryptRetrieveObjectByUrlW(wstr str long long ptr ptr ptr ptr ptr) @ stub CryptUninstallCancelRetrieval @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() Modified: trunk/reactos/dll/win32/cryptnet/cryptnet_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptnet/cryptne…
============================================================================== --- trunk/reactos/dll/win32/cryptnet/cryptnet_main.c (original) +++ trunk/reactos/dll/win32/cryptnet/cryptnet_main.c Thu Nov 29 13:28:12 2007 @@ -1,5 +1,6 @@ /* * Copyright (C) 2006 Maarten Lankhorst + * Copyright 2007 Juan Lang * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,10 +19,21 @@ */ #include "config.h" +#include "wine/port.h" +#include <stdio.h> + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + #include "windef.h" #include "wine/debug.h" #include "winbase.h" #include "winnt.h" +#include "winnls.h" +#include "wininet.h" +#include "objbase.h" +#define CERT_REVOCATION_PARA_HAS_EXTRA_FIELDS +#include "wincrypt.h" WINE_DEFAULT_DEBUG_CHANNEL(cryptnet); @@ -30,8 +42,6 @@ TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); switch (fdwReason) { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); break; @@ -43,13 +53,23 @@ return TRUE; } +static const WCHAR cryptNet[] = { 'c','r','y','p','t','n','e','t','.', + 'd','l','l',0 }; +static const WCHAR ldapProvOpenStore[] = { 'L','d','a','p','P','r','o','v', + 'O','p','e','S','t','o','r','e',0 }; + /*********************************************************************** * DllRegisterServer (CRYPTNET.@) */ HRESULT WINAPI DllRegisterServer(void) { - FIXME("stub\n"); - + TRACE("\n"); + CryptRegisterDefaultOIDFunction(X509_ASN_ENCODING, + CRYPT_OID_VERIFY_REVOCATION_FUNC, 0, cryptNet); + CryptRegisterOIDFunction(0, CRYPT_OID_OPEN_STORE_PROV_FUNC, "Ldap", + cryptNet, "LdapProvOpenStore"); + CryptRegisterOIDFunction(0, CRYPT_OID_OPEN_STORE_PROV_FUNC, + CERT_STORE_PROV_LDAP_W, cryptNet, "LdapProvOpenStore"); return S_OK; } @@ -58,7 +78,1383 @@ */ HRESULT WINAPI DllUnregisterServer(void) { - FIXME("stub\n"); - + TRACE("\n"); + CryptUnregisterDefaultOIDFunction(X509_ASN_ENCODING, + CRYPT_OID_VERIFY_REVOCATION_FUNC, cryptNet); + CryptUnregisterOIDFunction(0, CRYPT_OID_OPEN_STORE_PROV_FUNC, "Ldap"); + CryptUnregisterOIDFunction(0, CRYPT_OID_OPEN_STORE_PROV_FUNC, + CERT_STORE_PROV_LDAP_W); return S_OK; } + +static const char *url_oid_to_str(LPCSTR oid) +{ + if (HIWORD(oid)) + return oid; + else + { + static char buf[10]; + + switch (LOWORD(oid)) + { +#define _x(oid) case LOWORD(oid): return #oid + _x(URL_OID_CERTIFICATE_ISSUER); + _x(URL_OID_CERTIFICATE_CRL_DIST_POINT); + _x(URL_OID_CTL_ISSUER); + _x(URL_OID_CTL_NEXT_UPDATE); + _x(URL_OID_CRL_ISSUER); + _x(URL_OID_CERTIFICATE_FRESHEST_CRL); + _x(URL_OID_CRL_FRESHEST_CRL); + _x(URL_OID_CROSS_CERT_DIST_POINT); +#undef _x + default: + snprintf(buf, sizeof(buf), "%d", LOWORD(oid)); + return buf; + } + } +} + +typedef BOOL (WINAPI *UrlDllGetObjectUrlFunc)(LPCSTR, LPVOID, DWORD, + PCRYPT_URL_ARRAY, DWORD *, PCRYPT_URL_INFO, DWORD *, LPVOID); + +static BOOL WINAPI CRYPT_GetUrlFromCertificateIssuer(LPCSTR pszUrlOid, + LPVOID pvPara, DWORD dwFlags, PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, + PCRYPT_URL_INFO pUrlInfo, DWORD *pcbUrlInfo, LPVOID pvReserved) +{ + /* FIXME: This depends on the AIA (authority info access) extension being + * supported in crypt32. + */ + FIXME("\n"); + SetLastError(CRYPT_E_NOT_FOUND); + return FALSE; +} + +static BOOL WINAPI CRYPT_GetUrlFromCertificateCRLDistPoint(LPCSTR pszUrlOid, + LPVOID pvPara, DWORD dwFlags, PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, + PCRYPT_URL_INFO pUrlInfo, DWORD *pcbUrlInfo, LPVOID pvReserved) +{ + PCCERT_CONTEXT cert = (PCCERT_CONTEXT)pvPara; + PCERT_EXTENSION ext; + BOOL ret = FALSE; + + /* The only applicable flag is CRYPT_GET_URL_FROM_EXTENSION */ + if (dwFlags && !(dwFlags & CRYPT_GET_URL_FROM_EXTENSION)) + { + SetLastError(CRYPT_E_NOT_FOUND); + return FALSE; + } + if ((ext = CertFindExtension(szOID_CRL_DIST_POINTS, + cert->pCertInfo->cExtension, cert->pCertInfo->rgExtension))) + { + CRL_DIST_POINTS_INFO *info; + DWORD size; + + ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_CRL_DIST_POINTS, + ext->Value.pbData, ext->Value.cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, + &info, &size); + if (ret) + { + DWORD i, cUrl, bytesNeeded = sizeof(CRYPT_URL_ARRAY); + + for (i = 0, cUrl = 0; i < info->cDistPoint; i++) + if (info->rgDistPoint[i].DistPointName.dwDistPointNameChoice + == CRL_DIST_POINT_FULL_NAME) + { + DWORD j; + CERT_ALT_NAME_INFO *name = + &info->rgDistPoint[i].DistPointName.u.FullName; + + for (j = 0; j < name->cAltEntry; j++) + if (name->rgAltEntry[j].dwAltNameChoice == + CERT_ALT_NAME_URL) + { + if (name->rgAltEntry[j].u.pwszURL) + { + cUrl++; + bytesNeeded += sizeof(LPWSTR) + + (lstrlenW(name->rgAltEntry[j].u.pwszURL) + 1) + * sizeof(WCHAR); + } + } + } + if (!pcbUrlArray) + { + SetLastError(E_INVALIDARG); + ret = FALSE; + } + else if (!pUrlArray) + *pcbUrlArray = bytesNeeded; + else if (*pcbUrlArray < bytesNeeded) + { + SetLastError(ERROR_MORE_DATA); + *pcbUrlArray = bytesNeeded; + ret = FALSE; + } + else + { + LPWSTR nextUrl; + + *pcbUrlArray = bytesNeeded; + pUrlArray->cUrl = 0; + pUrlArray->rgwszUrl = + (LPWSTR *)((BYTE *)pUrlArray + sizeof(CRYPT_URL_ARRAY)); + nextUrl = (LPWSTR)((BYTE *)pUrlArray + sizeof(CRYPT_URL_ARRAY) + + cUrl * sizeof(LPWSTR)); + for (i = 0; i < info->cDistPoint; i++) + if (info->rgDistPoint[i].DistPointName.dwDistPointNameChoice + == CRL_DIST_POINT_FULL_NAME) + { + DWORD j; + CERT_ALT_NAME_INFO *name = + &info->rgDistPoint[i].DistPointName.u.FullName; + + for (j = 0; j < name->cAltEntry; j++) + if (name->rgAltEntry[j].dwAltNameChoice == + CERT_ALT_NAME_URL) + { + if (name->rgAltEntry[j].u.pwszURL) + { + lstrcpyW(nextUrl, + name->rgAltEntry[j].u.pwszURL); + pUrlArray->rgwszUrl[pUrlArray->cUrl++] = + nextUrl; + nextUrl += + (lstrlenW(name->rgAltEntry[j].u.pwszURL) + 1) + * sizeof(WCHAR); + } + } + } + } + if (ret) + { + if (pcbUrlInfo) + { + FIXME("url info: stub\n"); + if (!pUrlInfo) + *pcbUrlInfo = sizeof(CRYPT_URL_INFO); + else if (*pcbUrlInfo < sizeof(CRYPT_URL_INFO)) + { + *pcbUrlInfo = sizeof(CRYPT_URL_INFO); + SetLastError(ERROR_MORE_DATA); + ret = FALSE; + } + else + { + *pcbUrlInfo = sizeof(CRYPT_URL_INFO); + memset(pUrlInfo, 0, sizeof(CRYPT_URL_INFO)); + } + } + } + LocalFree(info); + } + } + else + SetLastError(CRYPT_E_NOT_FOUND); + return ret; +} + +/*********************************************************************** + * CryptGetObjectUrl (CRYPTNET.@) + */ +BOOL WINAPI CryptGetObjectUrl(LPCSTR pszUrlOid, LPVOID pvPara, DWORD dwFlags, + PCRYPT_URL_ARRAY pUrlArray, DWORD *pcbUrlArray, PCRYPT_URL_INFO pUrlInfo, + DWORD *pcbUrlInfo, LPVOID pvReserved) +{ + UrlDllGetObjectUrlFunc func = NULL; + HCRYPTOIDFUNCADDR hFunc = NULL; + BOOL ret = FALSE; + + TRACE("(%s, %p, %08x, %p, %p, %p, %p, %p)\n", debugstr_a(pszUrlOid), + pvPara, dwFlags, pUrlArray, pcbUrlArray, pUrlInfo, pcbUrlInfo, pvReserved); + + if (!HIWORD(pszUrlOid)) + { + switch (LOWORD(pszUrlOid)) + { + case LOWORD(URL_OID_CERTIFICATE_ISSUER): + func = CRYPT_GetUrlFromCertificateIssuer; + break; + case LOWORD(URL_OID_CERTIFICATE_CRL_DIST_POINT): + func = CRYPT_GetUrlFromCertificateCRLDistPoint; + break; + default: + FIXME("unimplemented for %s\n", url_oid_to_str(pszUrlOid)); + SetLastError(ERROR_FILE_NOT_FOUND); + } + } + else + { + static HCRYPTOIDFUNCSET set = NULL; + + if (!set) + set = CryptInitOIDFunctionSet(URL_OID_GET_OBJECT_URL_FUNC, 0); + CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, pszUrlOid, 0, + (void **)&func, &hFunc); + } + if (func) + ret = func(pszUrlOid, pvPara, dwFlags, pUrlArray, pcbUrlArray, + pUrlInfo, pcbUrlInfo, pvReserved); + if (hFunc) + CryptFreeOIDFunctionAddress(hFunc, 0); + return ret; +} + +/*********************************************************************** + * CryptRetrieveObjectByUrlA (CRYPTNET.@) + */ +BOOL WINAPI CryptRetrieveObjectByUrlA(LPCSTR pszURL, LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, DWORD dwTimeout, LPVOID *ppvObject, + HCRYPTASYNC hAsyncRetrieve, PCRYPT_CREDENTIALS pCredentials, LPVOID pvVerify, + PCRYPT_RETRIEVE_AUX_INFO pAuxInfo) +{ + BOOL ret = FALSE; + int len; + + TRACE("(%s, %s, %08x, %d, %p, %p, %p, %p, %p)\n", debugstr_a(pszURL), + debugstr_a(pszObjectOid), dwRetrievalFlags, dwTimeout, ppvObject, + hAsyncRetrieve, pCredentials, pvVerify, pAuxInfo); + + if (!pszURL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + len = MultiByteToWideChar(CP_ACP, 0, pszURL, -1, NULL, 0); + if (len) + { + LPWSTR url = CryptMemAlloc(len * sizeof(WCHAR)); + + if (url) + { + MultiByteToWideChar(CP_ACP, 0, pszURL, -1, url, len); + ret = CryptRetrieveObjectByUrlW(url, pszObjectOid, + dwRetrievalFlags, dwTimeout, ppvObject, hAsyncRetrieve, + pCredentials, pvVerify, pAuxInfo); + CryptMemFree(url); + } + else + SetLastError(ERROR_OUTOFMEMORY); + } + return ret; +} + +static void WINAPI CRYPT_FreeBlob(LPCSTR pszObjectOid, + PCRYPT_BLOB_ARRAY pObject, void *pvFreeContext) +{ + DWORD i; + + for (i = 0; i < pObject->cBlob; i++) + CryptMemFree(pObject->rgBlob[i].pbData); + CryptMemFree(pObject->rgBlob); +} + +static BOOL CRYPT_GetObjectFromFile(HANDLE hFile, PCRYPT_BLOB_ARRAY pObject) +{ + BOOL ret; + LARGE_INTEGER size; + + if ((ret = GetFileSizeEx(hFile, &size))) + { + if (size.u.HighPart) + { + WARN("file too big\n"); + SetLastError(ERROR_INVALID_DATA); + ret = FALSE; + } + else + { + CRYPT_DATA_BLOB blob; + + blob.pbData = CryptMemAlloc(size.u.LowPart); + if (blob.pbData) + { + blob.cbData = size.u.LowPart; + ret = ReadFile(hFile, blob.pbData, size.u.LowPart, &blob.cbData, + NULL); + if (ret) + { + pObject->rgBlob = CryptMemAlloc(sizeof(CRYPT_DATA_BLOB)); + if (pObject->rgBlob) + { + pObject->cBlob = 1; + memcpy(pObject->rgBlob, &blob, sizeof(CRYPT_DATA_BLOB)); + } + else + { + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + } + if (!ret) + CryptMemFree(blob.pbData); + } + else + { + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + } + } + return ret; +} + +/* FIXME: should make wininet cache all downloads instead */ +static BOOL CRYPT_GetObjectFromCache(LPCWSTR pszURL, PCRYPT_BLOB_ARRAY pObject, + PCRYPT_RETRIEVE_AUX_INFO pAuxInfo) +{ + BOOL ret = FALSE; + INTERNET_CACHE_ENTRY_INFOW cacheInfo = { sizeof(cacheInfo), 0 }; + DWORD size = sizeof(cacheInfo); + + TRACE("(%s, %p, %p)\n", debugstr_w(pszURL), pObject, pAuxInfo); + + if (GetUrlCacheEntryInfoW(pszURL, &cacheInfo, &size) || + GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + FILETIME ft; + + GetSystemTimeAsFileTime(&ft); + if (CompareFileTime(&cacheInfo.ExpireTime, &ft) >= 0) + { + LPINTERNET_CACHE_ENTRY_INFOW pCacheInfo = CryptMemAlloc(size); + + if (pCacheInfo) + { + if (GetUrlCacheEntryInfoW(pszURL, pCacheInfo, &size)) + { + HANDLE hFile = CreateFileW(pCacheInfo->lpszLocalFileName, + GENERIC_READ, 0, NULL, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + + if (hFile != INVALID_HANDLE_VALUE) + { + if ((ret = CRYPT_GetObjectFromFile(hFile, pObject))) + { + if (pAuxInfo && pAuxInfo->cbSize >= + offsetof(CRYPT_RETRIEVE_AUX_INFO, + pLastSyncTime) + sizeof(PFILETIME) && + pAuxInfo->pLastSyncTime) + memcpy(pAuxInfo->pLastSyncTime, + &pCacheInfo->LastSyncTime, + sizeof(FILETIME)); + } + CloseHandle(hFile); + } + } + CryptMemFree(pCacheInfo); + } + else + SetLastError(ERROR_OUTOFMEMORY); + } + else + DeleteUrlCacheEntryW(pszURL); + } + TRACE("returning %d\n", ret); + return ret; +} + +static inline LPWSTR strndupW(LPWSTR string, int len) +{ + LPWSTR ret = NULL; + if (string && (ret = CryptMemAlloc((len + 1) * sizeof(WCHAR))) != NULL) + { + memcpy(ret, string, len * sizeof(WCHAR)); + ret[len] = 0; + } + return ret; +} + +/* Parses the URL, and sets components's lpszHostName and lpszUrlPath members + * to NULL-terminated copies of those portions of the URL (to be freed with + * CryptMemFree.) + */ +static BOOL CRYPT_CrackUrl(LPCWSTR pszURL, URL_COMPONENTSW *components) +{ + BOOL ret; + + TRACE("(%s, %p)\n", debugstr_w(pszURL), components); + + memset(components, 0, sizeof(*components)); + components->dwStructSize = sizeof(*components); + components->dwHostNameLength = 1; + components->dwUrlPathLength = 1; + ret = InternetCrackUrlW(pszURL, 0, ICU_DECODE, components); + if (ret) + { + LPWSTR hostname = strndupW(components->lpszHostName, + components->dwHostNameLength); + LPWSTR path = strndupW(components->lpszUrlPath, + components->dwUrlPathLength); + + components->lpszHostName = hostname; + components->lpszUrlPath = path; + switch (components->nScheme) + { + case INTERNET_SCHEME_FTP: + if (!components->nPort) + components->nPort = INTERNET_DEFAULT_FTP_PORT; + break; + case INTERNET_SCHEME_HTTP: + if (!components->nPort) + components->nPort = INTERNET_DEFAULT_HTTP_PORT; + break; + default: + ; /* do nothing */ + } + } + TRACE("returning %d\n", ret); + return ret; +} + +struct InetContext +{ + HANDLE event; + DWORD timeout; + DWORD error; +}; + +static struct InetContext *CRYPT_MakeInetContext(DWORD dwTimeout) +{ + struct InetContext *context = CryptMemAlloc(sizeof(struct InetContext)); + + if (context) + { + context->event = CreateEventW(NULL, FALSE, FALSE, NULL); + if (!context->event) + { + CryptMemFree(context); + context = NULL; + } + else + { + context->timeout = dwTimeout; + context->error = ERROR_SUCCESS; + } + } + return context; +} + +static BOOL CRYPT_DownloadObject(DWORD dwRetrievalFlags, HINTERNET hHttp, + struct InetContext *context, PCRYPT_BLOB_ARRAY pObject, + PCRYPT_RETRIEVE_AUX_INFO pAuxInfo) +{ + CRYPT_DATA_BLOB object = { 0, NULL }; + DWORD bytesAvailable; + BOOL ret; + + do { + if ((ret = InternetQueryDataAvailable(hHttp, &bytesAvailable, 0, 0))) + { + if (bytesAvailable) + { + if (object.pbData) + object.pbData = CryptMemRealloc(object.pbData, + object.cbData + bytesAvailable); + else + object.pbData = CryptMemAlloc(bytesAvailable); + if (object.pbData) + { + INTERNET_BUFFERSA buffer = { sizeof(buffer), 0 }; + + buffer.dwBufferLength = bytesAvailable; + buffer.lpvBuffer = object.pbData + object.cbData; + if (!(ret = InternetReadFileExA(hHttp, &buffer, IRF_NO_WAIT, + (DWORD_PTR)context))) + { + if (GetLastError() == ERROR_IO_PENDING) + { + if (WaitForSingleObject(context->event, + context->timeout) == WAIT_TIMEOUT) + SetLastError(ERROR_TIMEOUT); + else if (context->error) + SetLastError(context->error); + else + ret = TRUE; + } + } + if (ret) + object.cbData += bytesAvailable; + } + else + { + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + } + } + else if (GetLastError() == ERROR_IO_PENDING) + { + if (WaitForSingleObject(context->event, context->timeout) == + WAIT_TIMEOUT) + SetLastError(ERROR_TIMEOUT); + else + ret = TRUE; + } + } while (ret && bytesAvailable); + if (ret) + { + pObject->rgBlob = CryptMemAlloc(sizeof(CRYPT_DATA_BLOB)); + if (!pObject->rgBlob) + { + CryptMemFree(object.pbData); + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + else + { + pObject->rgBlob[0].cbData = object.cbData; + pObject->rgBlob[0].pbData = object.pbData; + pObject->cBlob = 1; + } + } + TRACE("returning %d\n", ret); + return ret; +} + +static void CRYPT_CacheURL(LPCWSTR pszURL, PCRYPT_BLOB_ARRAY pObject, + DWORD dwRetrievalFlags, FILETIME expires) +{ + WCHAR cacheFileName[MAX_PATH]; + + /* FIXME: let wininet directly cache instead */ + if (CreateUrlCacheEntryW(pszURL, pObject->rgBlob[0].cbData, NULL, + cacheFileName, 0)) + { + HANDLE hCacheFile = CreateFileW(cacheFileName, GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + + if (hCacheFile != INVALID_HANDLE_VALUE) + { + DWORD bytesWritten, entryType; + FILETIME ft = { 0 }; + + if (!(dwRetrievalFlags & CRYPT_STICKY_CACHE_RETRIEVAL)) + entryType = NORMAL_CACHE_ENTRY; + else + entryType = STICKY_CACHE_ENTRY; + WriteFile(hCacheFile, pObject->rgBlob[0].pbData, + pObject->rgBlob[0].cbData, &bytesWritten, NULL); + CloseHandle(hCacheFile); + CommitUrlCacheEntryW(pszURL, cacheFileName, expires, ft, entryType, + NULL, 0, NULL, NULL); + } + } +} + +static void CALLBACK CRYPT_InetStatusCallback(HINTERNET hInt, + DWORD_PTR dwContext, DWORD status, void *statusInfo, DWORD statusInfoLen) +{ + struct InetContext *context = (struct InetContext *)dwContext; + LPINTERNET_ASYNC_RESULT result; + + switch (status) + { + case INTERNET_STATUS_REQUEST_COMPLETE: + result = (LPINTERNET_ASYNC_RESULT)statusInfo; + context->error = result->dwError; + SetEvent(context->event); + } +} + +static BOOL CRYPT_Connect(URL_COMPONENTSW *components, + struct InetContext *context, PCRYPT_CREDENTIALS pCredentials, + HINTERNET *phInt, HINTERNET *phHost) +{ + BOOL ret; + + TRACE("(%s:%d, %p, %p, %p, %p)\n", debugstr_w(components->lpszHostName), + components->nPort, context, pCredentials, phInt, phInt); + + *phHost = NULL; + *phInt = InternetOpenW(NULL, INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, + context ? INTERNET_FLAG_ASYNC : 0); + if (*phInt) + { + DWORD service; + + if (context) + InternetSetStatusCallbackW(*phInt, CRYPT_InetStatusCallback); + switch (components->nScheme) + { + case INTERNET_SCHEME_FTP: + service = INTERNET_SERVICE_FTP; + break; + case INTERNET_SCHEME_HTTP: + service = INTERNET_SERVICE_HTTP; + break; + default: + service = 0; + } + /* FIXME: use pCredentials for username/password */ + *phHost = InternetConnectW(*phInt, components->lpszHostName, + components->nPort, NULL, NULL, service, 0, (DWORD_PTR)context); + if (!*phHost) + { + InternetCloseHandle(*phInt); + *phInt = NULL; + ret = FALSE; + } + else + ret = TRUE; + } + else + ret = FALSE; + TRACE("returning %d\n", ret); + return ret; +} + +static BOOL WINAPI FTP_RetrieveEncodedObjectW(LPCWSTR pszURL, + LPCSTR pszObjectOid, DWORD dwRetrievalFlags, DWORD dwTimeout, + PCRYPT_BLOB_ARRAY pObject, PFN_FREE_ENCODED_OBJECT_FUNC *ppfnFreeObject, + void **ppvFreeContext, HCRYPTASYNC hAsyncRetrieve, + PCRYPT_CREDENTIALS pCredentials, PCRYPT_RETRIEVE_AUX_INFO pAuxInfo) +{ + FIXME("(%s, %s, %08x, %d, %p, %p, %p, %p, %p, %p)\n", debugstr_w(pszURL), + debugstr_a(pszObjectOid), dwRetrievalFlags, dwTimeout, pObject, + ppfnFreeObject, ppvFreeContext, hAsyncRetrieve, pCredentials, pAuxInfo); + + pObject->cBlob = 0; + pObject->rgBlob = NULL; + *ppfnFreeObject = CRYPT_FreeBlob; + *ppvFreeContext = NULL; + return FALSE; +} + +static const WCHAR x509cacert[] = { 'a','p','p','l','i','c','a','t','i','o','n', + '/','x','-','x','5','0','9','-','c','a','-','c','e','r','t',0 }; +static const WCHAR x509emailcert[] = { 'a','p','p','l','i','c','a','t','i','o', + 'n','/','x','-','x','5','0','9','-','e','m','a','i','l','-','c','e','r','t', + 0 }; +static const WCHAR x509servercert[] = { 'a','p','p','l','i','c','a','t','i','o', + 'n','/','x','-','x','5','0','9','-','s','e','r','v','e','r','-','c','e','r', + 't',0 }; +static const WCHAR x509usercert[] = { 'a','p','p','l','i','c','a','t','i','o', + 'n','/','x','-','x','5','0','9','-','u','s','e','r','-','c','e','r','t',0 }; +static const WCHAR pkcs7cert[] = { 'a','p','p','l','i','c','a','t','i','o','n', + '/','x','-','p','k','c','s','7','-','c','e','r','t','i','f','c','a','t','e', + 's',0 }; +static const WCHAR pkixCRL[] = { 'a','p','p','l','i','c','a','t','i','o','n', + '/','p','k','i','x','-','c','r','l',0 }; +static const WCHAR pkcs7CRL[] = { 'a','p','p','l','i','c','a','t','i','o','n', + '/','x','-','p','k','c','s','7','-','c','r','l',0 }; +static const WCHAR pkcs7sig[] = { 'a','p','p','l','i','c','a','t','i','o','n', + '/','x','-','p','k','c','s','7','-','s','i','g','n','a','t','u','r','e',0 }; +static const WCHAR pkcs7mime[] = { 'a','p','p','l','i','c','a','t','i','o','n', + '/','x','-','p','k','c','s','7','-','m','i','m','e',0 }; + +static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL, + LPCSTR pszObjectOid, DWORD dwRetrievalFlags, DWORD dwTimeout, + PCRYPT_BLOB_ARRAY pObject, PFN_FREE_ENCODED_OBJECT_FUNC *ppfnFreeObject, + void **ppvFreeContext, HCRYPTASYNC hAsyncRetrieve, + PCRYPT_CREDENTIALS pCredentials, PCRYPT_RETRIEVE_AUX_INFO pAuxInfo) +{ + BOOL ret = FALSE; + + TRACE("(%s, %s, %08x, %d, %p, %p, %p, %p, %p, %p)\n", debugstr_w(pszURL), + debugstr_a(pszObjectOid), dwRetrievalFlags, dwTimeout, pObject, + ppfnFreeObject, ppvFreeContext, hAsyncRetrieve, pCredentials, pAuxInfo); + + pObject->cBlob = 0; + pObject->rgBlob = NULL; + *ppfnFreeObject = CRYPT_FreeBlob; + *ppvFreeContext = NULL; + + if (!(dwRetrievalFlags & CRYPT_WIRE_ONLY_RETRIEVAL)) + ret = CRYPT_GetObjectFromCache(pszURL, pObject, pAuxInfo); + if (!ret && (!(dwRetrievalFlags & CRYPT_CACHE_ONLY_RETRIEVAL) || + (dwRetrievalFlags & CRYPT_WIRE_ONLY_RETRIEVAL))) + { + URL_COMPONENTSW components; + + if ((ret = CRYPT_CrackUrl(pszURL, &components))) + { + HINTERNET hInt, hHost; + struct InetContext *context = NULL; + + if (dwTimeout) + context = CRYPT_MakeInetContext(dwTimeout); + ret = CRYPT_Connect(&components, context, pCredentials, &hInt, + &hHost); + if (ret) + { + static LPCWSTR types[] = { x509cacert, x509emailcert, + x509servercert, x509usercert, pkcs7cert, pkixCRL, pkcs7CRL, + pkcs7sig, pkcs7mime, NULL }; + HINTERNET hHttp = HttpOpenRequestW(hHost, NULL, + components.lpszUrlPath, NULL, NULL, types, + INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_NO_UI, + (DWORD_PTR)context); + + if (hHttp) + { + if (dwTimeout) + { + InternetSetOptionW(hHttp, + INTERNET_OPTION_RECEIVE_TIMEOUT, &dwTimeout, + sizeof(dwTimeout)); + InternetSetOptionW(hHttp, INTERNET_OPTION_SEND_TIMEOUT, + &dwTimeout, sizeof(dwTimeout)); + } + ret = HttpSendRequestExW(hHttp, NULL, NULL, 0, + (DWORD_PTR)context); + if (!ret && GetLastError() == ERROR_IO_PENDING) + { + if (WaitForSingleObject(context->event, + context->timeout) == WAIT_TIMEOUT) + SetLastError(ERROR_TIMEOUT); + else + ret = TRUE; + } + /* We don't set ret to TRUE in this block to avoid masking + * an error from HttpSendRequestExW. + */ + if (!HttpEndRequestW(hHttp, NULL, 0, (DWORD_PTR)context) && + GetLastError() == ERROR_IO_PENDING) + { + if (WaitForSingleObject(context->event, + context->timeout) == WAIT_TIMEOUT) + { + SetLastError(ERROR_TIMEOUT); + ret = FALSE; + } + } + if (ret) + ret = CRYPT_DownloadObject(dwRetrievalFlags, hHttp, + context, pObject, pAuxInfo); + if (ret && !(dwRetrievalFlags & CRYPT_DONT_CACHE_RESULT)) + { + SYSTEMTIME st; + DWORD len = sizeof(st); + + if (HttpQueryInfoW(hHttp, + HTTP_QUERY_EXPIRES | HTTP_QUERY_FLAG_SYSTEMTIME, &st, + &len, NULL)) + { + FILETIME ft; + + SystemTimeToFileTime(&st, &ft); + CRYPT_CacheURL(pszURL, pObject, dwRetrievalFlags, + ft); + } + } + InternetCloseHandle(hHttp); + } + InternetCloseHandle(hHost); + InternetCloseHandle(hInt); + } + if (context) + { + CloseHandle(context->event); + CryptMemFree(context); + } + CryptMemFree(components.lpszUrlPath); + CryptMemFree(components.lpszHostName); + } + } + TRACE("returning %d\n", ret); + return ret; +} + +static BOOL WINAPI File_RetrieveEncodedObjectW(LPCWSTR pszURL, + LPCSTR pszObjectOid, DWORD dwRetrievalFlags, DWORD dwTimeout, + PCRYPT_BLOB_ARRAY pObject, PFN_FREE_ENCODED_OBJECT_FUNC *ppfnFreeObject, + void **ppvFreeContext, HCRYPTASYNC hAsyncRetrieve, + PCRYPT_CREDENTIALS pCredentials, PCRYPT_RETRIEVE_AUX_INFO pAuxInfo) +{ + URL_COMPONENTSW components = { sizeof(components), 0 }; + BOOL ret; + + TRACE("(%s, %s, %08x, %d, %p, %p, %p, %p, %p, %p)\n", debugstr_w(pszURL), + debugstr_a(pszObjectOid), dwRetrievalFlags, dwTimeout, pObject, + ppfnFreeObject, ppvFreeContext, hAsyncRetrieve, pCredentials, pAuxInfo); + + pObject->cBlob = 0; + pObject->rgBlob = NULL; + *ppfnFreeObject = CRYPT_FreeBlob; + *ppvFreeContext = NULL; + + components.dwUrlPathLength = 1; + ret = InternetCrackUrlW(pszURL, 0, ICU_DECODE, &components); + if (ret) + { + LPWSTR path; + + /* 3 == lstrlenW(L"c:") + 1 */ + path = CryptMemAlloc((components.dwUrlPathLength + 3) * sizeof(WCHAR)); + if (path) + { + HANDLE hFile; + + /* Try to create the file directly - Wine handles / in pathnames */ + lstrcpynW(path, components.lpszUrlPath, + components.dwUrlPathLength + 1); + hFile = CreateFileW(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + if (hFile == INVALID_HANDLE_VALUE) + { + /* Try again on the current drive */ + GetCurrentDirectoryW(components.dwUrlPathLength, path); + if (path[1] == ':') + { + lstrcpynW(path + 2, components.lpszUrlPath, + components.dwUrlPathLength + 1); + hFile = CreateFileW(path, GENERIC_READ, 0, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + } + if (hFile == INVALID_HANDLE_VALUE) + { + /* Try again on the Windows drive */ + GetWindowsDirectoryW(path, components.dwUrlPathLength); + if (path[1] == ':') + { + lstrcpynW(path + 2, components.lpszUrlPath, + components.dwUrlPathLength + 1); + hFile = CreateFileW(path, GENERIC_READ, 0, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + } + } + } + if (hFile != INVALID_HANDLE_VALUE) + { + if ((ret = CRYPT_GetObjectFromFile(hFile, pObject))) + { + if (pAuxInfo && pAuxInfo->cbSize >= + offsetof(CRYPT_RETRIEVE_AUX_INFO, + pLastSyncTime) + sizeof(PFILETIME) && + pAuxInfo->pLastSyncTime) + GetFileTime(hFile, NULL, NULL, + pAuxInfo->pLastSyncTime); + } + CloseHandle(hFile); + } + else + ret = FALSE; + CryptMemFree(path); + } + } + return ret; +} + +typedef BOOL (WINAPI *SchemeDllRetrieveEncodedObjectW)(LPCWSTR pwszUrl, + LPCSTR pszObjectOid, DWORD dwRetrievalFlags, DWORD dwTimeout, + PCRYPT_BLOB_ARRAY pObject, PFN_FREE_ENCODED_OBJECT_FUNC *ppfnFreeObject, + void **ppvFreeContext, HCRYPTASYNC hAsyncRetrieve, + PCRYPT_CREDENTIALS pCredentials, PCRYPT_RETRIEVE_AUX_INFO pAuxInfo); + +static BOOL CRYPT_GetRetrieveFunction(LPCWSTR pszURL, + SchemeDllRetrieveEncodedObjectW *pFunc, HCRYPTOIDFUNCADDR *phFunc) +{ + URL_COMPONENTSW components = { sizeof(components), 0 }; + BOOL ret; + + TRACE("(%s, %p, %p)\n", debugstr_w(pszURL), pFunc, phFunc); + + *pFunc = NULL; + *phFunc = 0; + components.dwSchemeLength = 1; + ret = InternetCrackUrlW(pszURL, 0, ICU_DECODE, &components); + if (ret) + { + /* Microsoft always uses CryptInitOIDFunctionSet/ + * CryptGetOIDFunctionAddress, but there doesn't seem to be a pressing + * reason to do so for builtin schemes. + */ + switch (components.nScheme) + { + case INTERNET_SCHEME_FTP: + *pFunc = FTP_RetrieveEncodedObjectW; + break; + case INTERNET_SCHEME_HTTP: + *pFunc = HTTP_RetrieveEncodedObjectW; + break; + case INTERNET_SCHEME_FILE: + *pFunc = File_RetrieveEncodedObjectW; + break; + default: + { + int len = WideCharToMultiByte(CP_ACP, 0, components.lpszScheme, + components.dwSchemeLength, NULL, 0, NULL, NULL); + + if (len) + { + LPSTR scheme = CryptMemAlloc(len); + + if (scheme) + { + static HCRYPTOIDFUNCSET set = NULL; + + if (!set) + set = CryptInitOIDFunctionSet( + SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC, 0); + WideCharToMultiByte(CP_ACP, 0, components.lpszScheme, + components.dwSchemeLength, scheme, len, NULL, NULL); + ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, + scheme, 0, (void **)pFunc, phFunc); + CryptMemFree(scheme); + } + else + { + SetLastError(ERROR_OUTOFMEMORY); + ret = FALSE; + } + } + else + ret = FALSE; + } + } + } + TRACE("returning %d\n", ret); + return ret; +} + +static BOOL WINAPI CRYPT_CreateBlob(LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, PCRYPT_BLOB_ARRAY pObject, void **ppvContext) +{ + DWORD size, i; + CRYPT_BLOB_ARRAY *context; + BOOL ret = FALSE; + + size = sizeof(CRYPT_BLOB_ARRAY) + pObject->cBlob * sizeof(CRYPT_DATA_BLOB); + for (i = 0; i < pObject->cBlob; i++) + size += pObject->rgBlob[i].cbData; + context = CryptMemAlloc(size); + if (context) + { + LPBYTE nextData; + + context->cBlob = 0; + context->rgBlob = + (CRYPT_DATA_BLOB *)((LPBYTE)context + sizeof(CRYPT_BLOB_ARRAY)); + nextData = + (LPBYTE)context->rgBlob + pObject->cBlob * sizeof(CRYPT_DATA_BLOB); + for (i = 0; i < pObject->cBlob; i++) + { + memcpy(nextData, pObject->rgBlob[i].pbData, + pObject->rgBlob[i].cbData); + context->rgBlob[i].pbData = nextData; + context->rgBlob[i].cbData = pObject->rgBlob[i].cbData; + nextData += pObject->rgBlob[i].cbData; + context->cBlob++; + } + *ppvContext = context; + ret = TRUE; + } + return ret; +} + +typedef BOOL (WINAPI *AddContextToStore)(HCERTSTORE hCertStore, + const void *pContext, DWORD dwAddDisposition, const void **ppStoreContext); + +static BOOL CRYPT_CreateContext(PCRYPT_BLOB_ARRAY pObject, + DWORD dwExpectedContentTypeFlags, AddContextToStore addFunc, void **ppvContext) +{ + BOOL ret = TRUE; + + if (!pObject->cBlob) + { + SetLastError(ERROR_INVALID_DATA); + *ppvContext = NULL; + ret = FALSE; + } + else if (pObject->cBlob == 1) + { + if (!CryptQueryObject(CERT_QUERY_OBJECT_BLOB, &pObject->rgBlob[0], + dwExpectedContentTypeFlags, CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, + NULL, NULL, NULL, NULL, (const void **)ppvContext)) + { + SetLastError(CRYPT_E_NO_MATCH); + ret = FALSE; + } + } + else + { + HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, + CERT_STORE_CREATE_NEW_FLAG, NULL); + + if (store) + { + DWORD i; + const void *context; + + for (i = 0; i < pObject->cBlob; i++) + { + if (CryptQueryObject(CERT_QUERY_OBJECT_BLOB, + &pObject->rgBlob[i], dwExpectedContentTypeFlags, + CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, NULL, NULL, NULL, + NULL, &context)) + { + if (!addFunc(store, context, CERT_STORE_ADD_ALWAYS, NULL)) + ret = FALSE; + } + else + { + SetLastError(CRYPT_E_NO_MATCH); + ret = FALSE; + } + } + } + else + ret = FALSE; + *ppvContext = store; + } + return ret; +} + +static BOOL WINAPI CRYPT_CreateCert(LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, PCRYPT_BLOB_ARRAY pObject, void **ppvContext) +{ + return CRYPT_CreateContext(pObject, CERT_QUERY_CONTENT_FLAG_CERT, + (AddContextToStore)CertAddCertificateContextToStore, ppvContext); +} + +static BOOL WINAPI CRYPT_CreateCRL(LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, PCRYPT_BLOB_ARRAY pObject, void **ppvContext) +{ + return CRYPT_CreateContext(pObject, CERT_QUERY_CONTENT_FLAG_CRL, + (AddContextToStore)CertAddCRLContextToStore, ppvContext); +} + +static BOOL WINAPI CRYPT_CreateCTL(LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, PCRYPT_BLOB_ARRAY pObject, void **ppvContext) +{ + return CRYPT_CreateContext(pObject, CERT_QUERY_CONTENT_FLAG_CTL, + (AddContextToStore)CertAddCTLContextToStore, ppvContext); +} + +static BOOL WINAPI CRYPT_CreatePKCS7(LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, PCRYPT_BLOB_ARRAY pObject, void **ppvContext) +{ + BOOL ret; + + if (!pObject->cBlob) + { + SetLastError(ERROR_INVALID_DATA); + *ppvContext = NULL; + ret = FALSE; + } + else if (pObject->cBlob == 1) + ret = CryptQueryObject(CERT_QUERY_OBJECT_BLOB, &pObject->rgBlob[0], + CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | + CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED, CERT_QUERY_FORMAT_FLAG_BINARY, + 0, NULL, NULL, NULL, (HCERTSTORE *)ppvContext, NULL, NULL); + else + { + FIXME("multiple messages unimplemented\n"); + ret = FALSE; + } + return ret; +} + +static BOOL WINAPI CRYPT_CreateAny(LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, PCRYPT_BLOB_ARRAY pObject, void **ppvContext) +{ + BOOL ret; + + if (!pObject->cBlob) + { + SetLastError(ERROR_INVALID_DATA); + *ppvContext = NULL; + ret = FALSE; + } + else + { + HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, + CERT_STORE_CREATE_NEW_FLAG, NULL); + + if (store) + { + HCERTSTORE memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, + CERT_STORE_CREATE_NEW_FLAG, NULL); + + if (memStore) + { + CertAddStoreToCollection(store, memStore, + CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); + CertCloseStore(memStore, 0); + } + else + { + CertCloseStore(store, 0); + store = NULL; + } + } + if (store) + { + DWORD i; + + ret = TRUE; + for (i = 0; i < pObject->cBlob; i++) + { + DWORD contentType, expectedContentTypes = + CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED | + CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED | + CERT_QUERY_CONTENT_FLAG_CERT | + CERT_QUERY_CONTENT_FLAG_CRL | + CERT_QUERY_CONTENT_FLAG_CTL; + HCERTSTORE contextStore; + const void *context; + + if (CryptQueryObject(CERT_QUERY_OBJECT_BLOB, + &pObject->rgBlob[i], expectedContentTypes, + CERT_QUERY_FORMAT_FLAG_BINARY, 0, NULL, &contentType, NULL, + &contextStore, NULL, &context)) + { + switch (contentType) + { + case CERT_QUERY_CONTENT_CERT: + if (!CertAddCertificateContextToStore(store, + (PCCERT_CONTEXT)context, CERT_STORE_ADD_ALWAYS, NULL)) + ret = FALSE; + break; + case CERT_QUERY_CONTENT_CRL: + if (!CertAddCRLContextToStore(store, + (PCCRL_CONTEXT)context, CERT_STORE_ADD_ALWAYS, NULL)) + ret = FALSE; + break; + case CERT_QUERY_CONTENT_CTL: + if (!CertAddCTLContextToStore(store, + (PCCTL_CONTEXT)context, CERT_STORE_ADD_ALWAYS, NULL)) + ret = FALSE; + break; + default: + CertAddStoreToCollection(store, contextStore, 0, 0); + } + } + else + ret = FALSE; + } + } + else + ret = FALSE; + *ppvContext = store; + } + return ret; +} + +typedef BOOL (WINAPI *ContextDllCreateObjectContext)(LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, PCRYPT_BLOB_ARRAY pObject, void **ppvContext); + +static BOOL CRYPT_GetCreateFunction(LPCSTR pszObjectOid, + ContextDllCreateObjectContext *pFunc, HCRYPTOIDFUNCADDR *phFunc) +{ + BOOL ret = TRUE; + + TRACE("(%s, %p, %p)\n", debugstr_a(pszObjectOid), pFunc, phFunc); + + *pFunc = NULL; + *phFunc = 0; + if (!HIWORD(pszObjectOid)) + { + switch (LOWORD(pszObjectOid)) + { + case 0: + *pFunc = CRYPT_CreateBlob; + break; + case LOWORD(CONTEXT_OID_CERTIFICATE): + *pFunc = CRYPT_CreateCert; + break; + case LOWORD(CONTEXT_OID_CRL): + *pFunc = CRYPT_CreateCRL; + break; + case LOWORD(CONTEXT_OID_CTL): + *pFunc = CRYPT_CreateCTL; + break; + case LOWORD(CONTEXT_OID_PKCS7): + *pFunc = CRYPT_CreatePKCS7; + break; + case LOWORD(CONTEXT_OID_CAPI2_ANY): + *pFunc = CRYPT_CreateAny; + break; + } + } + if (!*pFunc) + { + static HCRYPTOIDFUNCSET set = NULL; + + if (!set) + set = CryptInitOIDFunctionSet( + CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC, 0); + ret = CryptGetOIDFunctionAddress(set, X509_ASN_ENCODING, pszObjectOid, + 0, (void **)pFunc, phFunc); + } + TRACE("returning %d\n", ret); + return ret; +} + +/*********************************************************************** + * CryptRetrieveObjectByUrlW (CRYPTNET.@) + */ +BOOL WINAPI CryptRetrieveObjectByUrlW(LPCWSTR pszURL, LPCSTR pszObjectOid, + DWORD dwRetrievalFlags, DWORD dwTimeout, LPVOID *ppvObject, + HCRYPTASYNC hAsyncRetrieve, PCRYPT_CREDENTIALS pCredentials, LPVOID pvVerify, + PCRYPT_RETRIEVE_AUX_INFO pAuxInfo) +{ + BOOL ret; + SchemeDllRetrieveEncodedObjectW retrieve; + ContextDllCreateObjectContext create; + HCRYPTOIDFUNCADDR hRetrieve = 0, hCreate = 0; + + TRACE("(%s, %s, %08x, %d, %p, %p, %p, %p, %p)\n", debugstr_w(pszURL), + debugstr_a(pszObjectOid), dwRetrievalFlags, dwTimeout, ppvObject, + hAsyncRetrieve, pCredentials, pvVerify, pAuxInfo); + + if (!pszURL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + ret = CRYPT_GetRetrieveFunction(pszURL, &retrieve, &hRetrieve); + if (ret) + ret = CRYPT_GetCreateFunction(pszObjectOid, &create, &hCreate); + if (ret) + { + CRYPT_BLOB_ARRAY object = { 0, NULL }; + PFN_FREE_ENCODED_OBJECT_FUNC freeObject; + void *freeContext; + + ret = retrieve(pszURL, pszObjectOid, dwRetrievalFlags, dwTimeout, + &object, &freeObject, &freeContext, hAsyncRetrieve, pCredentials, + pAuxInfo); + if (ret) + { + ret = create(pszObjectOid, dwRetrievalFlags, &object, ppvObject); + freeObject(pszObjectOid, &object, freeContext); + } + } + if (hCreate) + CryptFreeOIDFunctionAddress(hCreate, 0); + if (hRetrieve) + CryptFreeOIDFunctionAddress(hRetrieve, 0); + TRACE("returning %d\n", ret); + return ret; +} + +typedef struct _OLD_CERT_REVOCATION_STATUS { + DWORD cbSize; + DWORD dwIndex; + DWORD dwError; + DWORD dwReason; +} OLD_CERT_REVOCATION_STATUS, *POLD_CERT_REVOCATION_STATUS; + +/*********************************************************************** + * CertDllVerifyRevocation (CRYPTNET.@) + */ +BOOL WINAPI CertDllVerifyRevocation(DWORD dwEncodingType, DWORD dwRevType, + DWORD cContext, PVOID rgpvContext[], DWORD dwFlags, + PCERT_REVOCATION_PARA pRevPara, PCERT_REVOCATION_STATUS pRevStatus) +{ + DWORD error = 0, i; + BOOL ret; + + TRACE("(%08x, %d, %d, %p, %08x, %p, %p)\n", dwEncodingType, dwRevType, + cContext, rgpvContext, dwFlags, pRevPara, pRevStatus); + + if (pRevStatus->cbSize != sizeof(OLD_CERT_REVOCATION_STATUS) && + pRevStatus->cbSize != sizeof(CERT_REVOCATION_STATUS)) + { + SetLastError(E_INVALIDARG); + return FALSE; + } + memset(&pRevStatus->dwIndex, 0, pRevStatus->cbSize - sizeof(DWORD)); + if (dwRevType != CERT_CONTEXT_REVOCATION_TYPE) + { + error = CRYPT_E_NO_REVOCATION_CHECK; + ret = FALSE; + } + else + { + ret = TRUE; + for (i = 0; ret && i < cContext; i++) + { + DWORD cbUrlArray; + + ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, + rgpvContext[i], 0, NULL, &cbUrlArray, NULL, NULL, NULL); + if (!ret && GetLastError() == CRYPT_E_NOT_FOUND) + { + error = CRYPT_E_NO_REVOCATION_CHECK; + pRevStatus->dwIndex = i; + } + else if (ret) + { + CRYPT_URL_ARRAY *urlArray = CryptMemAlloc(cbUrlArray); + + if (urlArray) + { + DWORD j, retrievalFlags = 0, startTime, endTime, timeout; + + ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, + rgpvContext[i], 0, urlArray, &cbUrlArray, NULL, NULL, + NULL); + if (dwFlags & CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION) + retrievalFlags |= CRYPT_CACHE_ONLY_RETRIEVAL; + if (dwFlags & CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG && + pRevPara->cbSize >= offsetof(CERT_REVOCATION_PARA, + dwUrlRetrievalTimeout) + sizeof(DWORD)) + { + startTime = GetTickCount(); + endTime = startTime + pRevPara->dwUrlRetrievalTimeout; + timeout = pRevPara->dwUrlRetrievalTimeout; + } + else + endTime = timeout = 0; + for (j = 0; ret && j < urlArray->cUrl; j++) + { + PCCRL_CONTEXT crl; + + ret = CryptRetrieveObjectByUrlW(urlArray->rgwszUrl[j], + CONTEXT_OID_CRL, retrievalFlags, timeout, + (void **)&crl, NULL, NULL, NULL, NULL); + if (ret) + { + PCRL_ENTRY entry = NULL; + + CertFindCertificateInCRL( + (PCCERT_CONTEXT)rgpvContext[i], crl, 0, NULL, + &entry); + if (entry) + { + error = CRYPT_E_REVOKED; + pRevStatus->dwIndex = i; + ret = FALSE; + } + else if (timeout) + { + DWORD time = GetTickCount(); + + if ((int)(endTime - time) <= 0) + { + error = ERROR_TIMEOUT; + pRevStatus->dwIndex = i; + ret = FALSE; + } + else + timeout = endTime - time; + } + CertFreeCRLContext(crl); + } + else + error = CRYPT_E_REVOCATION_OFFLINE; + } + CryptMemFree(urlArray); + } + else + { + error = ERROR_OUTOFMEMORY; + pRevStatus->dwIndex = i; + ret = FALSE; + } + } + else + pRevStatus->dwIndex = i; + } + } + + if (!ret) + { + SetLastError(error); + pRevStatus->dwError = error; + } + TRACE("returning %d (%08x)\n", ret, error); + return ret; +}
17 years
1
0
0
0
[winesync] 30863: Autosyncing with Wine HEAD
by winesync@svn.reactos.org
Author: winesync Date: Thu Nov 29 13:27:59 2007 New Revision: 30863 URL:
http://svn.reactos.org/svn/reactos?rev=30863&view=rev
Log: Autosyncing with Wine HEAD Modified: trunk/reactos/dll/win32/cryptdll/cryptdll.rbuild Modified: trunk/reactos/dll/win32/cryptdll/cryptdll.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptdll/cryptdl…
============================================================================== --- trunk/reactos/dll/win32/cryptdll/cryptdll.rbuild (original) +++ trunk/reactos/dll/win32/cryptdll/cryptdll.rbuild Thu Nov 29 13:27:59 2007 @@ -1,13 +1,12 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="cryptdll" type="win32dll" baseaddress="${BASEADDRESS_CRYPTDLL}" installbase="system32" installname="cryptdll.dll" allowwarnings="true"> <importlibrary definition="cryptdll.spec.def" /> <include base="cryptdll">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="__REACTOS__" /> <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> + <define name="WINVER">0x600</define> + <define name="_WIN32_WINNT">0x600</define> <library>wine</library> <library>advapi32</library> <library>kernel32</library>
17 years
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
89
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
Results per page:
10
25
50
100
200