-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathinterface_pointer.go
36 lines (30 loc) · 934 Bytes
/
interface_pointer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package dcom
import "github.com/oiweiwei/go-msrpc/ndr"
var ObjectReferenceCustomSignature = "MEOW"
func (o *InterfacePointer) IPID() *IPID {
if std := o.GetStandardObjectReference().Std; std != nil && std.IPID != nil {
return std.IPID
}
return &IPID{}
}
func (o *InterfacePointer) GetObjectReference() *ObjectReference {
ref := &ObjectReference{}
if o != nil && len(o.Data) > 0 {
ndr.Unmarshal(o.Data, ref, ndr.Opaque)
}
return ref
}
func (o *InterfacePointer) GetStandardObjectReference() *ObjectReferenceStandard {
std, _ := o.GetObjectReference().ObjectReference.GetValue().(*ObjectReferenceStandard)
if std != nil {
return std
}
return &ObjectReferenceStandard{}
}
func (o *InterfacePointer) GetCustomObjectReference() *ObjectReferenceCustom {
custom, _ := o.GetObjectReference().ObjectReference.GetValue().(*ObjectReferenceCustom)
if custom != nil {
return custom
}
return &ObjectReferenceCustom{}
}