ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2019
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
23 participants
208 discussions
Start a n
N
ew thread
[reactos] 06/06: [XDK] Remove _M_AMD64 special case
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fa548efb41f26da24d4ec…
commit fa548efb41f26da24d4ec7afc2209a5ef8a5edc1 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sat Feb 23 16:24:21 2019 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Feb 25 20:00:35 2019 +0100 [XDK] Remove _M_AMD64 special case --- modules/rostests/apitests/apphelp/register.cpp | 2 +- sdk/include/xdk/ntbasedef.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rostests/apitests/apphelp/register.cpp b/modules/rostests/apitests/apphelp/register.cpp index fb093cc594..146dc8cf37 100644 --- a/modules/rostests/apitests/apphelp/register.cpp +++ b/modules/rostests/apitests/apphelp/register.cpp @@ -7,7 +7,7 @@ #include <ntstatus.h> #define WIN32_NO_STATUS -#include <windows.h> +#include <windef.h> #include <ntndk.h> #include <atlbase.h> #include <strsafe.h> diff --git a/sdk/include/xdk/ntbasedef.h b/sdk/include/xdk/ntbasedef.h index 67ddadcfcf..a40ee83e57 100644 --- a/sdk/include/xdk/ntbasedef.h +++ b/sdk/include/xdk/ntbasedef.h @@ -343,7 +343,7 @@ typedef void *HANDLE, **PHANDLE; typedef char CHAR; typedef short SHORT; - #if defined(__ROS_LONG64__) && !defined(_M_AMD64) + #if defined(__ROS_LONG64__) typedef int LONG; #else typedef long LONG;
5 years, 10 months
1
0
0
0
[reactos] 05/06: [APPHELP] Implement SdbRegisterDatabase[Ex] CORE-11301
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c01fa8e9c13de66f4b167…
commit c01fa8e9c13de66f4b167e024fe4837a02cb5a67 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Mon Feb 11 22:45:48 2019 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Feb 25 20:00:35 2019 +0100 [APPHELP] Implement SdbRegisterDatabase[Ex] CORE-11301 --- dll/appcompat/apphelp/apphelp.c | 195 +++++++++++++++++++++++++++++++++++----- dll/appcompat/apphelp/layer.c | 6 +- 2 files changed, 174 insertions(+), 27 deletions(-) diff --git a/dll/appcompat/apphelp/apphelp.c b/dll/appcompat/apphelp/apphelp.c index ceb71a8e16..e05c1fd9eb 100644 --- a/dll/appcompat/apphelp/apphelp.c +++ b/dll/appcompat/apphelp/apphelp.c @@ -10,21 +10,29 @@ #define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" -#include "winver.h" +#include "winreg.h" #include "strsafe.h" #include "apphelp.h" -#include "ndk/rtlfuncs.h" -#include "ndk/kdtypes.h" +#include <ndk/rtlfuncs.h> +#include <ndk/cmfuncs.h> +#include <ndk/obfuncs.h> +#include <ndk/kdtypes.h> +ACCESS_MASK Wow64QueryFlag(void); + +const UNICODE_STRING InstalledSDBKeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\InstalledSDB"); + /* from dpfilter.h */ #define DPFLTR_APPCOMPAT_ID 123 +#define MAX_GUID_STRING_LEN sizeof("{12345678-1234-1234-0123-456789abcdef}") + #ifndef NT_SUCCESS #define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0) #endif -ULONG g_ShimDebugLevel = 0xffffffff; +ULONG g_ShimDebugLevel = ~0; HMODULE g_hInstance; void ApphelppInitDebugLevel(void) @@ -52,14 +60,14 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) { switch (reason) { - case DLL_PROCESS_ATTACH: - g_hInstance = hinst; - DisableThreadLibraryCalls( hinst ); - SdbpHeapInit(); - break; - case DLL_PROCESS_DETACH: - SdbpHeapDeinit(); - break; + case DLL_PROCESS_ATTACH: + g_hInstance = hinst; + DisableThreadLibraryCalls(hinst); + SdbpHeapInit(); + break; + case DLL_PROCESS_DETACH: + SdbpHeapDeinit(); + break; } return TRUE; } @@ -73,8 +81,8 @@ BOOL WINAPI ApphelpCheckInstallShieldPackage(void* ptr, LPCWSTR path) BOOL WINAPI ApphelpCheckShellObject(REFCLSID ObjectCLSID, BOOL bShimIfNecessary, ULONGLONG *pullFlags) { - WCHAR GuidString[100]; - if (!ObjectCLSID || !SdbGUIDToString(ObjectCLSID, GuidString, 100)) + WCHAR GuidString[MAX_GUID_STRING_LEN]; + if (!ObjectCLSID || !SdbGUIDToString(ObjectCLSID, GuidString, RTL_NUMBER_OF(GuidString))) GuidString[0] = L'\0'; SHIM_WARN("stub: ObjectCLSID='%S', bShimIfNecessary=%d, pullFlags=%p)\n", GuidString, bShimIfNecessary, pullFlags); @@ -103,7 +111,7 @@ BOOL WINAPIV ShimDbgPrint(SHIM_LOG_LEVEL Level, PCSTR FunctionName, PCSTR Format const char* LevelStr; size_t Length = sizeof(Buffer); - if (g_ShimDebugLevel == 0xffffffff) + if (g_ShimDebugLevel == ~0) ApphelppInitDebugLevel(); if (Level > g_ShimDebugLevel) @@ -251,14 +259,124 @@ ApphelpCheckRunAppEx( * @return TRUE on success, or FALSE on failure. */ BOOL WINAPI SdbRegisterDatabaseEx( - _In_ LPCTSTR pszDatabasePath, + _In_ LPCWSTR pszDatabasePath, _In_ DWORD dwDatabaseType, - _In_opt_ PULONGLONG pTimeStamp) + _In_opt_ const PULONGLONG pTimeStamp) { - SHIM_ERR("UNIMPLEMENTED, pszDatabasePath=%ws, dwDatabaseType=0x%x, pTimeStamp=%p\n", - pszDatabasePath, dwDatabaseType, pTimeStamp); + PDB pdb; + DB_INFORMATION Information; + WCHAR GuidBuffer[MAX_GUID_STRING_LEN]; + UNICODE_STRING KeyName; + ACCESS_MASK KeyAccess; + OBJECT_ATTRIBUTES ObjectKey = RTL_INIT_OBJECT_ATTRIBUTES(&KeyName, OBJ_CASE_INSENSITIVE); + NTSTATUS Status; + HANDLE InstalledSDBKey; + + pdb = SdbOpenDatabase(pszDatabasePath, DOS_PATH); + if (!pdb) + { + SHIM_ERR("Unable to open DB %S\n", pszDatabasePath); + return FALSE; + } + + if (!SdbGetDatabaseInformation(pdb, &Information) || + !(Information.dwFlags & DB_INFO_FLAGS_VALID_GUID)) + { + SHIM_ERR("Unable to retrieve DB info\n"); + SdbCloseDatabase(pdb); + return FALSE; + } + + if (!SdbGUIDToString(&Information.Id, GuidBuffer, RTL_NUMBER_OF(GuidBuffer))) + { + SHIM_ERR("Unable to Convert GUID to string\n"); + SdbFreeDatabaseInformation(&Information); + SdbCloseDatabase(pdb); + return FALSE; + } + + KeyName = InstalledSDBKeyName; + KeyAccess = Wow64QueryFlag() | KEY_WRITE | KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS; + Status = NtCreateKey(&InstalledSDBKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL); + if (NT_SUCCESS(Status)) + { + HANDLE DbKey; + + RtlInitUnicodeString(&KeyName, GuidBuffer); + ObjectKey.RootDirectory = InstalledSDBKey; - return FALSE; + Status = NtCreateKey(&DbKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL); + if (NT_SUCCESS(Status)) + { + UNICODE_STRING DatabasePathKey = RTL_CONSTANT_STRING(L"DatabasePath"); + UNICODE_STRING DatabaseInstallTimeStampKey = RTL_CONSTANT_STRING(L"DatabaseInstallTimeStamp"); + UNICODE_STRING DatabaseTypeKey = RTL_CONSTANT_STRING(L"DatabaseType"); + UNICODE_STRING DatabaseDescriptionKey = RTL_CONSTANT_STRING(L"DatabaseDescription"); + + Status = NtSetValueKey(DbKey, &DatabasePathKey, 0, REG_SZ, + (PVOID)pszDatabasePath, (wcslen(pszDatabasePath) + 1) * sizeof(WCHAR)); + if (!NT_SUCCESS(Status)) + SHIM_ERR("Unable to write %wZ\n", &DatabasePathKey); + + if (NT_SUCCESS(Status)) + { + ULARGE_INTEGER ulTimeStamp; + if (pTimeStamp) + { + ulTimeStamp.QuadPart = *pTimeStamp; + } + else + { + FILETIME fi; + GetSystemTimeAsFileTime(&fi); + ulTimeStamp.LowPart = fi.dwLowDateTime; + ulTimeStamp.HighPart = fi.dwHighDateTime; + } + Status = NtSetValueKey(DbKey, &DatabaseInstallTimeStampKey, 0, REG_QWORD, + &ulTimeStamp.QuadPart, sizeof(ulTimeStamp)); + if (!NT_SUCCESS(Status)) + SHIM_ERR("Unable to write %wZ\n", &DatabaseInstallTimeStampKey); + } + + if (NT_SUCCESS(Status)) + { + Status = NtSetValueKey(DbKey, &DatabaseTypeKey, 0, REG_DWORD, + &dwDatabaseType, sizeof(dwDatabaseType)); + if (!NT_SUCCESS(Status)) + SHIM_ERR("Unable to write %wZ\n", &DatabaseTypeKey); + } + + if (NT_SUCCESS(Status) && Information.Description) + { + Status = NtSetValueKey(DbKey, &DatabaseDescriptionKey, 0, REG_SZ, + (PVOID)Information.Description, (wcslen(Information.Description) + 1) * sizeof(WCHAR)); + if (!NT_SUCCESS(Status)) + SHIM_ERR("Unable to write %wZ\n", &DatabaseDescriptionKey); + } + + NtClose(DbKey); + + if (NT_SUCCESS(Status)) + { + SHIM_INFO("Installed %wS as %wZ\n", pszDatabasePath, &KeyName); + } + } + else + { + SHIM_ERR("Unable to create key %wZ\n", &KeyName); + } + + NtClose(InstalledSDBKey); + } + else + { + SHIM_ERR("Unable to create key %wZ\n", &KeyName); + } + + SdbFreeDatabaseInformation(&Information); + SdbCloseDatabase(pdb); + + return NT_SUCCESS(Status); } @@ -271,7 +389,7 @@ BOOL WINAPI SdbRegisterDatabaseEx( * @return TRUE on success, or FALSE on failure. */ BOOL WINAPI SdbRegisterDatabase( - _In_ LPCTSTR pszDatabasePath, + _In_ LPCWSTR pszDatabasePath, _In_ DWORD dwDatabaseType) { return SdbRegisterDatabaseEx(pszDatabasePath, dwDatabaseType, NULL); @@ -285,11 +403,40 @@ BOOL WINAPI SdbRegisterDatabase( * @param pguidDB * @return */ -BOOL WINAPI SdbUnregisterDatabase(_In_ GUID *pguidDB) +BOOL WINAPI SdbUnregisterDatabase(_In_ const GUID *pguidDB) { - SHIM_ERR("UNIMPLEMENTED, pguidDB = %p\n", pguidDB); + WCHAR KeyBuffer[MAX_PATH], GuidBuffer[50]; + UNICODE_STRING KeyName; + ACCESS_MASK KeyAccess; + OBJECT_ATTRIBUTES ObjectKey = RTL_INIT_OBJECT_ATTRIBUTES(&KeyName, OBJ_CASE_INSENSITIVE); + NTSTATUS Status; + HANDLE DbKey; + + if (!SdbGUIDToString(pguidDB, GuidBuffer, RTL_NUMBER_OF(GuidBuffer))) + { + SHIM_ERR("Unable to Convert GUID to string\n"); + return FALSE; + } + + RtlInitEmptyUnicodeString(&KeyName, KeyBuffer, sizeof(KeyBuffer)); + RtlAppendUnicodeStringToString(&KeyName, &InstalledSDBKeyName); + RtlAppendUnicodeToString(&KeyName, L"\\"); + RtlAppendUnicodeToString(&KeyName, GuidBuffer); + + KeyAccess = Wow64QueryFlag() | DELETE; + Status = NtCreateKey(&DbKey, KeyAccess, &ObjectKey, 0, NULL, 0, NULL); + if (!NT_SUCCESS(Status)) + { + SHIM_ERR("Unable to open %wZ\n", &KeyName); + return FALSE; + } + + Status = NtDeleteKey(DbKey); + if (!NT_SUCCESS(Status)) + SHIM_ERR("Unable to delete %wZ\n", &KeyName); - return FALSE; + NtClose(DbKey); + return NT_SUCCESS(Status); } diff --git a/dll/appcompat/apphelp/layer.c b/dll/appcompat/apphelp/layer.c index 36f9e86ae8..9c35c3f19f 100644 --- a/dll/appcompat/apphelp/layer.c +++ b/dll/appcompat/apphelp/layer.c @@ -2,7 +2,7 @@ * PROJECT: ReactOS Application compatibility module * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) * PURPOSE: Registry layer manipulation functions - * COPYRIGHT: Copyright 2015-2017 Mark Jansen (mark.jansen(a)reactos.org) + * COPYRIGHT: Copyright 2015-2019 Mark Jansen (mark.jansen(a)reactos.org) */ #define WIN32_NO_STATUS @@ -176,7 +176,7 @@ BOOL SdbpResolvePath(PSDB_TMP_STR LongPath, PCWSTR wszPath) } static ACCESS_MASK g_QueryFlag = 0xffffffff; -ACCESS_MASK QueryFlag(void) +ACCESS_MASK Wow64QueryFlag(void) { if (g_QueryFlag == 0xffffffff) { @@ -216,7 +216,7 @@ NTSTATUS SdbpOpenKey(PUNICODE_STRING FullPath, BOOL bMachine, ACCESS_MASK Access RtlFreeUnicodeString(&BasePath); RtlAppendUnicodeToString(FullPath, LayersKey); - Status = NtOpenKey(KeyHandle, Access | QueryFlag(), &ObjectLayer); + Status = NtOpenKey(KeyHandle, Access | Wow64QueryFlag(), &ObjectLayer); if (!NT_SUCCESS(Status)) { SHIM_ERR("Unable to open Key \"%wZ\" Status 0x%lx\n", FullPath, Status);
5 years, 10 months
1
0
0
0
[reactos] 04/06: [APPHELP][APPHELP_APITEST] Implement SdbGetDatabaseInformation CORE-11301
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=28a091ac12e003854328f…
commit 28a091ac12e003854328fe78465d11d5b8ed15fe Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Mon Feb 11 22:44:30 2019 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Feb 25 20:00:34 2019 +0100 [APPHELP][APPHELP_APITEST] Implement SdbGetDatabaseInformation CORE-11301 --- dll/appcompat/apphelp/apphelp.h | 16 ++++ dll/appcompat/apphelp/apphelp.spec | 4 +- dll/appcompat/apphelp/sdbapi.c | 81 ++++++++++++++++++--- modules/rostests/apitests/apphelp/db.cpp | 121 ++++++++++++++++++++++++++++++- sdk/include/reactos/appcompat/sdbtypes.h | 3 + 5 files changed, 210 insertions(+), 15 deletions(-) diff --git a/dll/appcompat/apphelp/apphelp.h b/dll/appcompat/apphelp/apphelp.h index fda2c501ad..90c52f866a 100644 --- a/dll/appcompat/apphelp/apphelp.h +++ b/dll/appcompat/apphelp/apphelp.h @@ -72,6 +72,20 @@ typedef struct tagSDBQUERYRESULT { GUID rgGuidDB[SDB_MAX_SDBS]; } SDBQUERYRESULT, *PSDBQUERYRESULT; + +#define DB_INFO_FLAGS_VALID_GUID 1 + +typedef struct _DB_INFORMATION +{ + DWORD dwFlags; + DWORD dwMajor; + DWORD dwMinor; + LPCWSTR Description; + GUID Id; + /* Win10+ has an extra field here */ +} DB_INFORMATION, *PDB_INFORMATION; + + #ifndef APPHELP_NOSDBPAPI #include "sdbpapi.h" #endif @@ -91,6 +105,8 @@ HRESULT WINAPI SdbGetAppPatchDir(HSDB db, LPWSTR path, DWORD size); LPWSTR WINAPI SdbGetStringTagPtr(PDB pdb, TAGID tagid); TAGID WINAPI SdbFindFirstNamedTag(PDB pdb, TAGID root, TAGID find, TAGID nametag, LPCWSTR find_name); DWORD WINAPI SdbQueryDataExTagID(PDB pdb, TAGID tiExe, LPCWSTR lpszDataName, LPDWORD lpdwDataType, LPVOID lpBuffer, LPDWORD lpcbBufferSize, TAGID *ptiData); +BOOL WINAPI SdbGetDatabaseInformation(PDB pdb, PDB_INFORMATION information); +VOID WINAPI SdbFreeDatabaseInformation(PDB_INFORMATION information); /* sdbread.c */ diff --git a/dll/appcompat/apphelp/apphelp.spec b/dll/appcompat/apphelp/apphelp.spec index af6582f90c..8f08f24d47 100644 --- a/dll/appcompat/apphelp/apphelp.spec +++ b/dll/appcompat/apphelp/apphelp.spec @@ -47,7 +47,7 @@ @ stub SdbFindNextStringIndexedTag @ stdcall SdbFindNextTag(ptr long long) @ stub SdbFindNextTagRef -@ stub SdbFreeDatabaseInformation +@ stdcall SdbFreeDatabaseInformation(ptr) @ stdcall SdbFreeFileAttributes(ptr) @ stub SdbFreeFileInfo @ stub SdbFreeFlagInfo @@ -55,7 +55,7 @@ @ stdcall SdbGetAppPatchDir(ptr wstr long) @ stdcall SdbGetBinaryTagData(ptr long) @ stdcall SdbGetDatabaseID(ptr ptr) -@ stub SdbGetDatabaseInformation +@ stdcall SdbGetDatabaseInformation(ptr ptr) @ stub SdbGetDatabaseInformationByName @ stub SdbGetDatabaseMatch @ stdcall SdbGetDatabaseVersion(wstr ptr ptr) diff --git a/dll/appcompat/apphelp/sdbapi.c b/dll/appcompat/apphelp/sdbapi.c index 0f380d0c1e..1a14424ca3 100644 --- a/dll/appcompat/apphelp/sdbapi.c +++ b/dll/appcompat/apphelp/sdbapi.c @@ -4,7 +4,7 @@ * PURPOSE: Sdb low level glue layer * COPYRIGHT: Copyright 2011 André Hentschel * Copyright 2013 Mislav Blaževic - * Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org) + * Copyright 2015-2019 Mark Jansen (mark.jansen(a)reactos.org) */ #include "ntndk.h" @@ -145,7 +145,7 @@ void WINAPI SdbpFlush(PDB pdb) ASSERT(pdb->for_write); Status = NtWriteFile(pdb->file, NULL, NULL, NULL, &io, pdb->data, pdb->write_iter, NULL, NULL); - if( !NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status)) SHIM_WARN("failed with 0x%lx\n", Status); } @@ -266,7 +266,7 @@ BOOL WINAPI SdbpCheckTagIDType(PDB pdb, TAGID tagid, WORD type) return SdbpCheckTagType(tag, type); } -PDB SdbpOpenDatabase(LPCWSTR path, PATH_TYPE type, PDWORD major, PDWORD minor) +PDB SdbpOpenDatabase(LPCWSTR path, PATH_TYPE type) { IO_STATUS_BLOCK io; FILE_STANDARD_INFORMATION fsi; @@ -311,8 +311,8 @@ PDB SdbpOpenDatabase(LPCWSTR path, PATH_TYPE type, PDWORD major, PDWORD minor) return NULL; } - *major = *(DWORD*)&header[0]; - *minor = *(DWORD*)&header[4]; + pdb->major = *(DWORD*)&header[0]; + pdb->minor = *(DWORD*)&header[4]; return pdb; } @@ -329,13 +329,13 @@ PDB SdbpOpenDatabase(LPCWSTR path, PATH_TYPE type, PDWORD major, PDWORD minor) PDB WINAPI SdbOpenDatabase(LPCWSTR path, PATH_TYPE type) { PDB pdb; - DWORD major, minor; + TAGID root, name; - pdb = SdbpOpenDatabase(path, type, &major, &minor); + pdb = SdbpOpenDatabase(path, type); if (!pdb) return NULL; - if (major != 2 && major != 3) + if (pdb->major != 2 && pdb->major != 3) { SdbCloseDatabase(pdb); SHIM_ERR("Invalid shim database version\n"); @@ -343,10 +343,25 @@ PDB WINAPI SdbOpenDatabase(LPCWSTR path, PATH_TYPE type) } pdb->stringtable = SdbFindFirstTag(pdb, TAGID_ROOT, TAG_STRINGTABLE); - if(!SdbGetDatabaseID(pdb, &pdb->database_id)) + if (!SdbGetDatabaseID(pdb, &pdb->database_id)) { SHIM_INFO("Failed to get the database id\n"); } + + root = SdbFindFirstTag(pdb, TAGID_ROOT, TAG_DATABASE); + if (root != TAGID_NULL) + { + name = SdbFindFirstTag(pdb, root, TAG_NAME); + if (name != TAGID_NULL) + { + pdb->database_name = SdbGetStringTagPtr(pdb, name); + } + } + if (!pdb->database_name) + { + SHIM_INFO("Failed to get the database name\n"); + } + return pdb; } @@ -397,7 +412,7 @@ BOOL WINAPI SdbGUIDFromString(PCWSTR GuidString, GUID *Guid) BOOL WINAPI SdbGUIDToString(CONST GUID *Guid, PWSTR GuidString, SIZE_T Length) { UNICODE_STRING GuidString_u; - if(NT_SUCCESS(RtlStringFromGUID(Guid, &GuidString_u))) + if (NT_SUCCESS(RtlStringFromGUID(Guid, &GuidString_u))) { HRESULT hr = StringCchCopyNW(GuidString, Length, GuidString_u.Buffer, GuidString_u.Length / 2); RtlFreeUnicodeString(&GuidString_u); @@ -445,7 +460,7 @@ BOOL WINAPI SdbGetStandardDatabaseGUID(DWORD Flags, GUID* Guid) SHIM_ERR("Cannot obtain database guid for databases other than main\n"); return FALSE; } - if(Guid) + if (Guid) { memcpy(Guid, copy_from, sizeof(GUID)); } @@ -465,13 +480,55 @@ BOOL WINAPI SdbGetDatabaseVersion(LPCWSTR database, PDWORD VersionHi, PDWORD Ver { PDB pdb; - pdb = SdbpOpenDatabase(database, DOS_PATH, VersionHi, VersionLo); + pdb = SdbpOpenDatabase(database, DOS_PATH); if (pdb) + { + *VersionHi = pdb->major; + *VersionLo = pdb->minor; SdbCloseDatabase(pdb); + } return TRUE; } +/** + * @name SdbGetDatabaseInformation + * Get information about the database + * + * @param pdb The database + * @param information The returned information + * @return TRUE on success + */ +BOOL WINAPI SdbGetDatabaseInformation(PDB pdb, PDB_INFORMATION information) +{ + if (pdb && information) + { + information->dwFlags = 0; + information->dwMajor = pdb->major; + information->dwMinor = pdb->minor; + information->Description = pdb->database_name; + if (!SdbIsNullGUID(&pdb->database_id)) + { + information->dwFlags |= DB_INFO_FLAGS_VALID_GUID; + information->Id = pdb->database_id; + } + return TRUE; + } + + return FALSE; +} + +/** + * @name SdbFreeDatabaseInformation + * Free up resources allocated in SdbGetDatabaseInformation + * + * @param information The information retrieved from SdbGetDatabaseInformation + */ +VOID WINAPI SdbFreeDatabaseInformation(PDB_INFORMATION information) +{ + // No-op +} + /** * Find the first named child tag. diff --git a/modules/rostests/apitests/apphelp/db.cpp b/modules/rostests/apitests/apphelp/db.cpp index 1ea13f1660..2ddfca9199 100644 --- a/modules/rostests/apitests/apphelp/db.cpp +++ b/modules/rostests/apitests/apphelp/db.cpp @@ -4,7 +4,7 @@ * PURPOSE: Tests for shim-database api's * COPYRIGHT: Copyright 2012 Detlef Riekenberg * Copyright 2013 Mislav Blažević - * Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org) + * Copyright 2015-2019 Mark Jansen (mark.jansen(a)reactos.org) */ #include <ntstatus.h> @@ -120,6 +120,16 @@ #define TAG_DATABASE_ID (0x7 | TAG_TYPE_BINARY) +typedef struct _DB_INFORMATION +{ + DWORD dwSomething; + DWORD dwMajor; + DWORD dwMinor; + LPCWSTR Description; + GUID Id; + /* Win10+ has an extra field here */ +} DB_INFORMATION, *PDB_INFORMATION; + static HMODULE hdll; static LPCWSTR (WINAPI *pSdbTagToString)(TAG); @@ -163,6 +173,8 @@ static LONGLONG (WINAPI* pSdbMakeIndexKeyFromString)(LPCWSTR); static DWORD (WINAPI* pSdbQueryData)(HSDB hsdb, TAGREF trWhich, LPCWSTR lpszDataName, LPDWORD lpdwDataType, LPVOID lpBuffer, LPDWORD lpcbBufferSize); static DWORD (WINAPI* pSdbQueryDataEx)(HSDB hsdb, TAGREF trWhich, LPCWSTR lpszDataName, LPDWORD lpdwDataType, LPVOID lpBuffer, LPDWORD lpcbBufferSize, TAGREF *ptrData); static DWORD (WINAPI* pSdbQueryDataExTagID)(PDB pdb, TAGID tiExe, LPCWSTR lpszDataName, LPDWORD lpdwDataType, LPVOID lpBuffer, LPDWORD lpcbBufferSize, TAGID *ptiData); +static BOOL (WINAPI* pSdbGetDatabaseInformation)(PDB pdb, PDB_INFORMATION information); +static VOID (WINAPI* pSdbFreeDatabaseInformation)(PDB_INFORMATION information); DEFINE_GUID(GUID_DATABASE_TEST, 0xe39b0eb0, 0x55db, 0x450b, 0x9b, 0xd4, 0xd2, 0x0c, 0x94, 0x84, 0x26, 0x0f); DEFINE_GUID(GUID_MAIN_DATABASE, 0x11111111, 0x1111, 0x1111, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11); @@ -174,6 +186,51 @@ static void Write(HANDLE file, LPCVOID buffer, DWORD size) WriteFile(file, buffer, size, &dwWritten, NULL); } +static void test_GetDatabaseInformationEmpty(PDB pdb) +{ + PDB_INFORMATION pInfo; + BOOL fResult; + + if (!pSdbGetDatabaseInformation || !pSdbFreeDatabaseInformation) + { + skip("GetDatabaseInformation or SdbFreeDatabaseInformation not found\n"); + return; + } + + pInfo = (PDB_INFORMATION)malloc(sizeof(*pInfo) * 4); + memset(pInfo, 0xDE, sizeof(*pInfo) * 2); + + fResult = pSdbGetDatabaseInformation(pdb, pInfo); + ok(fResult, "SdbGetDatabaseInformation failed\n"); + if (fResult) + { + ok_int(pInfo->dwSomething, 0); + ok(IsEqualGUID(GUID_NULL, pInfo->Id), "expected guid to be empty(%s)\n", wine_dbgstr_guid(&pInfo->Id)); + ok(pInfo->Description == NULL, "Expected pInfo->Description to be NULL, was %s\n", wine_dbgstr_w(pInfo->Description)); + + /* Struct is slightly bigger on some Win10, and the DB version nr is different on all */ + if (g_WinVersion >= WINVER_WIN10) + { + ok(pInfo->dwMajor == 3, "Expected pInfo->dwMajor to be 3, was: %d\n", pInfo->dwMajor); + ok(pInfo->dwMinor == 0, "Expected pInfo->dwMinor to be 0, was: %d\n", pInfo->dwMinor); + + ok(pInfo[1].dwSomething == 0 || pInfo[1].dwSomething == 0xdededede, "Something amiss: 0x%x\n", pInfo[1].dwSomething); + ok(pInfo[1].dwMajor == 0xdededede, "Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor); + } + else + { + ok(pInfo->dwMajor == 2, "Expected pInfo->dwMajor to be 2, was: %d\n", pInfo->dwMajor); + ok(pInfo->dwMinor == 1, "Expected pInfo->dwMinor to be 1, was: %d\n", pInfo->dwMinor); + + ok(pInfo[1].dwSomething == 0xdededede, "Cookie1 corrupt: 0x%x\n", pInfo[1].dwSomething); + ok(pInfo[1].dwMajor == 0xdededede, "Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor); + } + + } + free(pInfo); +} + + static void test_Sdb(void) { static const WCHAR temp[] = L"temp"; @@ -289,6 +346,8 @@ static void test_Sdb(void) word = pSdbReadWORDTag(pdb, tagid, 0); ok(word == 0xACE, "unexpected value 0x%x, expected 0x%x\n", word, 0xACE); + test_GetDatabaseInformationEmpty(pdb); + pSdbCloseDatabase(pdb); } DeleteFileW(path1); @@ -966,6 +1025,63 @@ static void check_db_apphelp(PDB pdb, TAGID root) ok(num == 2, "Expected to find 2 layer tags, found: %d\n", num); } +static void test_GetDatabaseInformation(PDB pdb) +{ + PDB_INFORMATION pInfo; + BOOL fResult; + + if (!pSdbGetDatabaseInformation || !pSdbFreeDatabaseInformation) + { + skip("GetDatabaseInformation or SdbFreeDatabaseInformation not found\n"); + return; + } + + _SEH2_TRY + { + pSdbFreeDatabaseInformation(NULL); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + ok(0, "SdbFreeDatabaseInformation did not handle a NULL pointer very gracefully.\n"); + } + _SEH2_END; + + + pInfo = (PDB_INFORMATION)malloc(sizeof(*pInfo) * 4); + memset(pInfo, 0xDE, sizeof(*pInfo) * 2); + + fResult = pSdbGetDatabaseInformation(pdb, pInfo); + ok(fResult, "SdbGetDatabaseInformation failed\n"); + if (fResult) + { + ok_int(pInfo->dwSomething, 1); + ok(IsEqualGUID(GUID_DATABASE_TEST, pInfo->Id), "expected guids to be equal(%s:%s)\n", + wine_dbgstr_guid(&GUID_DATABASE_TEST), wine_dbgstr_guid(&pInfo->Id)); + ok(wcscmp(pInfo->Description, L"apphelp_test1") == 0, + "Expected pInfo->Description to be 'apphelp_test1', was %s\n", wine_dbgstr_w(pInfo->Description)); + + /* Struct is slightly bigger on some Win10, and the DB version nr is different on all */ + if (g_WinVersion >= WINVER_WIN10) + { + ok(pInfo->dwMajor == 3, "Expected pInfo->dwMajor to be 3, was: %d\n", pInfo->dwMajor); + ok(pInfo->dwMinor == 0, "Expected pInfo->dwMinor to be 0, was: %d\n", pInfo->dwMinor); + + ok(pInfo[1].dwSomething == 4 || pInfo[1].dwSomething == 0xdededede, "Something amiss: 0x%x\n", pInfo[1].dwSomething); + ok(pInfo[1].dwMajor == 0xdededede, "Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor); + } + else + { + ok(pInfo->dwMajor == 2, "Expected pInfo->dwMajor to be 2, was: %d\n", pInfo->dwMajor); + ok(pInfo->dwMinor == 1, "Expected pInfo->dwMinor to be 1, was: %d\n", pInfo->dwMinor); + + ok(pInfo[1].dwSomething == 0xdededede, "Cookie1 corrupt: 0x%x\n", pInfo[1].dwSomething); + ok(pInfo[1].dwMajor == 0xdededede, "Cookie2 corrupt: 0x%x\n", pInfo[1].dwMajor); + } + + } + free(pInfo); +} + static void test_CheckDatabaseManually(void) { static const WCHAR path[] = {'t','e','s','t','_','d','b','.','s','d','b',0}; @@ -1040,6 +1156,7 @@ static void test_CheckDatabaseManually(void) check_db_exes(pdb, root); check_db_apphelp(pdb, root); } + test_GetDatabaseInformation(pdb); pSdbCloseDatabase(pdb); DeleteFileA("test_db.sdb"); @@ -1998,6 +2115,8 @@ START_TEST(db) *(void**)&pSdbQueryDataEx = (void *)GetProcAddress(hdll, "SdbQueryDataEx"); *(void**)&pSdbQueryDataExTagID = (void *)GetProcAddress(hdll, "SdbQueryDataExTagID"); *(void**)&pSdbGetLayerTagRef = (void *)GetProcAddress(hdll, "SdbGetLayerTagRef"); + *(void**)&pSdbGetDatabaseInformation = (void *)GetProcAddress(hdll, "SdbGetDatabaseInformation"); + *(void**)&pSdbFreeDatabaseInformation = (void *)GetProcAddress(hdll, "SdbFreeDatabaseInformation"); test_Sdb(); test_write_ex(); diff --git a/sdk/include/reactos/appcompat/sdbtypes.h b/sdk/include/reactos/appcompat/sdbtypes.h index 22ef7ae751..b804bd07b6 100644 --- a/sdk/include/reactos/appcompat/sdbtypes.h +++ b/sdk/include/reactos/appcompat/sdbtypes.h @@ -27,7 +27,10 @@ typedef struct _DB { BYTE* data; TAGID stringtable; DWORD write_iter; + DWORD major; + DWORD minor; GUID database_id; + PCWSTR database_name; BOOL for_write; struct SdbStringHashTable* string_lookup; struct _DB* string_buffer;
5 years, 10 months
1
0
0
0
[reactos] 03/06: [APPHELP] Implement ShimDumpCache and ShimFlushCache These functions simply call into the Base* functions, having a prototype that is compatible with rundll32 CORE-11301
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5c05a29d3d3f7507e8687…
commit 5c05a29d3d3f7507e86879f887fe7b990f665555 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Jan 6 17:51:55 2019 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Feb 25 20:00:34 2019 +0100 [APPHELP] Implement ShimDumpCache and ShimFlushCache These functions simply call into the Base* functions, having a prototype that is compatible with rundll32 CORE-11301 --- dll/appcompat/apphelp/apphelp.c | 35 +++++++++++++++++++++++++++++++++++ dll/appcompat/apphelp/apphelp.spec | 4 ++-- dll/win32/kernel32/client/appcache.c | 18 ++++++++++++------ ntoskrnl/ps/apphelp.c | 1 + 4 files changed, 50 insertions(+), 8 deletions(-) diff --git a/dll/appcompat/apphelp/apphelp.c b/dll/appcompat/apphelp/apphelp.c index 1e1a65b67b..ceb71a8e16 100644 --- a/dll/appcompat/apphelp/apphelp.c +++ b/dll/appcompat/apphelp/apphelp.c @@ -292,3 +292,38 @@ BOOL WINAPI SdbUnregisterDatabase(_In_ GUID *pguidDB) return FALSE; } + +/* kernel32.dll */ +BOOL WINAPI BaseDumpAppcompatCache(VOID); +BOOL WINAPI BaseFlushAppcompatCache(VOID); + + +/** + * @name ShimDumpCache + * Dump contents of the shim cache. + * + * @param hwnd Unused, pass 0 + * @param hInstance Unused, pass 0 + * @param lpszCmdLine Unused, pass 0 + * @param nCmdShow Unused, pass 0 + * @return + */ +BOOL WINAPI ShimDumpCache(HWND hwnd, HINSTANCE hInstance, LPCSTR lpszCmdLine, int nCmdShow) +{ + return BaseDumpAppcompatCache(); +} + +/** +* @name ShimFlushCache +* Flush the shim cache. Call this after installing a new shim database +* +* @param hwnd Unused, pass 0 +* @param hInstance Unused, pass 0 +* @param lpszCmdLine Unused, pass 0 +* @param nCmdShow Unused, pass 0 +* @return +*/ +BOOL WINAPI ShimFlushCache(HWND hwnd, HINSTANCE hInstance, LPCSTR lpszCmdLine, int nCmdShow) +{ + return BaseFlushAppcompatCache(); +} diff --git a/dll/appcompat/apphelp/apphelp.spec b/dll/appcompat/apphelp/apphelp.spec index 83735803f6..af6582f90c 100644 --- a/dll/appcompat/apphelp/apphelp.spec +++ b/dll/appcompat/apphelp/apphelp.spec @@ -173,7 +173,7 @@ @ stub SE_LdrEntryRemoved @ stub SetPermLayers @ cdecl ShimDbgPrint(long str str) -@ stub ShimDumpCache -@ stub ShimFlushCache +@ stdcall ShimDumpCache(ptr ptr wstr long) +@ stdcall ShimFlushCache(ptr ptr wstr long) @ stdcall SetPermLayerState(wstr wstr long long long) @ stdcall SdbRegisterDatabaseEx(wstr long ptr) diff --git a/dll/win32/kernel32/client/appcache.c b/dll/win32/kernel32/client/appcache.c index 302984ae99..81ffaefc3b 100644 --- a/dll/win32/kernel32/client/appcache.c +++ b/dll/win32/kernel32/client/appcache.c @@ -309,23 +309,29 @@ BasepCheckBadapp(IN HANDLE FileHandle, } /* - * @unimplemented + * @implemented */ -VOID +BOOL WINAPI BaseDumpAppcompatCache(VOID) { - STUB; + NTSTATUS Status; + + Status = NtApphelpCacheControl(ApphelpCacheServiceDump, NULL); + return NT_SUCCESS(Status); } /* - * @unimplemented + * @implemented */ -VOID +BOOL WINAPI BaseFlushAppcompatCache(VOID) { - STUB; + NTSTATUS Status; + + Status = NtApphelpCacheControl(ApphelpCacheServiceFlush, NULL); + return NT_SUCCESS(Status); } /* diff --git a/ntoskrnl/ps/apphelp.c b/ntoskrnl/ps/apphelp.c index 7692c7ab2e..7d9516e22b 100644 --- a/ntoskrnl/ps/apphelp.c +++ b/ntoskrnl/ps/apphelp.c @@ -764,6 +764,7 @@ NtApphelpCacheControl( } break; case ApphelpCacheServiceFlush: + /* FIXME: Check for admin or system here. */ Status = ApphelpCacheFlush(); break; case ApphelpCacheServiceDump:
5 years, 10 months
1
0
0
0
[reactos] 02/06: [SDB] Initial SdbRegisterDatabase stubs CORE-11301
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f2f54a052e5cc53e259d4…
commit f2f54a052e5cc53e259d4d8829288c1cacbf944b Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Thu Jan 3 23:24:54 2019 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Feb 25 20:00:34 2019 +0100 [SDB] Initial SdbRegisterDatabase stubs CORE-11301 --- dll/appcompat/apphelp/apphelp.c | 56 ++++++++++++++++++++++++++++++++++++-- dll/appcompat/apphelp/apphelp.spec | 5 ++-- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/dll/appcompat/apphelp/apphelp.c b/dll/appcompat/apphelp/apphelp.c index 4c04e5d80e..1e1a65b67b 100644 --- a/dll/appcompat/apphelp/apphelp.c +++ b/dll/appcompat/apphelp/apphelp.c @@ -4,7 +4,7 @@ * PURPOSE: apphelp entrypoint / generic interface functions * COPYRIGHT: Copyright 2011 André Hentschel * Copyright 2013 Mislav Blaževic - * Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org) + * Copyright 2015-2019 Mark Jansen (mark.jansen(a)reactos.org) */ #define WIN32_NO_STATUS @@ -66,7 +66,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) BOOL WINAPI ApphelpCheckInstallShieldPackage(void* ptr, LPCWSTR path) { - SHIM_WARN("stub: ptr=%p, path='%S'\r\n", ptr, path); + SHIM_WARN("stub: ptr=%p, path='%S'\n", ptr, path); return TRUE; } @@ -240,3 +240,55 @@ ApphelpCheckRunAppEx( return TRUE; } + +/** + * @name SdbRegisterDatabaseEx + * Register an application compatibility database + * + * @param pszDatabasePath The database. Required + * @param dwDatabaseType The database type. SDB_DATABASE_* + * @param pTimeStamp The timestamp. When this argument is not provided, the system time is used. + * @return TRUE on success, or FALSE on failure. + */ +BOOL WINAPI SdbRegisterDatabaseEx( + _In_ LPCTSTR pszDatabasePath, + _In_ DWORD dwDatabaseType, + _In_opt_ PULONGLONG pTimeStamp) +{ + SHIM_ERR("UNIMPLEMENTED, pszDatabasePath=%ws, dwDatabaseType=0x%x, pTimeStamp=%p\n", + pszDatabasePath, dwDatabaseType, pTimeStamp); + + return FALSE; +} + + +/** + * @name SdbRegisterDatabase + * Register an application compatibility database + * + * @param pszDatabasePath The database. Required + * @param dwDatabaseType The database type. SDB_DATABASE_* + * @return TRUE on success, or FALSE on failure. + */ +BOOL WINAPI SdbRegisterDatabase( + _In_ LPCTSTR pszDatabasePath, + _In_ DWORD dwDatabaseType) +{ + return SdbRegisterDatabaseEx(pszDatabasePath, dwDatabaseType, NULL); +} + + +/** + * @name SdbUnregisterDatabase + * + * + * @param pguidDB + * @return + */ +BOOL WINAPI SdbUnregisterDatabase(_In_ GUID *pguidDB) +{ + SHIM_ERR("UNIMPLEMENTED, pguidDB = %p\n", pguidDB); + + return FALSE; +} + diff --git a/dll/appcompat/apphelp/apphelp.spec b/dll/appcompat/apphelp/apphelp.spec index 9509e6e975..83735803f6 100644 --- a/dll/appcompat/apphelp/apphelp.spec +++ b/dll/appcompat/apphelp/apphelp.spec @@ -129,7 +129,7 @@ @ stub SdbReadStringTagRef @ stdcall SdbReadWORDTag(ptr long long) @ stub SdbReadWORDTagRef -@ stub SdbRegisterDatabase +@ stdcall SdbRegisterDatabase(wstr long) @ stdcall SdbReleaseDatabase(ptr) @ stub SdbReleaseMatchingExe @ stub SdbResolveDatabase @@ -147,7 +147,7 @@ @ stdcall SdbTagIDToTagRef(ptr ptr long ptr) @ stdcall SdbTagRefToTagID(ptr long ptr ptr) @ stdcall SdbTagToString(long) -@ stub SdbUnregisterDatabase +@ stdcall SdbUnregisterDatabase(ptr) @ stdcall SdbWriteBinaryTag(ptr long ptr long) @ stdcall SdbWriteBinaryTagFromFile(ptr long wstr) @ stub SdbWriteBYTETag @@ -176,3 +176,4 @@ @ stub ShimDumpCache @ stub ShimFlushCache @ stdcall SetPermLayerState(wstr wstr long long long) +@ stdcall SdbRegisterDatabaseEx(wstr long ptr)
5 years, 10 months
1
0
0
0
[reactos] 01/06: [APPHELP_APITEST] Add a test for shim database registration CORE-11301
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a9bd3da29907983285388…
commit a9bd3da299079832853884be595fa9b7e08ee95b Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Fri Jun 23 21:47:36 2017 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Mon Feb 25 20:00:34 2019 +0100 [APPHELP_APITEST] Add a test for shim database registration CORE-11301 --- modules/rostests/apitests/apphelp/CMakeLists.txt | 7 +- modules/rostests/apitests/apphelp/register.cpp | 374 +++++++++++++++++++++++ modules/rostests/apitests/apphelp/testlist.c | 2 + 3 files changed, 381 insertions(+), 2 deletions(-) diff --git a/modules/rostests/apitests/apphelp/CMakeLists.txt b/modules/rostests/apitests/apphelp/CMakeLists.txt index 06ca2ba83a..40da34c905 100644 --- a/modules/rostests/apitests/apphelp/CMakeLists.txt +++ b/modules/rostests/apitests/apphelp/CMakeLists.txt @@ -1,7 +1,9 @@ project(appcompat) -add_definitions(-D__ROS_LONG64__ -DWINETEST_USE_DBGSTR_LONGLONG) +add_definitions(-D__ROS_LONG64__ -DWINETEST_USE_DBGSTR_LONGLONG -DUNICODE -D_UNICODE) +set_cpp(WITH_RUNTIME) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl + ${CMAKE_CURRENT_BINARY_DIR}) list(APPEND SOURCE apphelp.c @@ -9,6 +11,7 @@ list(APPEND SOURCE db.cpp env.c layerapi.c + register.cpp testlist.c testdata.rc testdb.xml) diff --git a/modules/rostests/apitests/apphelp/register.cpp b/modules/rostests/apitests/apphelp/register.cpp new file mode 100644 index 0000000000..fb093cc594 --- /dev/null +++ b/modules/rostests/apitests/apphelp/register.cpp @@ -0,0 +1,374 @@ +/* + * PROJECT: apphelp_apitest + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Tests for shim database registration + * COPYRIGHT: Copyright 2017-2019 Mark Jansen (mark.jansen(a)reactos.org) + */ + +#include <ntstatus.h> +#define WIN32_NO_STATUS +#include <windows.h> +#include <ntndk.h> +#include <atlbase.h> +#include <strsafe.h> +#include "wine/test.h" + +static const unsigned char rawDB[] = +{ + /* Header: Major, Minor, 'sdbf' */ + 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x73, 0x64, 0x62, 0x66, + + /* TAG_DATABASE, Length */ + 0x01, 0x70, 0x22, 0x00, 0x00, 0x00, + /* TAG_NAME, Value */ + 0x01, 0x60, 0x06, 0x00, 0x00, 0x00, + + /* TAG_DATABASE_ID, Length, Value*/ + 0x07, 0x90, 0x10, 0x00, 0x00, 0x00, + /* offset 30 */ + 0xEB, 0x75, 0xDD, 0x79, 0x98, 0xC0, 0x57, 0x47, 0x99, 0x65, 0x9E, 0x83, 0xC4, 0xCA, 0x9D, 0xA4, + + /* TAG_LIBRARY, Length */ + 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, + + /* TAG_STRINGTABLE, Length */ + 0x01, 0x78, 0x0E, 0x00, 0x00, 0x00, + /* TAG_STRINGTABLE_ITEM, Length, Value */ + 0x01, 0x88, 0x08, 0x00, 0x00, 0x00, + 0x49, 0x00, 0x43, 0x00, 0x53, 0x00, 0x00, 0x00 +}; + +static BOOL WriteSdbFile(const WCHAR* FileName, const unsigned char* Data, DWORD Size, const GUID* CustomID) +{ + BOOL Success; + DWORD dwWritten; + HANDLE Handle = CreateFileW(FileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + + if (Handle == INVALID_HANDLE_VALUE) + { + skip("Failed to create temp file %ls, error %u\n", FileName, GetLastError()); + return FALSE; + } + Success = WriteFile(Handle, Data, Size, &dwWritten, NULL); + ok(Success == TRUE, "WriteFile failed with %u\n", GetLastError()); + ok(dwWritten == Size, "WriteFile wrote %u bytes instead of %u\n", dwWritten, Size); + if (CustomID) + { + DWORD dwGuidSize; + SetFilePointer(Handle, 30, NULL, FILE_BEGIN); + Success = WriteFile(Handle, CustomID, sizeof(*CustomID), &dwGuidSize, NULL); + ok(dwGuidSize == sizeof(GUID), "WriteFile wrote %u bytes instead of %u\n", dwGuidSize, sizeof(GUID)); + } + CloseHandle(Handle); + return Success && (dwWritten == Size); +} + + + +static const GUID GUID_DATABASE_SHIM = { 0x11111111, 0x1111, 0x1111, { 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11 } }; +static const GUID GUID_DATABASE_MSI = { 0xd8ff6d16, 0x6a3a, 0x468a, { 0x8b, 0x44, 0x01, 0x71, 0x4d, 0xdc, 0x49, 0xea } }; +static const GUID GUID_DATABASE_DRIVERS = { 0xf9ab2228, 0x3312, 0x4a73, { 0xb6, 0xf9, 0x93, 0x6d, 0x70, 0xe1, 0x12, 0xef } }; +static const GUID TEST_DB_GUID = { 0x79dd75eb, 0xc098, 0x4757, { 0x99, 0x65, 0x9e, 0x83, 0xc4, 0xca, 0x9d, 0xa4 } }; + +#define SDB_DATABASE_MAIN 0x80000000 + +BOOL (WINAPI *pSdbRegisterDatabase)(LPCWSTR pszDatabasePath, DWORD dwDatabaseType); +BOOL (WINAPI *pSdbRegisterDatabaseEx)(LPCWSTR pszDatabasePath, DWORD dwDatabaseType, const PULONGLONG pTimeStamp); +BOOL (WINAPI *pSdbUnregisterDatabase)(REFGUID pguidDB); + + +BOOL IsUserAdmin() +{ + BOOL Result; + SID_IDENTIFIER_AUTHORITY NtAuthority = { SECURITY_NT_AUTHORITY }; + PSID AdministratorsGroup; + + Result = AllocateAndInitializeSid(&NtAuthority, 2, + SECURITY_BUILTIN_DOMAIN_RID, + DOMAIN_ALIAS_RID_ADMINS, + 0, 0, 0, 0, 0, 0, + &AdministratorsGroup); + if (Result) + { + if (!CheckTokenMembership( NULL, AdministratorsGroup, &Result)) + Result = FALSE; + FreeSid(AdministratorsGroup); + } + + return Result; +} + +static DWORD g_QueryFlag = 0xffffffff; +static DWORD QueryFlag(void) +{ + if (g_QueryFlag == 0xffffffff) + { + ULONG_PTR wow64_ptr = 0; + NTSTATUS status = NtQueryInformationProcess(NtCurrentProcess(), ProcessWow64Information, &wow64_ptr, sizeof(wow64_ptr), NULL); + g_QueryFlag = (NT_SUCCESS(status) && wow64_ptr != 0) ? KEY_WOW64_64KEY : 0; + } + return g_QueryFlag; +} + +static void FileTimeNow(ULARGE_INTEGER& Result) +{ + FILETIME TimeBuffer; + + GetSystemTimeAsFileTime(&TimeBuffer); + Result.HighPart = TimeBuffer.dwHighDateTime; + Result.LowPart = TimeBuffer.dwLowDateTime; +} + +static void ok_keys_(REFGUID Guid, LPCWSTR DisplayName, LPCWSTR Path, DWORD Type, PULONGLONG TimeStamp) +{ + UNICODE_STRING GuidString; + WCHAR StringBuffer[200]; + DWORD ValueBuffer; + ULARGE_INTEGER LargeUIntBuffer; + + CRegKey key; + LSTATUS Status = key.Open(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\InstalledSDB", KEY_READ | QueryFlag()); + winetest_ok(!Status, "Unable to open InstalledSDB key\n"); + if (Status) + return; + + if (!SUCCEEDED(RtlStringFromGUID(Guid, &GuidString))) + { + ok(0, "Unable to format guid\n"); + return; + } + + Status = key.Open(key.m_hKey, GuidString.Buffer, KEY_READ); + winetest_ok(!Status, "Unable to open %s key (0x%x)\n", wine_dbgstr_w(GuidString.Buffer), Status); + RtlFreeUnicodeString(&GuidString); + if (Status) + return; + + ULONG nChars = _countof(StringBuffer); + Status = key.QueryStringValue(L"DatabaseDescription", StringBuffer, &nChars); + winetest_ok(!Status, "Unable to read DatabaseDescription (0x%x)\n", Status); + if (!Status) + winetest_ok(!wcscmp(DisplayName, StringBuffer), "Expected DatabaseDescription to be %s, was %s\n", wine_dbgstr_w(DisplayName), wine_dbgstr_w(StringBuffer)); + + nChars = _countof(StringBuffer); + Status = key.QueryStringValue(L"DatabasePath", StringBuffer, &nChars); + winetest_ok(!Status, "Unable to read DatabasePath (0x%x)\n", Status); + if (!Status) + winetest_ok(!wcscmp(Path, StringBuffer), "Expected DatabasePath to be %s, was %s\n", wine_dbgstr_w(Path), wine_dbgstr_w(StringBuffer)); + + Status = key.QueryDWORDValue(L"DatabaseType", ValueBuffer); + winetest_ok(!Status, "Unable to read DatabaseType (0x%x)\n", Status); + if (!Status) + winetest_ok(ValueBuffer == Type, "Expected DatabaseType to be 0x%x, was 0x%x\n", Type, ValueBuffer); + + Status = key.QueryQWORDValue(L"DatabaseInstallTimeStamp", LargeUIntBuffer.QuadPart); + winetest_ok(!Status, "Unable to read DatabaseInstallTimeStamp (0x%x)\n", Status); + if (!Status) + { + if (TimeStamp) + { + winetest_ok(LargeUIntBuffer.QuadPart == *TimeStamp, "Expected DatabaseInstallTimeStamp to be %s, was %s\n", + wine_dbgstr_longlong(*TimeStamp), wine_dbgstr_longlong(LargeUIntBuffer.QuadPart)); + } + else + { + ULARGE_INTEGER CurrentTime; + FileTimeNow(CurrentTime); + ULONG DiffMS = (ULONG)((CurrentTime.QuadPart - LargeUIntBuffer.QuadPart) / 10000); + winetest_ok(DiffMS < 5000 , "Expected DatabaseInstallTimeStamp to be less than 5 seconds before now (was: %u)\n", DiffMS); + } + } +} + + +#define ok_keys (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : ok_keys_ + + +START_TEST(register) +{ + WCHAR TempPath[MAX_PATH * 2]; + BOOL Success; + HMODULE hdll; + + SetEnvironmentVariableA("SHIM_DEBUG_LEVEL", "4"); + SetEnvironmentVariableA("SHIMENG_DEBUG_LEVEL", "4"); + SetEnvironmentVariableA("DEBUGCHANNEL", "+apphelp"); + + //silence_debug_output(); + hdll = LoadLibraryA("apphelp.dll"); + + *(void**)&pSdbRegisterDatabase = (void*)GetProcAddress(hdll, "SdbRegisterDatabase"); + *(void**)&pSdbRegisterDatabaseEx = (void*)GetProcAddress(hdll, "SdbRegisterDatabaseEx"); + *(void**)&pSdbUnregisterDatabase = (void*)GetProcAddress(hdll, "SdbUnregisterDatabase"); + + if (!pSdbRegisterDatabase || !pSdbRegisterDatabaseEx || !pSdbUnregisterDatabase) + { + skip("Not all functions present: %p, %p, %p\n", pSdbRegisterDatabase, pSdbRegisterDatabaseEx, pSdbUnregisterDatabase); + return; + } + + /* [Err ][SdbUnregisterDatabase] Failed to open key "\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB\{11111111-1111-1111-1111-111111111111}" Status 0xc0000034 */ + ok_int(pSdbUnregisterDatabase(GUID_DATABASE_SHIM), FALSE); + ok_int(pSdbUnregisterDatabase(GUID_DATABASE_MSI), FALSE); + ok_int(pSdbUnregisterDatabase(GUID_DATABASE_DRIVERS), FALSE); + + + if (!IsUserAdmin()) + { + skip("Not running as admin, unable to install databases!\n"); + return; + } + + GetTempPathW(_countof(TempPath), TempPath); + StringCchCatW(TempPath, _countof(TempPath), L"\\shim_db.sdb"); + if (!WriteSdbFile(TempPath, rawDB, sizeof(rawDB), NULL)) + { + skip("Cannot write %s\n", wine_dbgstr_w(TempPath)); + return; + } + + /* No Type */ + Success = pSdbRegisterDatabase(TempPath, 0); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, 0, NULL); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + /* Unknown type */ + Success = pSdbRegisterDatabase(TempPath, 1); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, 1, NULL); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + /* System type */ + Success = pSdbRegisterDatabase(TempPath, SDB_DATABASE_MAIN); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, SDB_DATABASE_MAIN, NULL); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + /* No type, null time */ + Success = pSdbRegisterDatabaseEx(TempPath, 0, NULL); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, 0, NULL); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + /* Unknown type, null time */ + Success = pSdbRegisterDatabaseEx(TempPath, 1, NULL); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, 1, NULL); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + + /* System type, null time */ + Success = pSdbRegisterDatabaseEx(TempPath, SDB_DATABASE_MAIN, NULL); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, SDB_DATABASE_MAIN, NULL); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + ULARGE_INTEGER Time; + FileTimeNow(Time); + Time.QuadPart ^= 0xffffffffffffffffll; + /* No type, random time */ + Success = pSdbRegisterDatabaseEx(TempPath, 0, &Time.QuadPart); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, 0, &Time.QuadPart); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + /* Unknown type, random time */ + Success = pSdbRegisterDatabaseEx(TempPath, 1, &Time.QuadPart); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, 1, &Time.QuadPart); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + /* System type, random time */ + Success = pSdbRegisterDatabaseEx(TempPath, SDB_DATABASE_MAIN, &Time.QuadPart); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(TEST_DB_GUID, L"ICS", TempPath, SDB_DATABASE_MAIN, &Time.QuadPart); + Success = pSdbUnregisterDatabase(TEST_DB_GUID); + ok_int(Success, TRUE); + } + + /* System reserved ID's */ + if (!WriteSdbFile(TempPath, rawDB, sizeof(rawDB), &GUID_DATABASE_SHIM)) + { + skip("Cannot write %s\n", wine_dbgstr_w(TempPath)); + DeleteFileW(TempPath); + return; + } + + Success = pSdbRegisterDatabase(TempPath, 0); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(GUID_DATABASE_SHIM, L"ICS", TempPath, 0, NULL); + Success = pSdbUnregisterDatabase(GUID_DATABASE_SHIM); + ok_int(Success, TRUE); + } + + if (!WriteSdbFile(TempPath, rawDB, sizeof(rawDB), &GUID_DATABASE_MSI)) + { + skip("Cannot write %s\n", wine_dbgstr_w(TempPath)); + DeleteFileW(TempPath); + return; + } + + Success = pSdbRegisterDatabase(TempPath, 0); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(GUID_DATABASE_MSI, L"ICS", TempPath, 0, NULL); + Success = pSdbUnregisterDatabase(GUID_DATABASE_MSI); + ok_int(Success, TRUE); + } + + if (!WriteSdbFile(TempPath, rawDB, sizeof(rawDB), &GUID_DATABASE_DRIVERS)) + { + skip("Cannot write %s\n", wine_dbgstr_w(TempPath)); + DeleteFileW(TempPath); + return; + } + + Success = pSdbRegisterDatabase(TempPath, 0); + ok_int(Success, TRUE); + if (Success) + { + ok_keys(GUID_DATABASE_DRIVERS, L"ICS", TempPath, 0, NULL); + Success = pSdbUnregisterDatabase(GUID_DATABASE_DRIVERS); + ok_int(Success, TRUE); + } + + DeleteFileW(TempPath); +} diff --git a/modules/rostests/apitests/apphelp/testlist.c b/modules/rostests/apitests/apphelp/testlist.c index a90da5fba5..c27d4e4821 100644 --- a/modules/rostests/apitests/apphelp/testlist.c +++ b/modules/rostests/apitests/apphelp/testlist.c @@ -7,6 +7,7 @@ extern void func_apphelp(void); extern void func_db(void); extern void func_env(void); extern void func_layerapi(void); +extern void func_register(void); const struct test winetest_testlist[] = { @@ -14,5 +15,6 @@ const struct test winetest_testlist[] = { "db", func_db }, { "env", func_env }, { "layerapi", func_layerapi }, + { "register", func_register }, { 0, 0 } };
5 years, 10 months
1
0
0
0
[reactos] 01/01: [MODULES][WALLPAPERS] Fix build (#1375)
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=12e78a9039569fdc82697…
commit 12e78a9039569fdc8269711c19b457d8006641a9 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon Feb 25 13:41:41 2019 +0300 Commit: Robert Naumann <gonzomdx(a)gmail.com> CommitDate: Mon Feb 25 11:41:41 2019 +0100 [MODULES][WALLPAPERS] Fix build (#1375) Some file names still contained space instead of underline. Addendum to 0760802. --- ... A_New_Hope_16x9.jpg => Angelus.ROS_A_New_Hope_16x9.jpg} | Bin ...OS A_New_Hope_4x3.jpg => Angelus.ROS_A_New_Hope_4x3.jpg} | Bin 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/modules/wallpapers/Angelus/ReactOSNewHope/Angelus.ROS A_New_Hope_16x9.jpg b/modules/wallpapers/Angelus/ReactOSNewHope/Angelus.ROS_A_New_Hope_16x9.jpg similarity index 100% rename from modules/wallpapers/Angelus/ReactOSNewHope/Angelus.ROS A_New_Hope_16x9.jpg rename to modules/wallpapers/Angelus/ReactOSNewHope/Angelus.ROS_A_New_Hope_16x9.jpg diff --git a/modules/wallpapers/Angelus/ReactOSNewHope/Angelus.ROS A_New_Hope_4x3.jpg b/modules/wallpapers/Angelus/ReactOSNewHope/Angelus.ROS_A_New_Hope_4x3.jpg similarity index 100% rename from modules/wallpapers/Angelus/ReactOSNewHope/Angelus.ROS A_New_Hope_4x3.jpg rename to modules/wallpapers/Angelus/ReactOSNewHope/Angelus.ROS_A_New_Hope_4x3.jpg
5 years, 10 months
1
0
0
0
[reactos] 01/01: [TRANSLATION] Update Chinese and Traditional Chinese translations. (#1369)
by Luo Yufan
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ca9cdce7608b906f047e6…
commit ca9cdce7608b906f047e6d926774e378fe6a6327 Author: Luo Yufan <njlyf2011(a)hotmail.com> AuthorDate: Mon Feb 25 07:36:53 2019 +0800 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Feb 25 00:36:53 2019 +0100 [TRANSLATION] Update Chinese and Traditional Chinese translations. (#1369) --- dll/cpl/hdwwiz/lang/zh-TW.rc | 16 +- dll/cpl/inetcpl/lang/zh-TW.rc | 2 +- dll/cpl/telephon/lang/zh-TW.rc | 5 +- dll/win32/browseui/lang/zh-CN.rc | 6 +- dll/win32/shdoclc/lang/Zh.rc | 31 +-- dll/win32/shell32/lang/zh-CN.rc | 8 +- dll/win32/shell32/lang/zh-TW.rc | 2 +- .../rosapps/applications/imagesoft/lang/zh-CN.rc | 234 +++++++++++++++++++++ modules/rosapps/applications/imagesoft/rsrc.rc | 3 + .../applications/vcdcontroltool/lang/zh-CN.rc | 0 .../applications/vcdcontroltool/lang/zh-TW.rc | 0 modules/rosapps/applications/winfile/lang/zh-CN.rc | 127 +---------- .../winfile/lang/{zh-CN.rc => zh-TW.rc} | 133 +----------- modules/rosapps/applications/winfile/rsrc.rc | 4 + 14 files changed, 284 insertions(+), 287 deletions(-) diff --git a/dll/cpl/hdwwiz/lang/zh-TW.rc b/dll/cpl/hdwwiz/lang/zh-TW.rc index 49fadd63e5..59533a4975 100644 --- a/dll/cpl/hdwwiz/lang/zh-TW.rc +++ b/dll/cpl/hdwwiz/lang/zh-TW.rc @@ -56,7 +56,7 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "新增硬體精靈" FONT 9, "新細明體" BEGIN - LTEXT "這個嚮導可以搜索其他硬體併為您自動安裝。或者,如果您知道要安裝哪個型號的硬體,您可以從清單選擇。", -1, 21, 8, 280, 24 + LTEXT "這個精靈可以搜索其他硬體併為您自動安裝。或者,如果您知道要安裝哪個型號的硬體,您可以從清單選擇。", -1, 21, 8, 280, 24 LTEXT "您期望精靈做什麼?", -1, 23, 40, 275, 8 AUTORADIOBUTTON "搜索並自動安裝硬體(推薦)(&S)", IDC_AUTOINSTALL, 30, 55, 266, 8, WS_GROUP | NOT WS_TABSTOP AUTORADIOBUTTON "安裝我手動從清單選擇的硬體(進階)(&M)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP @@ -84,7 +84,7 @@ END IDD_PROGRESSPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "添加硬體嚮導" +CAPTION "新增硬體精靈" FONT 9, "新細明體" BEGIN LTEXT "可能需要幾分鐘的時間來搜尋硬體。", -1, 21, 8, 275, 15 @@ -110,9 +110,9 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "新增硬體精靈" FONT 9, "新細明體" BEGIN - LTEXT "正在完成添加硬體嚮導", IDC_FINISHTITLE, 114, 8, 203, 24 + LTEXT "正在完成新增硬體精靈", IDC_FINISHTITLE, 114, 8, 203, 24 LTEXT "安裝了下列硬體:", -1, 114, 32, 193, 19 - LTEXT "要關閉這個嚮導,請按 [完成]。", -1, 114, 166, 132, 8 + LTEXT "要關閉這個精靈,請按 [完成]。", -1, 114, 166, 132, 8 CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END @@ -125,7 +125,7 @@ BEGIN LTEXT "這裡是您所選硬體的當前狀態:", -1, 114, 40, 193, 19 EDITTEXT IDC_HWSTATUSEDIT, 114, 60, 193, 70, ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP LTEXT "要啟用可以幫助您解決問題的疑難解答,請按 [完成]。", -1, 114, 136, 193, 16 - LTEXT "要退出這個嚮導,請按 [取消]。", IDC_STATUSTEXT, 114, 166, 132, 8 + LTEXT "要退出這個精靈,請按 [取消]。", IDC_STATUSTEXT, 114, 166, 132, 8 END IDD_NOTCONNECTEDPAGE DIALOGEX 0, 0, 317, 186 @@ -133,11 +133,11 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "新增硬體精靈" FONT 9, "新細明體" BEGIN - LTEXT "無法繼續添加硬體嚮導", IDC_FINISHTITLE, 114, 8, 203, 28 + LTEXT "無法繼續新增硬體精靈", IDC_FINISHTITLE, 114, 8, 203, 28 LTEXT "要繼續,請將這個硬體跟電腦連線。", -1, 114, 40, 193, 16 AUTOCHECKBOX "點選 [完成] 時關閉電腦;這樣,我可以開啟電腦並連線硬體(&T)。", IDC_TURNOFFCHECKBOX, 114, 64, 203, 20, BS_TOP | BS_MULTILINE - LTEXT "在大多數情況下,ReactOS 在硬體和電腦連線後自動將其安裝。如果 ReactOS 找不到這個硬體,您可以重新開啟這個嚮導,安裝支援軟體。", -1, 114, 98, 193, 32 - LTEXT "要關閉這個嚮導,請按 [完成]。", IDC_STATUSTEXT, 114, 166, 193, 8 + LTEXT "在大多數情況下,ReactOS 在硬體和電腦連線後自動將其安裝。如果 ReactOS 找不到這個硬體,您可以重新開啟這個精靈,安裝支援軟體。", -1, 114, 98, 193, 32 + LTEXT "要關閉這個精靈,請按 [完成]。", IDC_STATUSTEXT, 114, 166, 193, 8 END STRINGTABLE diff --git a/dll/cpl/inetcpl/lang/zh-TW.rc b/dll/cpl/inetcpl/lang/zh-TW.rc index 108dbd0506..2acde8bdae 100644 --- a/dll/cpl/inetcpl/lang/zh-TW.rc +++ b/dll/cpl/inetcpl/lang/zh-TW.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE BEGIN - IDS_CPL_NAME "網際網路設定" + IDS_CPL_NAME "網際網路選項" IDS_CPL_INFO "配置 Wine 網際網路瀏覽器和相關的設定" IDS_SEC_SETTINGS "區域的安全設定: " IDS_SEC_LEVEL0 "自訂" diff --git a/dll/cpl/telephon/lang/zh-TW.rc b/dll/cpl/telephon/lang/zh-TW.rc index 041f749295..36e0197ba9 100644 --- a/dll/cpl/telephon/lang/zh-TW.rc +++ b/dll/cpl/telephon/lang/zh-TW.rc @@ -1,9 +1,10 @@ /* Traditional Chinese translation by Henry Tang Ih 2016 (henrytang2(a)hotmail.com) */ +/* Improved by Luo Yufan 2019 (njlyf2011(a)hotmail.com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "電話和調制解調器選項" - IDS_CPLSYSTEMDESCRIPTION "配置您的電話撥號規則和調制解調器設置。" + IDS_CPLSYSTEMNAME "電話和數據機選項" + IDS_CPLSYSTEMDESCRIPTION "配置您的電話撥號規則和數據機設定。" END diff --git a/dll/win32/browseui/lang/zh-CN.rc b/dll/win32/browseui/lang/zh-CN.rc index 004ec38bb8..eb7f4edcf6 100644 --- a/dll/win32/browseui/lang/zh-CN.rc +++ b/dll/win32/browseui/lang/zh-CN.rc @@ -17,7 +17,7 @@ */ /* Simplified Chinese translation by Henry Tang Ih 2015 (henrytang2(a)hotmail.com) */ -/* Translation has been changed by Luo Yufan 2018 (njlyf2011(a)hotmail.com) */ +/* Translation has been changed by Luo Yufan 2018, 2019 (njlyf2011(a)hotmail.com) */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -85,8 +85,8 @@ BEGIN END POPUP "工具(&T)", FCIDM_MENU_TOOLS BEGIN - MENUITEM "映射网络磁盘...(&N)", IDM_TOOLS_MAPNETWORKDRIVE - MENUITEM "断开网络磁盘...(&D)", IDM_TOOLS_DISCONNECTNETWORKDRIVE + MENUITEM "映射网络驱动器...(&N)", IDM_TOOLS_MAPNETWORKDRIVE + MENUITEM "断开网络驱动器...(&D)", IDM_TOOLS_DISCONNECTNETWORKDRIVE MENUITEM "同步...(&S)", IDM_TOOLS_SYNCHRONIZE MENUITEM "", -1, MFT_SEPARATOR MENUITEM "文件夹选项...(&O)", IDM_TOOLS_FOLDEROPTIONS diff --git a/dll/win32/shdoclc/lang/Zh.rc b/dll/win32/shdoclc/lang/Zh.rc index 1c11ae4b8c..bac5f49093 100644 --- a/dll/win32/shdoclc/lang/Zh.rc +++ b/dll/win32/shdoclc/lang/Zh.rc @@ -16,7 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/* Translation has been changed by Luo Yufan on 2018-12-03 (njlyf2011(a)hotmail.com) */ +/* Translation has been changed by Luo Yufan on 2018, 2019 (njlyf2011(a)hotmail.com) */ + LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED STRINGTABLE @@ -46,7 +47,7 @@ IDR_BROWSE_CONTEXT_MENU MENU MENUITEM "粘贴(&P)", IDM_PASTE MENUITEM SEPARATOR MENUITEM "创建快捷方式(&T)", IDM_CREATESHORTCUT - MENUITEM "添加到我的最爱(&F)", IDM_ADDFAVORITES + MENUITEM "添加到收藏夹(&F)", IDM_ADDFAVORITES MENUITEM "查看源代码(&V)", IDM_VIEWSOURCE MENUITEM SEPARATOR MENUITEM "语言编码(&E)", IDM_LANGUAGE @@ -127,10 +128,10 @@ IDR_BROWSE_CONTEXT_MENU MENU MENUITEM SEPARATOR MENUITEM "剪下", IDM_CUT MENUITEM "复制(&C)", IDM_COPY - MENUITEM "复制捷径(&T)", IDM_COPYSHORTCUT + MENUITEM "复制快捷方式(&T)", IDM_COPYSHORTCUT MENUITEM "粘贴(&P)", IDM_PASTE MENUITEM SEPARATOR - MENUITEM "添加到我的最爱(&F)", IDM_ADDFAVORITES + MENUITEM "添加到收藏夹(&F)", IDM_ADDFAVORITES MENUITEM SEPARATOR MENUITEM "属性(&R)", IDM_PROPERTIES } @@ -154,10 +155,10 @@ IDR_BROWSE_CONTEXT_MENU MENU MENUITEM SEPARATOR MENUITEM "剪切(&T)", IDM_CUT MENUITEM "复制(&C)", IDM_COPY - MENUITEM "复制捷径(&T)", IDM_COPYSHORTCUT + MENUITEM "复制快捷方式(&T)", IDM_COPYSHORTCUT MENUITEM "粘贴(&P)", IDM_PASTE MENUITEM SEPARATOR - MENUITEM "添加到我的最爱(&F)", IDM_ADDFAVORITES + MENUITEM "添加到收藏夹(&F)", IDM_ADDFAVORITES MENUITEM SEPARATOR MENUITEM "播放", IDM_DYNSRCPLAY MENUITEM "停止", IDM_DYNSRCSTOP @@ -178,10 +179,10 @@ IDR_BROWSE_CONTEXT_MENU MENU MENUITEM SEPARATOR MENUITEM "剪切(&T)", IDM_CUT MENUITEM "复制(&C)", IDM_COPY - MENUITEM "复制捷径(&T)", IDM_COPYSHORTCUT + MENUITEM "复制快捷方式(&T)", IDM_COPYSHORTCUT MENUITEM "粘贴(&P)", IDM_PASTE MENUITEM SEPARATOR - MENUITEM "添加到我的最爱(&F)", IDM_ADDFAVORITES + MENUITEM "添加到收藏夹(&F)", IDM_ADDFAVORITES MENUITEM SEPARATOR MENUITEM "播放", IDM_IMGARTPLAY MENUITEM "停止", IDM_IMGARTSTOP @@ -243,7 +244,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL STRINGTABLE { - IDS_MESSAGE_BOX_TITLE, "Wine 互聯網瀏覽器" + IDS_MESSAGE_BOX_TITLE, "Wine Internet Explorer" } STRINGTABLE @@ -281,8 +282,8 @@ IDR_BROWSE_CONTEXT_MENU MENU POPUP "" /* Image */ { - MENUITEM "開啟鏈接(&O)", IDM_FOLLOWLINKC - MENUITEM "在新視窗開啟鏈接(&N)", IDM_FOLLOWLINKN + MENUITEM "開啟連結(&O)", IDM_FOLLOWLINKC + MENUITEM "在新視窗開啟連結(&N)", IDM_FOLLOWLINKN MENUITEM "將目標存為(&A)", IDM_SAVETARGET MENUITEM "列印目標(&P)", IDM_PRINTTARGET MENUITEM SEPARATOR @@ -364,8 +365,8 @@ IDR_BROWSE_CONTEXT_MENU MENU POPUP "" /* DYNSRC Image */ { - MENUITEM "開啟鏈接(&O)", IDM_FOLLOWLINKC - MENUITEM "在新窗口開啟鏈接(&N)", IDM_FOLLOWLINKN + MENUITEM "開啟連結(&O)", IDM_FOLLOWLINKC + MENUITEM "在新窗口開啟連結(&N)", IDM_FOLLOWLINKN MENUITEM "將目標存為(&A)...", IDM_SAVETARGET MENUITEM "列印目標(&P)", IDM_PRINTTARGET MENUITEM SEPARATOR @@ -388,8 +389,8 @@ IDR_BROWSE_CONTEXT_MENU MENU POPUP "" /* ART Image */ { - MENUITEM "開啟鏈接(&O)", IDM_FOLLOWLINKC - MENUITEM "在新窗口開啟鏈接(&N)", IDM_FOLLOWLINKN + MENUITEM "開啟連結(&O)", IDM_FOLLOWLINKC + MENUITEM "在新窗口開啟連結(&N)", IDM_FOLLOWLINKN MENUITEM "將目標存為(&A)", IDM_SAVETARGET MENUITEM "列印目標(&P)", IDM_PRINTTARGET MENUITEM SEPARATOR diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index d1c3f73e17..05c73039d2 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -3,9 +3,9 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/shell32/lang/zh-CN.rc * PURPOSE: Chinese (Simplified) Language Resources - * TRANSLATORS: 2008 zhangbing <e_zb(a)21cn.com, ezb(a)mail.gywb.cn> - 2011 Elton Chung aka MfldElton <elton328(a)gmail.com> - 2018 Luo Yufan <njlyf2011(a)hotmail.com> + * TRANSLATORS: 2008 zhangbing <e_zb(a)21cn.com, ezb(a)mail.gywb.cn> + 2011 Elton Chung aka MfldElton <elton328(a)gmail.com> + 2018, 2019 Luo Yufan <njlyf2011(a)hotmail.com> */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED @@ -42,7 +42,7 @@ BEGIN MENUITEM "", -1, MFT_SEPARATOR MENUITEM "自动排列(&D)", FCIDM_SHVIEW_AUTOARRANGE END - MENUITEM "排列图标", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM "对齐图标", FCIDM_SHVIEW_SNAPTOGRID MENUITEM "", -1, MFT_SEPARATOR MENUITEM "刷新", FCIDM_SHVIEW_REFRESH MENUITEM "", -1, MFT_SEPARATOR diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index adce8484b1..fe430d2a37 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -41,7 +41,7 @@ BEGIN MENUITEM "", -1, MFT_SEPARATOR MENUITEM "自動排列(&A)", FCIDM_SHVIEW_AUTOARRANGE END - MENUITEM "排列圖示", FCIDM_SHVIEW_SNAPTOGRID + MENUITEM "對齊圖示", FCIDM_SHVIEW_SNAPTOGRID MENUITEM "", -1, MFT_SEPARATOR MENUITEM "重新整理", FCIDM_SHVIEW_REFRESH MENUITEM "", -1, MFT_SEPARATOR diff --git a/modules/rosapps/applications/imagesoft/lang/zh-CN.rc b/modules/rosapps/applications/imagesoft/lang/zh-CN.rc new file mode 100644 index 0000000000..33c7a89cee --- /dev/null +++ b/modules/rosapps/applications/imagesoft/lang/zh-CN.rc @@ -0,0 +1,234 @@ +/* Translated by Luo Yufan 2019 <njlyf2011(a)hotmail.com> */ + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APPNAME "ImageSoft" + IDS_VERSION "v0.1" +END + +IDR_MAINMENU MENU +BEGIN + POPUP "文件(&F)" + BEGIN + MENUITEM "新建(&N)...", ID_NEW + MENUITEM "打开(&O)...", ID_OPEN + MENUITEM SEPARATOR + MENUITEM "关闭(&C)\tCtrl+F4", ID_CLOSE, GRAYED + MENUITEM "全部关闭(&L)", ID_CLOSEALL,GRAYED + MENUITEM SEPARATOR + MENUITEM "保存(&S)", ID_SAVE, GRAYED + MENUITEM "另存为(&A)...", ID_SAVEAS, GRAYED + MENUITEM SEPARATOR + MENUITEM "打印预览(&V)", ID_PRINTPRE,GRAYED + MENUITEM "打印(&P)...", ID_PRINT, GRAYED + MENUITEM SEPARATOR + MENUITEM "属性(&O)...", ID_PROP, GRAYED + MENUITEM SEPARATOR + MENUITEM "退出(&X)\tAlt+F4", ID_EXIT + END + POPUP "编辑(&E)" + BEGIN + MENUITEM "撤销(&U)", ID_UNDO, GRAYED + MENUITEM "重做(&R)", ID_REDO, GRAYED + MENUITEM SEPARATOR + MENUITEM "剪切(&T)", ID_CUT, GRAYED + MENUITEM "复制(&C)", ID_COPY, GRAYED + MENUITEM "粘贴(&P)", ID_PASTE, GRAYED + MENUITEM "粘贴为新图像(&I)", ID_PASTENEWIMAGE, GRAYED + MENUITEM SEPARATOR + MENUITEM "全选(&A)", ID_SELALL, GRAYED + END + POPUP "视图(&V)" + BEGIN + MENUITEM "工具(&T)", ID_TOOLS + MENUITEM "颜色(&C)", ID_COLOR + MENUITEM "历史(&H)", ID_HISTORY + MENUITEM "状态栏(&S)", ID_STATUSBAR + END + POPUP "调整(&A)" + BEGIN + MENUITEM "亮度...", ID_BRIGHTNESS + MENUITEM "对比度...", ID_CONTRAST + MENUITEM "色调/对比度...", -1, GRAYED + POPUP "颜色" + BEGIN + MENUITEM "黑白", ID_BLACKANDWHITE + MENUITEM "反色", ID_INVERTCOLORS + END + MENUITEM SEPARATOR + MENUITEM "模糊", ID_BLUR + MENUITEM "锐化", ID_SHARPEN + MENUITEM "平滑边缘", -1, GRAYED + MENUITEM "添加阴影", -1, GRAYED + MENUITEM SEPARATOR + MENUITEM "图像大小...", -1, GRAYED + MENUITEM "翻转", -1, GRAYED + MENUITEM "镜像", -1, GRAYED + MENUITEM "旋转", -1, GRAYED + + END + POPUP "颜色(&C)" + BEGIN + MENUITEM "编辑颜色(&E)...", ID_EDITCOLOURS + END + POPUP "窗口(&W)" + BEGIN + MENUITEM "&Cascade", ID_WINDOW_CASCADE + MENUITEM "Tile &Horizontally", ID_WINDOW_TILE_HORZ + MENUITEM "Tile &Vertically", ID_WINDOW_TILE_VERT + MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE + MENUITEM SEPARATOR + MENUITEM "Nex&t\tCtrl+F6", ID_WINDOW_NEXT + END + POPUP "帮助(&H)" + BEGIN + MENUITEM "关于(&A)...", ID_ABOUT + END +END + +IDR_POPUP MENU +BEGIN + POPUP "popup" + BEGIN + MENUITEM SEPARATOR + END +END + + +IDD_BRIGHTNESS DIALOGEX 6, 5, 193, 120 +CAPTION "亮度" +FONT 9,"宋体", 0, 0 +STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +BEGIN + LTEXT "", IDC_PICPREVIEW, 0, 1, 132, 96, SS_OWNERDRAW | SS_SUNKEN + LTEXT "Color form:", IDC_STATIC, 135, 5, 36, 9 + GROUPBOX "", IDC_BRI_GROUP, 138 ,30, 50, 48 + CONTROL "Full (RGB)", IDC_BRI_FULL, "Button", BS_AUTORADIOBUTTON, 138, 18, 46, 9 + CONTROL "Red", IDC_BRI_RED, "Button", BS_AUTORADIOBUTTON, 142, 38, 42, 9 + CONTROL "Green", IDC_BRI_GREEN, "Button", BS_AUTORADIOBUTTON, 142, 51, 42, 9 + CONTROL "Blue", IDC_BRI_BLUE, "Button", BS_AUTORADIOBUTTON, 142, 64, 42, 9 + EDITTEXT IDC_BRI_EDIT, 98, 103, 28, 13 + CONTROL "", IDC_BRI_TRACKBAR, "msctls_trackbar32", TBS_BOTH | TBS_NOTICKS | WS_TABSTOP, 2, 105, 90, 11 + PUSHBUTTON "OK", IDOK, 142, 88, 48, 13 + PUSHBUTTON "Cancel", IDCANCEL, 142, 105, 48, 13 +END + +IDD_ABOUTBOX DIALOGEX 22,16,210,182 +CAPTION "关于 ImageSoft" +FONT 9,"宋体",0,0 +STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +//EXSTYLE WS_EX_LAYERED +BEGIN + LTEXT "ImageSoft v0.1\nCopyright (C) 2006\nThomas Weidenmueller (w3seek(a)reactos.org)\nGed Murphy (gedmurphy(a)gmail.com)", IDC_STATIC, 48, 7, 150, 36 + PUSHBUTTON "关闭", IDOK, 75, 162, 44, 15 + ICON IDI_IMAGESOFTICON, IDC_STATIC, 10, 10, 7, 30 + EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE +END + + +IDD_IMAGE_PROP DIALOGEX 6, 5, 156, 163 +CAPTION "图像属性" +FONT 9,"宋体",0,0 +STYLE DS_SHELLFONT | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_MODALFRAME +BEGIN + LTEXT "名称:", IDC_STATIC, 12, 5, 38, 9 + EDITTEXT IDC_IMAGE_NAME_EDIT, 58, 3, 94, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP + GROUPBOX "画布属性", IDC_STATIC, 4, 22, 148, 98 + LTEXT "图像类型:", IDC_STATIC, 12, 36, 42, 9 + CONTROL "", IDC_IMAGETYPE, "ComboBox", WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST, 58, 35, 88, 54 + LTEXT "宽度:", IDC_STATIC, 12, 51, 42, 9 + EDITTEXT IDC_WIDTH_EDIT, 58, 49, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_NUMBER + LTEXT "", IDC_WIDTH_STAT, 94, 51, 40, 9 + LTEXT "高度:", IDC_STATIC, 12, 68, 42, 9 + EDITTEXT IDC_HEIGHT_EDIT, 58, 66, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_NUMBER + LTEXT "", IDC_HEIGHT_STAT, 94, 68, 40, 9 + LTEXT "分辨率:", IDC_STATIC, 12, 84, 42, 9 + EDITTEXT IDC_RES_EDIT, 58, 83, 32, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_NUMBER + LTEXT "", IDC_RES_STAT, 94, 84, 40, 9 + LTEXT "单元:", IDC_STATIC, 12, 99, 42, 9 + CONTROL "", IDC_UNIT, "ComboBox", WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST, 58, 99, 54, 50 + LTEXT "图像大小:", IDC_STATIC, 12, 125, 42, 9 + LTEXT "", IDC_IMAGE_SIZE, 58, 125, 54, 9 + PUSHBUTTON "确定", IDOK, 50, 144, 48, 13 + PUSHBUTTON "取消", IDCANCEL, 102, 144, 48, 13 +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_LICENSE "本程序为自由软件; 您可以根据自由软件基金会发布的 GNU 通用公共许可证的第 2 版,或(根据您的选择)任何更高版本的条款进行重新分发和修改它。\r\n\r\n本程序的发布是希望它有用,但没有任何担保; 甚至没有适销性或特定用途适用性的暗示保证。 有关详细信息,请参阅 GNU 通用公共许可证。\r\n\r\n您应该已收到 GNU 通用公共许可证的副本以及本程序; 如果没有,请写信给 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA。" + IDS_READY " 准备就绪。" + IDS_TOOLBAR_STANDARD "标准" + IDS_TOOLBAR_TEST "Test" + IDS_IMAGE_NAME "图像 %1!u!" + IDS_FLT_TOOLS "工具" + IDS_FLT_COLORS "颜色" + IDS_FLT_HISTORY "历史" +END + +/* imageprop.c */ +STRINGTABLE DISCARDABLE +BEGIN + IDS_IMAGE_MONOCHROME "Monochrome (1 bit)" + IDS_IMAGE_GREYSCALE "Grayscale (8 bit)" + IDS_IMAGE_PALETTE "Palette or 256 color (8 bit)" + IDS_IMAGE_TRUECOLOR "True color (24 bit)" + + IDS_UNIT_PIXELS "Pixels" + IDS_UNIT_CM "Cm" + IDS_UNIT_INCHES "Inches" + IDS_UNIT_DOTSCM "Dots / Cm" + IDS_UNIT_DPI "DPI" + IDS_UNIT_KB "%d KB" + IDS_UNIT_MB "%d MB" +END + +/* Tooltips */ +STRINGTABLE DISCARDABLE +BEGIN + IDS_TOOLTIP_NEW "新建" + IDS_TOOLTIP_OPEN "打开" + IDS_TOOLTIP_SAVE "保存" + IDS_TOOLTIP_PRINTPRE "打印预览" + IDS_TOOLTIP_PRINT "打印" + IDS_TOOLTIP_CUT "剪切" + IDS_TOOLTIP_COPY "复制" + IDS_TOOLTIP_PASTE "粘贴" + IDS_TOOLTIP_UNDO "撤销" + IDS_TOOLTIP_REDO "重做" +END + + +/* Hints */ +STRINGTABLE DISCARDABLE +BEGIN + IDS_HINT_BLANK " " + IDS_HINT_NEW " 创建一个新文档。" + IDS_HINT_OPEN " 打开现有文档。" + IDS_HINT_CLOSE " 关闭此窗口。" + IDS_HINT_CLOSEALL " 关闭所有窗口。" + IDS_HINT_SAVE " 保存活动文档。" + IDS_HINT_SAVEAS " 使用新名称保存活动文档。" + IDS_HINT_PRINTPRE " 预览要被打印的文档。" + IDS_HINT_PRINT " 打印活动文档。" + IDS_HINT_PROP " 显示活动图像的属性。" + IDS_HINT_EXIT " 退出此应用程序。" + + IDS_HINT_TOOLS " 显示或隐藏工具浮动窗口。" + IDS_HINT_COLORS " 显示或隐藏颜色浮动窗口。" + IDS_HINT_HISTORY " 显示或隐藏历史浮动窗口。" + IDS_HINT_STATUS " 显示或隐藏状态栏。" + + IDS_HINT_CASCADE " Arrange windows so they overlap." + IDS_HINT_TILE_HORZ " Arrange windows as non-overlapping tiles." + IDS_HINT_TILE_VERT " Arrange windows as non-overlapping tiles." + IDS_HINT_ARRANGE " Arrange icons at the bottom of the window." + IDS_HINT_NEXT " Activates the next window." + + IDS_HINT_SYS_RESTORE " 将此窗口恢复为正常大小。" + IDS_HINT_SYS_MOVE " 移动此窗口。" + IDS_HINT_SYS_SIZE " 调整此窗口的大小。" + IDS_HINT_SYS_MINIMIZE " 将此窗口折叠为图标。" + IDS_HINT_SYS_MAXIMIZE " 展开此窗口以填充此屏幕。" +END diff --git a/modules/rosapps/applications/imagesoft/rsrc.rc b/modules/rosapps/applications/imagesoft/rsrc.rc index aa83fc3198..09823602cb 100644 --- a/modules/rosapps/applications/imagesoft/rsrc.rc +++ b/modules/rosapps/applications/imagesoft/rsrc.rc @@ -48,3 +48,6 @@ #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif +#ifdef LANGUAGE_ZH_CN + #include "lang/zh-CN.rc" +#endif diff --git a/modules/rosapps/applications/vcdcontroltool/lang/zh-CN.rc b/modules/rosapps/applications/vcdcontroltool/lang/zh-CN.rc old mode 100755 new mode 100644 diff --git a/modules/rosapps/applications/vcdcontroltool/lang/zh-TW.rc b/modules/rosapps/applications/vcdcontroltool/lang/zh-TW.rc old mode 100755 new mode 100644 diff --git a/modules/rosapps/applications/winfile/lang/zh-CN.rc b/modules/rosapps/applications/winfile/lang/zh-CN.rc index c8e6c77a5b..b7fd71863e 100644 --- a/modules/rosapps/applications/winfile/lang/zh-CN.rc +++ b/modules/rosapps/applications/winfile/lang/zh-CN.rc @@ -68,7 +68,7 @@ IDM_WINEFILE MENU MENUITEM "制作系统盘(&M)...", -1 /*TODO*/ #endif MENUITEM SEPARATOR - MENUITEM "连接网络驱动器(&N)", ID_CONNECT_NETWORK_DRIVE + MENUITEM "映射网络驱动器(&N)", ID_CONNECT_NETWORK_DRIVE MENUITEM "断开网络驱动器连接(&D)", ID_DISCONNECT_NETWORK_DRIVE MENUITEM SEPARATOR MENUITEM "共享为...", 254 @@ -145,129 +145,6 @@ IDM_WINEFILE MENU MENUITEM "搜索帮助(&S)...\tF1", ID_HELP MENUITEM "使用帮助(&U)\tF1", ID_HELP_USING MENUITEM SEPARATOR - MENUITEM "&关于 Winefile...", ID_ABOUT + MENUITEM "关于 Winefile(&A)...", ID_ABOUT } } - -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL - -/* Menu */ - -IDM_WINEFILE MENU -{ - POPUP "檔案(&F)" { - MENUITEM "開啟(&O)\tEnter", ID_ACTIVATE - MENUITEM "移動(&M)...\tF7", ID_FILE_MOVE - MENUITEM "複製(&C)...\tF8", ID_FILE_COPY - MENUITEM "位於剪貼板(&I)...\tF9", 118 - MENUITEM "刪除(&D)\tDel", ID_FILE_DELETE - MENUITEM "改名(&N)...", 109 - MENUITEM "屬性(&I)...\tAlt+Enter", ID_EDIT_PROPERTIES - MENUITEM SEPARATOR - MENUITEM "壓縮(&O)...", 119 - MENUITEM "解壓縮(&O)...", 120 - MENUITEM SEPARATOR - MENUITEM "執行(&R)...", ID_RUN - MENUITEM "列印(&P)...", 102 - MENUITEM "配置檔案相關...", 103 - MENUITEM SEPARATOR - MENUITEM "建立目錄(&E)...", 111 - MENUITEM "查找(&H)...", 104 - MENUITEM "選擇檔案(&S)...", 116 - MENUITEM SEPARATOR -#ifndef _NO_EXTENSIONS - MENUITEM "結束(&X)\tAlt+X", ID_FILE_EXIT -#else - MENUITEM "結束(&X)", ID_FILE_EXIT -#endif - } - - POPUP "磁碟(&D)" { - MENUITEM "複製(&C)...", 201 - MENUITEM "命名(&L)...", 202 - MENUITEM SEPARATOR - MENUITEM "格式化(&)...", ID_FORMAT_DISK -#ifdef _WIN95 - MENUITEM "建立系統盤(&M)...", -1 /*TODO*/ -#endif - MENUITEM SEPARATOR - MENUITEM "連接網路儲存槽(&N)", ID_CONNECT_NETWORK_DRIVE - MENUITEM "斷開網路儲存槽連接(&D)", ID_DISCONNECT_NETWORK_DRIVE - MENUITEM SEPARATOR - MENUITEM "共享為...", 254 - MENUITEM "刪除共享(&R)...", 255 - MENUITEM SEPARATOR - MENUITEM "選擇儲存槽(&S)...", 251 - } - - POPUP "目錄(&D)" { - MENUITEM "下一層(&N)\t+", 301 - MENUITEM "展開(&T)\t*", 302 - MENUITEM "全部展開(&A)\tStrg+*", 303 - MENUITEM "折疊(&R)\t-", 304 - MENUITEM SEPARATOR - MENUITEM "標記子目錄(&M)", 505 - } - - POPUP "檢視(&V)" { - MENUITEM "目錄樹機器內容(&R)", 413 - MENUITEM "僅顯示目錄樹(&E)", 411 - MENUITEM "僅顯示目錄內容(&O)", 412 - MENUITEM SEPARATOR - MENUITEM "分割(&L)", ID_VIEW_SPLIT - MENUITEM SEPARATOR - MENUITEM "檔案名稱(&N)", ID_VIEW_NAME - MENUITEM "檔案詳情列表(&A)", ID_VIEW_ALL_ATTRIBUTES, CHECKED - MENUITEM "部分屬性(&P)...", ID_VIEW_SELECTED_ATTRIBUTES - MENUITEM SEPARATOR - MENUITEM "按檔案名排列(&S)", ID_VIEW_SORT_NAME - MENUITEM "按類型排列(&B)", ID_VIEW_SORT_TYPE - MENUITEM "按大小排列(&Z)", ID_VIEW_SORT_SIZE - MENUITEM "按日期排列(&D)", ID_VIEW_SORT_DATE - MENUITEM SEPARATOR - MENUITEM "定製排列...", ID_VIEW_FILTER - } - - POPUP "選項(&O)" { - MENUITEM "確定方式(&C)...", 501 - MENUITEM "字型(&F)...", ID_SELECT_FONT - MENUITEM "定製工具條(&B)...", 512 - MENUITEM SEPARATOR - MENUITEM "工具條(&T)", ID_VIEW_TOOL_BAR, CHECKED - MENUITEM "儲存槽列表(&D)", ID_VIEW_DRIVE_BAR, CHECKED - MENUITEM "狀態欄(&S)", ID_VIEW_STATUSBAR, CHECKED -#ifndef _NO_EXTENSIONS - MENUITEM "全屏(&U)\tCtrl+Shift+S", ID_VIEW_FULLSCREEN -#endif - MENUITEM SEPARATOR - MENUITEM "啟動後最小化(&M)", 504 - MENUITEM "結束時儲存設定(&S)", 511 - } - - - POPUP "安全(&S)" { - MENUITEM "訪問(&A)...", 605 - MENUITEM "登錄(&L)...", 606 - MENUITEM "所有者(&O)...", 607 - } - - POPUP "窗口(&W)" { - MENUITEM "新建(&W)", ID_WINDOW_NEW - MENUITEM "層疊\tCtrl+F5", ID_WINDOW_CASCADE - MENUITEM "水平平鋪(&H)", ID_WINDOW_TILE_HORZ - MENUITEM "垂直平鋪(&)\tCtrl+F4", ID_WINDOW_TILE_VERT -#ifndef _NO_EXTENSIONS - MENUITEM "自動排列", ID_WINDOW_AUTOSORT -#endif - MENUITEM "自動排列圖標(&S)", ID_WINDOW_ARRANGE - MENUITEM "刷新(&R)\tF5", ID_REFRESH - } - - POPUP "&?" { - MENUITEM "說明主題(&H)\tF1", ID_HELP - MENUITEM "搜索說明(&S)...\tF1", ID_HELP - MENUITEM "使用說明(&U)\tF1", ID_HELP_USING - MENUITEM SEPARATOR - MENUITEM "&關於 Winefile...", ID_ABOUT - } -} \ No newline at end of file diff --git a/modules/rosapps/applications/winfile/lang/zh-CN.rc b/modules/rosapps/applications/winfile/lang/zh-TW.rc similarity index 51% copy from modules/rosapps/applications/winfile/lang/zh-CN.rc copy to modules/rosapps/applications/winfile/lang/zh-TW.rc index c8e6c77a5b..8ac37c09b5 100644 --- a/modules/rosapps/applications/winfile/lang/zh-CN.rc +++ b/modules/rosapps/applications/winfile/lang/zh-TW.rc @@ -26,129 +26,6 @@ /* Chinese text is encoded in UTF-8 */ #pragma code_page(65001) -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED - -/* Menu */ - -IDM_WINEFILE MENU -{ - POPUP "文件(&F)" { - MENUITEM "打开(&O)\tEnter", ID_ACTIVATE - MENUITEM "移动(&M)...\tF7", ID_FILE_MOVE - MENUITEM "复制(&C)...\tF8", ID_FILE_COPY - MENUITEM "位于剪贴板(&I)...\tF9", 118 - MENUITEM "删除(&D)\tDel", ID_FILE_DELETE - MENUITEM "改名(&N)...", 109 - MENUITEM "属性(&I)...\tAlt+Enter", ID_EDIT_PROPERTIES - MENUITEM SEPARATOR - MENUITEM "压缩(&O)...", 119 - MENUITEM "解压缩(&O)...", 120 - MENUITEM SEPARATOR - MENUITEM "运行(&R)...", ID_RUN - MENUITEM "打印(&P)...", 102 - MENUITEM "配置文件相关...", 103 - MENUITEM SEPARATOR - MENUITEM "建立目录(&E)...", 111 - MENUITEM "查找(&H)...", 104 - MENUITEM "选择文件(&S)...", 116 - MENUITEM SEPARATOR -#ifndef _NO_EXTENSIONS - MENUITEM "退出(&X)\tAlt+X", ID_FILE_EXIT -#else - MENUITEM "退出(&X)", ID_FILE_EXIT -#endif - } - - POPUP "磁盘(&D)" { - MENUITEM "复制(&C)...", 201 - MENUITEM "标注磁盘(&L)...", 202 - MENUITEM SEPARATOR - MENUITEM "格式化(&)...", ID_FORMAT_DISK -#ifdef _WIN95 - MENUITEM "制作系统盘(&M)...", -1 /*TODO*/ -#endif - MENUITEM SEPARATOR - MENUITEM "连接网络驱动器(&N)", ID_CONNECT_NETWORK_DRIVE - MENUITEM "断开网络驱动器连接(&D)", ID_DISCONNECT_NETWORK_DRIVE - MENUITEM SEPARATOR - MENUITEM "共享为...", 254 - MENUITEM "删除共享(&R)...", 255 - MENUITEM SEPARATOR - MENUITEM "选择驱动器(&S)...", 251 - } - - POPUP "目录(&D)" { - MENUITEM "下一层(&N)\t+", 301 - MENUITEM "展开(&T)\t*", 302 - MENUITEM "全部展开(&A)\tStrg+*", 303 - MENUITEM "折叠(&R)\t-", 304 - MENUITEM SEPARATOR - MENUITEM "标记子目录(&M)", 505 - } - - POPUP "视图(&V)" { - MENUITEM "目录树机器内容(&R)", 413 - MENUITEM "仅显示目录树(&E)", 411 - MENUITEM "仅显示目录内容(&O)", 412 - MENUITEM SEPARATOR - MENUITEM "分割(&L)", ID_VIEW_SPLIT - MENUITEM SEPARATOR - MENUITEM "文件名称(&N)", ID_VIEW_NAME - MENUITEM "文件详情列表(&A)", ID_VIEW_ALL_ATTRIBUTES, CHECKED - MENUITEM "部分属性(&P)...", ID_VIEW_SELECTED_ATTRIBUTES - MENUITEM SEPARATOR - MENUITEM "按文件名排序(&S)", ID_VIEW_SORT_NAME - MENUITEM "按类型排序(&B)", ID_VIEW_SORT_TYPE - MENUITEM "按大小排序(&Z)", ID_VIEW_SORT_SIZE - MENUITEM "按日期排序(&D)", ID_VIEW_SORT_DATE - MENUITEM SEPARATOR - MENUITEM "定制排序...", ID_VIEW_FILTER - } - - POPUP "选项(&O)" { - MENUITEM "确定方式(&C)...", 501 - MENUITEM "字体(&F)...", ID_SELECT_FONT - MENUITEM "定制工具条(&B)...", 512 - MENUITEM SEPARATOR - MENUITEM "工具条(&T)", ID_VIEW_TOOL_BAR, CHECKED - MENUITEM "驱动器列表(&D)", ID_VIEW_DRIVE_BAR, CHECKED - MENUITEM "状态栏(&S)", ID_VIEW_STATUSBAR, CHECKED -#ifndef _NO_EXTENSIONS - MENUITEM "全屏(&U)\tCtrl+Shift+S", ID_VIEW_FULLSCREEN -#endif - MENUITEM SEPARATOR - MENUITEM "启动后最小化(&M)", 504 - MENUITEM "退出时保存设置(&S)", 511 - } - - - POPUP "安全(&S)" { - MENUITEM "访问(&A)...", 605 - MENUITEM "登录(&L)...", 606 - MENUITEM "所有者(&O)...", 607 - } - - POPUP "窗口(&W)" { - MENUITEM "新建(&W)", ID_WINDOW_NEW - MENUITEM "层叠\tCtrl+F5", ID_WINDOW_CASCADE - MENUITEM "水平平铺(&H)", ID_WINDOW_TILE_HORZ - MENUITEM "垂直平铺(&)\tCtrl+F4", ID_WINDOW_TILE_VERT -#ifndef _NO_EXTENSIONS - MENUITEM "自动排列", ID_WINDOW_AUTOSORT -#endif - MENUITEM "自动排列图标(&S)", ID_WINDOW_ARRANGE - MENUITEM "刷新(&R)\tF5", ID_REFRESH - } - - POPUP "&?" { - MENUITEM "帮助主题(&H)\tF1", ID_HELP - MENUITEM "搜索帮助(&S)...\tF1", ID_HELP - MENUITEM "使用帮助(&U)\tF1", ID_HELP_USING - MENUITEM SEPARATOR - MENUITEM "&关于 Winefile...", ID_ABOUT - } -} - LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL /* Menu */ @@ -191,8 +68,8 @@ IDM_WINEFILE MENU MENUITEM "建立系統盤(&M)...", -1 /*TODO*/ #endif MENUITEM SEPARATOR - MENUITEM "連接網路儲存槽(&N)", ID_CONNECT_NETWORK_DRIVE - MENUITEM "斷開網路儲存槽連接(&D)", ID_DISCONNECT_NETWORK_DRIVE + MENUITEM "連接網路磁碟機(&N)", ID_CONNECT_NETWORK_DRIVE + MENUITEM "中斷網路磁碟機(&D)", ID_DISCONNECT_NETWORK_DRIVE MENUITEM SEPARATOR MENUITEM "共享為...", 254 MENUITEM "刪除共享(&R)...", 255 @@ -252,14 +129,14 @@ IDM_WINEFILE MENU } POPUP "窗口(&W)" { - MENUITEM "新建(&W)", ID_WINDOW_NEW + MENUITEM "新增(&W)", ID_WINDOW_NEW MENUITEM "層疊\tCtrl+F5", ID_WINDOW_CASCADE MENUITEM "水平平鋪(&H)", ID_WINDOW_TILE_HORZ MENUITEM "垂直平鋪(&)\tCtrl+F4", ID_WINDOW_TILE_VERT #ifndef _NO_EXTENSIONS MENUITEM "自動排列", ID_WINDOW_AUTOSORT #endif - MENUITEM "自動排列圖標(&S)", ID_WINDOW_ARRANGE + MENUITEM "自動排列圖示(&S)", ID_WINDOW_ARRANGE MENUITEM "刷新(&R)\tF5", ID_REFRESH } @@ -268,6 +145,6 @@ IDM_WINEFILE MENU MENUITEM "搜索說明(&S)...\tF1", ID_HELP MENUITEM "使用說明(&U)\tF1", ID_HELP_USING MENUITEM SEPARATOR - MENUITEM "&關於 Winefile...", ID_ABOUT + MENUITEM "關於 Winefile(&A)...", ID_ABOUT } } \ No newline at end of file diff --git a/modules/rosapps/applications/winfile/rsrc.rc b/modules/rosapps/applications/winfile/rsrc.rc index acd41d4f5d..babd5d95e7 100644 --- a/modules/rosapps/applications/winfile/rsrc.rc +++ b/modules/rosapps/applications/winfile/rsrc.rc @@ -127,3 +127,7 @@ IDB_IMAGES BITMAP DISCARDABLE "resources/images.bmp" #ifdef LANGUAGE_ZH_CN #include "lang/zh-CN.rc" #endif +#ifdef LANGUAGE_ZH_TW + #include "lang/zh-TW.rc" +#endif +
5 years, 10 months
1
0
0
0
[reactos] 01/01: [MSAFD] Make WSPSetSockOpt() SO_RCVBUF stub return success
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f6c50cb93d50cd988b8a6…
commit f6c50cb93d50cd988b8a620b671f69db97b7adc9 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sun Feb 24 21:25:39 2019 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sun Feb 24 21:25:39 2019 +0100 [MSAFD] Make WSPSetSockOpt() SO_RCVBUF stub return success --- dll/win32/msafd/misc/dllmain.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dll/win32/msafd/misc/dllmain.c b/dll/win32/msafd/misc/dllmain.c index e604d2f15a..c761cff13e 100644 --- a/dll/win32/msafd/misc/dllmain.c +++ b/dll/win32/msafd/misc/dllmain.c @@ -2870,6 +2870,17 @@ WSPSetSockOpt( ERR("Setting send buf to %x is not implemented yet\n", optval); return NO_ERROR; + case SO_RCVBUF: + if (optlen < sizeof(DWORD)) + { + if (lpErrno) *lpErrno = WSAEFAULT; + return SOCKET_ERROR; + } + + /* TODO: The total per-socket buffer space reserved for receives */ + ERR("Setting receive buf to %x is not implemented yet\n", optval); + return NO_ERROR; + case SO_ERROR: if (optlen < sizeof(INT)) {
5 years, 10 months
1
0
0
0
[reactos] 01/01: [NTOS::Mm] Fix inverted check in MiWriteProtectSystemImage
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81727760e4cb6f99368c9…
commit 81727760e4cb6f99368c96dc129e80e91e54f15e Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Feb 24 13:24:26 2019 +0100 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sun Feb 24 20:34:02 2019 +0100 [NTOS::Mm] Fix inverted check in MiWriteProtectSystemImage --- ntoskrnl/mm/ARM3/sysldr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntoskrnl/mm/ARM3/sysldr.c b/ntoskrnl/mm/ARM3/sysldr.c index ffab764ae2..4c2ffdaeb3 100644 --- a/ntoskrnl/mm/ARM3/sysldr.c +++ b/ntoskrnl/mm/ARM3/sysldr.c @@ -2389,7 +2389,7 @@ MiWriteProtectSystemImage( PMMPTE FirstPte, LastPte; /* Check if the registry setting is on or not */ - if (MmEnforceWriteProtection) + if (MmEnforceWriteProtection == FALSE) { /* Ignore section protection */ return;
5 years, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
21
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
Results per page:
10
25
50
100
200