Commit 11bc769d3a981ce17a2d4dc29e97f5211d83a771
1 parent
7d8038b3
Exists in
master
Debugging on windows.
Showing
4 changed files
with
32 additions
and
23 deletions
Show diff stats
src/module/properties.cc
@@ -28,6 +28,7 @@ | @@ -28,6 +28,7 @@ | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <py3270.h> | 30 | #include <py3270.h> |
31 | + #include <lib3270/ipc.h> | ||
31 | #include <lib3270.h> | 32 | #include <lib3270.h> |
32 | 33 | ||
33 | /*---[ Implement ]----------------------------------------------------------------------------------*/ | 34 | /*---[ Implement ]----------------------------------------------------------------------------------*/ |
src/module/windows/init.cc
@@ -138,13 +138,13 @@ | @@ -138,13 +138,13 @@ | ||
138 | static string savedpath; | 138 | static string savedpath; |
139 | 139 | ||
140 | // https://docs.microsoft.com/en-us/cpp/build/reference/structure-and-constant-definitions?view=vs-2019 | 140 | // https://docs.microsoft.com/en-us/cpp/build/reference/structure-and-constant-definitions?view=vs-2019 |
141 | + | ||
141 | switch (reason) { | 142 | switch (reason) { |
142 | case dliNoteStartProcessing: | 143 | case dliNoteStartProcessing: |
143 | { | 144 | { |
145 | + string installLocation = TN3270::getInstallLocation(); | ||
144 | 146 | ||
145 | - string datadir = py3270_get_datadir(); | ||
146 | - | ||
147 | - if(!datadir.empty()) { | 147 | + if(!installLocation.empty()) { |
148 | 148 | ||
149 | char curdir[4096]; | 149 | char curdir[4096]; |
150 | memset(curdir,0,sizeof(curdir)); | 150 | memset(curdir,0,sizeof(curdir)); |
@@ -155,18 +155,20 @@ | @@ -155,18 +155,20 @@ | ||
155 | savedpath.clear(); | 155 | savedpath.clear(); |
156 | } | 156 | } |
157 | 157 | ||
158 | - SetCurrentDirectory(datadir.c_str()); | 158 | + SetCurrentDirectory(installLocation.c_str()); |
159 | 159 | ||
160 | } | 160 | } |
161 | - | ||
162 | } | 161 | } |
163 | break; | 162 | break; |
164 | 163 | ||
165 | case dliNoteEndProcessing: | 164 | case dliNoteEndProcessing: |
165 | + | ||
166 | if(!savedpath.empty()) { | 166 | if(!savedpath.empty()) { |
167 | SetCurrentDirectory(savedpath.c_str()); | 167 | SetCurrentDirectory(savedpath.c_str()); |
168 | savedpath.clear(); | 168 | savedpath.clear(); |
169 | + | ||
169 | } | 170 | } |
171 | + | ||
170 | break; | 172 | break; |
171 | 173 | ||
172 | case dliNotePreLoadLibrary: | 174 | case dliNotePreLoadLibrary: |
testprograms/sample.py
@@ -24,39 +24,39 @@ print("Testing python module") | @@ -24,39 +24,39 @@ print("Testing python module") | ||
24 | print("Using TN3270 Version " + tn3270.version()) | 24 | print("Using TN3270 Version " + tn3270.version()) |
25 | print(tn3270.revision()) | 25 | print(tn3270.revision()) |
26 | 26 | ||
27 | -#session = tn3270.Session("") | ||
28 | -#session.timeout = 10 | 27 | +session = tn3270.Session("") |
28 | +session.timeout = 10 | ||
29 | 29 | ||
30 | -#print("Using tn3270 version " + session.version + " revision " + session.revision) | 30 | +print("Using tn3270 version " + session.version + " revision " + session.revision) |
31 | 31 | ||
32 | -#print(session.cstate) | ||
33 | -#print(session.width) | ||
34 | -#print(session.connected) | 32 | +print(session.cstate) |
33 | +print(session.width) | ||
34 | +print(session.connected) | ||
35 | 35 | ||
36 | -#print(session.reconnect) | 36 | +print(session.reconnect) |
37 | 37 | ||
38 | # | 38 | # |
39 | # Can reconnect? If yes do it! | 39 | # Can reconnect? If yes do it! |
40 | # | 40 | # |
41 | -#if session.reconnect.activatable: | ||
42 | -# print("Reconnecting...") | ||
43 | -# session.reconnect().wait(10) | 41 | +if session.reconnect.activatable: |
42 | + print("Reconnecting...") | ||
43 | + session.reconnect().wait(10) | ||
44 | 44 | ||
45 | -#print(session.connected) | ||
46 | -#print(session.find('sisbb')) | ||
47 | -#print(session.count('sisbb')) | 45 | +print(session.connected) |
46 | +print(session.find('sisbb')) | ||
47 | +print(session.count('sisbb')) | ||
48 | 48 | ||
49 | -#print('----------------------') | ||
50 | -#print(dir(session)) | ||
51 | -#print('----------------------') | 49 | +print('----------------------') |
50 | +print(dir(session)) | ||
51 | +print('----------------------') | ||
52 | 52 | ||
53 | -#print(session.get(14,22,38)) | 53 | +print(session.get(14,22,38)) |
54 | 54 | ||
55 | #print("-----------------------------------------------------------------------") | 55 | #print("-----------------------------------------------------------------------") |
56 | #print(session) | 56 | #print(session) |
57 | #print("-----------------------------------------------------------------------") | 57 | #print("-----------------------------------------------------------------------") |
58 | 58 | ||
59 | -#session.enter().wait(14,2,"Senha") | 59 | +session.enter().wait(14,2,"Senha") |
60 | 60 | ||
61 | #session.set("value") | 61 | #session.set("value") |
62 | 62 |