Differences From Artifact [f5377fbd24e425cd]:
- File
src/win32/rapi.d
- 2015-04-21 10:46:55 - part of checkin [4e2933c620] on branch trunk - Rebased to the latest verson dmd 2.067. Not yet verified the outcome. (user: kinaba) [annotate]
To Artifact [83d09d08acc17a2f]:
- File
src/win32/rapi.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.
7 * by Stewart Gordon * 7 * by Stewart Gordon *
8 * * 8 * *
9 * Placed into public domain * 9 * Placed into public domain *
10 \***********************************************************************/ 10 \***********************************************************************/
11 module win32.rapi; 11 module win32.rapi;
12 12
13 /* Comment from MinGW 13 /* Comment from MinGW
14 NOTE: This strictly does not belong in the Win32 API since it's | 14 NOTE: This strictly does not belong in the Win32 API since it's
15 really part of Platform SDK. | 15 really part of Platform SDK.
16 */ 16 */
17 17
18 private import win32.winbase, win32.windef; 18 private import win32.winbase, win32.windef;
19 19
20 struct IRAPIStream { | 20 extern (Windows):
21 IRAPIStreamVtbl* lpVtbl; <
22 } <
23 21
24 enum RAPISTREAMFLAG { | 22 enum RAPISTREAMFLAG
> 23 {
25 STREAM_TIMEOUT_READ | 24 STREAM_TIMEOUT_READ
26 } 25 }
27 26
28 extern (Windows) { | 27 interface IRAPIStream
> 28 {
29 alias HRESULT function(IRAPIStream*, RAPISTREAMFLAG, DWORD) _SetRapiSta | 29 HRESULT SetRapiStat(RAPISTREAMFLAG, DWORD);
30 alias HRESULT function(IRAPIStream*, RAPISTREAMFLAG, DWORD*) _GetRapiSta | 30 HRESULT GetRapiStat(RAPISTREAMFLAG, DWORD*);
31 } 31 }
32 32
> 33 alias HRESULT function(DWORD, BYTE, DWORD, BYTE, IRAPIStream) RAPIEXT;
> 34
33 struct IRAPIStreamVtbl { | 35 struct RAPIINIT
34 _SetRapiStat SetRapiStat; <
35 _GetRapiStat GetRapiStat; <
> 36 {
> 37 DWORD cbSize = this.sizeof;
> 38 HANDLE heRapiInit;
> 39 HRESULT hrRapiInit;
36 } 40 }
37 41
38 // FIXME: what's this? <
39 //typedef HRESULT(STDAPICALLTYPE RAPIEXT)(DWORD, BYTE, DWORD, BYTE, IRAPIStream* <
40 <
41 struct RAPIINIT { <
42 DWORD cbSize = this.sizeof; <
43 HANDLE heRapiInit; <
44 HRESULT hrRapiInit; <
45 } <
46 <
47 extern (Windows) { <
48 HRESULT CeRapiInit(); | 42 HRESULT CeRapiInit();
49 HRESULT CeRapiInitEx(RAPIINIT*); | 43 HRESULT CeRapiInitEx(RAPIINIT*);
50 BOOL CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES, | 44 BOOL CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES,
51 LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO, | 45 LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO,
52 LPPROCESS_INFORMATION); | 46 LPPROCESS_INFORMATION);
53 HRESULT CeRapiUninit(); | 47 HRESULT CeRapiUninit();
54 BOOL CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED); | 48 BOOL CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED);
55 HANDLE CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, | 49 HANDLE CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD,
56 DWORD, HANDLE); | 50 DWORD, HANDLE);
57 BOOL CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES); | 51 BOOL CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES);
58 DWORD CeGetLastError(); | 52 DWORD CeGetLastError();
59 BOOL CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME); | 53 BOOL CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
60 BOOL CeCloseHandle(HANDLE); | 54 BOOL CeCloseHandle(HANDLE);
61 } <