com

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STGM_READ      = 0x00000000
	STGM_WRITE     = 0x00000001
	STGM_READWRITE = 0x00000002
)

Variables

This section is empty.

Functions

func CoCreateInstance

func CoCreateInstance(
	clsid *windows.GUID,
	unkOuter *IUnknown,
	clsContext uint32,
	iid *windows.GUID,
) (v unsafe.Pointer, err error)

创建并默认初始化与指定 CLSID 关联的类的单个对象。

func CoInitializeEx

func CoInitializeEx(reserved uintptr, coInitFlag uint32) (err error)

初始化 COM 库以供调用线程使用,设置线程的并发模型,并根据需要为线程创建一个新单元。

func CoTaskMemFree

func CoTaskMemFree(address unsafe.Pointer)

释放先前通过调用 CoTaskMemAlloc 或 CoTaskMemRealloc 函数分配的任务内存块。

func CoUninitialize

func CoUninitialize()

关闭当前线程上的 COM 库,卸载线程加载的所有 DLL,释放线程维护的任何其他资源,并强制关闭线程上的所有 RPC 连接。

func IID_IPropertyStore

func IID_IPropertyStore() windows.GUID

func IID_IUnknown

func IID_IUnknown() windows.GUID

Types

type HRESULT

type HRESULT = uint32

type IPropertyStore

type IPropertyStore struct {
	// contains filtered or unexported fields
}

func (*IPropertyStore) Commit

func (self *IPropertyStore) Commit() (err error)

进行更改后,此方法将保存更改。

func (*IPropertyStore) GetAt

func (self *IPropertyStore) GetAt(iProp uint32) (key *PROPERTYKEY, err error)

从项的属性数组中获取属性键。

func (*IPropertyStore) GetCount

func (self *IPropertyStore) GetCount() (cProps uint32, err error)

此方法返回附加到文件的属性数的计数。

func (*IPropertyStore) GetValue

func (self *IPropertyStore) GetValue(key PROPERTYKEY) (propVar PROPVARIANT, err error)

此方法检索特定属性的数据。

func (*IPropertyStore) Release

func (self *IPropertyStore) Release() (err error)

func (*IPropertyStore) SetValue

func (self *IPropertyStore) SetValue(key PROPERTYKEY, propVar PROPVARIANT) (err error)

此方法设置属性值或替换或删除现有值。

type IUnknown

type IUnknown struct {
	// contains filtered or unexported fields
}

type IUnknownVtbl

type IUnknownVtbl struct {
	QueryInterface uintptr
	AddRef         uintptr
	Release        uintptr
}

type PROPERTYKEY

type PROPERTYKEY struct {
	Fmtid windows.GUID
	Pid   uint32
}

func PKEY_Device_ContainerId

func PKEY_Device_ContainerId() PROPERTYKEY

func PKEY_Device_DeviceDesc

func PKEY_Device_DeviceDesc() PROPERTYKEY

func PKEY_Device_FriendlyName

func PKEY_Device_FriendlyName() PROPERTYKEY

func PKEY_Device_InstanceId

func PKEY_Device_InstanceId() PROPERTYKEY

type PROPVARIANT

type PROPVARIANT struct {
	Vt         uint16 // Value type tag.
	WReserved1 uint16
	WReserved2 uint16
	WReserved3 uint16
	Val        uint64
	// contains filtered or unexported fields
}

func (*PROPVARIANT) PwszVal

func (self *PROPVARIANT) PwszVal() *uint16

func (*PROPVARIANT) PwszValString added in v0.2.0

func (self *PROPVARIANT) PwszValString() string

Jump to

Keyboard shortcuts

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