chore: drop support for Windows 7 / 8 / 8.1 (#36427)
* chore: drop support for Windows 7 & 8 * chore: remove disable-redraw-lock.patch * chore: update patches * Update docs/breaking-changes.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * Update docs/breaking-changes.md Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> * fix breaking-changes.md * chore: note last supported version Co-authored-by: Jeremy Rose <jeremya@chromium.org> * chore: add link to deprecation policy * Update docs/breaking-changes.md Co-authored-by: Jeremy Rose <jeremya@chromium.org> * update README.md Co-authored-by: Milan Burda <miburda@microsoft.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Erick Zhao <erick@hotmail.ca> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
parent
4ff0642af7
commit
eb291485bb
34 changed files with 63 additions and 2606 deletions
|
@ -71,41 +71,11 @@ bool GetAppUserModelID(ScopedHString* app_id) {
|
|||
}
|
||||
|
||||
bool IsRunningInDesktopBridgeImpl() {
|
||||
if (IsWindows8OrGreater()) {
|
||||
// GetPackageFamilyName is not available on Windows 7
|
||||
using GetPackageFamilyNameFuncPtr = decltype(&GetPackageFamilyName);
|
||||
|
||||
static bool initialize_get_package_family_name = true;
|
||||
static GetPackageFamilyNameFuncPtr get_package_family_namePtr = NULL;
|
||||
|
||||
if (initialize_get_package_family_name) {
|
||||
initialize_get_package_family_name = false;
|
||||
HMODULE kernel32_base = GetModuleHandle(L"Kernel32.dll");
|
||||
if (!kernel32_base) {
|
||||
NOTREACHED() << std::string(" ") << std::string(__FUNCTION__)
|
||||
<< std::string("(): Can't open Kernel32.dll");
|
||||
return false;
|
||||
}
|
||||
|
||||
get_package_family_namePtr =
|
||||
reinterpret_cast<GetPackageFamilyNameFuncPtr>(
|
||||
GetProcAddress(kernel32_base, "GetPackageFamilyName"));
|
||||
|
||||
if (!get_package_family_namePtr) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 length = PACKAGE_FAMILY_NAME_MAX_LENGTH;
|
||||
wchar_t packageFamilyName[PACKAGE_FAMILY_NAME_MAX_LENGTH];
|
||||
HANDLE proc = GetCurrentProcess();
|
||||
LONG result =
|
||||
(*get_package_family_namePtr)(proc, &length, packageFamilyName);
|
||||
|
||||
return result == ERROR_SUCCESS;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
UINT32 length = PACKAGE_FAMILY_NAME_MAX_LENGTH;
|
||||
wchar_t packageFamilyName[PACKAGE_FAMILY_NAME_MAX_LENGTH];
|
||||
HANDLE proc = GetCurrentProcess();
|
||||
LONG result = GetPackageFamilyName(proc, &length, packageFamilyName);
|
||||
return result == ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
bool IsRunningInDesktopBridge() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue