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
September 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
852 discussions
Start a n
N
ew thread
Luca Bennati : crypt32: Update Italian translation.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: 5687a1640798ada5459182cf347d92b15ec0260b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5687a1640798ada5459182cf3…
Author: Luca Bennati <lucak3(a)gmail.com> Date: Thu Sep 9 15:14:35 2010 +0200 crypt32: Update Italian translation. --- dlls/crypt32/crypt32_It.rc | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/crypt32_It.rc b/dlls/crypt32/crypt32_It.rc index 6ca2a15..5aa53f4 100644 --- a/dlls/crypt32/crypt32_It.rc +++ b/dlls/crypt32/crypt32_It.rc @@ -36,7 +36,7 @@ STRINGTABLE IDS_KEY_USAGE "Uso della chiave" IDS_CERT_POLICIES "Policy del certificato" IDS_SUBJECT_KEY_IDENTIFIER "Identificatore chiave soggetto" - IDS_CRL_REASON_CODE "Codice Motico CRL" + IDS_CRL_REASON_CODE "Codice Motivo CRL" IDS_CRL_DIST_POINTS "Punti Distribuzione CRL" IDS_ENHANCED_KEY_USAGE "Uso chiave avanzata" IDS_AUTHORITY_INFO_ACCESS "Accesso Informazioni Autorità" @@ -49,7 +49,7 @@ STRINGTABLE IDS_MESSAGE_DIGEST "Impronta Messaggio" IDS_SIGNING_TIME "Ora Firma" IDS_COUNTER_SIGN "Controfirma" - IDS_CHALLENGE_PASSWORD "Challenge Password" + IDS_CHALLENGE_PASSWORD "Domanda di sicurezza" IDS_UNSTRUCTURED_ADDRESS "Indirizzo non strutturato" IDS_SMIME_CAPABILITIES "Capacità SMIME" IDS_PREFER_SIGNED_DATA "Preferisci Dati Firmati" @@ -191,7 +191,7 @@ STRINGTABLE IDS_ALT_NAME_DIRECTORY_NAME "Indirizzo della cartella" IDS_ALT_NAME_URL "URL=" IDS_ALT_NAME_IP_ADDRESS "Indirizzo IP=" - IDS_ALT_NAME_MASK "Mask=" + IDS_ALT_NAME_MASK "Maschera=" IDS_ALT_NAME_REGISTERED_ID "ID registrato=" IDS_USAGE_UNKNOWN "Uso della Chiave Sconosciuto" IDS_SUBJECT_TYPE "Tipo Soggetto="
1
0
0
0
Austin English : ws2_32: Add a stub for WSANSPIoctl.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: 4ada99aa83c5fc84bb77c5b5b14a9fa0c220b6d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ada99aa83c5fc84bb77c5b5b…
Author: Austin English <austinenglish(a)gmail.com> Date: Thu Sep 9 11:32:56 2010 -0500 ws2_32: Add a stub for WSANSPIoctl. --- dlls/ws2_32/socket.c | 13 +++++++++++++ dlls/ws2_32/ws2_32.spec | 2 +- include/winsock2.h | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 82d157c..0335d41 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -6020,3 +6020,16 @@ INT WINAPI WSCWriteProviderOrder( LPDWORD entry, DWORD number ) FIXME("(%p 0x%08x) Stub!\n", entry, number); return 0; } + +/*********************************************************************** + * WSANSPIoctl (WS2_32.91) + */ +INT WINAPI WSANSPIoctl( HANDLE hLookup, DWORD dwControlCode, LPVOID lpvInBuffer, + DWORD cbInBuffer, LPVOID lpvOutBuffer, DWORD cbOutBuffer, + LPDWORD lpcbBytesReturned, LPWSACOMPLETION lpCompletion ) +{ + FIXME("(%p, 0x%08x, %p, 0x%08x, %p, 0x%08x, %p, %p) Stub!\n", hLookup, dwControlCode, + lpvInBuffer, cbInBuffer, lpvOutBuffer, cbOutBuffer, lpcbBytesReturned, lpCompletion); + WSASetLastError(WSA_NOT_ENOUGH_MEMORY); + return SOCKET_ERROR; +}; diff --git a/dlls/ws2_32/ws2_32.spec b/dlls/ws2_32/ws2_32.spec index a77c215..537e7f3 100644 --- a/dlls/ws2_32/ws2_32.spec +++ b/dlls/ws2_32/ws2_32.spec @@ -85,7 +85,7 @@ @ stdcall WSALookupServiceEnd(long) @ stdcall WSALookupServiceNextA(long long ptr ptr) @ stdcall WSALookupServiceNextW(long long ptr ptr) -@ stub WSANSPIoctl +@ stdcall WSANSPIoctl(ptr long ptr long ptr long ptr ptr) @ stdcall WSANtohl(long long ptr) @ stdcall WSANtohs(long long ptr) @ stdcall WSAProviderConfigChange(ptr ptr ptr) diff --git a/include/winsock2.h b/include/winsock2.h index 5d5bd60..c346473 100644 --- a/include/winsock2.h +++ b/include/winsock2.h @@ -506,6 +506,37 @@ DECL_WINELIB_TYPE_AW(WSANAMESPACE_INFO) DECL_WINELIB_TYPE_AW(PWSANAMESPACE_INFO) DECL_WINELIB_TYPE_AW(LPWSANAMESPACE_INFO) +typedef enum _WSACOMPLETIONTYPE { + NSP_NOTIFY_IMMEDIATELY = 0, + NSP_NOTIFY_HWND = 1, + NSP_NOTIFY_EVENT = 2, + NSP_NOTIFY_PORT = 3, + NSP_NOTIFY_APC = 4 +} WSACOMPLETIONTYPE, * PWSACOMPLETIONTYPE, * LPWSACOMPLETIONTYPE; + +typedef struct _WSACOMPLETION { + WSACOMPLETIONTYPE Type; + union { + struct { + HWND hWnd; + UINT uMsg; + WPARAM context; + } WindowMessage; + struct { + LPWSAOVERLAPPED lpOverlapped; + } Event; + struct { + LPWSAOVERLAPPED lpOverlapped; + LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc; + } Apc; + struct { + LPWSAOVERLAPPED lpOverlapped; + HANDLE hPort; + ULONG_PTR Key; + } Port; + } Parameters; +} WSACOMPLETION, *PWSACOMPLETION, *LPWSACOMPLETION; + /* * Winsock Function Typedefs * @@ -613,6 +644,7 @@ INT WINAPI WSALookupServiceEnd(HANDLE); INT WINAPI WSALookupServiceNextA(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA); INT WINAPI WSALookupServiceNextW(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW); #define WSALookupServiceNext WINELIB_NAME_AW(WSALookupServiceNext) +int WINAPI WSANSPIoctl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION); int WINAPI WSANtohl(SOCKET,ULONG,ULONG*); int WINAPI WSANtohs(SOCKET,WS(u_short),WS(u_short)*); INT WINAPI WSAProviderConfigChange(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE); @@ -685,6 +717,7 @@ typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEEND(HANDLE); typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTA)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA); typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW); #define LPFN_WSALOOKUPSERVICENEXT WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICENEXT) +typedef int (WINAPI *LPFN_WSANSPIoctl)(HANDLE, DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION); typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET,ULONG,ULONG*); typedef int (WINAPI *LPFN_WSANTOHS)(SOCKET,WS(u_short),WS(u_short)*); typedef INT (WINAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
1
0
0
0
Austin English : kernel32/tests: Typo fixes.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: 66e635adac8ae91c22c8c2180f6bf939e64c958e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66e635adac8ae91c22c8c2180…
Author: Austin English <austinenglish(a)gmail.com> Date: Thu Sep 9 11:21:30 2010 -0500 kernel32/tests: Typo fixes. --- dlls/kernel32/tests/time.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c index 5dd0d41..36dcbdf 100644 --- a/dlls/kernel32/tests/time.c +++ b/dlls/kernel32/tests/time.c @@ -437,8 +437,8 @@ static void test_TzSpecificLocalTimeToSystemTime(void) tzE.StandardBias=0; tzE.DaylightBias=-60; tzE.StandardDate.wMonth=10; - tzE.StandardDate.wDayOfWeek=0; /*sunday */ - tzE.StandardDate.wDay=5; /* last (sunday) of the month */ + tzE.StandardDate.wDayOfWeek=0; /* Sunday */ + tzE.StandardDate.wDay=5; /* last (Sunday) of the month */ tzE.StandardDate.wHour=3; tzE.DaylightDate.wMonth=3; tzE.DaylightDate.wDay=5; @@ -448,19 +448,19 @@ static void test_TzSpecificLocalTimeToSystemTime(void) tzW.StandardBias=0; tzW.DaylightBias=-60; tzW.StandardDate.wMonth=10; - tzW.StandardDate.wDayOfWeek=0; /*sunday */ - tzW.StandardDate.wDay=4; /* 4th (sunday) of the month */ + tzW.StandardDate.wDayOfWeek=0; /* Sunday */ + tzW.StandardDate.wDay=4; /* 4th (Sunday) of the month */ tzW.StandardDate.wHour=2; tzW.DaylightDate.wMonth=4; tzW.DaylightDate.wDay=1; tzW.DaylightDate.wHour=2; - /* timezone Eastern hemisphere */ + /* timezone Southern hemisphere */ tzS.Bias=240; tzS.StandardBias=0; tzS.DaylightBias=-60; tzS.StandardDate.wMonth=4; - tzS.StandardDate.wDayOfWeek=0; /*sunday */ - tzS.StandardDate.wDay=1; /* 1st (sunday) of the month */ + tzS.StandardDate.wDayOfWeek=0; /*Sunday */ + tzS.StandardDate.wDay=1; /* 1st (Sunday) of the month */ tzS.StandardDate.wHour=2; tzS.DaylightDate.wMonth=10; tzS.DaylightDate.wDay=4; @@ -483,7 +483,7 @@ static void test_TzSpecificLocalTimeToSystemTime(void) { 10, &tzW, {2004,10,-1,24,1,0,0,0}, 4}, { 11, &tzW, {2004,10,-1,24,1,59,59,999}, 4}, { 12, &tzW, {2004,10,-1,24,2,0,0,0 }, 6}, - /* and now south */ + /* and now South */ { 13, &tzS, {2004,4,-1,4,1,0,0,0}, 4}, { 14, &tzS, {2004,4,-1,4,1,59,59,999}, 4}, { 15, &tzS, {2004,4,-1,4,2,0,0,0}, 6}, @@ -548,7 +548,7 @@ static void test_TzSpecificLocalTimeToSystemTime(void) { 10, &tzW, {2004,10,-1,24,4,0,0,0}, 1}, { 11, &tzW, {2004,10,-1,24,4,59,59,999}, 1}, { 12, &tzW, {2004,10,-1,24,5,0,0,0 }, 1}, - /* and now south */ + /* and now South */ { 13, &tzS, {2004,4,-1,4,4,0,0,0}, 1}, { 14, &tzS, {2004,4,-1,4,4,59,59,999}, 1}, { 15, &tzS, {2004,4,-1,4,5,0,0,0}, 1},
1
0
0
0
Austin English : rstrtmgr: Add stubs for RmGetList and RmRegisterResources.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: e899b55ec167a32cbbc90f3fe8db3db66338ceac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e899b55ec167a32cbbc90f3fe…
Author: Austin English <austinenglish(a)gmail.com> Date: Thu Sep 9 11:19:41 2010 -0500 rstrtmgr: Add stubs for RmGetList and RmRegisterResources. --- dlls/rstrtmgr/main.c | 30 +++++++++++++++++++++- dlls/rstrtmgr/rstrtmgr.spec | 4 +- include/Makefile.in | 1 + include/restartmanager.h | 58 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 3 deletions(-) diff --git a/dlls/rstrtmgr/main.c b/dlls/rstrtmgr/main.c index f39ca83..8ac62ae 100644 --- a/dlls/rstrtmgr/main.c +++ b/dlls/rstrtmgr/main.c @@ -23,6 +23,8 @@ #include "winbase.h" #include "wine/debug.h" +#include "restartmanager.h" + WINE_DEFAULT_DEBUG_CHANNEL(rstrtmgr); /***************************************************** @@ -48,9 +50,35 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) } /*********************************************************************** + * RmGetList (rstrtmgr.@) + * + * Retrieve the list of all applications and services using resources registered with the Restart Manager session + */ +DWORD WINAPI RmGetList(DWORD dwSessionHandle, UINT *pnProcInfoNeeded, UINT *pnProcInfo, + RM_PROCESS_INFO *rgAffectedApps[], LPDWORD lpdwRebootReasons) +{ + FIXME("%d, %p, %p, %p, %p stub!\n", dwSessionHandle, pnProcInfoNeeded, pnProcInfo, rgAffectedApps, lpdwRebootReasons); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/*********************************************************************** + * RmRegisterResources (rstrtmgr.@) + * + * Register resources for a Restart Manager session + */ +DWORD WINAPI RmRegisterResources(DWORD dwSessionHandle, UINT nFiles, LPCWSTR rgsFilenames[], + UINT nApplications, RM_UNIQUE_PROCESS *rgApplications, + UINT nServices, LPCWSTR rgsServiceNames[]) +{ + FIXME("%d, %d, %p, %d, %p, %d, %p stub!\n", dwSessionHandle, nFiles, rgsFilenames, + nApplications, rgApplications, nServices, rgsServiceNames); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +/*********************************************************************** * RmStartSession (rstrtmgr.@) * - * Start a new restart manager session + * Start a new Restart Manager session */ DWORD WINAPI RmStartSession(DWORD *sessionhandle, DWORD flags, WCHAR sessionkey[]) { diff --git a/dlls/rstrtmgr/rstrtmgr.spec b/dlls/rstrtmgr/rstrtmgr.spec index f9466a8..c943658 100644 --- a/dlls/rstrtmgr/rstrtmgr.spec +++ b/dlls/rstrtmgr/rstrtmgr.spec @@ -2,9 +2,9 @@ @ stub RmCancelCurrentTask @ stub RmEndSession @ stub RmGetFilterList -@ stub RmGetList +@ stdcall RmGetList(long ptr ptr ptr ptr) @ stub RmJoinSession -@ stub RmRegisterResources +@ stdcall RmRegisterResources(long long ptr long ptr long ptr) @ stub RmRemoveFilter @ stub RmReserveHeap @ stub RmRestart diff --git a/include/Makefile.in b/include/Makefile.in index 2812eff..8fd6663 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -425,6 +425,7 @@ SRCDIR_INCLUDES = \ raserror.h \ reason.h \ regstr.h \ + restartmanager.h \ richedit.h \ rmxfguid.h \ row.idl \ diff --git a/include/restartmanager.h b/include/restartmanager.h new file mode 100644 index 0000000..c2250bb --- /dev/null +++ b/include/restartmanager.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2010 Austin English + * + * 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 + */ + +#ifndef RESTARTMANAGER_H +#define RESTARTMANAGER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define CCH_RM_MAX_APP_NAME 255 +#define CH_RM_MAX_SVC_NAME 63 + +typedef enum { + RmUnknownApp = 0, + RmMainWindow = 1, + RmOtherWindow = 2, + RmService = 3, + RmExplorer = 4, + RmConsole = 5, + RmCritical = 1000 +} RM_APP_TYPE; + +typedef struct { + DWORD dwProcessId; + FILETIME ProcessStartTime; +} RM_UNIQUE_PROCESS, *PRM_UNIQUE_PROCESS; + +typedef struct { + RM_UNIQUE_PROCESS Process; + WCHAR strAppName[CCH_RM_MAX_APP_NAME+1]; + WCHAR strServiceShortName[CH_RM_MAX_SVC_NAME+1]; + RM_APP_TYPE ApplicationType; + ULONG AppStatus; + DWORD TSSessionID; + BOOL bRestartable; +} RM_PROCESS_INFO, *PRM_PROCESS_INFO; + +#ifdef __cplusplus +} +#endif + +#endif /* RESTARTMANAGER_H */
1
0
0
0
Alexandre Goujon : avifil32: Fix EditStreamSetInfo wine checks.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: ee706d3d687e63d3f9bef635e2ef904b7005d1fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee706d3d687e63d3f9bef635e…
Author: Alexandre Goujon <ale.goujon(a)gmail.com> Date: Sat Sep 4 17:26:52 2010 +0200 avifil32: Fix EditStreamSetInfo wine checks. --- dlls/avifil32/api.c | 7 ++- dlls/avifil32/editstream.c | 16 ++----- dlls/avifil32/tests/api.c | 102 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 108 insertions(+), 17 deletions(-) diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index 8ef75d3..11eb4dd 100644 --- a/dlls/avifil32/api.c +++ b/dlls/avifil32/api.c @@ -2150,9 +2150,7 @@ HRESULT WINAPI EditStreamSetInfoA(PAVISTREAM pstream, LPAVISTREAMINFOA asi, TRACE("(%p,%p,%d)\n", pstream, asi, size); - if (pstream == NULL) - return AVIERR_BADHANDLE; - if ((DWORD)size < sizeof(AVISTREAMINFOA)) + if (size >= 0 && size < sizeof(AVISTREAMINFOA)) return AVIERR_BADSIZE; memcpy(&asiw, asi, sizeof(asiw) - sizeof(asiw.szName)); @@ -2173,6 +2171,9 @@ HRESULT WINAPI EditStreamSetInfoW(PAVISTREAM pstream, LPAVISTREAMINFOW asi, TRACE("(%p,%p,%d)\n", pstream, asi, size); + if (size >= 0 && size < sizeof(AVISTREAMINFOA)) + return AVIERR_BADSIZE; + hr = IAVIStream_QueryInterface(pstream, &IID_IAVIEditStream,(LPVOID*)&pEdit); if (SUCCEEDED(hr) && pEdit != NULL) { hr = IAVIEditStream_SetInfo(pEdit, asi, size); diff --git a/dlls/avifil32/editstream.c b/dlls/avifil32/editstream.c index f19f3ac..10b6b30 100644 --- a/dlls/avifil32/editstream.c +++ b/dlls/avifil32/editstream.c @@ -775,23 +775,15 @@ static HRESULT WINAPI IAVIEditStream_fnSetInfo(IAVIEditStream*iface, TRACE("(%p,%p,%d)\n",iface,asi,size); /* check parameters */ - if (asi == NULL) - return AVIERR_BADPARAM; - if (size != sizeof(AVISTREAMINFOW)) + if (size >= 0 && size < sizeof(AVISTREAMINFOW)) return AVIERR_BADSIZE; - if (asi->dwScale == 0 || asi->dwRate == 0 || (LONG)asi->dwQuality < -1 || - asi->dwQuality > ICQUALITY_HIGH) - return AVIERR_ERROR; This->sInfo.wLanguage = asi->wLanguage; This->sInfo.wPriority = asi->wPriority; This->sInfo.dwStart = asi->dwStart; - if (asi->dwRate != 0) - This->sInfo.dwRate = asi->dwRate; - if (asi->dwScale != 0) - This->sInfo.dwScale = asi->dwScale; - if (asi->dwQuality <= ICQUALITY_HIGH) - This->sInfo.dwQuality = ICQUALITY_HIGH; + This->sInfo.dwRate = asi->dwRate; + This->sInfo.dwScale = asi->dwScale; + This->sInfo.dwQuality = asi->dwQuality; CopyRect(&This->sInfo.rcFrame, &asi->rcFrame); memcpy(This->sInfo.szName, asi->szName, sizeof(asi->szName)); This->sInfo.dwEditCount++; diff --git a/dlls/avifil32/tests/api.c b/dlls/avifil32/tests/api.c index fe295bf..14ad4b4 100644 --- a/dlls/avifil32/tests/api.c +++ b/dlls/avifil32/tests/api.c @@ -194,11 +194,11 @@ static void test_AVISaveOptions(void) SetLastError(0xdeadbeef); hres = EditStreamSetNameA(streams[0], winetest0); - todo_wine ok(hres == AVIERR_OK, "0: got 0x%x (expected AVIERR_OK)\n", hres); + ok(hres == AVIERR_OK, "0: got 0x%x (expected AVIERR_OK)\n", hres); SetLastError(0xdeadbeef); hres = EditStreamSetNameA(streams[1], winetest1); - todo_wine ok(hres == AVIERR_OK, "1: got 0x%x (expected AVIERR_OK)\n", hres); + ok(hres == AVIERR_OK, "1: got 0x%x (expected AVIERR_OK)\n", hres); if (winetest_interactive) { SetLastError(0xdeadbeef); @@ -223,6 +223,103 @@ static void test_AVISaveOptions(void) /* ########################### */ +static void test_EditStreamSetInfo(void) +{ + PAVISTREAM stream = NULL; + HRESULT hres; + AVISTREAMINFO info, info2; + + hres = CreateEditableStream(&stream, NULL); + ok(hres == AVIERR_OK, "got 0x%08X, expected AVIERR_OK\n", hres); + + + if(0) /* Crashing - first parameter not checked */ + hres = EditStreamSetInfo(NULL, &info, sizeof(AVISTREAMINFO) ); + + /* Size parameter is somehow checked (notice the crash with size=-1 below) */ + hres = EditStreamSetInfo(stream, NULL, 0); + ok( hres == AVIERR_BADSIZE, "got 0x%08X, expected AVIERR_BADSIZE\n", hres); + + hres = EditStreamSetInfo(stream, NULL, sizeof(AVISTREAMINFO)-1 ); + ok( hres == AVIERR_BADSIZE, "got 0x%08X, expected AVIERR_BADSIZE\n", hres); + + if(0) + { /* Crashing - second parameter not checked */ + hres = EditStreamSetInfo(stream, NULL, sizeof(AVISTREAMINFO) ); + + hres = EditStreamSetInfo(stream, NULL, -1); + ok( hres == AVIERR_BADSIZE, "got 0x%08X, expected AVIERR_BADSIZE\n", hres); + } + + hres = AVIStreamInfo(stream, &info, sizeof(AVISTREAMINFO) ); + ok( hres == 0, "got 0x%08X, expected 0\n", hres); + + /* Does the function check what's it's updating ? */ + +#define IS_INFO_UPDATED(m) do { \ + hres = EditStreamSetInfo(stream, &info, sizeof(AVISTREAMINFO) ); \ + ok( hres == 0, "got 0x%08X, expected 0\n", hres); \ + hres = AVIStreamInfo(stream, &info2, sizeof(AVISTREAMINFO) ); \ + ok( hres == 0, "got 0x%08X, expected 0\n", hres); \ + ok( info2.m == info.m, "EditStreamSetInfo did not update "#m" parameter\n" ); \ + } while(0) + + info.dwStart++; + IS_INFO_UPDATED(dwStart); + info.dwStart = 0; + IS_INFO_UPDATED(dwStart); + + info.wPriority++; + IS_INFO_UPDATED(wPriority); + info.wPriority = 0; + IS_INFO_UPDATED(wPriority); + + info.wLanguage++; + IS_INFO_UPDATED(wLanguage); + info.wLanguage = 0; + IS_INFO_UPDATED(wLanguage); + + info.dwScale++; + IS_INFO_UPDATED(dwScale); + info.dwScale = 0; + IS_INFO_UPDATED(dwScale); + + info.dwRate++; + IS_INFO_UPDATED(dwRate); + info.dwRate = 0; + IS_INFO_UPDATED(dwRate); + + info.dwQuality++; + IS_INFO_UPDATED(dwQuality); + info.dwQuality = 0; + IS_INFO_UPDATED(dwQuality); + info.dwQuality = -2; + IS_INFO_UPDATED(dwQuality); + info.dwQuality = ICQUALITY_HIGH+1; + IS_INFO_UPDATED(dwQuality); + + info.rcFrame.left = 0; + IS_INFO_UPDATED(rcFrame.left); + info.rcFrame.top = 0; + IS_INFO_UPDATED(rcFrame.top); + info.rcFrame.right = 0; + IS_INFO_UPDATED(rcFrame.right); + info.rcFrame.bottom = 0; + IS_INFO_UPDATED(rcFrame.bottom); + + info.rcFrame.left = -1; + IS_INFO_UPDATED(rcFrame.left); + info.rcFrame.top = -1; + IS_INFO_UPDATED(rcFrame.top); + info.rcFrame.right = -1; + IS_INFO_UPDATED(rcFrame.right); + info.rcFrame.bottom = -1; + IS_INFO_UPDATED(rcFrame.bottom); + AVIStreamRelease(stream); +#undef IS_INFO_UPDATED +} + + static void init_test_struct(COMMON_AVI_HEADERS *cah) { memcpy(cah->fh, deffh, sizeof(deffh)); @@ -451,6 +548,7 @@ START_TEST(api) { AVIFileInit(); + test_EditStreamSetInfo(); test_AVISaveOptions(); test_default_data(); test_amh_corruption();
1
0
0
0
Mariusz Pluciński : gameux: IGameExplorer:: RemoveGame implementation.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: bb9a6ea2b05e79319ae4ed563f9147c7a27bbc22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bb9a6ea2b05e79319ae4ed563…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Tue Sep 7 16:08:39 2010 +0200 gameux: IGameExplorer::RemoveGame implementation. --- dlls/gameux/gameexplorer.c | 33 +++++++++++++++++++++++++++++++-- dlls/gameux/tests/gameexplorer.c | 8 ++++---- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index deb6475..aabadcd 100644 --- a/dlls/gameux/gameexplorer.c +++ b/dlls/gameux/gameexplorer.c @@ -480,6 +480,36 @@ static HRESULT GAMEUX_ParseGDFBinary(struct GAMEUX_GAME_DATA *GameData) return hr; } +/******************************************************************* + * GAMEUX_RemoveRegistryRecord + * + * Helper function, removes registry key associated with given game instance + */ +static HRESULT GAMEUX_RemoveRegistryRecord(GUID* pInstanceID) +{ + HRESULT hr; + LPWSTR lpRegistryPath = NULL; + TRACE("(%s)\n", debugstr_guid(pInstanceID)); + + /* first, check is game installed for all users */ + hr = GAMEUX_buildGameRegistryPath(GIS_ALL_USERS, pInstanceID, &lpRegistryPath); + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegDeleteKeyExW(HKEY_LOCAL_MACHINE, lpRegistryPath, 0, 0)); + + HeapFree(GetProcessHeap(), 0, lpRegistryPath); + + /* if not, check current user */ + if(FAILED(hr)) + { + hr = GAMEUX_buildGameRegistryPath(GIS_CURRENT_USER, pInstanceID, &lpRegistryPath); + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegDeleteKeyExW(HKEY_LOCAL_MACHINE, lpRegistryPath, 0, 0)); + + HeapFree(GetProcessHeap(), 0, lpRegistryPath); + } + + return hr; +} /******************************************************************************* * GAMEUX_RegisterGame * @@ -628,8 +658,7 @@ static HRESULT WINAPI GameExplorerImpl_RemoveGame( GameExplorerImpl *This = impl_from_IGameExplorer(iface); TRACE("(%p, %s)\n", This, debugstr_guid(&instanceID)); - FIXME("stub\n"); - return E_NOTIMPL; + return GAMEUX_RemoveRegistryRecord(&instanceID); } static HRESULT WINAPI GameExplorerImpl_UpdateGame( diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c index d01783d..3e86239 100644 --- a/dlls/gameux/tests/gameexplorer.c +++ b/dlls/gameux/tests/gameexplorer.c @@ -446,10 +446,10 @@ static void test_add_remove_game(void) _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, TRUE); hr = IGameExplorer_RemoveGame(ge, guid); - todo_wine ok(SUCCEEDED(hr), "IGameExplorer::RemoveGame failed (error 0x%08x)\n", hr); + ok(SUCCEEDED(hr), "IGameExplorer::RemoveGame failed (error 0x%08x)\n", hr); } - todo_wine _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, FALSE); + _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, FALSE); /* try to register game with empty guid */ @@ -464,10 +464,10 @@ static void test_add_remove_game(void) _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, TRUE); hr = IGameExplorer_RemoveGame(ge, guid); - todo_wine ok(SUCCEEDED(hr), "IGameExplorer::RemoveGame failed (error 0x%08x)\n", hr); + ok(SUCCEEDED(hr), "IGameExplorer::RemoveGame failed (error 0x%08x)\n", hr); } - todo_wine _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, FALSE); + _validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, FALSE); } /* free allocated resources */
1
0
0
0
Mariusz Pluciński : gameux: Add storing Description registry value.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: 9b7347b619c85c5028f193352f7bb6f2625c385e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b7347b619c85c5028f193352…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Tue Sep 7 16:08:06 2010 +0200 gameux: Add storing Description registry value. --- dlls/gameux/gameexplorer.c | 14 ++++++++++++++ dlls/gameux/gameux_private.h | 1 + dlls/gameux/tests/gameexplorer.c | 2 +- 3 files changed, 16 insertions(+), 1 deletions(-) diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index f792333..deb6475 100644 --- a/dlls/gameux/gameexplorer.c +++ b/dlls/gameux/gameexplorer.c @@ -52,6 +52,7 @@ void GAMEUX_initGameData(struct GAMEUX_GAME_DATA *GameData) GameData->sGDFBinaryPath = NULL; GameData->sGameInstallDirectory = NULL; GameData->bstrName = NULL; + GameData->bstrDescription = NULL; } /******************************************************************************* * GAMEUX_uninitGameData @@ -63,6 +64,7 @@ void GAMEUX_uninitGameData(struct GAMEUX_GAME_DATA *GameData) HeapFree(GetProcessHeap(), 0, GameData->sGDFBinaryPath); HeapFree(GetProcessHeap(), 0, GameData->sGameInstallDirectory); SysFreeString(GameData->bstrName); + SysFreeString(GameData->bstrDescription); } /******************************************************************************* * GAMEUX_buildGameRegistryPath @@ -211,6 +213,8 @@ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) {'C','o','n','f','i','g','G','D','F','B','i','n','a','r','y','P','a','t','h',0}; static const WCHAR sTitle[] = {'T','i','t','l','e',0}; + static const WCHAR sDescription[] = + {'D','e','s','c','r','i','p','t','i','o','n',0}; HRESULT hr, hr2; LPWSTR lpRegistryKey; @@ -251,6 +255,11 @@ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) REG_SZ, (LPBYTE)(GameData->bstrName), (lstrlenW(GameData->bstrName)+1)*sizeof(WCHAR))); + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, sDescription, 0, + REG_SZ, (LPBYTE)(GameData->bstrDescription ? GameData->bstrDescription : GameData->bstrName), + (lstrlenW(GameData->bstrDescription ? GameData->bstrDescription : GameData->bstrName)+1)*sizeof(WCHAR))); + RegCloseKey(hKey); if(FAILED(hr)) @@ -283,6 +292,8 @@ static HRESULT GAMEUX_ProcessGameDefinitionElement( { static const WCHAR sName[] = {'N','a','m','e',0}; + static const WCHAR sDescription[] = + {'D','e','s','c','r','i','p','t','i','o','n',0}; HRESULT hr; BSTR bstrElementName; @@ -296,6 +307,9 @@ static HRESULT GAMEUX_ProcessGameDefinitionElement( if(lstrcmpW(bstrElementName, sName) == 0) hr = IXMLDOMElement_get_text(element, &GameData->bstrName); + else if(lstrcmpW(bstrElementName, sDescription) == 0) + hr = IXMLDOMElement_get_text(element, &GameData->bstrDescription); + else FIXME("entry %s in Game Definition File not yet supported\n", debugstr_w(bstrElementName)); diff --git a/dlls/gameux/gameux_private.h b/dlls/gameux/gameux_private.h index 5b6e80d..97826f0 100644 --- a/dlls/gameux/gameux_private.h +++ b/dlls/gameux/gameux_private.h @@ -43,6 +43,7 @@ struct GAMEUX_GAME_DATA GUID guidInstanceId; /* game installation instance identifier */ GUID guidApplicationId; /* game's application identifier */ BSTR bstrName; /* game's title */ + BSTR bstrDescription; /* game's description */ }; /******************************************************************************* * GAMEUX_initGameData diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c index a538d35..d01783d 100644 --- a/dlls/gameux/tests/gameexplorer.c +++ b/dlls/gameux/tests/gameexplorer.c @@ -305,7 +305,7 @@ static void _validateGameRegistryValues(int line, /* this value exists up from Win7 */ hr = _validateRegistryValue(hKey, keyPath, sDescription, RRF_RT_REG_SZ, sGameDescription); - todo_wine ok_(__FILE__, line)(hr==S_OK || broken(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)), "failed while checking registry value (error 0x%x)\n", hr); + ok_(__FILE__, line)(hr==S_OK || broken(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)), "failed while checking registry value (error 0x%x)\n", hr); } /******************************************************************************* * _validateGameKey
1
0
0
0
Mariusz Pluciński : gameux: Add storing Title registry value.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: 3c68877bc5c20e61ffa34b3d0e999be6a1ea9638 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3c68877bc5c20e61ffa34b3d0…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Tue Sep 7 16:05:25 2010 +0200 gameux: Add storing Title registry value. --- dlls/gameux/gameexplorer.c | 80 ++++++++++++++++++++++++++++++++++++++ dlls/gameux/gameux_private.h | 1 + dlls/gameux/tests/gameexplorer.c | 2 +- 3 files changed, 82 insertions(+), 1 deletions(-) diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index a4c37a7..f792333 100644 --- a/dlls/gameux/gameexplorer.c +++ b/dlls/gameux/gameexplorer.c @@ -51,6 +51,7 @@ void GAMEUX_initGameData(struct GAMEUX_GAME_DATA *GameData) { GameData->sGDFBinaryPath = NULL; GameData->sGameInstallDirectory = NULL; + GameData->bstrName = NULL; } /******************************************************************************* * GAMEUX_uninitGameData @@ -61,6 +62,7 @@ void GAMEUX_uninitGameData(struct GAMEUX_GAME_DATA *GameData) { HeapFree(GetProcessHeap(), 0, GameData->sGDFBinaryPath); HeapFree(GetProcessHeap(), 0, GameData->sGameInstallDirectory); + SysFreeString(GameData->bstrName); } /******************************************************************************* * GAMEUX_buildGameRegistryPath @@ -196,6 +198,7 @@ static HRESULT GAMEUX_buildGameRegistryPath(GAME_INSTALL_SCOPE installScope, * ApplicationId guidApplicationId * ConfigApplicationPath sGameInstallDirectory * ConfigGDFBinaryPath sGDFBinaryPath + * Title bstrName * */ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) @@ -206,6 +209,8 @@ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) {'C','o','n','f','i','g','A','p','p','l','i','c','a','t','i','o','n','P','a','t','h',0}; static const WCHAR sConfigGDFBinaryPath[] = {'C','o','n','f','i','g','G','D','F','B','i','n','a','r','y','P','a','t','h',0}; + static const WCHAR sTitle[] = + {'T','i','t','l','e',0}; HRESULT hr, hr2; LPWSTR lpRegistryKey; @@ -241,6 +246,11 @@ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) REG_SZ, (LPBYTE)(sGameApplicationId), (lstrlenW(sGameApplicationId)+1)*sizeof(WCHAR))); + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, sTitle, 0, + REG_SZ, (LPBYTE)(GameData->bstrName), + (lstrlenW(GameData->bstrName)+1)*sizeof(WCHAR))); + RegCloseKey(hKey); if(FAILED(hr)) @@ -258,6 +268,43 @@ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) return hr; } /******************************************************************************* + * GAMEUX_ProcessGameDefinitionElement + * + * Helper function, parses single element from Game Definition + * + * Parameters: + * lpXMLElement [I] game definition element + * GameData [O] structure, where parsed + * data will be stored + */ +static HRESULT GAMEUX_ProcessGameDefinitionElement( + IXMLDOMElement *element, + struct GAMEUX_GAME_DATA *GameData) +{ + static const WCHAR sName[] = + {'N','a','m','e',0}; + + HRESULT hr; + BSTR bstrElementName; + + TRACE("(%p, %p)\n", element, GameData); + + hr = IXMLDOMElement_get_nodeName(element, &bstrElementName); + if(SUCCEEDED(hr)) + { + /* check element name */ + if(lstrcmpW(bstrElementName, sName) == 0) + hr = IXMLDOMElement_get_text(element, &GameData->bstrName); + + else + FIXME("entry %s in Game Definition File not yet supported\n", debugstr_w(bstrElementName)); + + SysFreeString(bstrElementName); + } + + return hr; +} +/******************************************************************************* * GAMEUX_ParseGameDefinition * * Helper function, loads data from given XML element into fields of GAME_DATA @@ -277,6 +324,9 @@ static HRESULT GAMEUX_ParseGameDefinition( HRESULT hr = S_OK; BSTR bstrAttribute; VARIANT variant; + IXMLDOMNodeList *childrenList; + IXMLDOMNode *nextNode; + IXMLDOMElement *nextElement; TRACE("(%p, %p)\n", gdElement, GameData); @@ -295,6 +345,36 @@ static HRESULT GAMEUX_ParseGameDefinition( SysFreeString(bstrAttribute); + /* browse subnodes */ + if(SUCCEEDED(hr)) + hr = IXMLDOMElement_get_childNodes(gdElement, &childrenList); + + if(SUCCEEDED(hr)) + { + do + { + hr = IXMLDOMNodeList_nextNode(childrenList, &nextNode); + + if(hr == S_OK) + { + hr = IXMLDOMNode_QueryInterface(nextNode, &IID_IXMLDOMElement, + (LPVOID*)&nextElement); + + if(SUCCEEDED(hr)) + { + hr = GAMEUX_ProcessGameDefinitionElement(nextElement, GameData); + IXMLDOMElement_Release(nextElement); + } + + IXMLDOMElement_Release(nextNode); + } + } + while(hr == S_OK); + hr = S_OK; + + IXMLDOMNodeList_Release(childrenList); + } + return hr; } /******************************************************************************* diff --git a/dlls/gameux/gameux_private.h b/dlls/gameux/gameux_private.h index 4beb500..5b6e80d 100644 --- a/dlls/gameux/gameux_private.h +++ b/dlls/gameux/gameux_private.h @@ -42,6 +42,7 @@ struct GAMEUX_GAME_DATA GAME_INSTALL_SCOPE installScope;/* game's installation scope */ GUID guidInstanceId; /* game installation instance identifier */ GUID guidApplicationId; /* game's application identifier */ + BSTR bstrName; /* game's title */ }; /******************************************************************************* * GAMEUX_initGameData diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c index 4367ab3..a538d35 100644 --- a/dlls/gameux/tests/gameexplorer.c +++ b/dlls/gameux/tests/gameexplorer.c @@ -301,7 +301,7 @@ static void _validateGameRegistryValues(int line, hr = _validateRegistryValue(hKey, keyPath, sConfigGDFBinaryPath, RRF_RT_REG_SZ, gameExeName); ok_(__FILE__, line)(hr==S_OK, "failed while checking registry value (error 0x%x)\n", hr); hr = _validateRegistryValue(hKey, keyPath, sTitle, RRF_RT_REG_SZ, sExampleGame); - todo_wine ok_(__FILE__, line)(hr==S_OK, "failed while checking registry value (error 0x%x)\n", hr); + ok_(__FILE__, line)(hr==S_OK, "failed while checking registry value (error 0x%x)\n", hr); /* this value exists up from Win7 */ hr = _validateRegistryValue(hKey, keyPath, sDescription, RRF_RT_REG_SZ, sGameDescription);
1
0
0
0
Mariusz Pluciński : gameux: Add support of loading Application Id into registry.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: 180ac750bba09a7dab8af4041e6e65dfd80e78bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=180ac750bba09a7dab8af4041…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Tue Sep 7 15:36:30 2010 +0200 gameux: Add support of loading Application Id into registry. --- dlls/gameux/Makefile.in | 2 +- dlls/gameux/gameexplorer.c | 152 +++++++++++++++++++++++++++++++++++++- dlls/gameux/gameux_private.h | 1 + dlls/gameux/tests/gameexplorer.c | 2 +- 4 files changed, 154 insertions(+), 3 deletions(-) diff --git a/dlls/gameux/Makefile.in b/dlls/gameux/Makefile.in index b90698c..bf8f9ab 100644 --- a/dlls/gameux/Makefile.in +++ b/dlls/gameux/Makefile.in @@ -4,7 +4,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = gameux.dll -IMPORTS = uuid ole32 user32 advapi32 oleaut32 +IMPORTS = uuid shell32 oleaut32 ole32 user32 advapi32 C_SRCS = \ factory.c \ diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c index 9df9a23..a4c37a7 100644 --- a/dlls/gameux/gameexplorer.c +++ b/dlls/gameux/gameexplorer.c @@ -23,15 +23,22 @@ #include "ole2.h" #include "sddl.h" +#include "xmldom.h" #include "gameux.h" #include "gameux_private.h" +#include "initguid.h" +#include "msxml2.h" + #include "wine/debug.h" #include "winreg.h" WINE_DEFAULT_DEBUG_CHANNEL(gameux); +/* function from Shell32, not defined in header */ +extern BOOL WINAPI GUIDFromStringW(LPCWSTR psz, LPGUID pguid); + /******************************************************************************* * GameUX helper functions */ @@ -186,12 +193,15 @@ static HRESULT GAMEUX_buildGameRegistryPath(GAME_INSTALL_SCOPE installScope, * * List of registry keys associated with structure fields: * Key Field in GAMEUX_GAME_DATA structure + * ApplicationId guidApplicationId * ConfigApplicationPath sGameInstallDirectory * ConfigGDFBinaryPath sGDFBinaryPath * */ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) { + static const WCHAR sApplicationId[] = + {'A','p','p','l','i','c','a','t','i','o','n','I','d',0}; static const WCHAR sConfigApplicationPath[] = {'C','o','n','f','i','g','A','p','p','l','i','c','a','t','i','o','n','P','a','t','h',0}; static const WCHAR sConfigGDFBinaryPath[] = @@ -200,12 +210,16 @@ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) HRESULT hr, hr2; LPWSTR lpRegistryKey; HKEY hKey; + WCHAR sGameApplicationId[40]; TRACE("(%p)\n", GameData); hr = GAMEUX_buildGameRegistryPath(GameData->installScope, &GameData->guidInstanceId, &lpRegistryKey); if(SUCCEEDED(hr)) + hr = (StringFromGUID2(&GameData->guidApplicationId, sGameApplicationId, sizeof(sGameApplicationId)/sizeof(sGameApplicationId[0])) ? S_OK : E_FAIL); + + if(SUCCEEDED(hr)) hr = HRESULT_FROM_WIN32(RegCreateKeyExW(HKEY_LOCAL_MACHINE, lpRegistryKey, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, NULL)); @@ -222,6 +236,11 @@ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) REG_SZ, (LPBYTE)(GameData->sGDFBinaryPath), (lstrlenW(GameData->sGDFBinaryPath)+1)*sizeof(WCHAR))); + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, sApplicationId, 0, + REG_SZ, (LPBYTE)(sGameApplicationId), + (lstrlenW(sGameApplicationId)+1)*sizeof(WCHAR))); + RegCloseKey(hKey); if(FAILED(hr)) @@ -239,6 +258,135 @@ static HRESULT GAMEUX_WriteRegistryRecord(struct GAMEUX_GAME_DATA *GameData) return hr; } /******************************************************************************* + * GAMEUX_ParseGameDefinition + * + * Helper function, loads data from given XML element into fields of GAME_DATA + * structure + * + * Parameters: + * lpXMLGameDefinitionElement [I] Game Definition XML element + * GameData [O] structure where data loaded from + * XML element will be stored in + */ +static HRESULT GAMEUX_ParseGameDefinition( + IXMLDOMElement *gdElement, + struct GAMEUX_GAME_DATA *GameData) +{ + static const WCHAR sGameId[] = {'g','a','m','e','I','D',0}; + + HRESULT hr = S_OK; + BSTR bstrAttribute; + VARIANT variant; + + TRACE("(%p, %p)\n", gdElement, GameData); + + bstrAttribute = SysAllocString(sGameId); + if(!bstrAttribute) + hr = E_OUTOFMEMORY; + + hr = IXMLDOMElement_getAttribute(gdElement, bstrAttribute, &variant); + + if(SUCCEEDED(hr)) + { + hr = ( GUIDFromStringW(V_BSTR(&variant), &GameData->guidApplicationId)==TRUE ? S_OK : E_FAIL); + + SysFreeString(V_BSTR(&variant)); + } + + SysFreeString(bstrAttribute); + + return hr; +} +/******************************************************************************* + * GAMEUX_ParseGDFBinary + * + * Helper funtion, loads given binary and parses embed GDF if there's any. + * + * Parameters: + * GameData [I/O] Structure with game's data. Content of field + * sGDFBinaryPath defines path to binary, from + * which embed GDF will be loaded. Data from + * GDF will be stored in other fields of this + * structure. + */ +static HRESULT GAMEUX_ParseGDFBinary(struct GAMEUX_GAME_DATA *GameData) +{ + static const WCHAR sRes[] = {'r','e','s',':','/','/',0}; + static const WCHAR sDATA[] = {'D','A','T','A',0}; + static const WCHAR sSlash[] = {'/',0}; + + HRESULT hr = S_OK; + WCHAR sResourcePath[MAX_PATH]; + VARIANT variant; + VARIANT_BOOL isSuccessful; + IXMLDOMDocument *document; + IXMLDOMNode *gdNode; + IXMLDOMElement *root, *gdElement; + + TRACE("(%p)->sGDFBinaryPath = %s\n", GameData, debugstr_w(GameData->sGDFBinaryPath)); + + /* prepare path to GDF, using res:// prefix */ + lstrcpyW(sResourcePath, sRes); + lstrcatW(sResourcePath, GameData->sGDFBinaryPath); + lstrcatW(sResourcePath, sSlash); + lstrcatW(sResourcePath, sDATA); + lstrcatW(sResourcePath, sSlash); + lstrcatW(sResourcePath, ID_GDF_XML_STR); + + hr = CoCreateInstance(&CLSID_DOMDocument, NULL, CLSCTX_INPROC_SERVER, + &IID_IXMLDOMDocument, (void**)&document); + + if(SUCCEEDED(hr)) + { + /* load GDF into MSXML */ + V_VT(&variant) = VT_BSTR; + V_BSTR(&variant) = SysAllocString(sResourcePath); + if(!V_BSTR(&variant)) + hr = E_OUTOFMEMORY; + + if(SUCCEEDED(hr)) + { + hr = IXMLDOMDocument_load(document, variant, &isSuccessful); + if(hr == S_FALSE || isSuccessful == VARIANT_FALSE) + hr = E_FAIL; + } + + SysFreeString(V_BSTR(&variant)); + + if(SUCCEEDED(hr)) + { + hr = IXMLDOMDocument_get_documentElement(document, &root); + if(hr == S_FALSE) + hr = E_FAIL; + } + + if(SUCCEEDED(hr)) + { + hr = IXMLDOMElement_get_firstChild(root, &gdNode); + if(hr == S_FALSE) + hr = E_FAIL; + + if(SUCCEEDED(hr)) + { + hr = IXMLDOMNode_QueryInterface(gdNode, &IID_IXMLDOMElement, (LPVOID*)&gdElement); + if(SUCCEEDED(hr)) + { + hr = GAMEUX_ParseGameDefinition(gdElement, GameData); + IXMLDOMElement_Release(gdElement); + } + + IXMLDOMNode_Release(gdNode); + } + + IXMLDOMElement_Release(root); + } + + IXMLDOMDocument_Release(document); + } + + return hr; +} +/******************************************************************************* * GAMEUX_RegisterGame * * Internal helper function. Description available in gameux_private.h file @@ -266,7 +414,9 @@ HRESULT WINAPI GAMEUX_RegisterGame(LPCWSTR sGDFBinaryPath, GameData.guidInstanceId = *pInstanceID; - FIXME("loading game data from GDF file not yet implemented\n"); + /* load data from GDF binary */ + if(SUCCEEDED(hr)) + hr = GAMEUX_ParseGDFBinary(&GameData); /* save data to registry */ if(SUCCEEDED(hr)) diff --git a/dlls/gameux/gameux_private.h b/dlls/gameux/gameux_private.h index 3ff28ec..4beb500 100644 --- a/dlls/gameux/gameux_private.h +++ b/dlls/gameux/gameux_private.h @@ -41,6 +41,7 @@ struct GAMEUX_GAME_DATA LPWSTR sGameInstallDirectory; /* directory passed to AddGame/InstallGame methods */ GAME_INSTALL_SCOPE installScope;/* game's installation scope */ GUID guidInstanceId; /* game installation instance identifier */ + GUID guidApplicationId; /* game's application identifier */ }; /******************************************************************************* * GAMEUX_initGameData diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c index 4a0f241..4367ab3 100644 --- a/dlls/gameux/tests/gameexplorer.c +++ b/dlls/gameux/tests/gameexplorer.c @@ -295,7 +295,7 @@ static void _validateGameRegistryValues(int line, /* these values exist up from Vista */ hr = _validateRegistryValue(hKey, keyPath, sApplicationId, RRF_RT_REG_SZ, sGameApplicationId); - todo_wine ok_(__FILE__, line)(hr==S_OK, "failed while checking registry value (error 0x%x)\n", hr); + ok_(__FILE__, line)(hr==S_OK, "failed while checking registry value (error 0x%x)\n", hr); hr = _validateRegistryValue(hKey, keyPath, sConfigApplicationPath, RRF_RT_REG_SZ, gameExePath); ok_(__FILE__, line)(hr==S_OK, "failed while checking registry value (error 0x%x)\n", hr); hr = _validateRegistryValue(hKey, keyPath, sConfigGDFBinaryPath, RRF_RT_REG_SZ, gameExeName);
1
0
0
0
Mariusz Pluciński : gameux: Initial implementation of IGameExplorer::AddGame.
by Alexandre Julliard
09 Sep '10
09 Sep '10
Module: wine Branch: master Commit: 0949e083eccb460dd3a64496fd8ddb872e0bd15b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0949e083eccb460dd3a64496f…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Tue Sep 7 15:34:41 2010 +0200 gameux: Initial implementation of IGameExplorer::AddGame. --- dlls/gameux/Makefile.in | 2 +- dlls/gameux/gameexplorer.c | 254 +++++++++++++++++++++++++++++++++++++- dlls/gameux/gameux_private.h | 63 ++++++++++ dlls/gameux/tests/gameexplorer.c | 18 ++-- 4 files changed, 322 insertions(+), 15 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0949e083eccb460dd3a64…
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
...
86
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
Results per page:
10
25
50
100
200