[MSIEXEC] Sync with Wine Staging 3.3. CORE-14434
[reactos.git] / win32ss / reactx / dxapi / dxapi_driver.h
1 #include <wdm.h>
2
3 #include <windef.h>
4 #include <winerror.h>
5 #include <wingdi.h>
6 #define NT_BUILD_ENVIRONMENT
7 #include <winddi.h>
8
9 #include <ddkmapi.h>
10
11 /* Prototypes */
12 VOID DxGetVersionNumber(PVOID lpvInBuffer, LPDDGETVERSIONNUMBER lpvOutBuffer);
13 VOID DxCloseHandle(PVOID lpvInBuffer, PVOID lpvOutBuffer);
14 VOID DxOpenDirectDraw(PVOID lpvInBuffer, PVOID lpvOutBuffer);
15 VOID DxOpenSurface(PVOID lpvInBuffer, PVOID lpvOutBuffer);
16 VOID DxOpenVideoPort(PVOID lpvInBuffer, PVOID lpvOutBuffer);
17 VOID DxGetKernelCaps(PVOID lpvInBuffer, PVOID lpvOutBuffer);
18 VOID DxGetFieldNumber(PVOID lpvInBuffer, PVOID lpvOutBuffer);
19 VOID DxSetFieldNumber(PVOID lpvInBuffer, PVOID lpvOutBuffer);
20 VOID DxSetSkipPattern(PVOID lpvInBuffer, PVOID lpvOutBuffer);
21 VOID DxGetSurfaceState(PVOID lpvInBuffer, PVOID lpvOutBuffer);
22 VOID DxSetSurfaceState(PVOID lpvInBuffer, PVOID lpvOutBuffer);
23 VOID DxLock(PVOID lpvInBuffer, PVOID lpvOutBuffer);
24 VOID DxFlipOverlay(PVOID lpvInBuffer, PVOID lpvOutBuffer);
25 VOID DxFlipVideoPort(PVOID lpvInBuffer, PVOID lpvOutBuffer);
26 VOID DxGetCurrentAutoflip(PVOID lpvInBuffer, PVOID lpvOutBuffer);
27 VOID DxGetPreviousAutoflip(PVOID lpvInBuffer, PVOID lpvOutBuffer);
28 VOID DxRegisterEvent(PVOID lpvInBuffer, PVOID lpvOutBuffer);
29 VOID DxUnregisterEvent(PVOID lpvInBuffer, PVOID lpvOutBuffer);
30 VOID DxGetPolarity(PVOID lpvInBuffer, PVOID lpvOutBuffer);
31 VOID DxOpenVpCatureDevice(PVOID lpvInBuffer, PVOID lpvOutBuffer);
32 VOID DxAddVpCaptureBuffer(PVOID lpvInBuffer, PVOID lpvOutBuffer);
33 VOID DxFlushVpCaptureBuffs(PVOID lpvInBuffer, PVOID lpvOutBuffer);
34
35 /* Internal driver table being use as looking up table for correct size of structs */
36 DWORD tblCheckInBuffer [] =
37 {
38 /* DD_DXAPI_GETVERSIONNUMBER */
39 0,
40 /* DD_DXAPI_CLOSEHANDLE */
41 sizeof(DDCLOSEHANDLE),
42 0, // DD_DXAPI_OPENDIRECTDRAW
43 0, // DD_DXAPI_OPENSURFACE
44 0, // DD_DXAPI_OPENVIDEOPORT
45 /* DD_DXAPI_GETKERNELCAPS */
46 sizeof(HANDLE),
47 /* DD_DXAPI_GET_VP_FIELD_NUMBER */
48 sizeof(DDGETFIELDNUMIN),
49 0, // DD_DXAPI_SET_VP_FIELD_NUMBER
50 0, // DD_DXAPI_SET_VP_SKIP_FIELD
51 0, // DD_DXAPI_GET_SURFACE_STATE
52 0, // DD_DXAPI_SET_SURFACE_STATE
53 0, // DD_DXAPI_LOCK
54 /* DD_DXAPI_FLIP_OVERLAY */
55 sizeof(DDFLIPOVERLAY),
56 /* DD_DXAPI_FLIP_VP */
57 sizeof(DDFLIPVIDEOPORT),
58 /* DD_DXAPI_GET_CURRENT_VP_AUTOFLIP_SURFACE */
59 sizeof(DDGETAUTOFLIPIN),
60 /* DD_DXAPI_GET_LAST_VP_AUTOFLIP_SURFACE */
61 sizeof(DDGETAUTOFLIPIN),
62 /* DD_DXAPI_REGISTER_CALLBACK */
63 sizeof(DDREGISTERCALLBACK),
64 /* DD_DXAPI_UNREGISTER_CALLBACK */
65 sizeof(DDREGISTERCALLBACK),
66 /* DD_DXAPI_GET_POLARITY */
67 sizeof(DDGETPOLARITYIN),
68 /* DD_DXAPI_OPENVPCAPTUREDEVICE */
69 sizeof(DDOPENVPCAPTUREDEVICEIN),
70 /* DD_DXAPI_ADDVPCAPTUREBUFFER */
71 sizeof(DDADDVPCAPTUREBUFF),
72 /* DD_DXAPI_FLUSHVPCAPTUREBUFFERS */
73 sizeof(HANDLE)
74 };
75
76 DWORD tblCheckOutBuffer [] =
77 {
78 /* DD_DXAPI_GETVERSIONNUMBER */
79 sizeof(DDGETVERSIONNUMBER),
80 /* DD_DXAPI_CLOSEHANDLE */
81 sizeof(DWORD),
82 0, // DD_DXAPI_OPENDIRECTDRAW
83 0, // DD_DXAPI_OPENSURFACE
84 0, // DD_DXAPI_OPENVIDEOPORT
85 /* DD_DXAPI_GETKERNELCAPS */
86 sizeof(DDGETKERNELCAPSOUT),
87 /* DD_DXAPI_GET_VP_FIELD_NUMBER */
88 sizeof(DDGETFIELDNUMOUT),
89 0, // DD_DXAPI_SET_VP_FIELD_NUMBER
90 0, // DD_DXAPI_SET_VP_SKIP_FIELD
91 0, // DD_DXAPI_GET_SURFACE_STATE
92 0, // DD_DXAPI_SET_SURFACE_STATE
93 0, // DD_DXAPI_LOCK
94 /* DD_DXAPI_FLIP_OVERLAY */
95 sizeof(DWORD),
96 /* DD_DXAPI_FLIP_VP */
97 sizeof(DWORD),
98 /* DD_DXAPI_GET_CURRENT_VP_AUTOFLIP_SURFACE */
99 sizeof(DDGETAUTOFLIPOUT),
100 /* DD_DXAPI_GET_LAST_VP_AUTOFLIP_SURFACE */
101 sizeof(DDGETAUTOFLIPOUT),
102 /* DD_DXAPI_REGISTER_CALLBACK */
103 sizeof(DWORD),
104 /* DD_DXAPI_UNREGISTER_CALLBACK */
105 sizeof(DWORD),
106 /* DD_DXAPI_GET_POLARITY */
107 sizeof(DDGETPOLARITYOUT),
108 /* DD_DXAPI_OPENVPCAPTUREDEVICE */
109 sizeof(DDOPENVPCAPTUREDEVICEOUT),
110 /* DD_DXAPI_ADDVPCAPTUREBUFFER */
111 sizeof(DWORD),
112 /* DD_DXAPI_FLUSHVPCAPTUREBUFFERS */
113 sizeof(DWORD)
114 };
115
116 /* Internal driver function */
117 DRVFN gDxApiEntryPoint [] =
118 {
119 {DD_DXAPI_GETVERSIONNUMBER - DD_FIRST_DXAPI, (PFN) DxGetVersionNumber},
120 {DD_DXAPI_CLOSEHANDLE - DD_FIRST_DXAPI, (PFN) DxCloseHandle},
121 {DD_DXAPI_OPENDIRECTDRAW - DD_FIRST_DXAPI, (PFN) DxOpenDirectDraw},
122 {DD_DXAPI_OPENSURFACE - DD_FIRST_DXAPI, (PFN) DxOpenSurface},
123 {DD_DXAPI_OPENVIDEOPORT - DD_FIRST_DXAPI, (PFN) DxOpenVideoPort},
124 {DD_DXAPI_GETKERNELCAPS - DD_FIRST_DXAPI, (PFN) DxGetKernelCaps},
125 {DD_DXAPI_GET_VP_FIELD_NUMBER - DD_FIRST_DXAPI, (PFN) DxGetFieldNumber},
126 {DD_DXAPI_SET_VP_FIELD_NUMBER - DD_FIRST_DXAPI, (PFN) DxSetFieldNumber},
127 {DD_DXAPI_SET_VP_SKIP_FIELD - DD_FIRST_DXAPI, (PFN) DxSetSkipPattern},
128 {DD_DXAPI_GET_SURFACE_STATE - DD_FIRST_DXAPI, (PFN) DxGetSurfaceState},
129 {DD_DXAPI_SET_SURFACE_STATE - DD_FIRST_DXAPI, (PFN) DxSetSurfaceState},
130 {DD_DXAPI_LOCK - DD_FIRST_DXAPI, (PFN) DxLock},
131 {DD_DXAPI_FLIP_OVERLAY - DD_FIRST_DXAPI, (PFN) DxFlipOverlay},
132 {DD_DXAPI_FLIP_VP - DD_FIRST_DXAPI, (PFN) DxFlipVideoPort},
133 {DD_DXAPI_GET_CURRENT_VP_AUTOFLIP_SURFACE - DD_FIRST_DXAPI, (PFN) DxGetCurrentAutoflip},
134 {DD_DXAPI_GET_LAST_VP_AUTOFLIP_SURFACE - DD_FIRST_DXAPI, (PFN) DxGetPreviousAutoflip},
135 {DD_DXAPI_REGISTER_CALLBACK - DD_FIRST_DXAPI, (PFN) DxRegisterEvent},
136 {DD_DXAPI_UNREGISTER_CALLBACK - DD_FIRST_DXAPI, (PFN) DxUnregisterEvent},
137 {DD_DXAPI_GET_POLARITY - DD_FIRST_DXAPI, (PFN) DxGetPolarity},
138 {DD_DXAPI_OPENVPCAPTUREDEVICE - DD_FIRST_DXAPI, (PFN) DxOpenVpCatureDevice},
139 {DD_DXAPI_ADDVPCAPTUREBUFFER - DD_FIRST_DXAPI, (PFN) DxAddVpCaptureBuffer},
140 {DD_DXAPI_FLUSHVPCAPTUREBUFFERS - DD_FIRST_DXAPI, (PFN) DxFlushVpCaptureBuffs}
141 };