Commit e557ca107a66b0d87ff4b59126baf899071627bd
1 parent
a0beae2f
Exists in
master
Corrigindo convenções de chamada em windows.
Showing
3 changed files
with
27 additions
and
26 deletions
Show diff stats
Makefile.in
... | ... | @@ -66,12 +66,12 @@ $(BINDBG)/%.exe: \ |
66 | 66 | testprograms/%.cs \ |
67 | 67 | $(BINDBG)/$(LIBNAME) |
68 | 68 | |
69 | - $(MCS) -reference:$(BINDBG)/$(LIBNAME) -debug -out:$@ $< | |
69 | + @$(MCS) -reference:$(BINDBG)/$(LIBNAME) -debug -out:$@ $< | |
70 | 70 | |
71 | 71 | $(BINRLS)/%.exe: \ |
72 | 72 | testprograms/%.cs |
73 | 73 | |
74 | - $(MCS) -reference:$(BINRLS)/$(LIBNAME) -out:$@ $< | |
74 | + @$(MCS) -reference:$(BINRLS)/$(LIBNAME) -out:$@ $< | |
75 | 75 | |
76 | 76 | #---[ Targets ]-------------------------------------------------------------------------- |
77 | 77 | ... | ... |
src/native/private.h
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 | #include <windows.h> |
41 | 41 | |
42 | 42 | #define DLL_PRIVATE extern |
43 | - #define DLL_PUBLIC extern __declspec (dllexport) | |
43 | + #define DLL_PUBLIC extern __declspec (dllexport) __attribute__((cdecl)) | |
44 | 44 | |
45 | 45 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) |
46 | 46 | |
... | ... | @@ -61,6 +61,7 @@ |
61 | 61 | extern "C" { |
62 | 62 | |
63 | 63 | DLL_PUBLIC h3270::session * tn3270_create_session(const char *name); |
64 | + | |
64 | 65 | DLL_PUBLIC void tn3270_destroy_session(h3270::session *ses); |
65 | 66 | |
66 | 67 | DLL_PUBLIC void tn3270_get_version(h3270::session *ses, char* str, int strlen); | ... | ... |
src/tn3270-sharp/tn3270-sharp.cs
... | ... | @@ -47,73 +47,73 @@ namespace tn3270 { |
47 | 47 | /// </summary> |
48 | 48 | private IntPtr hSession; |
49 | 49 | |
50 | - [DllImport ("lib3270-mono")] | |
50 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
51 | 51 | extern static IntPtr tn3270_create_session(string name); |
52 | 52 | |
53 | - [DllImport ("lib3270-mono")] | |
53 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
54 | 54 | extern static void tn3270_destroy_session(IntPtr session); |
55 | 55 | |
56 | - [DllImport ("lib3270-mono")] | |
56 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
57 | 57 | extern static void tn3270_get_version(IntPtr session, StringBuilder str, int strlen); |
58 | 58 | |
59 | - [DllImport ("lib3270-mono")] | |
59 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
60 | 60 | extern static void tn3270_get_revision(IntPtr session, StringBuilder str, int strlen); |
61 | 61 | |
62 | - [DllImport ("lib3270-mono")] | |
62 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
63 | 63 | extern static int tn3270_connect(IntPtr Session, string host, int wait); |
64 | 64 | |
65 | - [DllImport ("lib3270-mono")] | |
65 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
66 | 66 | extern static int tn3270_is_connected(IntPtr Session); |
67 | 67 | |
68 | - [DllImport ("lib3270-mono")] | |
68 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
69 | 69 | extern static int tn3270_disconnect(IntPtr Session); |
70 | 70 | |
71 | - [DllImport ("lib3270-mono")] | |
71 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
72 | 72 | extern static int tn3270_wait_for_ready(IntPtr Session, int seconds); |
73 | 73 | |
74 | - [DllImport ("lib3270-mono")] | |
74 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
75 | 75 | extern static int tn3270_wait(IntPtr Session, int seconds); |
76 | 76 | |
77 | - [DllImport ("lib3270-mono")] | |
77 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
78 | 78 | extern static int tn3270_get_cstate(IntPtr Session); |
79 | 79 | |
80 | - [DllImport ("lib3270-mono")] | |
80 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
81 | 81 | extern static int tn3270_get_program_message(IntPtr Session); |
82 | 82 | |
83 | - [DllImport ("lib3270-mono")] | |
83 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
84 | 84 | extern static int tn3270_get_secure(IntPtr Session); |
85 | 85 | |
86 | - [DllImport ("lib3270-mono")] | |
86 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
87 | 87 | extern static void tn3270_get_string(IntPtr Session, int addr, StringBuilder str, int strlen); |
88 | 88 | |
89 | - [DllImport ("lib3270-mono")] | |
89 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
90 | 90 | extern static void tn3270_get_string_at(IntPtr Session, int row, int col, StringBuilder str, int strlen); |
91 | 91 | |
92 | - [DllImport ("lib3270-mono")] | |
92 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
93 | 93 | extern static void tn3270_set_string_at(IntPtr Session, int row, int col, string str); |
94 | 94 | |
95 | - [DllImport ("lib3270-mono")] | |
95 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
96 | 96 | extern static int tn3270_wait_for_string_at(IntPtr Session, int row, int col, string key, int timeout); |
97 | 97 | |
98 | - [DllImport ("lib3270-mono")] | |
98 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
99 | 99 | extern static int tn3270_cmp_string_at(IntPtr Session, int row, int col, string str); |
100 | 100 | |
101 | - [DllImport ("lib3270-mono")] | |
101 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
102 | 102 | extern static void tn3270_set_unlock_delay(IntPtr Session, int ms); |
103 | 103 | |
104 | - [DllImport ("lib3270-mono")] | |
104 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
105 | 105 | extern static void tn3270_set_cursor_position(IntPtr Session, int row, int col); |
106 | 106 | |
107 | - [DllImport ("lib3270-mono")] | |
107 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
108 | 108 | extern static void tn3270_set_cursor_addr(IntPtr Session, int addr); |
109 | 109 | |
110 | - [DllImport ("lib3270-mono")] | |
110 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
111 | 111 | extern static int tn3270_enter(IntPtr Session); |
112 | 112 | |
113 | - [DllImport ("lib3270-mono")] | |
113 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
114 | 114 | extern static int tn3270_pfkey(IntPtr Session, int key); |
115 | 115 | |
116 | - [DllImport ("lib3270-mono")] | |
116 | + [DllImport ("lib3270-mono",CallingConvention=CallingConvention.Cdecl)] | |
117 | 117 | extern static int tn3270_pakey(IntPtr Session, int key); |
118 | 118 | |
119 | 119 | /// <summary> | ... | ... |