Stufen
Anforderungen
|
Konzepte
|
Entwurf
|
Entwicklung
|
Qualitätssicherung
|
Lebenszyklus
|
Steuerung
Ziele
Untersuchung
mit Columbo
Integrität von
Datenbanken
Interaktion und
Portierbarkeit
Ergonomie der
Schnittstellen
Angebot
Produkte
Projekt
Beratung
Mittel
Analytik
Modellierung
Sprachen
Algebra
Logik
Hardware
Denken
Kreativität
Zusammenhänge
Gesellschaft
Wirtschaft
Branche
Firma
products
/
Sources
/
formale Sprachen
/
C
/
Firefox
/
third_party
/
rust
/
windows-result
/ (
Browser von der Mozilla Stiftung
Version 136.0.1
©
) Datei vom 10.2.2025 mit Größe 958 B
Quelle readme.md Sprache: unbekannt
## Windows error handling
The [windows-result](
https://crates.io/crates/windows-result)
crate provides efficie
nt Windows error handling and propagation with support for Win32, COM, and WinRT APIs.
* [Getting started](
https://kennykerr.ca/rust-getting-started/)
* [Samples](
https://github.com/microsoft/windows-rs/tree/0.58.0/crates/samples)
* [Releases](
https://github.com/microsoft/windows-rs/releases)
Start by adding the following to your Cargo.toml file:
```toml
[dependencies.windows-result]
version = "0.2"
```
Use the `HRESULT`, `Error`, and specialized `Result` types as needed:
```rust
use windows_result::*;
const S_OK: HRESULT = HRESULT(0);
const ERROR_CANCELLED: u32 = 1223;
const E_CANCELLED: HRESULT = HRESULT::from_win32(ERROR_CANCELLED);
fn main() -> Result<()> {
S_OK.ok()?;
let e = Error::new(E_CANCELLED, "test message");
assert_eq!(e.code(), E_CANCELLED);
assert_eq!(e.message(), "test message");
Ok(())
}
```
[ Dauer der Verarbeitung: 0.2 Sekunden (vorverarbeitet)
]
2026-04-02
Neuigkeiten
Aktuelles
Motto des Tages
Software
Produkte
Quellcodebibliothek
Aktivitäten
Artikel über Sicherheit
Anleitung zur Aktivierung von SSL
Muße
Gedichte
Musik
Bilder
Jenseits des Üblichen ....
Besucherstatistik
Monitoring
Impressum
|
Ethik und Gesetz
|
Haftungsausschluß
|
Kontakt
|
Seitenstruktur
|
©
2026 JDD
|