Imports System.Runtime.InteropServices

Module VBMarshal

    Public Class Native
        <DllImport("unmanaged.dll")> _
        Public Shared Function _
            OutFunction(ByVal i As Integer, ByRef o As Integer) As Integer
        End Function
        <DllImport("unmanaged.dll")> _
        Public Shared Function _
            Add(ByVal a As String, ByVal b As String) As String
        End Function
    End Class

    Sub Main()
        Dim i As Integer
        Dim o As Integer
        i = 5
        Native.OutFunction(i, o)
        Dim a As String = "To"
        Dim b As String = "jest test"
        Dim r As String = Native.Add(a, b)
    End Sub

End Module
