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 version(Windows): 13 14 /* Comment from MinGW 15 NOTE: This strictly does not belong in the Win32 API since it's 16 really part of Platform SDK. 17 */ 18 19 private import win32.winbase, win32.windef; 20 21 extern (Windows): 22 23 enum RAPISTREAMFLAG 24 { 25 STREAM_TIMEOUT_READ 26 } 27 28 interface IRAPIStream 29 { 30 HRESULT SetRapiStat(RAPISTREAMFLAG, DWORD); 31 HRESULT GetRapiStat(RAPISTREAMFLAG, DWORD*); 32 } 33 34 alias HRESULT function(DWORD, BYTE, DWORD, BYTE, IRAPIStream) RAPIEXT; 35 36 struct RAPIINIT 37 { 38 DWORD cbSize = this.sizeof; 39 HANDLE heRapiInit; 40 HRESULT hrRapiInit; 41 } 42 43 HRESULT CeRapiInit(); 44 HRESULT CeRapiInitEx(RAPIINIT*); 45 BOOL CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES, 46 LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO, 47 LPPROCESS_INFORMATION); 48 HRESULT CeRapiUninit(); 49 BOOL CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED); 50 HANDLE CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, 51 DWORD, HANDLE); 52 BOOL CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES); 53 DWORD CeGetLastError(); 54 BOOL CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME); 55 BOOL CeCloseHandle(HANDLE);