Jump to content

Recommended Posts

Posted (edited)

Hi :hello:

I have detailed below a simple vb program which is part of a vb.exe . I wish to use in a vb script which I can use in some HA software.

My question is how can I query the dll without the module?

module code

Option Explicit

Declare Function Initreceivep6 Lib "socket.dll" Alias "receivep6" () As Long

Declare Function Datatransfer Lib "socket.dll" Alias "transfer" (ByVal variable As Long) As Long

Declare Function Setdata Lib "socket.dll" Alias "setdata" (ByVal variable As Long) As Long

Declare Function Cleandata Lib "socket.dll" Alias "cleandata" (ByVal variable As Long) As Long

Declare Sub Setip Lib "socket.dll" Alias "setip" (ByVal variable As String)

vb form code

Option Explicit

Dim Ipset

Private Sub Command10_Click()

Command10.Visible = False

Command18.Visible = True

Label1.Visible = True

Ipset = Setdata(&H40)

Ipset = Datatransfer(Ipset)

End Sub

Private Sub Command11_Click()

Command11.Visible = False

Command19.Visible = True

Label2.Visible = True

Ipset = Setdata(&H80)

Ipset = Datatransfer(Ipset)

End Sub

Private Sub Command18_Click()

Command10.Visible = True

Command18.Visible = False

Label1.Visible = False

Ipset = Cleandata(&HBF)

Ipset = Datatransfer(Ipset)

End Sub

Private Sub Command19_Click()

Command11.Visible = True

Command19.Visible = False

Label2.Visible = False

Ipset = Cleandata(&H7F)

Ipset = Datatransfer(Ipset)

End Sub

Private Sub Form_Load()

Dim P6

Setip "192.168.1.25"

P6 = Initreceivep6

If (P6 And &H40) Then

Command10.Visible = False

Command18.Visible = True

Setdata (&H40)

'value =64

Else

Command10.Visible = True

Command18.Visible = False

Cleandata (&HBF)

End If

If (P6 And &H80) Then

Command11.Visible = False

Command19.Visible = True

Setdata (&H80)

Else

Command11.Visible = True

Command19.Visible = False

Cleandata (&H7F)

End If

If (P6 And &HB40) Then

Label1.Visible = True

Else

Label1.Visible = False

Cleandata (&HBF)

End If

If (P6 And &HB80) Then

Label2.Visible = True

Else

Label2.Visible = False

Cleandata (&H7F)

End If

End Sub

I wish to remove need for graphics and in the vb script use

SetPropertyValue() fed to a device in the program.

ie If (P6 And &HB80) Then

SetPropertyValue(X)

Any ideas anyone

Edited by PNT

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...