mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
feat, win10, virtual display, not support message
Signed-off-by: fufesou <shuanglongchen@yeah.ne>
This commit is contained in:
@@ -634,42 +634,3 @@ extern "C"
|
||||
freopen("CONOUT$", "w", stdout);
|
||||
}
|
||||
} // end of extern "C"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// https://learn.microsoft.com/en-us/windows/win32/sysinfo/targeting-your-application-at-windows-8-1
|
||||
// https://github.com/nodejs/node-convergence-archive/blob/e11fe0c2777561827cdb7207d46b0917ef3c42a7/deps/uv/src/win/util.c#L780
|
||||
BOOL IsWindowsVersionOrGreater(DWORD os_major,
|
||||
DWORD os_minor,
|
||||
DWORD build_number,
|
||||
WORD service_pack_major,
|
||||
WORD service_pack_minor)
|
||||
{
|
||||
OSVERSIONINFOEX osvi;
|
||||
DWORDLONG condition_mask = 0;
|
||||
int op = VER_GREATER_EQUAL;
|
||||
|
||||
/* Initialize the OSVERSIONINFOEX structure. */
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
osvi.dwMajorVersion = os_major;
|
||||
osvi.dwMinorVersion = os_minor;
|
||||
osvi.dwBuildNumber = build_number;
|
||||
osvi.wServicePackMajor = service_pack_major;
|
||||
osvi.wServicePackMinor = service_pack_minor;
|
||||
|
||||
/* Initialize the condition mask. */
|
||||
VER_SET_CONDITION(condition_mask, VER_MAJORVERSION, op);
|
||||
VER_SET_CONDITION(condition_mask, VER_MINORVERSION, op);
|
||||
VER_SET_CONDITION(condition_mask, VER_BUILDNUMBER, op);
|
||||
VER_SET_CONDITION(condition_mask, VER_SERVICEPACKMAJOR, op);
|
||||
VER_SET_CONDITION(condition_mask, VER_SERVICEPACKMINOR, op);
|
||||
|
||||
/* Perform the test. */
|
||||
return VerifyVersionInfo(
|
||||
&osvi,
|
||||
VER_MAJORVERSION | VER_MINORVERSION | VER_BUILDNUMBER |
|
||||
VER_SERVICEPACKMAJOR | VER_SERVICEPACKMINOR,
|
||||
condition_mask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,13 +460,6 @@ extern "C" {
|
||||
fn is_win_down() -> BOOL;
|
||||
fn is_local_system() -> BOOL;
|
||||
fn alloc_console_and_redirect();
|
||||
fn IsWindowsVersionOrGreater(
|
||||
os_major: DWORD,
|
||||
os_minor: DWORD,
|
||||
build_number: DWORD,
|
||||
service_pack_major: WORD,
|
||||
service_pack_minor: WORD,
|
||||
) -> BOOL;
|
||||
}
|
||||
|
||||
extern "system" {
|
||||
@@ -1255,25 +1248,6 @@ pub fn block_input(v: bool) -> (bool, String) {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn is_windows_version_or_greater(
|
||||
os_major: u32,
|
||||
os_minor: u32,
|
||||
build_number: u32,
|
||||
service_pack_major: u32,
|
||||
service_pack_minor: u32,
|
||||
) -> bool {
|
||||
unsafe {
|
||||
IsWindowsVersionOrGreater(
|
||||
os_major as _,
|
||||
os_minor as _,
|
||||
build_number as _,
|
||||
service_pack_major as _,
|
||||
service_pack_minor as _,
|
||||
) == TRUE
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_recent_document(path: &str) {
|
||||
extern "C" {
|
||||
fn AddRecentDocument(path: *const u16);
|
||||
|
||||
Reference in New Issue
Block a user