Commit 3202b9c0588a8a67bd3463ae8dbea862c3caac77
1 parent
db8febae
Exists in
master
Experimentando com VB.NET
Showing
3 changed files
with
43 additions
and
0 deletions
Show diff stats
Makefile.in
... | ... | @@ -57,6 +57,7 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ |
57 | 57 | LN_S=@LN_S@ |
58 | 58 | |
59 | 59 | MCS=@MCS@ |
60 | +VBNC=@VBNC@ | |
60 | 61 | MONO=@MONO@ |
61 | 62 | MKDIR=@MKDIR_P@ |
62 | 63 | AMTAR=@AMTAR@ |
... | ... | @@ -70,6 +71,12 @@ $(BINDBG)/%.exe: \ |
70 | 71 | |
71 | 72 | @$(MCS) -reference:$(BINDBG)/$(LIBNAME) -debug -out:$@ $< |
72 | 73 | |
74 | +$(BINDBG)/%.exe: \ | |
75 | + testprograms/%.vb \ | |
76 | + $(BINDBG)/$(LIBNAME) | |
77 | + | |
78 | + @$(VBNC) -debug -out:$@ $< | |
79 | + | |
73 | 80 | $(BINRLS)/%.exe: \ |
74 | 81 | testprograms/%.cs |
75 | 82 | ... | ... |
configure.ac
... | ... | @@ -116,6 +116,7 @@ AC_PATH_TOOL([VALGRIND], [valgrind], [no]) |
116 | 116 | AC_PATH_TOOL([WINDRES], [windres], [no]) |
117 | 117 | AC_PATH_TOOL([ZIP], [zip], [zip]) |
118 | 118 | AC_PATH_TOOL([MCS], [mcs], [mcs]) |
119 | +AC_PATH_TOOL([VBNC], [vbnc2], [vbnc2]) | |
119 | 120 | AC_PATH_TOOL([GACUTIL], [gacutil], [gacutil]) |
120 | 121 | AC_PATH_TOOL([SN], [sn], [sn]) |
121 | 122 | AC_PATH_PROG([MONO], [mono], [no]) | ... | ... |
... | ... | @@ -0,0 +1,35 @@ |
1 | + | |
2 | +Imports System | |
3 | +Imports System.Text | |
4 | +Imports System.Runtime.InteropServices | |
5 | + | |
6 | +' This module houses the application's entry point. | |
7 | +Public Module modmain | |
8 | + | |
9 | + | |
10 | + <DllImport("lib3270-mono")> _ | |
11 | + Private Shared Function tn3270_create_session(ByVal Name As String) As IntPtr | |
12 | + End Function | |
13 | + | |
14 | + <DllImport("lib3270-mono")> _ | |
15 | + Private Shared Function tn3270_destroy_session(ByVal hSession As IntPtr) as Long | |
16 | + End Function | |
17 | + | |
18 | + <DllImport("lib3270-mono")> _ | |
19 | + Private Shared Function tn3270_get_version(ByVal hSession As IntPtr, ByRef buffer As StringBuilder, ByVal strlen as Integer) as Long | |
20 | + End Function | |
21 | + | |
22 | + ' Main is the application's entry point. | |
23 | + Sub Main() | |
24 | + | |
25 | + dim host as IntPtr = tn3270_create_session("") | |
26 | + | |
27 | + ' Write text to the console. | |
28 | + Console.WriteLine ("Hello World using Visual Basic!") | |
29 | + | |
30 | + | |
31 | + | |
32 | + End Sub | |
33 | + | |
34 | +End Module | |
35 | + | ... | ... |