Artifact 70d972547cb509ad337905c7c445e664a715c30c:
- File
src/win32/lmapibuf.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.
0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0d 0a 2a 20 20 20 20 ********\..*
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0060: 20 20 20 20 20 20 20 20 20 20 6c 6d 61 70 69 62 lmapib
0070: 75 66 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 uf.d
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0090: 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 20 *..*
00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d *.
00e0: 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .*
00f0: 20 20 20 20 20 20 20 20 20 57 69 6e 64 6f 77 73 Windows
0100: 20 41 50 49 20 68 65 61 64 65 72 20 6d 6f 64 75 API header modu
0110: 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le
0120: 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 20 *..*
0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0170: 20 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 *..*
0180: 20 20 20 20 20 20 20 20 20 54 72 61 6e 73 6c 61 Transla
0190: 74 65 64 20 66 72 6f 6d 20 4d 69 6e 47 57 20 57 ted from MinGW W
01a0: 69 6e 64 6f 77 73 20 68 65 61 64 65 72 73 20 20 indows headers
01b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a *
01c0: 0d 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..*
01d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
01e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0200: 20 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 *..*
0210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0220: 20 20 20 20 20 50 6c 61 63 65 64 20 69 6e 74 6f Placed into
0230: 20 70 75 62 6c 69 63 20 64 6f 6d 61 69 6e 20 20 public domain
0240: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0250: 20 20 20 20 20 2a 0d 0a 5c 2a 2a 2a 2a 2a 2a 2a *..\*******
0260: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0270: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0280: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0290: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
02a0: 2f 0d 0a 6d 6f 64 75 6c 65 20 77 69 6e 33 32 2e /..module win32.
02b0: 6c 6d 61 70 69 62 75 66 3b 0d 0a 70 72 61 67 6d lmapibuf;..pragm
02c0: 61 28 6c 69 62 2c 20 22 6e 65 74 61 70 69 33 32 a(lib, "netapi32
02d0: 22 29 3b 0d 0a 0d 0a 70 72 69 76 61 74 65 20 69 ");....private i
02e0: 6d 70 6f 72 74 20 77 69 6e 33 32 2e 6c 6d 63 6f mport win32.lmco
02f0: 6e 73 2c 20 77 69 6e 33 32 2e 77 69 6e 64 65 66 ns, win32.windef
0300: 3b 0d 0a 0d 0a 65 78 74 65 72 6e 20 28 57 69 6e ;....extern (Win
0310: 64 6f 77 73 29 20 7b 0d 0a 09 4e 45 54 5f 41 50 dows) {...NET_AP
0320: 49 5f 53 54 41 54 55 53 20 4e 65 74 41 70 69 42 I_STATUS NetApiB
0330: 75 66 66 65 72 41 6c 6c 6f 63 61 74 65 28 44 57 ufferAllocate(DW
0340: 4f 52 44 2c 20 50 56 4f 49 44 2a 29 3b 0d 0a 09 ORD, PVOID*);...
0350: 4e 45 54 5f 41 50 49 5f 53 54 41 54 55 53 20 4e NET_API_STATUS N
0360: 65 74 41 70 69 42 75 66 66 65 72 46 72 65 65 28 etApiBufferFree(
0370: 50 56 4f 49 44 29 3b 0d 0a 09 4e 45 54 5f 41 50 PVOID);...NET_AP
0380: 49 5f 53 54 41 54 55 53 20 4e 65 74 41 70 69 42 I_STATUS NetApiB
0390: 75 66 66 65 72 52 65 61 6c 6c 6f 63 61 74 65 28 ufferReallocate(
03a0: 50 56 4f 49 44 2c 20 44 57 4f 52 44 2c 20 50 56 PVOID, DWORD, PV
03b0: 4f 49 44 2a 29 3b 0d 0a 09 4e 45 54 5f 41 50 49 OID*);...NET_API
03c0: 5f 53 54 41 54 55 53 20 4e 65 74 41 70 69 42 75 _STATUS NetApiBu
03d0: 66 66 65 72 53 69 7a 65 28 50 56 4f 49 44 2c 20 fferSize(PVOID,
03e0: 50 44 57 4f 52 44 29 3b 0d 0a 09 4e 45 54 5f 41 PDWORD);...NET_A
03f0: 50 49 5f 53 54 41 54 55 53 20 4e 65 74 61 70 69 PI_STATUS Netapi
0400: 70 42 75 66 66 65 72 41 6c 6c 6f 63 61 74 65 28 pBufferAllocate(
0410: 44 57 4f 52 44 2c 20 50 56 4f 49 44 2a 29 3b 0d DWORD, PVOID*);.
0420: 0a 7d 0d 0a .}..