automation

package
v0.0.0-...-b75a8a7 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

Package automation provides essential types for interacting with COM Automation (IDispatch).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BSTR

type BSTR uintptr

BSTR is the string format used by COM Automation. They are not garbage collected and must be explicitly closed when no longer needed.

func NewBSTR

func NewBSTR(s string) BSTR

NewBSTR creates a new BSTR from string s.

func NewBSTRFromUTF16

func NewBSTRFromUTF16(us []uint16) BSTR

NewBSTR creates a new BSTR from slice us, which contains UTF-16 code units.

func NewBSTRFromUTF16Ptr

func NewBSTRFromUTF16Ptr(up *uint16) BSTR

NewBSTR creates a new BSTR from up, a C-style string pointer to UTF-16 code units.

func (*BSTR) Clone

func (bs *BSTR) Clone() BSTR

Clone creates a clone of bs whose lifetime becomes independent of the original. It must be explicitly closed when no longer needed.

func (*BSTR) Close

func (bs *BSTR) Close() error

Close frees bs.

func (*BSTR) IsNil

func (bs *BSTR) IsNil() bool

IsNil returns true if bs holds a nil value.

func (*BSTR) Len

func (bs *BSTR) Len() uint32

Len returns the length of bs in code units.

func (*BSTR) String

func (bs *BSTR) String() string

String returns the contents of bs as a Go string.

func (*BSTR) ToUTF16

func (bs *BSTR) ToUTF16() []uint16

ToUTF16 returns the contents of bs as a slice of UTF-16 code units.

func (*BSTR) ToUTF16Ptr

func (bs *BSTR) ToUTF16Ptr() *uint16

ToUTF16 returns the contents of bs as C-style string pointer to UTF-16 code units.

Jump to

Keyboard shortcuts

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