winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1099 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Move some of registration process to IRegistrar mechanism.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: eda1787b3cbb4aa4f52bc80a0df4e91f1a19d3d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eda1787b3cbb4aa4f52bc80a0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Dec 15 19:33:17 2010 +0100 jscript: Move some of registration process to IRegistrar mechanism. --- .gitignore | 1 + dlls/jscript/Makefile.in | 2 + dlls/jscript/jscript.inf | 18 ---------------- dlls/jscript/jscript_classes.idl | 41 ++++++++++++++++++++++++++++++++++++++ dlls/jscript/jscript_main.c | 23 ++++++++++++++------ 5 files changed, 60 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 0f96790..16370d3 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ dlls/dispex/disp_ex_p.c dlls/dxdiagn/fil_data.h dlls/gameux/gameux_tlb.tlb dlls/infosoft/infosoft.h +dlls/jscript/jscript_classes.h dlls/jscript/jsglobal.tlb dlls/jscript/parser.tab.c dlls/jscript/parser.tab.h diff --git a/dlls/jscript/Makefile.in b/dlls/jscript/Makefile.in index 24f5fdb..5819753 100644 --- a/dlls/jscript/Makefile.in +++ b/dlls/jscript/Makefile.in @@ -46,6 +46,8 @@ C_SRCS = \ vbarray.c IDL_TLB_SRCS = jsglobal.idl +IDL_R_SRCS = jscript_classes.idl +IDL_H_SRCS = jscript_classes.idl BISON_SRCS = \ parser.y diff --git a/dlls/jscript/jscript.inf b/dlls/jscript/jscript.inf index d6a6f8c..c8f0105 100644 --- a/dlls/jscript/jscript.inf +++ b/dlls/jscript/jscript.inf @@ -11,29 +11,17 @@ DelReg=Classes.Reg, FileType.Reg [Classes.Reg] -HKCR,"CLSID\%CLSID_JScript%",,,"JScript Language" HKCR,"CLSID\%CLSID_JScript%\Implemented Categories\%CATID_ActiveScript%",,16 HKCR,"CLSID\%CLSID_JScript%\Implemented Categories\%CATID_ActiveScriptParse%",,16 -HKCR,"CLSID\%CLSID_JScript%\InprocServer32",,,"%MODULE%" -HKCR,"CLSID\%CLSID_JScript%\InprocServer32","ThreadingModel",,"Both" HKCR,"CLSID\%CLSID_JScript%\OLEScript",,16 -HKCR,"CLSID\%CLSID_JScript%\ProgID",,,"JScript" -HKCR,"CLSID\%CLSID_JScriptAuthor%",,,"JScript Language Authoring" HKCR,"CLSID\%CLSID_JScriptAuthor%\Implemented Categories\%CATID_ActiveScriptAuthor%",,16 -HKCR,"CLSID\%CLSID_JScriptAuthor%\InprocServer32",,,"%MODULE%" -HKCR,"CLSID\%CLSID_JScriptAuthor%\InprocServer32","ThreadingModel",,"Both" HKCR,"CLSID\%CLSID_JScriptAuthor%\OLEScript",,16 -HKCR,"CLSID\%CLSID_JScriptAuthor%\ProgID",,,"JScript Author" -HKCR,"CLSID\%CLSID_JScriptEncode%",,,"JScript Language Encoding" HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScript%",,16 HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScriptParse%",,16 HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScriptEncode%",,16 -HKCR,"CLSID\%CLSID_JScriptEncode%\InprocServer32",,,"%MODULE%" -HKCR,"CLSID\%CLSID_JScriptEncode%\InprocServer32","ThreadingModel",,"Both" HKCR,"CLSID\%CLSID_JScriptEncode%\OLEScript",,16 -HKCR,"CLSID\%CLSID_JScriptEncode%\ProgID",,,"JScript.Encode" HKCR,"Component Categories\%CATID_ActiveScriptAuthor%","409",,"Active Scripting Engine with Authoring" HKCR,"Component Categories\%CATID_ActiveScript%","409",,"Active Scripting Engine" @@ -48,8 +36,6 @@ HKCR,"JavaScript",,,"JScript Language" HKCR,"JavaScript\CLSID",,,"%CLSID_JScript%" HKCR,"JavaScript\OLEScript",,16 -HKCR,"JavaScript Author",,,"JScript Language Authoring" -HKCR,"JavaScript Author\CLSID",,,"%CLSID_JScriptAuthor%" HKCR,"JavaScript Author\OLEScript",,16 HKCR,"JavaScript1.1",,,"JScript Language" @@ -72,16 +58,12 @@ HKCR,"JavaScript1.3",,,"JScript Language" HKCR,"JavaScript1.3\CLSID",,,"%CLSID_JScript%" HKCR,"JavaScript1.3\OLEScript",,16 -HKCR,"JScript",,,"JScript Language" -HKCR,"JScript\CLSID",,,"%CLSID_JScript%" HKCR,"JScript\OLEScript",,16 HKCR,"JScript Author",,,"JScript Language Authoring" HKCR,"JScript Author\CLSID",,,"%CLSID_JScriptAuthor%" HKCR,"JScript Author\OLEScript",,16 -HKCR,"JScript.Encode",,,"JScript Language Encoding" -HKCR,"JScript.Encode\CLSID",,,"%CLSID_JScriptEncode%" HKCR,"JScript.Encode\OLEScript",,16 HKCR,"LiveScript",,,"JScript Language" diff --git a/dlls/jscript/jscript_classes.idl b/dlls/jscript/jscript_classes.idl new file mode 100644 index 0000000..d9f481e --- /dev/null +++ b/dlls/jscript/jscript_classes.idl @@ -0,0 +1,41 @@ +/* + * Copyright 2010 Jacek Caban for CodeWeavers + * + * 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 + */ + +[ + helpstring("JScript Language"), + threading(both), + progid("JScript"), + uuid(f414c260-6ac0-11cf-b6d1-00aa00bbbb58) +] +coclass JScript {} + +[ + helpstring("JScript Language Authoring"), + threading(both), + progid("JScript Author"), + uuid(f414c261-6ac0-11cf-b6d1-00aa00bbbb58) +] +coclass JScriptAuthor {} + +[ + helpstring("JScript Language Encoding"), + threading(both), + progid("JScript.Encode"), + uuid(f414c262-6ac0-11cf-b6d1-00aa00bbbb58) +] +coclass JScriptEncode {} diff --git a/dlls/jscript/jscript_main.c b/dlls/jscript/jscript_main.c index 78f8f00..3f5b7de 100644 --- a/dlls/jscript/jscript_main.c +++ b/dlls/jscript/jscript_main.c @@ -25,6 +25,8 @@ #include "activaut.h" #include "objsafe.h" #include "mshtmhst.h" +#include "rpcproxy.h" +#include "jscript_classes.h" #include "wine/debug.h" @@ -32,13 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript); LONG module_ref = 0; -static const CLSID CLSID_JScript = - {0xf414c260,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}}; -static const CLSID CLSID_JScriptAuthor = - {0xf414c261,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}}; -static const CLSID CLSID_JScriptEncode = - {0xf414c262,0x6ac0,0x11cf,{0xb6,0xd1,0x00,0xaa,0x00,0xbb,0xbb,0x58}}; - DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); HINSTANCE jscript_hinstance; @@ -204,7 +199,14 @@ static HRESULT register_inf(BOOL doregister) */ HRESULT WINAPI DllRegisterServer(void) { + HRESULT hres; + TRACE("()\n"); + + hres = __wine_register_resources(jscript_hinstance, NULL); + if(FAILED(hres)) + return hres; + return register_inf(TRUE); } @@ -213,6 +215,13 @@ HRESULT WINAPI DllRegisterServer(void) */ HRESULT WINAPI DllUnregisterServer(void) { + HRESULT hres; + TRACE("()\n"); + + hres = __wine_unregister_resources(jscript_hinstance, NULL); + if(FAILED(hres)) + return hres; + return register_inf(FALSE); }
1
0
0
0
Jacek Caban : mshtml: Removed undocumented, internal stubs exported only by old IEs.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 11b310b50127f8505d9da652e8df5751fafb2b29 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11b310b50127f8505d9da652e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Dec 15 18:37:41 2010 +0100 mshtml: Removed undocumented, internal stubs exported only by old IEs. --- dlls/mshtml/mshtml.spec | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/dlls/mshtml/mshtml.spec b/dlls/mshtml/mshtml.spec index 81f9f0e..8fd737a 100644 --- a/dlls/mshtml/mshtml.spec +++ b/dlls/mshtml/mshtml.spec @@ -12,13 +12,6 @@ @ stdcall ShowHTMLDialog(ptr ptr ptr wstr ptr) @ stub ShowModalDialog @ stub ShowModelessHTMLDialog -@ stub SvrTri_ClearCache -@ stub SvrTri_GetDLText -@ stub SvrTri_NormalizeUA -@ stub com_ms_osp_ospmrshl_classInit -@ stub com_ms_osp_ospmrshl_copyToExternal -@ stub com_ms_osp_ospmrshl_releaseByValExternal -@ stub com_ms_osp_ospmrshl_toJava #Wine extension for Mozilla plugin support @ stdcall NP_GetEntryPoints(ptr)
1
0
0
0
Alexander Morozov : crypt32: Implement getting content and some parameters from a decoded enveloped message .
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: f44ae748c0015c144f6a08702cda9b5f3b2bed8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f44ae748c0015c144f6a08702…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Wed Dec 15 17:51:37 2010 +0300 crypt32: Implement getting content and some parameters from a decoded enveloped message. --- dlls/crypt32/msg.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/crypt32/tests/msg.c | 15 -------- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index d85d2a0..b083d26 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -2881,6 +2881,89 @@ static BOOL CRYPT_CopySignerCertInfo(void *pvData, DWORD *pcbData, return ret; } +static BOOL CRYPT_CopyRecipientInfo(void *pvData, DWORD *pcbData, + const CERT_ISSUER_SERIAL_NUMBER *in) +{ + DWORD size = sizeof(CERT_INFO); + BOOL ret; + + TRACE("(%p, %d, %p)\n", pvData, pvData ? *pcbData : 0, in); + + size += in->SerialNumber.cbData; + size += in->Issuer.cbData; + if (!pvData) + { + *pcbData = size; + ret = TRUE; + } + else if (*pcbData < size) + { + *pcbData = size; + SetLastError(ERROR_MORE_DATA); + ret = FALSE; + } + else + { + LPBYTE nextData = (BYTE *)pvData + sizeof(CERT_INFO); + CERT_INFO *out = pvData; + + CRYPT_CopyBlob(&out->SerialNumber, &in->SerialNumber, &nextData); + CRYPT_CopyBlob(&out->Issuer, &in->Issuer, &nextData); + ret = TRUE; + } + TRACE("returning %d\n", ret); + return ret; +} + +static BOOL CDecodeEnvelopedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType, + DWORD dwIndex, void *pvData, DWORD *pcbData) +{ + BOOL ret = FALSE; + + switch (dwParamType) + { + case CMSG_TYPE_PARAM: + ret = CRYPT_CopyParam(pvData, pcbData, &msg->type, sizeof(msg->type)); + break; + case CMSG_CONTENT_PARAM: + if (msg->u.enveloped_data.data) + ret = CRYPT_CopyParam(pvData, pcbData, + msg->u.enveloped_data.content.pbData, + msg->u.enveloped_data.content.cbData); + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + case CMSG_RECIPIENT_COUNT_PARAM: + if (msg->u.enveloped_data.data) + ret = CRYPT_CopyParam(pvData, pcbData, + &msg->u.enveloped_data.data->cRecipientInfo, sizeof(DWORD)); + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + case CMSG_RECIPIENT_INFO_PARAM: + if (msg->u.enveloped_data.data) + { + if (dwIndex < msg->u.enveloped_data.data->cRecipientInfo) + { + PCMSG_KEY_TRANS_RECIPIENT_INFO recipientInfo = + &msg->u.enveloped_data.data->rgRecipientInfo[dwIndex]; + + ret = CRYPT_CopyRecipientInfo(pvData, pcbData, + &recipientInfo->RecipientId.u.IssuerSerialNumber); + } + else + SetLastError(CRYPT_E_INVALID_INDEX); + } + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + default: + FIXME("unimplemented for %d\n", dwParamType); + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + } + return ret; +} + static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType, DWORD dwIndex, void *pvData, DWORD *pcbData) { @@ -3073,6 +3156,10 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, ret = CDecodeHashMsg_GetParam(msg, dwParamType, dwIndex, pvData, pcbData); break; + case CMSG_ENVELOPED: + ret = CDecodeEnvelopedMsg_GetParam(msg, dwParamType, dwIndex, pvData, + pcbData); + break; case CMSG_SIGNED: ret = CDecodeSignedMsg_GetParam(msg, dwParamType, dwIndex, pvData, pcbData); diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index 20ad5c9..77b468c 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -3057,7 +3057,6 @@ static void test_decode_msg_get_param(void) NULL); CryptMsgUpdate(msg, envelopedEmptyBareContent, sizeof(envelopedEmptyBareContent), TRUE); - todo_wine check_param("enveloped empty bare content", msg, CMSG_CONTENT_PARAM, NULL, 0); CryptMsgClose(msg); @@ -3065,7 +3064,6 @@ static void test_decode_msg_get_param(void) msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); CryptMsgUpdate(msg, envelopedEmptyContent, sizeof(envelopedEmptyContent), TRUE); - todo_wine check_param("enveloped empty content", msg, CMSG_CONTENT_PARAM, NULL, 0); CryptMsgClose(msg); @@ -3080,7 +3078,6 @@ static void test_decode_msg_get_param(void) msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); CryptMsgUpdate(msg, envelopedMessage, sizeof(envelopedMessage), TRUE); - todo_wine check_param("enveloped message before decrypting", msg, CMSG_CONTENT_PARAM, envelopedMessage + sizeof(envelopedMessage) - 4, 4); if (key) @@ -3094,7 +3091,6 @@ static void test_decode_msg_get_param(void) ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(!ret && GetLastError() == CRYPT_E_ALREADY_DECRYPTED, "expected CRYPT_E_ALREADY_DECRYPTED, got %08x\n", GetLastError()); - todo_wine check_param("enveloped message", msg, CMSG_CONTENT_PARAM, msgData, sizeof(msgData)); } @@ -3106,7 +3102,6 @@ static void test_decode_msg_get_param(void) NULL); CryptMsgUpdate(msg, envelopedBareMessage, sizeof(envelopedBareMessage), TRUE); - todo_wine check_param("enveloped bare message before decrypting", msg, CMSG_CONTENT_PARAM, envelopedBareMessage + sizeof(envelopedBareMessage) - 4, 4); @@ -3116,7 +3111,6 @@ static void test_decode_msg_get_param(void) SetLastError(0xdeadbeef); ret = CryptMsgControl(msg, 0, CMSG_CTRL_DECRYPT, &decryptPara); ok(ret, "CryptMsgControl failed: %08x\n", GetLastError()); - todo_wine check_param("enveloped bare message", msg, CMSG_CONTENT_PARAM, msgData, sizeof(msgData)); } @@ -3132,21 +3126,17 @@ static void test_decode_msg_get_param(void) CryptMsgUpdate(msg, envelopedMessageWith3Recps, sizeof(envelopedMessageWith3Recps), TRUE); value = 3; - todo_wine check_param("recipient count", msg, CMSG_RECIPIENT_COUNT_PARAM, (const BYTE *)&value, sizeof(value)); size = 0; SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_RECIPIENT_INFO_PARAM, 3, NULL, &size); - todo_wine ok(!ret && GetLastError() == CRYPT_E_INVALID_INDEX, "expected CRYPT_E_INVALID_INDEX, got %08x\n", GetLastError()); size = 0; SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_RECIPIENT_INFO_PARAM, 2, NULL, &size); - todo_wine ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - todo_wine ok(size >= 142, "unexpected size: %u\n", size); if (ret) buf = CryptMemAlloc(size); @@ -3158,18 +3148,13 @@ static void test_decode_msg_get_param(void) SetLastError(0xdeadbeef); ret = CryptMsgGetParam(msg, CMSG_RECIPIENT_INFO_PARAM, 2, buf, &size); - todo_wine ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); - todo_wine ok(certInfo->SerialNumber.cbData == sizeof(serialNumber), "unexpected serial number size: %u\n", certInfo->SerialNumber.cbData); - todo_wine ok(!memcmp(certInfo->SerialNumber.pbData, serialNumber, sizeof(serialNumber)), "unexpected serial number\n"); - todo_wine ok(certInfo->Issuer.cbData == sizeof(issuer), "unexpected issuer size: %u\n", certInfo->Issuer.cbData); - todo_wine ok(!memcmp(certInfo->Issuer.pbData, issuer, sizeof(issuer)), "unexpected issuer\n"); CryptMemFree(buf);
1
0
0
0
Alexander Morozov : crypt32: Implement decoding enveloped messages.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: dd75ab38c640e0be5a513f3051b0bdaccc7cc668 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd75ab38c640e0be5a513f305…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Wed Dec 15 17:35:29 2010 +0300 crypt32: Implement decoding enveloped messages. --- dlls/crypt32/crypt32_private.h | 4 + dlls/crypt32/decode.c | 118 +++++++++++++++++++++++++++ dlls/crypt32/msg.c | 174 +++++++++++++++++++++++++++++++++++++++- dlls/crypt32/tests/msg.c | 7 -- 4 files changed, 292 insertions(+), 11 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=dd75ab38c640e0be5a513…
1
0
0
0
Alexander Morozov : wincrypt.h: Define PFN_CMSG_IMPORT_KEY_TRANS callback function.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 60be01f16d142fd88371cb3e45eca50b6d50b81f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60be01f16d142fd88371cb3e4…
Author: Alexander Morozov <amorozov(a)etersoft.ru> Date: Wed Dec 15 16:40:01 2010 +0300 wincrypt.h: Define PFN_CMSG_IMPORT_KEY_TRANS callback function. --- include/wincrypt.h | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/include/wincrypt.h b/include/wincrypt.h index 7d5a87c..8834561 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -2281,6 +2281,7 @@ static const WCHAR CERT_TRUST_PUB_AUTHENTICODE_FLAGS_VALUE_NAME[] = #define TIME_VALID_OID_GET_OBJECT_FUNC "TimeValidDllGetObject" #define CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC "CryptMsgDllGenContentEncryptKey" #define CMSG_OID_EXPORT_KEY_TRANS_FUNC "CryptMsgDllExportKeyTrans" +#define CMSG_OID_IMPORT_KEY_TRANS_FUNC "CryptMsgDllImportKeyTrans" #define CRYPT_OID_REGPATH "Software\\Microsoft\\Cryptography\\OID" #define CRYPT_OID_REG_ENCODING_TYPE_PREFIX "EncodingType " @@ -3805,6 +3806,14 @@ typedef struct _CMSG_KEY_TRANS_ENCRYPT_INFO { DWORD dwFlags; } CMSG_KEY_TRANS_ENCRYPT_INFO, *PCMSG_KEY_TRANS_ENCRYPT_INFO; +typedef struct _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA { + DWORD cbSize; + HCRYPTPROV hCryptProv; + DWORD dwKeySpec; + PCMSG_KEY_TRANS_RECIPIENT_INFO pKeyTrans; + DWORD dwRecipientIndex; +} CMSG_CTRL_KEY_TRANS_DECRYPT_PARA, *PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA; + typedef BOOL (WINAPI *PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY)( PCMSG_CONTENT_ENCRYPT_INFO pContentEncryptInfo, DWORD dwFlags, void *pvReserved); @@ -3815,6 +3824,11 @@ typedef BOOL (WINAPI *PFN_CMSG_EXPORT_KEY_TRANS)( PCMSG_KEY_TRANS_ENCRYPT_INFO pKeyTransEncryptInfo, DWORD dwFlags, void *pvReserved); +typedef BOOL (WINAPI *PFN_CMSG_IMPORT_KEY_TRANS)( + PCRYPT_ALGORITHM_IDENTIFIER pContentEncryptionAlgorithm, + PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA pKeyTransDecryptPara, DWORD dwFlags, + void *pvReserved, HCRYPTKEY *phContentEncryptKey); + /* CryptMsgGetAndVerifySigner flags */ #define CMSG_TRUSTED_SIGNER_FLAG 0x1 #define CMSG_SIGNER_ONLY_FLAG 0x2
1
0
0
0
Alexandre Julliard : ntdll: Don't worry about the DOS area on non-x86.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: e39c6d0474eebea464b37dfdc557b703282129a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e39c6d0474eebea464b37dfdc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Dec 16 10:25:14 2010 +0100 ntdll: Don't worry about the DOS area on non-x86. --- dlls/ntdll/virtual.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 6f8b9a3..3ce0884 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -122,6 +122,7 @@ static RTL_CRITICAL_SECTION csVirtual = { &critsect_debug, -1, 0, 0, 0, 0 }; static void *address_space_limit = (void *)0xc0000000; /* top of the total available address space */ static void *user_space_limit = (void *)0x7fff0000; /* top of the user address space */ static void *working_set_limit = (void *)0x7fff0000; /* top of the current working set */ +static void *address_space_start = (void *)0x110000; /* keep DOS area clear */ #elif defined(__x86_64__) # define page_mask 0xfff # define page_shift 12 @@ -129,6 +130,7 @@ static void *working_set_limit = (void *)0x7fff0000; /* top of the current wo static void *address_space_limit = (void *)0x7fffffff0000; static void *user_space_limit = (void *)0x7fffffff0000; static void *working_set_limit = (void *)0x7fffffff0000; +static void *address_space_start = (void *)0x10000; #else static UINT page_shift; static UINT_PTR page_size; @@ -136,8 +138,8 @@ static UINT_PTR page_mask; static void *address_space_limit; static void *user_space_limit; static void *working_set_limit; +static void *address_space_start = (void *)0x10000; #endif /* __i386__ */ -static void * const address_space_start = (void *)0x110000; #define ROUND_ADDR(addr,mask) \ ((void *)((UINT_PTR)(addr) & ~(UINT_PTR)(mask))) @@ -1071,7 +1073,7 @@ static NTSTATUS map_image( HANDLE hmapping, int fd, char *base, SIZE_T total_siz server_enter_uninterrupted_section( &csVirtual, &sigset ); - if (base >= (char *)0x110000) /* make sure the DOS area remains free */ + if (base >= (char *)address_space_start) /* make sure the DOS area remains free */ status = map_view( &view, base, total_size, mask, FALSE, VPROT_COMMITTED | VPROT_READ | VPROT_EXEC | VPROT_WRITECOPY | VPROT_IMAGE ); @@ -1367,6 +1369,7 @@ void virtual_init(void) { const char *preload; void *heap_base; + size_t size; struct file_view *heap_view; #ifndef page_mask @@ -1397,9 +1400,10 @@ void virtual_init(void) VIRTUAL_HEAP_SIZE, NULL, NULL ); create_view( &heap_view, heap_base, VIRTUAL_HEAP_SIZE, VPROT_COMMITTED | VPROT_READ | VPROT_WRITE ); - /* make the DOS area accessible to hide bugs in broken apps like Excel 2003 */ - if (wine_mmap_is_in_reserved_area( (void *)0x10000, 0x100000 ) == 1) - wine_anon_mmap( (void *)0x10000, 0x100000, PROT_READ | PROT_WRITE, MAP_FIXED ); + /* make the DOS area accessible (except the low 64K) to hide bugs in broken apps like Excel 2003 */ + size = (char *)address_space_start - (char *)0x10000; + if (size && wine_mmap_is_in_reserved_area( (void*)0x10000, size ) == 1) + wine_anon_mmap( (void *)0x10000, size, PROT_READ | PROT_WRITE, MAP_FIXED ); }
1
0
0
0
Alexandre Julliard : winecfg: Set Wow64 registry keys as well as the 64-bit ones for version information .
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: d15d52ddab95d246cf20f4fbc0f1674d1b777b83 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d15d52ddab95d246cf20f4fbc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 15 22:30:18 2010 +0100 winecfg: Set Wow64 registry keys as well as the 64-bit ones for version information. --- programs/winecfg/winecfg.c | 62 ++++++++++++++++++++++++++----------------- 1 files changed, 37 insertions(+), 25 deletions(-) diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c index 1abf8ed..c41d2ba 100644 --- a/programs/winecfg/winecfg.c +++ b/programs/winecfg/winecfg.c @@ -34,6 +34,7 @@ #include <limits.h> #include <windows.h> #include <winreg.h> +#include <wine/unicode.h> #include <wine/debug.h> #include <wine/list.h> @@ -42,6 +43,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg); #include "winecfg.h" #include "resource.h" +static const int is_win64 = (sizeof(void *) > sizeof(int)); + HKEY config_key = NULL; HMENU hPopupMenus = 0; @@ -159,7 +162,8 @@ end: * * If valueName or value is NULL, an empty section will be created */ -static int set_config_key(HKEY root, const WCHAR *subkey, const WCHAR *name, const void *value, DWORD type) { +static int set_config_key(HKEY root, const WCHAR *subkey, REGSAM access, const WCHAR *name, const void *value, DWORD type) +{ DWORD res = 1; HKEY key = NULL; @@ -170,7 +174,8 @@ static int set_config_key(HKEY root, const WCHAR *subkey, const WCHAR *name, con if (subkey[0]) { - res = RegCreateKeyW(root, subkey, &key); + res = RegCreateKeyExW( root, subkey, 0, NULL, REG_OPTION_NON_VOLATILE, + access, NULL, &key, NULL ); if (res != ERROR_SUCCESS) goto end; } else key = root; @@ -192,25 +197,6 @@ end: return res; } -/* removes the requested value from the registry, however, does not - * remove the section if empty. Returns S_OK (0) on success. - */ -static HRESULT remove_value(HKEY root, const WCHAR *subkey, const WCHAR *name) -{ - HRESULT hr; - HKEY key; - - WINE_TRACE("subkey=%s, name=%s\n", wine_dbgstr_w(subkey), wine_dbgstr_w(name)); - - hr = RegOpenKeyW(root, subkey, &key); - if (hr != S_OK) return hr; - - hr = RegDeleteValueW(key, name); - if (hr != ERROR_SUCCESS) return hr; - - return S_OK; -} - /* ========================================================================= */ /* This code exists for the following reasons: @@ -635,17 +621,43 @@ BOOL reg_key_exists(HKEY root, const char *path, const char *name) static void process_setting(struct setting *s) { + static const WCHAR softwareW[] = {'S','o','f','t','w','a','r','e','\\'}; + HKEY key; + BOOL needs_wow64 = (is_win64 && s->root == HKEY_LOCAL_MACHINE && s->path && + !strncmpiW( s->path, softwareW, sizeof(softwareW)/sizeof(WCHAR) )); + if (s->value) { WINE_TRACE("Setting %s:%s to '%s'\n", wine_dbgstr_w(s->path), wine_dbgstr_w(s->name), wine_dbgstr_w(s->value)); - set_config_key(s->root, s->path, s->name, s->value, s->type); + set_config_key(s->root, s->path, MAXIMUM_ALLOWED, s->name, s->value, s->type); + if (needs_wow64) + { + WINE_TRACE("Setting 32-bit %s:%s to '%s'\n", wine_dbgstr_w(s->path), + wine_dbgstr_w(s->name), wine_dbgstr_w(s->value)); + set_config_key(s->root, s->path, MAXIMUM_ALLOWED | KEY_WOW64_32KEY, s->name, s->value, s->type); + } } else { - /* NULL name means remove that path/section entirely */ - if (s->path && s->name) remove_value(s->root, s->path, s->name); - else if (s->path && !s->name) RegDeleteTreeW(s->root, s->path); + WINE_TRACE("Removing %s:%s\n", wine_dbgstr_w(s->path), wine_dbgstr_w(s->name)); + if (!RegOpenKeyW( s->root, s->path, &key )) + { + /* NULL name means remove that path/section entirely */ + if (s->name) RegDeleteValueW( key, s->name ); + else RegDeleteTreeW( key, NULL ); + RegCloseKey( key ); + } + if (needs_wow64) + { + WINE_TRACE("Removing 32-bit %s:%s\n", wine_dbgstr_w(s->path), wine_dbgstr_w(s->name)); + if (!RegOpenKeyExW( s->root, s->path, 0, MAXIMUM_ALLOWED | KEY_WOW64_32KEY, &key )) + { + if (s->name) RegDeleteValueW( key, s->name ); + else RegDeleteTreeW( key, NULL ); + RegCloseKey( key ); + } + } } }
1
0
0
0
Alexandre Julliard : winecfg: Relaunch the 64-bit version of winecfg on Wow64.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: fb929be9a423d47683d49d1ba63c14ff57679a60 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fb929be9a423d47683d49d1ba…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 15 22:29:49 2010 +0100 winecfg: Relaunch the 64-bit version of winecfg on Wow64. --- programs/winecfg/main.c | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/programs/winecfg/main.c b/programs/winecfg/main.c index fdefefb..7376309 100644 --- a/programs/winecfg/main.c +++ b/programs/winecfg/main.c @@ -214,6 +214,32 @@ ProcessCmdLine(LPSTR lpCmdLine) int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow) { + BOOL is_wow64; + + if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64) + { + STARTUPINFOW si; + PROCESS_INFORMATION pi; + WCHAR filename[MAX_PATH]; + void *redir; + DWORD exit_code; + + memset( &si, 0, sizeof(si) ); + si.cb = sizeof(si); + GetModuleFileNameW( 0, filename, MAX_PATH ); + + Wow64DisableWow64FsRedirection( &redir ); + if (CreateProcessW( filename, GetCommandLineW(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi )) + { + WINE_TRACE( "restarting %s\n", wine_dbgstr_w(filename) ); + WaitForSingleObject( pi.hProcess, INFINITE ); + GetExitCodeProcess( pi.hProcess, &exit_code ); + ExitProcess( exit_code ); + } + else WINE_ERR( "failed to restart 64-bit %s, err %d\n", wine_dbgstr_w(filename), GetLastError() ); + Wow64RevertWow64FsRedirection( redir ); + } + if (ProcessCmdLine(szCmdLine)) { return 0; }
1
0
0
0
Alexandre Julliard : wineboot: Relaunch the 64-bit version of wineboot on Wow64.
by Alexandre Julliard
17 Dec '10
17 Dec '10
Module: wine Branch: master Commit: 9b3483899225a0232b6ebc22597a1d1d836ab7dd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b3483899225a0232b6ebc225…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 15 22:29:25 2010 +0100 wineboot: Relaunch the 64-bit version of wineboot on Wow64. --- programs/wineboot/wineboot.c | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 804528f..28292ad 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -1133,11 +1133,36 @@ int main( int argc, char *argv[] ) int end_session = 0, force = 0, init = 0, kill = 0, restart = 0, shutdown = 0, update = 0; HANDLE event; SECURITY_ATTRIBUTES sa; + BOOL is_wow64; GetWindowsDirectoryW( windowsdir, MAX_PATH ); if( !SetCurrentDirectoryW( windowsdir ) ) WINE_ERR("Cannot set the dir to %s (%d)\n", wine_dbgstr_w(windowsdir), GetLastError() ); + if (IsWow64Process( GetCurrentProcess(), &is_wow64 ) && is_wow64) + { + STARTUPINFOW si; + PROCESS_INFORMATION pi; + WCHAR filename[MAX_PATH]; + void *redir; + DWORD exit_code; + + memset( &si, 0, sizeof(si) ); + si.cb = sizeof(si); + GetModuleFileNameW( 0, filename, MAX_PATH ); + + Wow64DisableWow64FsRedirection( &redir ); + if (CreateProcessW( filename, GetCommandLineW(), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi )) + { + WINE_TRACE( "restarting %s\n", wine_dbgstr_w(filename) ); + WaitForSingleObject( pi.hProcess, INFINITE ); + GetExitCodeProcess( pi.hProcess, &exit_code ); + ExitProcess( exit_code ); + } + else WINE_ERR( "failed to restart 64-bit %s, err %d\n", wine_dbgstr_w(filename), GetLastError() ); + Wow64RevertWow64FsRedirection( redir ); + } + while ((optc = getopt_long(argc, argv, short_options, long_options, NULL )) != -1) { switch(optc)
1
0
0
0
Alexandre Julliard : explorer: Add support for displaying system tray notification balloons in desktop mode .
by Alexandre Julliard
15 Dec '10
15 Dec '10
Module: wine Branch: master Commit: ed3ac5f4d61d30291078b1cdba392d204ea44426 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed3ac5f4d61d30291078b1cdb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 15 17:16:52 2010 +0100 explorer: Add support for displaying system tray notification balloons in desktop mode. --- programs/explorer/systray.c | 132 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 122 insertions(+), 10 deletions(-) diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 1b55664..93793ab 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -87,9 +87,18 @@ static struct icon **displayed; /* array of currently displayed icons */ static BOOL hide_systray; static int icon_cx, icon_cy, tray_width; +static struct icon *balloon_icon; +static HWND balloon_window; + #define MIN_DISPLAYED 8 #define ICON_BORDER 2 +#define VALID_WIN_TIMER 1 +#define BALLOON_CREATE_TIMER 2 +#define BALLOON_SHOW_TIMER 3 + +#define VALID_WIN_TIMEOUT 2000 +#define BALLOON_CREATE_TIMEOUT 2000 #define BALLOON_SHOW_MIN_TIMEOUT 10000 #define BALLOON_SHOW_MAX_TIMEOUT 30000 @@ -116,14 +125,11 @@ static RECT get_icon_rect( struct icon *icon ) return rect; } -/* Creates tooltip window for icon. */ -static void create_tooltip(struct icon *icon) +static void init_common_controls(void) { - TTTOOLINFOW ti; - static BOOL tooltips_initialized = FALSE; + static BOOL initialized = FALSE; - /* Register tooltip classes if this is the first icon */ - if (!tooltips_initialized) + if (!initialized) { INITCOMMONCONTROLSEX init_tooltip; @@ -131,9 +137,16 @@ static void create_tooltip(struct icon *icon) init_tooltip.dwICC = ICC_TAB_CLASSES; InitCommonControlsEx(&init_tooltip); - tooltips_initialized = TRUE; + initialized = TRUE; } +} +/* Creates tooltip window for icon. */ +static void create_tooltip(struct icon *icon) +{ + TTTOOLINFOW ti; + + init_common_controls(); icon->tooltip = CreateWindowExW(WS_EX_TOPMOST, TOOLTIPS_CLASSW, NULL, WS_POPUP | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, @@ -148,6 +161,96 @@ static void create_tooltip(struct icon *icon) SendMessageW(icon->tooltip, TTM_ADDTOOLW, 0, (LPARAM)&ti); } +static void set_balloon_position( struct icon *icon ) +{ + RECT rect = get_icon_rect( icon ); + POINT pos; + + MapWindowPoints( tray_window, 0, (POINT *)&rect, 2 ); + pos.x = (rect.left + rect.right) / 2; + pos.y = (rect.top + rect.bottom) / 2; + SendMessageW( balloon_window, TTM_TRACKPOSITION, 0, MAKELONG( pos.x, pos.y )); +} + +static void balloon_create_timer(void) +{ + TTTOOLINFOW ti; + + init_common_controls(); + balloon_window = CreateWindowExW( WS_EX_TOPMOST, TOOLTIPS_CLASSW, NULL, + WS_POPUP | TTS_ALWAYSTIP | TTS_NOPREFIX | TTS_BALLOON | TTS_CLOSE, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + tray_window, NULL, NULL, NULL); + + memset( &ti, 0, sizeof(ti) ); + ti.cbSize = sizeof(TTTOOLINFOW); + ti.hwnd = tray_window; + ti.uFlags = TTF_TRACK; + ti.lpszText = balloon_icon->info_text; + SendMessageW( balloon_window, TTM_ADDTOOLW, 0, (LPARAM)&ti ); + if ((balloon_icon->info_flags & NIIF_ICONMASK) == NIIF_USER) + SendMessageW( balloon_window, TTM_SETTITLEW, (WPARAM)balloon_icon->info_icon, + (LPARAM)balloon_icon->info_title ); + else + SendMessageW( balloon_window, TTM_SETTITLEW, balloon_icon->info_flags, + (LPARAM)balloon_icon->info_title ); + set_balloon_position( balloon_icon ); + SendMessageW( balloon_window, TTM_TRACKACTIVATE, TRUE, (LPARAM)&ti ); + KillTimer( tray_window, BALLOON_CREATE_TIMER ); + SetTimer( tray_window, BALLOON_SHOW_TIMER, balloon_icon->info_timeout, NULL ); +} + +static BOOL show_balloon( struct icon *icon ) +{ + if (icon->display == -1) return FALSE; /* not displayed */ + if (!icon->info_text[0]) return FALSE; /* no balloon */ + balloon_icon = icon; + SetTimer( tray_window, BALLOON_CREATE_TIMER, BALLOON_CREATE_TIMEOUT, NULL ); + return TRUE; +} + +static void hide_balloon(void) +{ + if (!balloon_icon) return; + if (balloon_window) + { + KillTimer( tray_window, BALLOON_SHOW_TIMER ); + DestroyWindow( balloon_window ); + balloon_window = 0; + } + else KillTimer( tray_window, BALLOON_CREATE_TIMER ); + balloon_icon = NULL; +} + +static void show_next_balloon(void) +{ + struct icon *icon; + + LIST_FOR_EACH_ENTRY( icon, &icon_list, struct icon, entry ) + if (show_balloon( icon )) break; +} + +static void update_balloon( struct icon *icon ) +{ + if (balloon_icon == icon) + { + hide_balloon(); + show_balloon( icon ); + } + else if (!balloon_icon) + { + if (!show_balloon( icon )) return; + } + if (!balloon_icon) show_next_balloon(); +} + +static void balloon_timer(void) +{ + if (balloon_icon) balloon_icon->info_text[0] = 0; /* clear text now that balloon has been shown */ + hide_balloon(); + show_next_balloon(); +} + /* Synchronize tooltip text with tooltip window */ static void update_tooltip_text(struct icon *icon) { @@ -171,6 +274,7 @@ static void update_tooltip_position( struct icon *icon ) ti.hwnd = tray_window; if (icon->display != -1) ti.rect = get_icon_rect( icon ); SendMessageW( icon->tooltip, TTM_NEWTOOLRECTW, 0, (LPARAM)&ti ); + if (balloon_icon == icon) set_balloon_position( icon ); } /* find the icon located at a certain point in the tray window */ @@ -220,6 +324,7 @@ static BOOL show_icon(struct icon *icon) if (nb_displayed == 1 && !hide_systray) ShowWindow( tray_window, SW_SHOWNA ); create_tooltip(icon); + update_balloon( icon ); return TRUE; } @@ -245,6 +350,7 @@ static BOOL hide_icon(struct icon *icon) if (!nb_displayed) ShowWindow( tray_window, SW_HIDE ); + update_balloon( icon ); update_tooltip_position( icon ); return TRUE; } @@ -289,6 +395,7 @@ static BOOL modify_icon( struct icon *icon, NOTIFYICONDATAW *nid ) icon->info_flags = nid->dwInfoFlags; icon->info_timeout = max(min(nid->u.uTimeout, BALLOON_SHOW_MAX_TIMEOUT), BALLOON_SHOW_MIN_TIMEOUT); icon->info_icon = nid->hBalloonIcon; + update_balloon( icon ); } if (icon->state & NIS_HIDDEN) hide_icon( icon ); else show_icon( icon ); @@ -319,7 +426,7 @@ static BOOL add_icon(NOTIFYICONDATAW *nid) icon->owner = nid->hWnd; icon->display = -1; - if (list_empty( &icon_list )) SetTimer( tray_window, 1, 2000, NULL ); + if (list_empty( &icon_list )) SetTimer( tray_window, VALID_WIN_TIMER, VALID_WIN_TIMEOUT, NULL ); list_add_tail(&icon_list, &icon->entry); return modify_icon( icon, nid ); @@ -332,7 +439,7 @@ static BOOL delete_icon(struct icon *icon) list_remove(&icon->entry); DestroyIcon(icon->image); HeapFree(GetProcessHeap(), 0, icon); - if (list_empty( &icon_list )) KillTimer( tray_window, 1 ); + if (list_empty( &icon_list )) KillTimer( tray_window, VALID_WIN_TIMER ); return TRUE; } @@ -448,7 +555,12 @@ static LRESULT WINAPI tray_wndproc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l break; case WM_TIMER: - cleanup_destroyed_windows(); + switch (wparam) + { + case VALID_WIN_TIMER: cleanup_destroyed_windows(); break; + case BALLOON_CREATE_TIMER: balloon_create_timer(); break; + case BALLOON_SHOW_TIMER: balloon_timer(); break; + } break; case WM_PAINT:
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
110
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200