PISDKVersion Example

picture

 

This example, during the Form_Load, obtains the PISDKVersion object and prints its properties to the screen.

 

Build the PISDKVersion example as follows:

1. Create a new project and add a reference to the PISDK library.

2. Add the visual elements as shown in the picture. Make sure the numbered element names (label1, list1, ...) match those shown.

3. Cut and paste the code below into the project.

Option Explicit

Private Sub Form_Load()
  Dim pver As PISDKVersion
  Set pver = PISDKVersion
  With pver
    Label1.Caption = .Version
    Label2.Caption = .BuildID
    Label3.Caption = .BuildDate
    Label4.Caption = .Path
    Label5.Caption = ShowBuildType(.BuildType)
    Label6.Caption = ShowTimeoutDate(.TimeoutDate)
  End With
End Sub

Private Function ShowBuildType(bldTyp As pisdkBuildTypeConstants) As String
  Select Case (bldTyp)
    Case pisdkDebugBuild
      ShowBuildType = "Debug Build"
    Case pisdkPrereleaseBuild
      ShowBuildType = "Prerelease Build"
    Case pisdkReleaseBuild
      ShowBuildType = "Release Build"
  End Select
End Function
Private Function ShowTimeoutDate(vtTimeout As Variant) As String
  If Not IsEmpty(vtTimeout) Then
    ShowTimeoutDate = CStr(vtTimeout)
  Else
    ShowTimeoutDate = "No Timeout"
  End If
End Function
Enabling Operational Intelligence