From 3202b9c0588a8a67bd3463ae8dbea862c3caac77 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 8 Dec 2016 17:12:34 -0200 Subject: [PATCH] Experimentando com VB.NET --- Makefile.in | 7 +++++++ configure.ac | 1 + testprograms/vbtest.vb | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 0 deletions(-) create mode 100644 testprograms/vbtest.vb diff --git a/Makefile.in b/Makefile.in index 062ed7c..52e5c93 100644 --- a/Makefile.in +++ b/Makefile.in @@ -57,6 +57,7 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ LN_S=@LN_S@ MCS=@MCS@ +VBNC=@VBNC@ MONO=@MONO@ MKDIR=@MKDIR_P@ AMTAR=@AMTAR@ @@ -70,6 +71,12 @@ $(BINDBG)/%.exe: \ @$(MCS) -reference:$(BINDBG)/$(LIBNAME) -debug -out:$@ $< +$(BINDBG)/%.exe: \ + testprograms/%.vb \ + $(BINDBG)/$(LIBNAME) + + @$(VBNC) -debug -out:$@ $< + $(BINRLS)/%.exe: \ testprograms/%.cs diff --git a/configure.ac b/configure.ac index 3f93587..3cd859c 100644 --- a/configure.ac +++ b/configure.ac @@ -116,6 +116,7 @@ AC_PATH_TOOL([VALGRIND], [valgrind], [no]) AC_PATH_TOOL([WINDRES], [windres], [no]) AC_PATH_TOOL([ZIP], [zip], [zip]) AC_PATH_TOOL([MCS], [mcs], [mcs]) +AC_PATH_TOOL([VBNC], [vbnc2], [vbnc2]) AC_PATH_TOOL([GACUTIL], [gacutil], [gacutil]) AC_PATH_TOOL([SN], [sn], [sn]) AC_PATH_PROG([MONO], [mono], [no]) diff --git a/testprograms/vbtest.vb b/testprograms/vbtest.vb new file mode 100644 index 0000000..8aadeb2 --- /dev/null +++ b/testprograms/vbtest.vb @@ -0,0 +1,35 @@ + +Imports System +Imports System.Text +Imports System.Runtime.InteropServices + +' This module houses the application's entry point. +Public Module modmain + + + _ + Private Shared Function tn3270_create_session(ByVal Name As String) As IntPtr + End Function + + _ + Private Shared Function tn3270_destroy_session(ByVal hSession As IntPtr) as Long + End Function + + _ + Private Shared Function tn3270_get_version(ByVal hSession As IntPtr, ByRef buffer As StringBuilder, ByVal strlen as Integer) as Long + End Function + + ' Main is the application's entry point. + Sub Main() + + dim host as IntPtr = tn3270_create_session("") + + ' Write text to the console. + Console.WriteLine ("Hello World using Visual Basic!") + + + + End Sub + +End Module + -- libgit2 0.21.2