Rockwell-automation FactoryTalk Transaction Manager User Guide Uživatelský manuál Strana 154

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 186
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 153
FactoryTalk Transaction Manager User Guide
154
10. Click Apply to save the parameters, then click Close to return to the
Configuration Checklist.
You are now ready to use Microsoft COM+ components in a FactoryTalk
Transaction Manager transaction.
Code Sample A (ComSampleVB)
The following code is referenced in the ―Creating the remote component‖
procedure.
Option Explicit
Public Function Get_VB_Sample_Data( _
ByVal strKeyID As String, _
Optional ByRef strData As String, _
Optional ByRef intData As Integer, _
Optional ByRef lngData As Long, _
Optional ByRef sngData As Single, _
Optional ByRef dblData As Double, _
Optional ByRef bytData As Byte, _
Optional ByRef dtData As Date, _
Optional ByRef bolData As Boolean) _
As Long
‘ Declare an object variable as ObjectContext
Dim ctxObject As ObjectContext ‘Required
On Error GoTo errorhandler
‘ Set the object variable using GetObjectContext()
Set ctxObject = GetObjectContext() ‘Required
‘ Put all business code below
strData = "VB Sample Data"
intData = 32767
lngData = 32768
sngData = 34.02823
dblData = 1797.69313
bytData = 255
dtData = Now()
bolData = True
Get_VB_Sample_Data = 0
‘ Keep all business code above
Zobrazit stránku 153
1 2 ... 149 150 151 152 153 154 155 156 157 158 159 ... 185 186

Komentáře k této Příručce

Žádné komentáře