Page 1 of 1

Usar una dll con Xailer

Posted: Wed Jan 23, 2019 6:17 pm
by Christian
Hola tengo que usar una DLL con Xailer ya he usado otras pero esta me esta trayendo problemas, mas abajo paso el ejemplo en VB

En Xailer lo hago asi:
oHandleBOX := TOleAuto():New("Fusion")
oFusion:=oHandleBOX:New()
i:=oFusion:ConnectionStatus()
i:=oFusion:Connection("200...
i:=oFusion:ConnectionStatus()

Pero la funcion de getConfig no la puedo usar porque devuelve un puntero ??, alguien que conozca de VB y me pueda ayudar, gracias.

Ejemplo BV


Private Sub GetConfig_Click()
txt_result.Text = "Trying connection to Fusion"
cFusion.Connection (txt_Fusion_ip.Text)
txt_result.Text = "Connection stablished"
Dim result As String
result = "Configuration:" & vbCrLf

Dim cConfig As New FusionClass.FusionForecourt
Set cConfig = cFusion.GetConfig()
result = result & "Configuration ID: " & cConfig.m_iConfigurationID & vbCrLf

Dim pumps As Integer
pumps = cConfig.m_iPumps

result = result & "Pumps: " & pumps & vbCrLf

For id = 1 To pumps
Dim pump As FusionClass.FusionPump
Set pump = cConfig.GetPumpConfiguration(id)
result = result & " Pump: " & id & vbCrLf
result = result & " Hoses: " & pump.m_iHoses & vbCrLf
result = result & " PhysicalID: " & pump.m_iPhysicalID & vbCrLf

For hoseId = 1 To pump.m_iHoses
Dim hose As FusionClass.FusionHose
Set hose = pump.GetHose(hoseId)
result = result & " Hose Grade NR: " & hose.m_iGradeNr & vbCrLf
result = result & " Hose Grade Name: " & hose.m_strGradeName & vbCrLf
result = result & " Hose Physical ID: " & hose.m_iPhysicalID & vbCrLf
result = result & " Hose PPU: " & hose.m_strPPU & vbCrLf
Next


Next


'Display information
txt_result.Text = result
cFusion.Close
End Sub