Skip to content

Instantly share code, notes, and snippets.

View kennykerr's full-sized avatar

Kenny Kerr kennykerr

View GitHub Profile
00000000-0000-0000-0000-000000000000
  Windows.Win32.Storage.Vhd.VIRTUAL_STORAGE_TYPE_VENDOR_UNKNOWN
  Windows.Wdk.System.SystemServices.CPER_EMPTY_GUID
  Windows.Win32.Security.ExtensibleAuthenticationProtocol.GUID_EapHost_Default
  Windows.Win32.UI.TextServices.GUID_MODEBIAS_NONE
  Windows.Win32.System.Iis.GUID_IIS_ALL_TRACE_PROVIDERS
  Windows.Win32.Storage.FileSystem.PARTITION_ENTRY_UNUSED_GUID
  Windows.Win32.Media.KernelStreaming.GUID_NULL
  Windows.Win32.Devices.PortableDevices.WPD_CATEGORY_NULL
use syn::{parse::*, *};
mod keywords {
syn::custom_keyword!(interface);
}
#[derive(Debug)]
struct Module {
pub name: Ident,
pub members: Vec<ModuleMember>,
using namespace winrt;
using namespace Windows::Foundation::Collections;
struct Sample
{
IVector<IMap<hstring, hstring>> m_examples{ multi_threaded_vector<IMap<hstring, hstring>>() };
auto Examples() const
{
@kennykerr
kennykerr / com_sys.rs
Created January 10, 2023 17:04
COM without `windows` crate
#![allow(non_snake_case)]
use windows_sys::{core::*, Win32::Foundation::*, Win32::System::Com::*};
fn main() {
unsafe {
let mut uri = std::ptr::null_mut();
let hr = CreateUri(
w!("http://kennykerr.ca"),
Uri_CREATE_CANONICALIZE,
use windows::{core::*, Win32::System::Performance::*};
fn main() {
unsafe {
let mut query = 0;
PdhOpenQueryW(None, 0, &mut query);
let mut counter = 0;
PdhAddCounterW(
query,
Windows.AI.MachineLearning -> Windows.Foundation -> Windows.Foundation.Collections -> Windows.Foundation
Windows.AI.MachineLearning.Preview -> Windows.Foundation -> Windows.Foundation.Collections -> Windows.Foundation
Windows.ApplicationModel -> Windows.ApplicationModel.Activation -> Windows.ApplicationModel.Appointments.AppointmentsProvider -> Windows.ApplicationModel.Appointments -> Windows.Foundation -> Windows.Foundation.Collections -> Windows.Foundation
Windows.ApplicationModel.Activation -> Windows.ApplicationModel.Appointments.AppointmentsProvider -> Windows.ApplicationModel.Appointments -> Windows.Foundation -> Windows.Foundation.Collections -> Windows.Foundation
Windows.ApplicationModel.AppExtensions -> Windows.ApplicationModel -> Windows.ApplicationModel.Activation -> Windows.ApplicationModel.Appointments.AppointmentsProvider -> Windows.ApplicationModel.Appointments -> Windows.Foundation -> Windows.Foundation.Collections -> Windows.Foundation
1 alljoyn_interfacedescription_property_getannotationscount
current:12
expected:16
2 alljoyn_interfacedescription_property_getannotation
current:24
expected:28
3 JsCreateRuntime
current:16
expected:12
4 JsCreateContext
UiaRaiseAutomationPropertyChangedEvent
current:544
expected:40
VarCyAdd
current:36
expected:20
VarCyNeg
current:20
expected:12
ItemContainerPattern_FindItemByProperty
umutablecptrie_clone
current:8
expected:
utrans_clone
current:8
expected:
ucfpos_getInt64IterationContext
current:8
expected:
VarBoolFromCy
Microsoft (R) COFF/PE Dumper Version 14.31.31104.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file test.winmd
PE signature found
File Type: DLL