How rustdesk-org/rustdeskidddriver works
RustDeskIdd is a Windows indirect-display sample with a console control application and a UMDF/IddCx driver. The user installs the driver and creates its software device, then requests monitor plug-in, plug-out, or mode updates; the app sends these requests through device-control calls, and the driver reports monitor changes to Windows. IddCx also assigns swap chains for frame processing. The sampled source is partial, so internal IOCTL dispatch details and some callback wiring are represented only where documented or evident; frame processing is described as a sample loop, not a completed rendering pipeline.
Main entry points: IddController.c Device controller · main.c Console controls · Driver.h Indirect device context · Public.h Control IOCTLs
Components 16
Control application
- Console controls
RustDeskIddApp/main.c - Device controller
RustDeskIddApp/IddController.c - Controller API
RustDeskIddApp/IddController.h
Device setup
- Software device
RustDeskIddApp/IddController.c - Driver install
RustDeskIddApp/IddController.c
Display driver
- Control IOCTLs
RustDeskIddDriver/Public.h - Driver and device callbacks
RustDeskIddDriver/Driver.cpp - Indirect device context
RustDeskIddDriver/Driver.h - Monitor lifecycle
RustDeskIddDriver/Driver.cpp - Monitor mode update
RustDeskIddDriver/Driver.cpp
Frame handling
- Monitor context
RustDeskIddDriver/Driver.h - Render device
RustDeskIddDriver/Driver.h - Swap-chain processor
RustDeskIddDriver/Driver.cpp
Other components
- Operator
- Windows device services
- Windows IddCx
Connections 18
- Operator → Console controls: selects actions
- Console controls → Device controller: calls controls
- Console controls → Controller API: uses declarations
- Device controller → Driver install: installs or removes
- Driver install → Windows device services: requests driver setup
- Device controller → Software device: creates or closes
- Software device → Windows device services: creates device
- Device controller → Control IOCTLs: sends device controls
- Control IOCTLs → Driver and device callbacks: dispatches controls
- Driver and device callbacks → Indirect device context: initializes context
- Indirect device context → Monitor lifecycle: handles plug requests
- Indirect device context → Monitor mode update: handles mode requests
- Monitor lifecycle → Windows IddCx: reports monitor arrival
- Windows IddCx → Monitor context: assigns swap chain
- Monitor context → Render device: initializes rendering
- Monitor context → Swap-chain processor: starts processing
- Swap-chain processor → Windows IddCx: acquires and releases buffers
- Monitor mode update → Windows IddCx: updates monitor modes