1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * Authors: Stewart Gordon
7  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
8  * Source: $(DRUNTIMESRC core/sys/windows/_rapi.d)
9  */
10 /// Automatically imported and edited from the druntime module
11 /// core.sys.windows.rapi for the auto-generated win32 package.
12 module win32.rapi;
13 //version (Windows):
14 @system:
15 
16 /* Comment from MinGW
17    NOTE: This strictly does not belong in the Win32 API since it's
18    really part of Platform SDK.
19  */
20 
21 import win32.winbase, win32.windef;
22 
23 extern (Windows):
24 
25 enum RAPISTREAMFLAG
26 {
27     STREAM_TIMEOUT_READ
28 }
29 
30 interface IRAPIStream
31 {
32     HRESULT SetRapiStat(RAPISTREAMFLAG, DWORD);
33     HRESULT GetRapiStat(RAPISTREAMFLAG, DWORD*);
34 }
35 
36 alias HRESULT function(DWORD, BYTE, DWORD, BYTE, IRAPIStream) RAPIEXT;
37 
38 struct RAPIINIT
39 {
40     DWORD   cbSize = this.sizeof;
41     HANDLE  heRapiInit;
42     HRESULT hrRapiInit;
43 }
44 
45 HRESULT CeRapiInit();
46 HRESULT CeRapiInitEx(RAPIINIT*);
47 BOOL CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES,
48   LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO,
49   LPPROCESS_INFORMATION);
50 HRESULT CeRapiUninit();
51 BOOL CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED);
52 HANDLE CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD,
53   DWORD, HANDLE);
54 BOOL CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES);
55 DWORD CeGetLastError();
56 BOOL CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
57 BOOL CeCloseHandle(HANDLE);