B
bhc
i'm trying to wrap a RAS library, and i've found pretty solid examples
for most RAS API calls...except for RasGetErrorString. i've seen a C#
example, but can't seem to get the right declaration and use in VB.NET.
the current attempt is:
---
Private Declare Auto Function RasGetErrorString Lib "rasapi32.dll"
( _
ByVal ErrorValue As Integer, _
ByRef ErrorString As String, _
ByVal BufferSize As Integer _
) As Integer
'And then in a button click somewhere...
Dim errstr As String
Dim err As Integer = 639
Dim lbuff As Integer = 256
Debug.WriteLine(RasGetErrorString(err, errstr, lbuff))
Debug.WriteLine(errstr)
for most RAS API calls...except for RasGetErrorString. i've seen a C#
example, but can't seem to get the right declaration and use in VB.NET.
the current attempt is:
---
Private Declare Auto Function RasGetErrorString Lib "rasapi32.dll"
( _
ByVal ErrorValue As Integer, _
ByRef ErrorString As String, _
ByVal BufferSize As Integer _
) As Integer
'And then in a button click somewhere...
Dim errstr As String
Dim err As Integer = 639
Dim lbuff As Integer = 256
Debug.WriteLine(RasGetErrorString(err, errstr, lbuff))
Debug.WriteLine(errstr)