Documentation ¶
Index ¶
- Constants
- Variables
- func BoolToComBOOL(b bool) int32
- func CoCreateInstanceEx(Clsid *windows.GUID, punkOuter *IUnknown, dwClsCtx CLSCTX, ...) (ret error)
- func CoTaskMemFree(pv unsafe.Pointer)
- func Initialize()
- func IsEqualGUID(guid1 *windows.GUID, guid2 *windows.GUID) bool
- func IsLocal(host string) bool
- func SysAllocStringLen(v string) (ss *uint16)
- func SysFreeString(v *uint16) (err error)
- func Uninitialize()
- func VariantClear(pvarg *VARIANT) (err error)
- type CLSCTX
- type COAUTHIDENTITY
- type COAUTHINFO
- type COSERVERINFO
- type IConnectionPoint
- type IConnectionPointContainer
- type IConnectionPointContainerVtbl
- type IConnectionPointVtbl
- type IEnumGUID
- type IEnumGUIDVtbl
- type IEnumString
- type IEnumStringVtbl
- type IOPCAsyncIO2
- func (sl *IOPCAsyncIO2) Cancel2(dwCancelID uint32) (err error)
- func (sl *IOPCAsyncIO2) Read(phServer []uint32, dwTransactionID uint32) (pdwCancelID uint32, ppErrors []int32, err error)
- func (sl *IOPCAsyncIO2) Refresh2(dwSource OPCDATASOURCE, dwTransactionID uint32) (pdwCancelID uint32, err error)
- func (sl *IOPCAsyncIO2) Vtbl() *IOPCAsyncIO2Vtbl
- func (sl *IOPCAsyncIO2) Write(phServer []uint32, pItemValues []VARIANT, dwTransactionID uint32) (pdwCancelID uint32, ppErrors []int32, err error)
- type IOPCAsyncIO2Vtbl
- type IOPCBrowseServerAddressSpace
- func (v *IOPCBrowseServerAddressSpace) BrowseOPCItemIDs(dwBrowseFilterType OPCBROWSETYPE, szFilterCriteria string, ...) (result []string, err error)
- func (v *IOPCBrowseServerAddressSpace) ChangeBrowsePosition(dwBrowseDirection OPCBROWSEDIRECTION, szString string) (err error)
- func (v *IOPCBrowseServerAddressSpace) GetItemID(szItemDataID string) (szItemID string, err error)
- func (v *IOPCBrowseServerAddressSpace) QueryOrganization() (pNameSpaceType OPCNAMESPACETYPE, err error)
- func (v *IOPCBrowseServerAddressSpace) Vtbl() *IOPCBrowseServerAddressSpaceVtbl
- type IOPCBrowseServerAddressSpaceVtbl
- type IOPCCommon
- func (v *IOPCCommon) GetErrorString(dwError uint32) (str string, err error)
- func (v *IOPCCommon) GetLocaleID() (pdwLcid uint32, err error)
- func (v *IOPCCommon) QueryAvailableLocaleIDs() (result []uint32, err error)
- func (v *IOPCCommon) SetClientName(szName string) (err error)
- func (v *IOPCCommon) SetLocaleID(dwLcid uint32) (err error)
- func (v *IOPCCommon) Vtbl() *IOPCCommonVtbl
- type IOPCCommonVtbl
- type IOPCGroupStateMgt
- func (sl *IOPCGroupStateMgt) GetState() (pUpdateRate uint32, pActive bool, ppName string, pTimeBias int32, ...)
- func (sl *IOPCGroupStateMgt) SetName(szName string) error
- func (sl *IOPCGroupStateMgt) SetState(requestedUpdateRate *uint32, pActive *int32, pTimeBias *int32, ...) (pRevisedUpdateRate uint32, err error)
- func (sl *IOPCGroupStateMgt) Vtbl() *IOPCGroupStateMgtVtbl
- type IOPCGroupStateMgtVtbl
- type IOPCItemMgt
- func (sl *IOPCItemMgt) AddItems(items []TagOPCITEMDEF) ([]TagOPCITEMRESULTStruct, []int32, error)
- func (sl *IOPCItemMgt) RemoveItems(phServer []uint32) ([]int32, error)
- func (sl *IOPCItemMgt) SetActiveState(phServer []uint32, bActive bool) ([]int32, error)
- func (sl *IOPCItemMgt) SetClientHandles(phServer []uint32, phClient []uint32) ([]int32, error)
- func (sl *IOPCItemMgt) SetDatatypes(phServer []uint32, pRequestedDatatypes []VT) ([]int32, error)
- func (sl *IOPCItemMgt) ValidateItems(items []TagOPCITEMDEF, bBlobUpdate bool) ([]TagOPCITEMRESULTStruct, []int32, error)
- func (sl *IOPCItemMgt) Vtbl() *IOPCItemMgtVtbl
- type IOPCItemMgtVtbl
- type IOPCItemProperties
- func (v *IOPCItemProperties) GetItemProperties(szItemID string, propertyIDs []uint32) (ppvData []interface{}, ppErrors []int32, err error)
- func (v *IOPCItemProperties) LookupItemIDs(szItemID string, propertyIDs []uint32) (ppszNewItemIDs []string, ppErrors []int32, err error)
- func (v *IOPCItemProperties) QueryAvailableProperties(szItemID string) (ppPropertyIDs []uint32, ppDescriptions []string, ppvtDataTypes []uint16, ...)
- func (v *IOPCItemProperties) Vtbl() *IOPCItemPropertiesVtbl
- type IOPCItemPropertiesVtbl
- type IOPCServer
- func (v *IOPCServer) AddGroup(szName string, bActive bool, dwRequestedUpdateRate uint32, hClientGroup uint32, ...) (phServerGroup uint32, pRevisedUpdateRate uint32, ppUnk *IUnknown, err error)
- func (v *IOPCServer) GetStatus() (status *ServerStatus, err error)
- func (v *IOPCServer) RemoveGroup(hServerGroup uint32, bForce bool) (err error)
- func (v *IOPCServer) Vtbl() *IOPCServerVtbl
- type IOPCServerList2
- type IOPCServerListVtbl
- type IOPCServerVtbl
- type IOPCSyncIO
- type IOPCSyncIOVtbl
- type IUnknown
- type IUnknownVtbl
- type ItemState
- type MULTI_QI
- type OPCBROWSEDIRECTION
- type OPCBROWSETYPE
- type OPCDATASOURCE
- type OPCNAMESPACETYPE
- type OPCSERVERSTATUS
- type OPCServerState
- type SafeArray
- type SafeArrayBound
- type ServerStatus
- type TagOPCITEMDEF
- type TagOPCITEMRESULT
- type TagOPCITEMRESULTStruct
- type TagOPCITEMSTATE
- type VARIANT
- type VT
- type VariantWrapper
Constants ¶
View Source
const ( S_OK = 0x00000000 E_UNEXPECTED = 0x8000FFFF E_NOTIMPL = 0x80004001 E_OUTOFMEMORY = 0x8007000E E_INVALIDARG = 0x80070057 E_NOINTERFACE = 0x80004002 E_POINTER = 0x80004003 E_HANDLE = 0x80070006 E_ABORT = 0x80004004 E_FAIL = 0x80004005 E_ACCESSDENIED = 0x80070005 E_PENDING = 0x8000000A CO_E_CLASSSTRING = 0x800401F3 )
Variables ¶
View Source
var CLSID_OpcServerList = windows.GUID{ Data1: 0x13486D51, Data2: 0x4821, Data3: 0x11D2, Data4: [8]byte{0xA4, 0x94, 0x3C, 0xB3, 0x06, 0xC1, 0x00, 0x00}, }
View Source
var IID_IConnectionPointContainer = windows.GUID{ Data1: 0xB196B284, Data2: 0xBAB4, Data3: 0x101A, Data4: [8]byte{0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x07}, }
B196B284-BAB4-101A-B69C-00AA00341D07
View Source
var IID_IOPCAsyncIO2 = windows.GUID{ Data1: 0x39c13a71, Data2: 0x011e, Data3: 0x11d0, Data4: [8]byte{0x96, 0x75, 0x00, 0x20, 0xaf, 0xd8, 0xad, 0xb3}, }
View Source
var IID_IOPCBrowseServerAddressSpace = windows.GUID{ Data1: 0x39c13a4f, Data2: 0x011e, Data3: 0x11d0, Data4: [8]byte{0x96, 0x75, 0x00, 0x20, 0xaf, 0xd8, 0xad, 0xb3}, }
View Source
var IID_IOPCCommon = windows.GUID{ Data1: 0xF31DFDE2, Data2: 0x07B6, Data3: 0x11d2, Data4: [8]byte{0xB2, 0xD8, 0x00, 0x60, 0x08, 0x3B, 0xA1, 0xFB}, }
View Source
var IID_IOPCGroupStateMgt = windows.GUID{ Data1: 0x39c13a50, Data2: 0x011e, Data3: 0x11d0, Data4: [8]byte{0x96, 0x75, 0x00, 0x20, 0xaf, 0xd8, 0xad, 0xb3}, }
View Source
var IID_IOPCItemMgt = windows.GUID{ Data1: 0x39c13a54, Data2: 0x011e, Data3: 0x11d0, Data4: [8]byte{0x96, 0x75, 0x00, 0x20, 0xaf, 0xd8, 0xad, 0xb3}, }
View Source
var IID_IOPCItemProperties = windows.GUID{ Data1: 0x39c13a72, Data2: 0x011e, Data3: 0x11d0, Data4: [8]byte{0x96, 0x75, 0x00, 0x20, 0xaf, 0xd8, 0xad, 0xb3}, }
View Source
var IID_IOPCServer = windows.GUID{ Data1: 0x39c13a4d, Data2: 0x011e, Data3: 0x11d0, Data4: [8]byte{0x96, 0x75, 0x00, 0x20, 0xaf, 0xd8, 0xad, 0xb3}, }
View Source
var IID_IOPCServerList2 = windows.GUID{ Data1: 0x9DD0B56C, Data2: 0xAD9E, Data3: 0x43ee, Data4: [8]byte{0x83, 0x05, 0x48, 0x7F, 0x31, 0x88, 0xBF, 0x7A}, }
View Source
var IID_IOPCSyncIO = windows.GUID{ Data1: 0x39c13a52, Data2: 0x011e, Data3: 0x11d0, Data4: [8]byte{0x96, 0x75, 0x00, 0x20, 0xaf, 0xd8, 0xad, 0xb3}, }
View Source
var IID_IUnknown = &windows.GUID{ Data1: 0x00000000, Data2: 0x0000, Data3: 0x0000, Data4: [8]byte{0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}, }
Functions ¶
func BoolToComBOOL ¶ added in v0.2.0
func CoCreateInstanceEx ¶
func CoTaskMemFree ¶
func Initialize ¶ added in v0.2.0
func Initialize()
Initialize initialize COM with COINIT_MULTITHREADED
func SysAllocStringLen ¶
func SysFreeString ¶
func VariantClear ¶
Types ¶
type COAUTHIDENTITY ¶
type COAUTHINFO ¶
type COSERVERINFO ¶
type COSERVERINFO struct { DwReserved1 uint32 PwszName *uint16 PAuthInfo *COAUTHINFO DwReserved2 uint32 }
type IConnectionPoint ¶
type IConnectionPoint struct {
*IUnknown
}
func (*IConnectionPoint) Advise ¶
func (p *IConnectionPoint) Advise(pUnkSink *IUnknown) (cookie uint32, err error)
func (*IConnectionPoint) Unadvise ¶
func (p *IConnectionPoint) Unadvise(dwCookie uint32) error
func (*IConnectionPoint) Vtbl ¶
func (p *IConnectionPoint) Vtbl() *IConnectionPointVtbl
type IConnectionPointContainer ¶
type IConnectionPointContainer struct {
*IUnknown
}
func (*IConnectionPointContainer) FindConnectionPoint ¶
func (c *IConnectionPointContainer) FindConnectionPoint(riid *windows.GUID) (*IConnectionPoint, error)
func (*IConnectionPointContainer) Vtbl ¶
func (c *IConnectionPointContainer) Vtbl() *IConnectionPointContainerVtbl
type IConnectionPointContainerVtbl ¶
type IConnectionPointContainerVtbl struct { IUnknownVtbl EnumConnectionPoints uintptr FindConnectionPoint uintptr }
type IConnectionPointVtbl ¶
type IEnumGUID ¶
type IEnumGUID struct {
*IUnknown
}
func (*IEnumGUID) Vtbl ¶
func (ie *IEnumGUID) Vtbl() *IEnumGUIDVtbl
type IEnumGUIDVtbl ¶
type IEnumGUIDVtbl struct { IUnknownVtbl Next uintptr Skip uintptr Reset uintptr Clone uintptr }
type IEnumString ¶
type IEnumString struct {
*IUnknown
}
func (*IEnumString) Vtbl ¶
func (sl *IEnumString) Vtbl() *IEnumStringVtbl
type IEnumStringVtbl ¶
type IEnumStringVtbl struct { IUnknownVtbl Next uintptr Skip uintptr Reset uintptr Clone uintptr }
type IOPCAsyncIO2 ¶
type IOPCAsyncIO2 struct {
*IUnknown
}
func (*IOPCAsyncIO2) Cancel2 ¶
func (sl *IOPCAsyncIO2) Cancel2(dwCancelID uint32) (err error)
func (*IOPCAsyncIO2) Refresh2 ¶
func (sl *IOPCAsyncIO2) Refresh2(dwSource OPCDATASOURCE, dwTransactionID uint32) (pdwCancelID uint32, err error)
func (*IOPCAsyncIO2) Vtbl ¶
func (sl *IOPCAsyncIO2) Vtbl() *IOPCAsyncIO2Vtbl
type IOPCAsyncIO2Vtbl ¶
type IOPCBrowseServerAddressSpace ¶
type IOPCBrowseServerAddressSpace struct {
*IUnknown
}
func (*IOPCBrowseServerAddressSpace) BrowseOPCItemIDs ¶
func (v *IOPCBrowseServerAddressSpace) BrowseOPCItemIDs(dwBrowseFilterType OPCBROWSETYPE, szFilterCriteria string, vtDataTypeFilter uint16, dwAccessRightsFilter uint32) (result []string, err error)
func (*IOPCBrowseServerAddressSpace) ChangeBrowsePosition ¶
func (v *IOPCBrowseServerAddressSpace) ChangeBrowsePosition(dwBrowseDirection OPCBROWSEDIRECTION, szString string) (err error)
func (*IOPCBrowseServerAddressSpace) GetItemID ¶
func (v *IOPCBrowseServerAddressSpace) GetItemID(szItemDataID string) (szItemID string, err error)
func (*IOPCBrowseServerAddressSpace) QueryOrganization ¶
func (v *IOPCBrowseServerAddressSpace) QueryOrganization() (pNameSpaceType OPCNAMESPACETYPE, err error)
func (*IOPCBrowseServerAddressSpace) Vtbl ¶
func (v *IOPCBrowseServerAddressSpace) Vtbl() *IOPCBrowseServerAddressSpaceVtbl
type IOPCCommon ¶
type IOPCCommon struct {
*IUnknown
}
func (*IOPCCommon) GetErrorString ¶
func (v *IOPCCommon) GetErrorString(dwError uint32) (str string, err error)
func (*IOPCCommon) GetLocaleID ¶
func (v *IOPCCommon) GetLocaleID() (pdwLcid uint32, err error)
func (*IOPCCommon) QueryAvailableLocaleIDs ¶
func (v *IOPCCommon) QueryAvailableLocaleIDs() (result []uint32, err error)
func (*IOPCCommon) SetClientName ¶
func (v *IOPCCommon) SetClientName(szName string) (err error)
func (*IOPCCommon) SetLocaleID ¶
func (v *IOPCCommon) SetLocaleID(dwLcid uint32) (err error)
func (*IOPCCommon) Vtbl ¶
func (v *IOPCCommon) Vtbl() *IOPCCommonVtbl
type IOPCCommonVtbl ¶
type IOPCGroupStateMgt ¶
type IOPCGroupStateMgt struct {
*IUnknown
}
func (*IOPCGroupStateMgt) SetName ¶
func (sl *IOPCGroupStateMgt) SetName(szName string) error
func (*IOPCGroupStateMgt) Vtbl ¶
func (sl *IOPCGroupStateMgt) Vtbl() *IOPCGroupStateMgtVtbl
type IOPCGroupStateMgtVtbl ¶
type IOPCGroupStateMgtVtbl struct { IUnknownVtbl GetState uintptr SetState uintptr SetName uintptr CloneGroup uintptr }
type IOPCItemMgt ¶
type IOPCItemMgt struct {
*IUnknown
}
func (*IOPCItemMgt) AddItems ¶
func (sl *IOPCItemMgt) AddItems(items []TagOPCITEMDEF) ([]TagOPCITEMRESULTStruct, []int32, error)
func (*IOPCItemMgt) RemoveItems ¶
func (sl *IOPCItemMgt) RemoveItems(phServer []uint32) ([]int32, error)
func (*IOPCItemMgt) SetActiveState ¶
func (sl *IOPCItemMgt) SetActiveState(phServer []uint32, bActive bool) ([]int32, error)
func (*IOPCItemMgt) SetClientHandles ¶
func (sl *IOPCItemMgt) SetClientHandles(phServer []uint32, phClient []uint32) ([]int32, error)
func (*IOPCItemMgt) SetDatatypes ¶
func (sl *IOPCItemMgt) SetDatatypes(phServer []uint32, pRequestedDatatypes []VT) ([]int32, error)
func (*IOPCItemMgt) ValidateItems ¶
func (sl *IOPCItemMgt) ValidateItems(items []TagOPCITEMDEF, bBlobUpdate bool) ([]TagOPCITEMRESULTStruct, []int32, error)
func (*IOPCItemMgt) Vtbl ¶
func (sl *IOPCItemMgt) Vtbl() *IOPCItemMgtVtbl
type IOPCItemMgtVtbl ¶
type IOPCItemProperties ¶
type IOPCItemProperties struct {
*IUnknown
}
func (*IOPCItemProperties) GetItemProperties ¶
func (v *IOPCItemProperties) GetItemProperties(szItemID string, propertyIDs []uint32) (ppvData []interface{}, ppErrors []int32, err error)
func (*IOPCItemProperties) LookupItemIDs ¶
func (*IOPCItemProperties) QueryAvailableProperties ¶
func (*IOPCItemProperties) Vtbl ¶
func (v *IOPCItemProperties) Vtbl() *IOPCItemPropertiesVtbl
type IOPCItemPropertiesVtbl ¶
type IOPCItemPropertiesVtbl struct { IUnknownVtbl QueryAvailableProperties uintptr GetItemProperties uintptr LookupItemIDs uintptr }
type IOPCServer ¶
type IOPCServer struct {
*IUnknown
}
func (*IOPCServer) GetStatus ¶
func (v *IOPCServer) GetStatus() (status *ServerStatus, err error)
func (*IOPCServer) RemoveGroup ¶
func (v *IOPCServer) RemoveGroup(hServerGroup uint32, bForce bool) (err error)
func (*IOPCServer) Vtbl ¶
func (v *IOPCServer) Vtbl() *IOPCServerVtbl
type IOPCServerList2 ¶
type IOPCServerList2 struct {
*IUnknown
}
func (*IOPCServerList2) EnumClassesOfCateGories ¶
func (*IOPCServerList2) GetClassDetails ¶
func (*IOPCServerList2) Vtbl ¶
func (sl *IOPCServerList2) Vtbl() *IOPCServerListVtbl
type IOPCServerListVtbl ¶
type IOPCServerListVtbl struct { IUnknownVtbl EnumClassesOfCategories uintptr GetClassDetails uintptr CLSIDFromProgID uintptr }
type IOPCServerVtbl ¶
type IOPCSyncIO ¶
type IOPCSyncIO struct {
*IUnknown
}
func (*IOPCSyncIO) Read ¶
func (sl *IOPCSyncIO) Read(source OPCDATASOURCE, serverHandles []uint32) ([]*ItemState, []int32, error)
func (*IOPCSyncIO) Vtbl ¶
func (sl *IOPCSyncIO) Vtbl() *IOPCSyncIOVtbl
type IOPCSyncIOVtbl ¶
type IOPCSyncIOVtbl struct { IUnknownVtbl Read uintptr Write uintptr }
type IUnknown ¶
type IUnknown struct {
LpVtbl *[1024]uintptr
}
func MakeCOMObjectEx ¶ added in v0.2.0
func (*IUnknown) QueryInterface ¶
QueryInterface HRESULT QueryInterface(
REFIID riid, void **ppvObject
);
func (*IUnknown) Vtbl ¶
func (v *IUnknown) Vtbl() *IUnknownVtbl
type IUnknownVtbl ¶
type OPCBROWSEDIRECTION ¶
type OPCBROWSEDIRECTION uint32
type OPCBROWSETYPE ¶
type OPCBROWSETYPE uint32
type OPCDATASOURCE ¶
type OPCDATASOURCE int32
type OPCNAMESPACETYPE ¶
type OPCNAMESPACETYPE uint32
type OPCSERVERSTATUS ¶
type OPCServerState ¶
type OPCServerState uint32
type SafeArray ¶
type SafeArray struct { Dimensions uint16 FeaturesFlag uint16 ElementsSize uint32 LocksAmount uint32 Data uint32 Bounds [16]byte }
func (*SafeArray) ToValueArray ¶
type SafeArrayBound ¶
type ServerStatus ¶
type TagOPCITEMDEF ¶
type TagOPCITEMRESULT ¶
type TagOPCITEMRESULT struct { HServer uint32 VtCanonical uint16 WReserved uint16 DwAccessRights uint32 DwBlobSize uint32 PBlob *byte }
func (*TagOPCITEMRESULT) CloneToStruct ¶
func (result *TagOPCITEMRESULT) CloneToStruct() TagOPCITEMRESULTStruct
type TagOPCITEMRESULTStruct ¶
type TagOPCITEMSTATE ¶
type VT ¶
type VT uint16
const ( VT_EMPTY VT = 0 VT_NULL VT = 1 VT_I2 VT = 2 VT_I4 VT = 3 VT_R4 VT = 4 VT_R8 VT = 5 VT_CY VT = 6 VT_DATE VT = 7 VT_BSTR VT = 8 VT_DISPATCH VT = 9 VT_ERROR VT = 10 VT_BOOL VT = 11 VT_VARIANT VT = 12 VT_UNKNOWN VT = 13 VT_DECIMAL VT = 14 VT_I1 VT = 16 VT_UI1 VT = 17 VT_UI2 VT = 18 VT_UI4 VT = 19 VT_I8 VT = 20 VT_UI8 VT = 21 VT_INT VT = 22 VT_UINT VT = 23 VT_VOID VT = 24 VT_HRESULT VT = 25 VT_PTR VT = 26 VT_SAFEARRAY VT = 27 VT_CARRAY VT = 28 VT_USERDEFINED VT = 29 VT_LPSTR VT = 30 VT_LPWSTR VT = 31 VT_RECORD VT = 36 VT_INT_PTR VT = 37 VT_UINT_PTR VT = 38 VT_FILETIME VT = 64 VT_BLOB VT = 65 VT_STREAM VT = 66 VT_STORAGE VT = 67 VT_STREAMED_OBJECT VT = 68 VT_STORED_OBJECT VT = 69 VT_BLOB_OBJECT VT = 70 VT_CF VT = 71 VT_CLSID VT = 72 VT_VERSIONED_STREAM VT = 73 VT_BSTR_BLOB VT = 0xfff VT_VECTOR VT = 0x1000 VT_ARRAY VT = 0x2000 VT_BYREF VT = 0x4000 VT_RESERVED VT = 0x8000 VT_ILLEGAL VT = 0xffff VT_ILLEGALMASKED VT = 0xfff VT_TYPEMASK VT = 0xfff )
type VariantWrapper ¶
type VariantWrapper struct { Variant *VARIANT // contains filtered or unexported fields }
func NewVariant ¶
func NewVariant(val interface{}) (*VariantWrapper, error)
func (*VariantWrapper) Clear ¶
func (vw *VariantWrapper) Clear() error
func (*VariantWrapper) SetValue ¶
func (vw *VariantWrapper) SetValue(val interface{}) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.