-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
659 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: windows-strings | ||
|
||
on: | ||
pull_request: | ||
push: | ||
paths-ignore: | ||
- '.github/ISSUE_TEMPLATE/**' | ||
branches: | ||
- master | ||
|
||
env: | ||
RUSTFLAGS: -Dwarnings | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
matrix: | ||
rust: [1.60.0, stable, nightly] | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Prepare | ||
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} | ||
- name: Check | ||
run: cargo check -p windows-strings --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | ||
<Type Name="windows_strings::hstring::HSTRING"> | ||
<Intrinsic Name="header" Expression="(windows_strings::hstring::Header *)__0.tag" /> | ||
<Intrinsic Name="is_empty" Expression="__0.tag == 0" /> | ||
<DisplayString Condition="is_empty()">""</DisplayString> | ||
<DisplayString>{header()->data,[header()->len]su}</DisplayString> | ||
|
||
<Expand> | ||
<Item Name="[len]">is_empty() ? (unsigned int)0 : header()->len</Item> | ||
<Item Name="[ref_count]" Condition="!is_empty()">header()->count</Item> | ||
<Item Name="[flags]" Condition="!is_empty()">header()->flags</Item> | ||
<Synthetic Name="[chars]" Condition="!is_empty()"> | ||
<Expand> | ||
<ArrayItems> | ||
<Size>header()->len</Size> | ||
<ValuePointer>(char16_t*)header()->data</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Synthetic> | ||
</Expand> | ||
</Type> | ||
|
||
<Type Name="windows_strings::pstr::PSTR"> | ||
<AlternativeType Name="windows_strings::pcstr::PCSTR" /> | ||
<Intrinsic Name="len" Expression="strlen(((char*)__0))" /> | ||
<DisplayString>{(char*)__0,[len()]s8}</DisplayString> | ||
<Expand> | ||
<Item Name="[len]">len()</Item> | ||
<Synthetic Name="[chars]"> | ||
<Expand> | ||
<ArrayItems> | ||
<Size>len()</Size> | ||
<ValuePointer>(char*)__0</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Synthetic> | ||
</Expand> | ||
</Type> | ||
|
||
<Type Name="windows_strings::pwstr::PWSTR"> | ||
<AlternativeType Name="windows_strings::pcwstr::PCWSTR" /> | ||
<Intrinsic Name="len" Expression="wcslen(((WCHAR*)__0))" /> | ||
<DisplayString>{(char16_t*)__0,[len()]su}</DisplayString> | ||
|
||
<Expand> | ||
<Item Name="[len]">len()</Item> | ||
<Synthetic Name="[chars]"> | ||
<Expand> | ||
<ArrayItems> | ||
<Size>len()</Size> | ||
<ValuePointer>(char16_t*)__0</ValuePointer> | ||
</ArrayItems> | ||
</Expand> | ||
</Synthetic> | ||
</Expand> | ||
</Type> | ||
|
||
<Type Name="windows_strings::ref_count::RefCount"> | ||
<DisplayString>{__0}</DisplayString> | ||
</Type> | ||
</AutoVisualizer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[package] | ||
name = "windows-strings" | ||
version = "0.1.0" | ||
authors = ["Microsoft"] | ||
edition = "2021" | ||
rust-version = "1.60" | ||
license = "MIT OR Apache-2.0" | ||
description = "Rust for Windows" | ||
repository = "https://github.com/microsoft/windows-rs" | ||
readme = "readme.md" | ||
categories = ["os::windows-apis"] | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[package.metadata.docs.rs] | ||
default-target = "x86_64-pc-windows-msvc" | ||
targets = [] | ||
|
||
[dependencies.windows-targets] | ||
version = "0.52.5" | ||
path = "../targets" | ||
|
||
[dependencies.windows-result] | ||
version = "0.1.1" | ||
path = "../result" | ||
|
||
[features] | ||
default = ["std"] | ||
std = [] |
Oops, something went wrong.