Click here to Skip to main content
15,892,746 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.NET Global Event Pin
Dave Kreskowiak14-Jul-05 6:02
mveDave Kreskowiak14-Jul-05 6:02 
GeneralRe: VB.NET Global Event Pin
Purple Monk14-Jul-05 23:45
Purple Monk14-Jul-05 23:45 
GeneralRe: VB.NET Global Event Pin
Dave Kreskowiak15-Jul-05 1:37
mveDave Kreskowiak15-Jul-05 1:37 
GeneralVB6 to VB.NET Marshal Structure Pin
meyerengineering14-Jul-05 4:53
meyerengineering14-Jul-05 4:53 
GeneralRe: VB6 to VB.NET Marshal Structure Pin
Dave Kreskowiak14-Jul-05 5:51
mveDave Kreskowiak14-Jul-05 5:51 
GeneralRe: VB6 to VB.NET Marshal Structure Pin
meyerengineering14-Jul-05 6:31
meyerengineering14-Jul-05 6:31 
GeneralRe: VB6 to VB.NET Marshal Structure Pin
Dave Kreskowiak14-Jul-05 6:44
mveDave Kreskowiak14-Jul-05 6:44 
GeneralRe: VB6 to VB.NET Marshal Structure Pin
meyerengineering14-Jul-05 8:06
meyerengineering14-Jul-05 8:06 
This VB6 code works.

Note that I had removed some parameters from the VB.NET sample for brevity.

Thanks again.


Const HEIAPIVersion As Byte = 3
Const HEIP_IP As Integer = 3
Const HEIT_WINSOCK As Integer = 4

Private Type Encryption
Algorithm As Byte ' Algorithm to use for encryption:
Unused1(2) As Byte ' Reserved
Key(59) As Byte ' Encryption key (null terminated)
End Type

Private Type EnetAddress
Address(19) As Byte
End Type

Private Type HEITransport
Transport As Integer
Protocol As Integer
Encrypt As Encryption
SourceAddress As EnetAddress
Reserved(47) As Byte
End Type

Private Type HEIDevice
Address(125) As Byte ' 126-byte byte array (VB packs on 4-byte boundaries)
End Type


Private Declare Function PASCAL_HEIOpen Lib "hei_pas" ( _
ByVal HEIAPIVersion As Integer _
) As Long

Private Declare Function PASCAL_HEIClose Lib "hei_pas" ( _
) As Long

Private Declare Function PASCAL_HEIOpenTransport Lib "hei_pas" ( _
ByRef pTransport As HEITransport, _
ByVal HEIAPIVersion As Integer, _
ByVal EnetAdress As Long _
) As Long

Private Declare Function PASCAL_HEICloseTransport Lib "hei_pas" ( _
ByRef pTransport As HEITransport _
) As Long

Private Declare Function PASCAL_HEIQueryDevices Lib "hei_pas" ( _
ByRef pTransport As HEITransport, _
ByRef pDevice As HEIDevice, _
ByRef pNumDevices As Long, _
ByVal HEIAPIVersion As Integer _
) As Long

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Global variables
'
Dim Rc As Long
Dim TP As HEITransport
Const MAXDEVICES As Integer = 100
Dim aDevices(MAXDEVICES) As HEIDevice
Dim DeviceCount As Long



Private Sub NetworkInit_Click()
Rc = PASCAL_HEIOpen(HEIAPIVersion)

TP.Transport = HEIT_WINSOCK
TP.Protocol = HEIP_IP

Rc = PASCAL_HEIOpenTransport(TP, HEIAPIVersion, 0)
End Sub


Private Sub ScanNetwork_Click()
DeviceCount = MAXDEVICES

Rc = PASCAL_HEIQueryDevices(TP, aDevices(0), DeviceCount, HEIAPIVersion)
End Sub



meyer
meyer@meyerengineering.net
GeneralRe: VB6 to VB.NET Marshal Structure Pin
meyerengineering15-Jul-05 4:16
meyerengineering15-Jul-05 4:16 
GeneralRe: VB6 to VB.NET Marshal Structure Pin
progload15-Jul-05 5:25
progload15-Jul-05 5:25 
Generalopen email Pin
Ali el14-Jul-05 4:52
Ali el14-Jul-05 4:52 
GeneralRe: open email Pin
Dave Kreskowiak14-Jul-05 5:48
mveDave Kreskowiak14-Jul-05 5:48 
GeneralRe: open email Pin
Ali el15-Jul-05 6:22
Ali el15-Jul-05 6:22 
GeneralRe: open email Pin
Dave Kreskowiak15-Jul-05 11:45
mveDave Kreskowiak15-Jul-05 11:45 
GeneralRe: open email Pin
Ali el17-Jul-05 5:03
Ali el17-Jul-05 5:03 
GeneralProblem in Data Reports in VB 6.0 Pin
Birdy14-Jul-05 3:48
Birdy14-Jul-05 3:48 
GeneralRe: Problem in Data Reports in VB 6.0 Pin
rwestgraham14-Jul-05 11:23
rwestgraham14-Jul-05 11:23 
GeneralRe: Problem in Data Reports in VB 6.0 Pin
Birdy15-Jul-05 2:08
Birdy15-Jul-05 2:08 
Generalnahelp me in this printing problem-- nidhi s Pin
pnavkumar@yahoo.co.in14-Jul-05 1:16
susspnavkumar@yahoo.co.in14-Jul-05 1:16 
GeneralRe: nahelp me in this printing problem-- nidhi s Pin
Dave Kreskowiak14-Jul-05 3:31
mveDave Kreskowiak14-Jul-05 3:31 
GeneralRe: nahelp me in this printing problem-- nidhi s Pin
Member 211512814-Jul-05 3:53
Member 211512814-Jul-05 3:53 
GeneralRe: nahelp me in this printing problem-- nidhi s Pin
Dave Kreskowiak14-Jul-05 4:24
mveDave Kreskowiak14-Jul-05 4:24 
GeneralChange SQL Server startup account to SA Pin
Toms Edison14-Jul-05 0:46
Toms Edison14-Jul-05 0:46 
GeneralRe: Change SQL Server startup account to SA Pin
Dave Kreskowiak14-Jul-05 1:16
mveDave Kreskowiak14-Jul-05 1:16 
GeneralSelecting dropdown value automatically Pin
macca2414-Jul-05 0:44
macca2414-Jul-05 0:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.