clusapi

package
v0.32.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseProperties

func ParseProperties(data []byte) (map[string][]Property, error)

ParseProperties decodes CLUSPROP_LIST without casting untrusted bytes to native structs. Headers and payloads are DWORD aligned; cbLength is measured in bytes. Only the structure is validated: string contents are decoded when used, so one unusual value does not discard the whole list. https://learn.microsoft.com/en-us/previous-versions/windows/desktop/mscs/property-lists

Types

type Property

type Property struct {
	Format uint16
	Data   []byte
}

Property is a single CLUSPROP_LIST_VALUE. Values retain their native format; unsupported formats can be skipped without confusing an absent DWORD with zero.

func (Property) DWORD

func (p Property) DWORD() (uint32, error)

func (Property) String

func (p Property) String() (string, error)

String decodes an SZ, EXPAND_SZ or EXPANDED_SZ value like WMI does: the value ends at the first NUL and invalid UTF-16 is replaced with U+FFFD.

func (Property) Value32

func (p Property) Value32() (uint32, error)

Value32 returns the bit pattern of a DWORD or LONG value. Callers decide the signedness, matching the WMI type of the property they publish.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL