1
|
1 /***********************************************************************\
|
|
2 * rapi.d *
|
|
3 * *
|
|
4 * Windows API header module *
|
|
5 * *
|
|
6 * Translated from MinGW Windows headers *
|
|
7 * by Stewart Gordon *
|
|
8 * *
|
|
9 * Placed into public domain *
|
|
10 \***********************************************************************/
|
|
11 module win32.rapi;
|
|
12
|
|
13 /* Comment from MinGW
|
|
14 NOTE: This strictly does not belong in the Win32 API since it's
|
|
15 really part of Platform SDK.
|
|
16 */
|
|
17
|
|
18 private import win32.winbase, win32.windef;
|
|
19
|
|
20 struct IRAPIStream {
|
|
21 IRAPIStreamVtbl* lpVtbl;
|
|
22 }
|
|
23
|
|
24 enum RAPISTREAMFLAG {
|
|
25 STREAM_TIMEOUT_READ
|
|
26 }
|
|
27
|
|
28 extern (Windows) {
|
|
29 alias HRESULT function(IRAPIStream*, RAPISTREAMFLAG, DWORD) _SetRapiStat;
|
|
30 alias HRESULT function(IRAPIStream*, RAPISTREAMFLAG, DWORD*) _GetRapiStat;
|
|
31 }
|
|
32
|
|
33 struct IRAPIStreamVtbl {
|
|
34 _SetRapiStat SetRapiStat;
|
|
35 _GetRapiStat GetRapiStat;
|
|
36 }
|
|
37
|
|
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();
|
|
49 HRESULT CeRapiInitEx(RAPIINIT*);
|
|
50 BOOL CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES,
|
|
51 LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO,
|
|
52 LPPROCESS_INFORMATION);
|
|
53 HRESULT CeRapiUninit();
|
|
54 BOOL CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED);
|
|
55 HANDLE CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD,
|
|
56 DWORD, HANDLE);
|
|
57 BOOL CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES);
|
|
58 DWORD CeGetLastError();
|
|
59 BOOL CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
|
|
60 BOOL CeCloseHandle(HANDLE);
|
|
61 }
|