Files
Marc-André Moreau 98413f16cc feat(activex)!: broaden mstscax compatibility (#2211)
Hosts written against Microsoft's mstscax control (RDM, MsRdpEx,
scripting hosts, mstsc-style shells) still hit members that IronRDP's
ActiveX control left unimplemented. A comparison against mstscax.dll
10.0.26100 (its embedded MSTSCLib type library, AdvancedSettings vtable
and property handlers) identified the most-used gaps; this change closes
six of them.

Late-bound Automation: every published MSTSCLib member of the control
and of the Advanced, Secured, Transport and RemoteProgram settings
objects is reachable through `IDispatch` by name and DISPID, with
arguments coerced to the published Automation types and calls routed to
the existing vtable slots through `DispCallFunc`. The control also
implements `IProvideClassInfo2`, `IQuickActivate` and
`IPersistPropertyBag`/`IPersistPropertyBag2`. No type library is created
or registered, so `GetTypeInfo` still returns `E_NOTIMPL`.

Events: the control raises `OnRequestContainerMinimize`, `OnLogonError`,
`OnUserNameAcquired`, `OnNetworkStatusChanged`,
`OnRemoteProgramDisplayed`, `OnRemoteWindowDisplayed`,
`OnIdleTimeoutNotification`, `OnFocusReleased` and
`OnMouseInputModeChanged` with mstscax's argument layout, and the modern
facade gains `OnNetworkStatusChanged` and `OnKeyCombinationPressed`.
Events without an IronRDP source stay unraised and are documented.

Keyboard and input policy: the `HotKey*` and focus-release hotkeys,
`AcceleratorPassthrough`, `SasSequence`, `DisableCtrlAltDel`,
`DoubleClickDetect` and `RelativeMouseMode` follow mstscax defaults, and
the extended properties `AllowRelativeMouseMode`,
`IgnoreServerGeneratedMouseMoves`, `IgnoreClientSideMouseInput`,
`DisableFullScreenHotkey` and `AllowSasSequenceTransmission` are
honored. Relative pointer input is sent only when the server's Input
Capability Set allows it, and the client then advertises
`RNS_UD_CS_RELATIVE_MOUSE_INPUT` with RDP version 10.12, the lowest
version for which servers honor it.

AdvancedSettings compatibility: deprecated slots that mstscax answers
with `S_FALSE` now do the same instead of failing with `E_NOTIMPL`, and
`overallConnectionTimeout`, `singleConnectionTimeout`,
`shutdownTimeout`, `MinutesToIdleTimeout` and `CanAutoReconnect` are
wired to the client.

Extended settings and `.rdp` properties: `IMsRdpExtendedSettings`
accepts the mstscax names that map to IronRDP behavior (desktop and
device scale, physical size and orientation, selected monitors, audio
devices, location, touch, manual clipboard sync, `RemoteSessionId` and
others) and documents the rest. The connector can advertise physical
size, orientation, device scale and Client Monitor Extended Data (only
when it describes every monitor of Client Monitor Data), and the `.rdp`
mapping reads `session bpp`, `devicescalefactor`, `connection type`,
`redirectsmartcards` and `redirectlocation`.

`IMsRdpClientShell` and publisher trust: `MsRdpClientShell` returns a
working `.rdp` record store. Its `Launch` applies the records to the
owning control and connects in-process instead of starting `mstsc.exe`,
subject to the `DisableClientLaunchingFromActiveXControl` policy.
`ApplySettings` verifies signed `.rdp` files with the Windows client's
format and policies, and `ShowRedirectionWarningDialog`,
`RedirectionWarningType`, `WarnAboutPrinterRedirection`,
`LaunchedViaClientShellInterface` and `PublisherCertificateChain` drive
a fail-closed consent prompt before connecting. A signed file whose
signature no longer matches is rejected, where Windows downgrades it to
an unverifiable publisher.

Save Session Info logon errors now decode NTSTATUS failure types
([MS-RDPBCGR] 2.2.10.1.1.4.1.1), which previously ended the session with
a decode error, and relative mouse fast-path events now carry their
body. The FFI reports the new session outputs as
`ActiveStageOutputType::LogonErrors` (17) and
`ActiveStageOutputType::SessionId` (18), after the existing
`WindowSurfaceUpdates` (15) and `ServerRedirection` (16).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

BREAKING CHANGE: `ironrdp_session::ActiveStageOutput` and
`ironrdp_session::x224::ProcessorOutput` gain `LogonErrors` and
`SessionId` variants; `ironrdp_client::rdp::RdpOutputEvent` gains
`ServerInputFlags`, `LogonError`, `NetworkCharacteristics` and
`RemoteSessionId` variants; `ironrdp_connector::Config` and
`ironrdp_client::config::ChannelConfig` have new public fields;
`ironrdp_pdu::rdp::session_info::LogonErrorNotificationType` gains an
`NtStatus(u32)` variant and is no longer `#[repr(u32)]`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 17:30:58 -04:00
..

IronRDP FFI

Diplomat-based FFI for IronRDP.

Currently, only the .NET target is officially supported.

How to build

  • Install required tools: cargo xtask ffi install

    • For .NET, note that dotnet is also a requirement that you will need to install on your own.
  • Build the shared library: cargo xtask ffi build (alternatively, in release mode: cargo xtask ffi build --release)

  • Build the bindings: cargo xtask ffi bindings

At this point, you may build and run the examples for .NET:

  • dotnet run --project Devolutions.IronRdp.ConnectExample
  • dotnet run --project Devolutions.IronRdp.AvaloniaExample