Skip to content

Add safe HGLOBAL data transfer support - #140

Merged
leileizhang (lei9444) merged 8 commits into
mainfrom
feature/com-stgmedium
Sep 7, 2026
Merged

leileizhang (lei9444) merged 8 commits into
mainfrom
feature/com-stgmedium

Conversation

@lei9444

Copy link
Copy Markdown
Contributor

Summary

  • add dedicated target-device-independent FORMATETC and TYMED_HGLOBAL STGMEDIUM runtime values with exact cleanup
  • project safe IDataObject methods, including pinned SetData(fRelease = FALSE) ownership evidence
  • add generated fake-vtable coverage and raise safe Classic COM coverage from 5,681 to 5,692 interfaces

Validation

  • cargo test -p dynwinrt
  • cargo test -p dynwinrt-codegen
  • cargo check -p dynwinrt --target i686-pc-windows-msvc
  • cargo check -p jswinrt_rs --features test-hooks --target i686-pc-windows-msvc
  • npm run build and npm test (known WinUI timing test passed on isolated rerun)
  • npm run test:generated-unsafe
  • Classic COM E2E: 17/17
  • capability census regenerated twice byte-identically

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
Model FORMATETC and STGMEDIUM as dedicated COM ABI values, generate a caller-owned IDataObject SetData projection, and validate real HGLOBAL cleanup paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
Use the official IWbemServices vtable through ExecMethodAsync and return ABI-correct IWbemClassObject and IWbemCallResult tear-offs with canonical identity and shared reference counting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
Pin IDataObject and inherited IOleCache SetData inputs to caller-retained ownership. Model canonical FORMATETC result validity in the COM plan, preserve semantic HRESULTs, and keep ordinary FORMATETC decoding strict.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
Pin IDataObject::GetDataHere to caller-owned, non-replacing HGLOBAL storage. Reject unproven STGMEDIUM InOut projections such as IWiaDataTransfer, preserve the existing runtime API, and update capability evidence and coverage baselines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
Base automatically changed from feature/com-stabilization to main September 7, 2026 06:39
Preserve the storage-medium fixes after the squash merge of #139 and incorporate the upstream benchmark dependency lockfile update.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9ef7fa55-eb2a-4360-bd17-05feae50fadb
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Mixed-language test coverage

Workflow status: ✅ Passed

Layer Lines Functions Branches/regions
Rust, including native .pyd/.node 84.97% 80.07% 84.56% regions
Generated Python projections 70.48% n/a 21.71% branches
JavaScript aggregate 21.48% 20.64% 54.23% branches
JavaScript runtime 25.56% 14.28% 7.14% branches
Generated WinRT projections 25.8% 19.3% 54.74% branches
Generated Classic COM projections 14.83% 24.65% 54.38% branches

View workflow run and download full HTML/LCOV/XML reports

@lei9444
leileizhang (lei9444) merged commit c1c12f6 into main Sep 7, 2026
24 checks passed
@lei9444
leileizhang (lei9444) deleted the feature/com-stgmedium branch September 7, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants