私は次の構造を持っています:
    <StructLayout(LayoutKind.Sequential)> _
    Public Structure _WTS_CLIENT_ADDRESS
        Public AddressFamily As Integer
        <MarshalAs(UnmanagedType.ByValArray, SizeConst:=20)> _
        Public Address() As Byte
    End Structure
これは、次の呼び出しによって入力されます。
        Dim _ClientIPAddress As New _WTS_CLIENT_ADDRESS
        Dim rtnPtr As IntPtr
        Dim rtncount As Int32
        NativeMethods.WTSQuerySessionInformation(CInt(NativeMethods.WTS_CURRENT_SERVER_HANDLE), NativeMethods.WTS_CURRENT_SESSION, NativeMethods.WTS_INFO_CLASS.WTSClientAddress, rtnPtr, rtncount)
        '_ClientIPAddress()
        _ClientIPAddress = _
            CType(System.Runtime.InteropServices.Marshal.PtrToStructure(rtnPtr, GetType(_WTS_CLIENT_ADDRESS)), _WTS_CLIENT_ADDRESS)
アドレスバイト配列が入力されていますが、それを有用な文字列または整数値に変換する方法がわかりません。MDSNのドキュメントはまばらです:http://msdn.microsoft.com/en-us/library/aa383857(VS.85).aspx