Commit dc4709a8c8ed5929de2bad36c155ff3b370fa391
1 parent
98f358fb
Exists in
master
and in
1 other branch
Working on MSVC build.
Showing
8 changed files
with
24 additions
and
6 deletions
Show diff stats
client/src/core/windows/dynamic/init.cc
... | ... | @@ -40,10 +40,14 @@ |
40 | 40 | #include <delayimp.h> |
41 | 41 | #include <fcntl.h> |
42 | 42 | |
43 | +#if defined(_MSC_VER) | |
44 | + #pragma comment(lib,"lib3270.lib") | |
45 | +#endif // _MSC_VER | |
46 | + | |
43 | 47 | extern "C" { |
44 | 48 | |
45 | - extern __declspec (dllexport) PfnDliHook __pfnDliNotifyHook2; | |
46 | - extern __declspec (dllexport) PfnDliHook __pfnDliFailureHook2; | |
49 | +// extern __declspec (dllexport) PfnDliHook __pfnDliNotifyHook2; | |
50 | +// extern __declspec (dllexport) PfnDliHook __pfnDliFailureHook2; | |
47 | 51 | |
48 | 52 | FARPROC WINAPI IPC3270_DelayLoadHook(unsigned reason, DelayLoadInfo * info); |
49 | 53 | |
... | ... | @@ -55,8 +59,8 @@ |
55 | 59 | |
56 | 60 | // https://docs.microsoft.com/en-us/cpp/build/reference/loading-all-imports-for-a-delay-loaded-dll?view=vs-2019 |
57 | 61 | |
58 | - PfnDliHook __pfnDliNotifyHook2 = IPC3270_DelayLoadHook; | |
59 | - PfnDliHook __pfnDliFailureHook2 = IPC3270_DelayLoadHook; | |
62 | + const PfnDliHook __pfnDliNotifyHook2 = IPC3270_DelayLoadHook; | |
63 | + const PfnDliHook __pfnDliFailureHook2 = IPC3270_DelayLoadHook; | |
60 | 64 | |
61 | 65 | static HANDLE hModule = 0; |
62 | 66 | static HANDLE hEventLog = 0; | ... | ... |
client/src/core/windows/tools.cc
... | ... | @@ -40,6 +40,10 @@ |
40 | 40 | #include <lmcons.h> |
41 | 41 | #include <fcntl.h> |
42 | 42 | |
43 | +#if defined(_MSC_VER) | |
44 | + #pragma comment(lib,"Advapi32.lib") | |
45 | +#endif // _MSC_VER | |
46 | + | |
43 | 47 | using std::string; |
44 | 48 | |
45 | 49 | /*---[ Implement ]----------------------------------------------------------------------------------*/ | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
win/Makefile.msc
... | ... | @@ -78,8 +78,18 @@ OBJ_FILES= \ |
78 | 78 | |
79 | 79 | ipc3270.dll: \ |
80 | 80 | $(OBJ_FILES) \ |
81 | - client\src\core\windows\dynamic\init.obj | |
81 | + client\src\core\windows\dynamic\init.obj \ | |
82 | + lib3270.lib | |
82 | 83 | link \ |
83 | 84 | /DLL \ |
84 | 85 | /OUT:"$@" \ |
85 | - $< | |
86 | + $(OBJ_FILES) \ | |
87 | + client\src\core\windows\dynamic\init.obj \ | |
88 | + /DELAYLOAD:lib3270.dll | |
89 | + | |
90 | + | |
91 | +lib3270.lib: | |
92 | + lib \ | |
93 | + /def:"c:\Program Files\pw3270\sdk\def\lib3270.def" \ | |
94 | + /out:lib3270.lib | |
95 | + | ... | ... |