annotate win32/rapi.d @ 1:4a9dcbd9e54f

-files of 0.13 beta -fixes so that it now compiles with the current dmd version
author marton@basel.hu
date Tue, 05 Apr 2011 20:44:01 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
1 /***********************************************************************\
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
2 * rapi.d *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
3 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
4 * Windows API header module *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
5 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
6 * Translated from MinGW Windows headers *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
7 * by Stewart Gordon *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
8 * *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
9 * Placed into public domain *
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
10 \***********************************************************************/
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
11 module win32.rapi;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
12
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
13 /* Comment from MinGW
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
14 NOTE: This strictly does not belong in the Win32 API since it's
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
15 really part of Platform SDK.
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
16 */
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
17
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
18 private import win32.winbase, win32.windef;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
19
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
20 struct IRAPIStream {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
21 IRAPIStreamVtbl* lpVtbl;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
22 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
23
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
24 enum RAPISTREAMFLAG {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
25 STREAM_TIMEOUT_READ
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
26 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
27
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
28 extern (Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
29 alias HRESULT function(IRAPIStream*, RAPISTREAMFLAG, DWORD) _SetRapiStat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
30 alias HRESULT function(IRAPIStream*, RAPISTREAMFLAG, DWORD*) _GetRapiStat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
31 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
32
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
33 struct IRAPIStreamVtbl {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
34 _SetRapiStat SetRapiStat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
35 _GetRapiStat GetRapiStat;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
36 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
37
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
38 // FIXME: what's this?
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
39 //typedef HRESULT(STDAPICALLTYPE RAPIEXT)(DWORD, BYTE, DWORD, BYTE, IRAPIStream*);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
40
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
41 struct RAPIINIT {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
42 DWORD cbSize = this.sizeof;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
43 HANDLE heRapiInit;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
44 HRESULT hrRapiInit;
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
45 }
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
46
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
47 extern (Windows) {
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
48 HRESULT CeRapiInit();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
49 HRESULT CeRapiInitEx(RAPIINIT*);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
50 BOOL CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
51 LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
52 LPPROCESS_INFORMATION);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
53 HRESULT CeRapiUninit();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
54 BOOL CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
55 HANDLE CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD,
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
56 DWORD, HANDLE);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
57 BOOL CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
58 DWORD CeGetLastError();
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
59 BOOL CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
60 BOOL CeCloseHandle(HANDLE);
4a9dcbd9e54f -files of 0.13 beta
marton@basel.hu
parents:
diff changeset
61 }