Trait winsafe::prelude::user_Hdesk

source ·
pub trait user_Hdesk: Handle {
    // Provided methods
    fn CreateDesktop(
        name: &str,
        flags: Option<DF>,
        desired_access: DESKTOP_RIGHTS,
        security_attributes: Option<&SECURITY_ATTRIBUTES<'_>>
    ) -> SysResult<CloseDesktopGuard> { ... }
    fn CreateDesktopEx(
        name: &str,
        flags: Option<DF>,
        desired_access: DESKTOP_RIGHTS,
        security_attributes: Option<&SECURITY_ATTRIBUTES<'_>>,
        heap_size_kb: u32
    ) -> SysResult<CloseDesktopGuard> { ... }
    fn GetThreadDesktop(
        thread_id: u32
    ) -> SysResult<ManuallyDrop<CloseDesktopGuard>> { ... }
    fn OpenDesktop(
        name: &str,
        flags: Option<DF>,
        inherit: bool,
        desired_access: DESKTOP_RIGHTS
    ) -> SysResult<CloseDesktopGuard> { ... }
    fn OpenInputDesktop(
        flags: Option<DF>,
        inherit: bool,
        desired_access: DESKTOP_RIGHTS
    ) -> SysResult<CloseDesktopGuard> { ... }
    fn SetThreadDesktop(&self) -> SysResult<()> { ... }
    fn SwitchDesktop(&self) -> SysResult<()> { ... }
}
Available on crate features kernel and user only.
Expand description

This trait is enabled with the user feature, and provides methods for HDESK.

Prefer importing this trait through the prelude:

use winsafe::prelude::*;

Provided Methods§

source

fn CreateDesktop( name: &str, flags: Option<DF>, desired_access: DESKTOP_RIGHTS, security_attributes: Option<&SECURITY_ATTRIBUTES<'_>> ) -> SysResult<CloseDesktopGuard>

CreateDesktop function.

source

fn CreateDesktopEx( name: &str, flags: Option<DF>, desired_access: DESKTOP_RIGHTS, security_attributes: Option<&SECURITY_ATTRIBUTES<'_>>, heap_size_kb: u32 ) -> SysResult<CloseDesktopGuard>

CreateDesktopEx function.

source

fn GetThreadDesktop( thread_id: u32 ) -> SysResult<ManuallyDrop<CloseDesktopGuard>>

GetThreadDesktop function.

§Examples
use winsafe::{self as w, prelude::*};

let hdesk = w::HDESK::GetThreadDesktop(w::GetCurrentThreadId())?;
source

fn OpenDesktop( name: &str, flags: Option<DF>, inherit: bool, desired_access: DESKTOP_RIGHTS ) -> SysResult<CloseDesktopGuard>

OpenDesktop function.

source

fn OpenInputDesktop( flags: Option<DF>, inherit: bool, desired_access: DESKTOP_RIGHTS ) -> SysResult<CloseDesktopGuard>

OpenInputDesktop function.

source

fn SetThreadDesktop(&self) -> SysResult<()>

SetThreadDesktop function.

source

fn SwitchDesktop(&self) -> SysResult<()>

SwitchDesktop function.

Object Safety§

This trait is not object safe.

Implementors§