Use whllapi.dll in vb.net

  • Thread starter Thread starter jagat
  • Start date Start date
J

jagat

I tried using this dll which connects to mainframe and it works fine
while when i tried using the same for VB.net it gives an error
"System.Nullreference exception".

Here is the piece of code:

<DllImport("Whllapi.dll")> _
Private Function WinHLLAPIStartup(ByVal wVersionRequired As
Integer, ByVal lpData As LPWHLLAPIDATA) As Integer
End Function

Private Structure LPWHLLAPIDATA
Private b1 As Byte
Private b2 As Byte
Private s As String ' * 128
End Structure

Dim lpData As LPWHLLAPIDATA
Dim iFuncResult As Integer

Sub Main()

iFuncResult = WinHLLAPIStartup(257, lpData)

End Sub


Any help will be appreciated.

Thanks
 
Back
Top