Table of Contents

Method ToWin32ControllerWith

Namespace
MaaFramework.Binding
Assembly
MaaFramework.Binding.Native.dll

ToWin32ControllerWith(DesktopWindowInfo, Win32ScreencapMethod?, Win32InputMethod?, Win32InputMethod?, nint?, LinkOption, CheckStatusOption)

Converts a MaaFramework.Binding.DesktopWindowInfo to a MaaFramework.Binding.MaaWin32Controller.

public static MaaWin32Controller ToWin32ControllerWith(this DesktopWindowInfo info, Win32ScreencapMethod? screencapMethod = null, Win32InputMethod? mouseMethod = null, Win32InputMethod? keyboardMethod = null, nint? hWnd = null, LinkOption link = LinkOption.Start, CheckStatusOption check = CheckStatusOption.ThrowIfNotSucceeded)

Parameters

info DesktopWindowInfo

The DesktopWindowInfo.

screencapMethod Win32ScreencapMethod?

The screencap method.

mouseMethod Win32InputMethod?

The mouse method.

keyboardMethod Win32InputMethod?

The keyboard method.

hWnd nint?

The new handle to a win32 window.

link LinkOption

Executes MaaFramework.Binding.MaaController.LinkStart if MaaFramework.Binding.LinkOption.Start; otherwise, not link.

check CheckStatusOption

Checks LinkStart().Wait() status if MaaFramework.Binding.CheckStatusOption.ThrowIfNotSucceeded; otherwise, not check.

Returns

MaaWin32Controller

A MaaWin32Controller.

Exceptions

ArgumentNullException