VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "sJawinTest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Event Start(ByRef sStartParam As String)

Public Sub ShowMsgBox()
    MsgBox "Message box from VB6."
End Sub

Public Sub ShowMsgBox2()
    MsgBox "ShowMsgBox2"
End Sub
Public Function ReturnString() As String
    ReturnString = "Returned string from VB6."
End Function
Public Sub ReturnStringArray(ByRef arr() As String)
Dim a(4) As String
a(0) = "This array is"
a(1) = "created by"
a(2) = "VB code."
a(3) = "NJAWIN supports only one dimensional arrays."
a(4) = "Array references are not implemented in events."
arr = a
End Sub


Public Sub ByRefString(ByRef sValue As String)
    sValue = "ByRef string from VB6."
End Sub
Public Sub RaiseMyEvent()
    RaiseEvent Start("4")
End Sub
Public Sub ByRefDate(ByRef dteValue As Date)
    Dim bIsDate As Boolean
    bIsDate = IsDate(dteValue)
    MsgBox "IsData?= " & bIsDate
    If bIsDate Then
        MsgBox "Month =" & Month(dteValue) & " Day=" & Day(dteValue) & " Year=" & Year(dteValue) & _
         " Hour=" & Hour(dteValue) & " Minute=" & Minute(dteValue) & " Second=" & Second(dteValue)
    End If
End Sub
Public Sub TestsOptionalVariants(Optional ByVal vFirstParam As Variant, _
 Optional ByVal vSecondParam As Variant)
    MsgBox "vFirstParam is missing=" & IsMissing(vFirstParam) & _
     " vSecondParam is missing=" & IsMissing(vSecondParam)
    MsgBox "vSecondParam=" & vSecondParam
End Sub
Public Function LongReturn(Optional ByRef lLongEntryMethod As Long, _
 Optional ByRef lEntryLength As Long, _
 Optional ByRef sDefaultString As String, _
 Optional ByVal oTitleNoun As Object _
 ) As Long
    lLongEntryMethod = 333333333
    lEntryLength = 444444444
    LongReturn = 1313131
    sDefaultString = "Take into account: each compile changes Event GUIDs."
End Function

Public Sub GetObject(ByRef obj As Object)
Set obj = CreateObject("JawinTest.sJawinTest")
End Sub

Public Sub CallInside(ByRef obj As Object)
obj.ShowMsgBox2
End Sub

Public Sub PassCurrency(ByVal dollars As Currency)
    MsgBox "PassCurrency(" & dollars & ")"
End Sub

Public Sub GetCurrency(ByRef dollars As Currency)
Dim cu As Currency
dollars = 5000000
End Sub

