Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
$root = Join-Path $env:RUNNER_TEMP 'win32metadata'
nuget install Microsoft.Windows.SDK.Win32Metadata `
-Version 69.0.7-preview `
-Version 71.0.14-preview `
-OutputDirectory $root `
-DirectDownload `
-NonInteractive
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
run: |
$root = Join-Path $env:RUNNER_TEMP 'win32metadata'
nuget install Microsoft.Windows.SDK.Win32Metadata `
-Version 69.0.7-preview `
-Version 71.0.14-preview `
-OutputDirectory $root `
-DirectDownload `
-NonInteractive
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ extends:
script: |
$root = Join-Path "$(Agent.TempDirectory)" "win32metadata"
nuget install Microsoft.Windows.SDK.Win32Metadata `
-Version 69.0.7-preview `
-Version 71.0.14-preview `
-OutputDirectory $root `
-DirectDownload `
-NonInteractive
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ console.log(uri.host); // "example.com"
```

Classic COM bindings import their runtime API from the separate
`@microsoft/dynwinrt/com` subpath. It is part of the same npm package; the
package root remains the WinRT-only API. See
`@microsoft/dynwinrt/com/unsafe` subpath internally. Applications use
`@microsoft/dynwinrt/com` for initialization and managed COM value types;
manual ABI declarations require an explicit `/com/unsafe` import. All are
part of the same npm package, while the package root remains WinRT-only. See
[Classic COM support](docs/architecture/classic-com-support.md) for the supported ABI,
common-interface test matrix, unsupported native types, and ownership rules.
See [Classic COM JavaScript usage](docs/guides/windows/classic-com-usage.md) for codegen,
GUID/IID/CLSID, lifecycle, Automation, and explicit unsafe ABI examples.

Generated bindings project unambiguous public WinRT activation metadata as JavaScript
constructors, including overloads such as `new Uri(base, relative)`. Existing
Expand Down
1 change: 1 addition & 0 deletions bindings/js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dynwinrt = { path = "../../crates/dynwinrt" }
windows-future = "0.3.2"
windows-string = "0.0.0"
pollster = "0.4.0"
serde_json = "1"

[dependencies.windows]
version = ">=0.59, <=0.62"
Expand Down
17 changes: 12 additions & 5 deletions bindings/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,22 @@ Classic COM uses a separate subpath from the same package, keeping the WinRT
root API unchanged:

```js
const { DynCom } = require('@microsoft/dynwinrt/com');
const { initializeCom } = require('@microsoft/dynwinrt/com');
initializeCom(1); // MTA
```

COM interface values returned by activation, `QueryInterface`, or typed
interface out-parameters own one reference and release it when their
`DynWinRtValue` is released or collected. `adoptComPointer()` is only for a
native output that transfers an existing `+1` reference; numeric pointers and
typed-array pointers are borrowed and cannot be adopted. Win32 handles are not
COM references and require their own type-specific cleanup function.
`DynWinRtValue` is released or collected. Manual interface registration,
native signatures, and raw pointer ownership are isolated under
`@microsoft/dynwinrt/com/unsafe`. `adoptOwnedComPointer()` there consumes one
explicit caller-supplied `+1` reference; Buffer backing addresses are not
accepted. Win32 handles are not COM references and require their own
type-specific cleanup function.

See the repository's
[Classic COM JavaScript usage guide](../../docs/guides/windows/classic-com-usage.md) for
codegen, GUID/IID/CLSID, lifetime, Automation, and `/com/unsafe` examples.

Unambiguous public WinRT activation metadata is projected as JavaScript constructors.
Parameterized and composable activations support idiomatic forms such as
Expand Down
Loading
Loading