Type
Commande de compilation
Dans le menu Project - References de Visual Basic,
il faut importer les déclarations des modules Up ! Kernel et Up
! System en cochant les cases correspondantes.
Commande d'enregistrement des ActiveX
upsvtm Com=Charger
Commande d'exécution
type.exe
Fichier source
Dim MUpsKrn As IUpsKrn
Dim MUpsSys As IUpsSys
Private Sub EcrireEcran(ByVal Libelle As String)
' ==============================================
Ecran.AddItem Libelle
End Sub
Private Sub Form_Load()
' =====================
Dim E As IUpsKrnEntier
Dim T As IUpsKrnType
Dim O As IUpsKrnObjet
Dim Inutile As Object
On Error GoTo GestionErreur
Set MUpsKrn = CreateObject("UpsApp.UpsKrn")
Set MUpsSys = CreateObject("UpsApp.UpsSys")
Set T = MUpsKrn.Type.EnumererObjets(MUpsKrn.ObjetNul)
Do While Not MUpsKrn.EstNul(T)
EcrireEcran MUpsKrn.Caractere2DComBStr(T.NomType())
Set T = MUpsKrn.Type.EnumererObjets(T)
Loop
EcrireEcran "
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Binaire.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Caractere.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Date.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Entier.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Enumere.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Exception.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsSys.Fichier.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Module.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Objet.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Reel.NomType)
EcrireEcran MUpsKrn.Caractere2DComBStr(MUpsKrn.Type.NomType)
Set E = MUpsKrn.DComInt2Entier(1)
Set Inutile = E.Incrementer(False)
If MUpsKrn.Booleen2DComVariantBool(E.Egal(MUpsKrn.DComInt2Entier(2))) Then
Set T = MUpsKrn.Caractere
Else
End If
If MUpsKrn.Booleen2DComVariantBool(T.Egal(MUpsKrn.Date())) Then
End If
If MUpsKrn.Booleen2DComVariantBool(T.Different(MUpsKrn.Date())) Then
End If
EcrireEcran MUpsKrn.Caractere2DComBStr(T.NomType)
E.Convertir MUpsKrn.Entier.NouvelObjet
EcrireEcran Str$(MUpsKrn.Entier2DComInt(E))
E.Convertir MUpsKrn.Exception.NouvelObjet
EcrireEcran Str$(MUpsKrn.Entier2DComInt(E))
Set E = Nothing
Set T = Nothing
Set O = Nothing
Set Inutile = Nothing
Set MUpsSys = Nothing
Set MUpsKrn = Nothing
Exit Sub
GestionErreur:
'=============
EcrireEcran Erreur UpsKrn-0 : L'exception suivante a été envoyée dans le
source '" + Err.Source + "' :"
EcrireEcran Err.Description
End Sub