3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * PURPOSE: Native driver for dxg implementation
6 * FILE: drivers/directx/dxg/main.c
7 * PROGRAMER: Magnus olsen (magnus@greatlord.com)
9 * 15/10-2007 Magnus Olsen
13 #include "dxapi_driver.h"
16 DriverEntry(IN PVOID Context1
,
20 * NOTE this driver will never be load, it only contain export list
21 * to win32k eng functions
23 return STATUS_SUCCESS
;
27 GsDriverEntry(IN PVOID Context1
,
30 return DriverEntry(Context1
, Context2
);
36 * @name DxApiGetVersion
39 * The function DxApiGetVersion return the dsound version, and it always return 4.02
51 /* MSDN say this always return Direct Sound version 4.02 */
61 * The function DxApi calls to diffent functions, follow functions
63 * DxGetVersionNumber, DxCloseHandle, DxOpenDirectDraw, DxOpenSurface,
64 * DxOpenVideoPort, DxGetKernelCaps, DxGetFieldNumber, DxSetFieldNumber,
65 * DxSetSkipPattern, DxGetSurfaceState, DxSetSurfaceState, DxLock,
66 * DxFlipOverlay, DxFlipVideoPort, DxGetCurrentAutoflip, DxGetPreviousAutoflip,
67 * DxRegisterEvent, DxUnregisterEvent, DxGetPolarity, DxOpenVpCatureDevice,
68 * DxAddVpCaptureBuffer, DxFlushVpCaptureBuffs
70 * See ddkmapi.h as well
73 * @param ULONG dwFunctionNum
74 * The function id we want call on in the dxapi.sys see ddkmapi.h for the id
76 * @param PVOID lpvInBuffer
77 * Our input buffer to the functions we call to, This param can be NULL
79 * @param ULONG cbInBuffer
80 * Our size in bytes of the input buffer, rember wrong size will result in the function
81 * does not being call.
83 * @param PVOID lpvOutBuffer
84 * Our Output buffer, there the function fill in the info, this param can not
85 * be null. if it null the functions we trying call on will not be call
87 * @param ULONG cbOutBuffer
88 * Our size in bytes of the output buffer, rember wrong size will result in the function
89 * does not being call.
95 * before call to any of this functions, do not forget set lpvOutBuffer->ddRVal = DDERR_GEN*,
96 * if that member exists in the outbuffer ;
100 DxApi(ULONG dwFunctionNum
,
107 dwFunctionNum
-= DD_FIRST_DXAPI
;
109 if ((lpvOutBuffer
== NULL
) ||
110 (dwFunctionNum
< (DD_FIRST_DXAPI
- DD_FIRST_DXAPI
)) ||
111 (dwFunctionNum
> (DD_DXAPI_FLUSHVPCAPTUREBUFFERS
- DD_FIRST_DXAPI
)) ||
112 (gDxApiEntryPoint
[dwFunctionNum
].pfn
== NULL
) ||
113 (cbInBuffer
!= tblCheckInBuffer
[dwFunctionNum
]) ||
114 (cbOutBuffer
!= tblCheckOutBuffer
[dwFunctionNum
]))
120 gDxApiEntryPoint
[dwFunctionNum
].pfn(lpvInBuffer
, lpvOutBuffer
);
125 * @name DxGetVersionNumber
128 * The function DxGetVersionNumber return dxapi interface version, that is 1.0
138 DxGetVersionNumber(PVOID lpvInBuffer
, LPDDGETVERSIONNUMBER lpvOutBuffer
)
140 lpvOutBuffer
->ddRVal
= DD_OK
;
141 lpvOutBuffer
->dwMajorVersion
= 1;
142 lpvOutBuffer
->dwMinorVersion
= 0;
146 DxCloseHandle(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
148 /* FIXME Unimplement */
152 DxOpenDirectDraw(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
154 /* FIXME Unimplement */
158 DxOpenSurface(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
160 /* FIXME Unimplement */
164 DxOpenVideoPort(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
166 /* FIXME Unimplement */
170 DxGetKernelCaps(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
172 /* FIXME Unimplement */
176 DxGetFieldNumber(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
178 /* FIXME Unimplement */
182 DxSetFieldNumber(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
184 /* FIXME Unimplement */
188 DxSetSkipPattern(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
190 /* FIXME Unimplement */
194 DxGetSurfaceState(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
196 /* FIXME Unimplement */
200 DxSetSurfaceState(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
202 /* FIXME Unimplement */
206 DxLock(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
208 /* FIXME Unimplement */
212 DxFlipOverlay(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
214 /* FIXME Unimplement */
218 DxFlipVideoPort(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
220 /* FIXME Unimplement */
224 DxGetCurrentAutoflip(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
226 /* FIXME Unimplement */
230 DxGetPreviousAutoflip(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
232 /* FIXME Unimplement */
236 DxRegisterEvent(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
238 /* FIXME Unimplement */
242 DxUnregisterEvent(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
244 /* FIXME Unimplement */
248 DxGetPolarity(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
250 /* FIXME Unimplement */
254 DxOpenVpCatureDevice(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
256 /* FIXME Unimplement */
260 DxAddVpCaptureBuffer(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
262 /* FIXME Unimplement */
266 DxFlushVpCaptureBuffs(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
268 /* FIXME Unimplement */