Differences From Artifact [8bbe4efdd1d3598d]:
- File
src/qbga32.d
- 2015-04-30 23:34:45 - part of checkin [c0856e8ace] on branch trunk - v0.05 (user: kinaba) [annotate]
To Artifact [1c734ac63ab48040]:
- File
src/qbga32.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
1 -import core.sys.windows.dll;
2 1 import win32.windows;
3 -import win32.winuser;
4 2 import std.string;
5 3 import std.file;
6 4 import util;
7 5 import windll;
8 6 import bga_melter;
9 7 import qbga_gui;
10 8
11 9 //----------------------------------------------------------------
12 -// おきまりのDLL初期化ルーチン
10 +// API転送処理
13 11 //----------------------------------------------------------------
14 12
15 -__gshared HINSTANCE g_hinst;
16 -
17 -extern (Windows)
18 -BOOL DllMain( HINSTANCE inst, ULONG reason, void* reserved )
19 -{
20 - switch( reason )
21 - {
22 - case DLL_PROCESS_ATTACH:
23 - g_hinst = inst;
24 - dll_process_attach( inst, true );
25 - if( g_orig_dll is null )
26 - return false;
27 - break;
28 -
29 - case DLL_PROCESS_DETACH:
30 - dll_process_detach( inst, true );
31 - break;
32 -
33 - case DLL_THREAD_ATTACH:
34 - dll_thread_attach( true, true );
35 - break;
36 -
37 - case DLL_THREAD_DETACH:
38 - dll_thread_detach( true, true );
39 - break;
40 -
41 - default:
42 - }
43 - return true;
44 -}
45 -
46 -//----------------------------------------------------------------
47 -// API転送処理
48 -//----------------------------------------------------------------
49 -
50 -__gshared WinDLL g_orig_dll = null;
51 -__gshared UINT WM_ARCEXTRACT;
13 +WinDLL g_orig_dll = null;
14 +UINT WM_ARCEXTRACT;
52 15
53 16 static this()
54 17 {
55 18 g_orig_dll = WinDLL.load( "_Bga32.DLL" );
56 19 WM_ARCEXTRACT = RegisterWindowMessage("wm_arcextract");
57 20 }
58 21