Dim iReturnCode As Integer 'Return code
Dim szDeviceName As String = "" 'List data for 'DeviceName'
Dim iNumberOfDeviceName As Integer = 0 'Data for 'DeviceSize'
Dim sharrDeviceValue() As Short 'Data for 'DeviceValue'
'軟元件名
szDeviceName = String.Join(vbLf, txt_DeviceNameRandom.Lines)
'寫(xiě)入點(diǎn)數(shù)
If GetIntValue(txt_DeviceSizeRandom, iNumberOfDeviceName) = False Then
'If failed, this process is end.
Exit Sub
End If
'寫(xiě)入的軟元件值
ReDim sharrDeviceValue(iNumberOfDeviceName - 1)
If GetShortArray(txt_DeviceDataRandom, sharrDeviceValue) = False Then
'If failed, this process is end.
Exit Sub
End If
'軟元件的隨機(jī)寫(xiě)入
iReturnCode = AxActUtlType1.WriteDeviceRandom2(szDeviceName, iNumberOfDeviceName, sharrDeviceValue(0))