-
Notifications
You must be signed in to change notification settings - Fork 3
/
SinkEvent.cls
57 lines (55 loc) · 1.36 KB
/
SinkEvent.cls
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "SinkEvent"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Public Event fire()
Public Event GetString(a$)
Public Event GetVariantRef(ByRef a As Variant)
Public Event GetValueRef(a As Variant)
Public Event GetData()
Private resp()
'Mark as default member via Tools|Procedure Attributes... dialog.
Public Sub FireMe()
Attribute FireMe.VB_UserMemId = 0
RaiseEvent fire
End Sub
Public Sub SendString(a)
On Error Resume Next
Dim b$
If Not myVarType(a, vbString) Then a = vbNullString
SwapString2Variant b$, a
RaiseEvent GetString(b$)
SwapString2Variant b$, a
End Sub
Public Sub SendVariantRef(ByRef a As Variant)
On Error Resume Next
Dim k
' k = a
RaiseEvent GetVariantRef(a)
' a = k
End Sub
Public Sub SendValueRef(a)
On Error Resume Next
RaiseEvent GetValueRef(a)
End Sub
Public Sub SendData(ParamArray flds())
resp() = flds()
RaiseEvent GetData
End Sub
Public Function GetData() As Object
Dim m As New mArray, H As New mHandler
m.LoadTuple resp
H.t1 = 3
Set H.objref = m
Set GetData = H
End Function