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
52 /* MSDN say this always return Direct Sound version 4.02 */
62 * The function DxApi calls to diffent functions, follow functions
64 * DxGetVersionNumber, DxCloseHandle, DxOpenDirectDraw, DxOpenSurface,
65 * DxOpenVideoPort, DxGetKernelCaps, DxGetFieldNumber, DxSetFieldNumber,
66 * DxSetSkipPattern, DxGetSurfaceState, DxSetSurfaceState, DxLock,
67 * DxFlipOverlay, DxFlipVideoPort, DxGetCurrentAutoflip, DxGetPreviousAutoflip,
68 * DxRegisterEvent, DxUnregisterEvent, DxGetPolarity, DxOpenVpCatureDevice,
69 * DxAddVpCaptureBuffer, DxFlushVpCaptureBuffs
71 * See ddkmapi.h as well
74 * @param ULONG dwFunctionNum
75 * The function id we want call on in the dxapi.sys see ddkmapi.h for the id
77 * @param PVOID lpvInBuffer
78 * Our input buffer to the functions we call to, This param can be NULL
80 * @param ULONG cbInBuffer
81 * Our size in bytes of the input buffer, rember wrong size will result in the function
82 * does not being call.
84 * @param PVOID lpvOutBuffer
85 * Our Output buffer, there the function fill in the info, this param can not
86 * be null. if it null the functions we trying call on will not be call
88 * @param ULONG cbOutBuffer
89 * Our size in bytes of the output buffer, rember wrong size will result in the function
90 * does not being call.
96 * before call to any of this functions, do not forget set lpvOutBuffer->ddRVal = DDERR_GEN*,
97 * if that member exists in the outbuffer ;
103 DxApi(IN DWORD dwFunctionNum
,
104 IN LPVOID lpvInBuffer
,
106 OUT LPVOID lpvOutBuffer
,
107 OUT DWORD cbOutBuffer
)
110 dwFunctionNum
-= DD_FIRST_DXAPI
;
112 if ((lpvOutBuffer
== NULL
) ||
113 /*(dwFunctionNum < (DD_FIRST_DXAPI - DD_FIRST_DXAPI)) ||*/
114 (dwFunctionNum
> (DD_DXAPI_FLUSHVPCAPTUREBUFFERS
- DD_FIRST_DXAPI
)) ||
115 (gDxApiEntryPoint
[dwFunctionNum
].pfn
== NULL
) ||
116 (cbInBuffer
!= tblCheckInBuffer
[dwFunctionNum
]) ||
117 (cbOutBuffer
!= tblCheckOutBuffer
[dwFunctionNum
]))
123 gDxApiEntryPoint
[dwFunctionNum
].pfn(lpvInBuffer
, lpvOutBuffer
);
128 * @name DxGetVersionNumber
131 * The function DxGetVersionNumber return dxapi interface version, that is 1.0
141 DxGetVersionNumber(PVOID lpvInBuffer
, LPDDGETVERSIONNUMBER lpvOutBuffer
)
143 lpvOutBuffer
->ddRVal
= DD_OK
;
144 lpvOutBuffer
->dwMajorVersion
= 1;
145 lpvOutBuffer
->dwMinorVersion
= 0;
149 DxCloseHandle(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
151 /* FIXME Unimplement */
155 DxOpenDirectDraw(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
157 /* FIXME Unimplement */
161 DxOpenSurface(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
163 /* FIXME Unimplement */
167 DxOpenVideoPort(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
169 /* FIXME Unimplement */
173 DxGetKernelCaps(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
175 /* FIXME Unimplement */
179 DxGetFieldNumber(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
181 /* FIXME Unimplement */
185 DxSetFieldNumber(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
187 /* FIXME Unimplement */
191 DxSetSkipPattern(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
193 /* FIXME Unimplement */
197 DxGetSurfaceState(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
199 /* FIXME Unimplement */
203 DxSetSurfaceState(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
205 /* FIXME Unimplement */
209 DxLock(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
211 /* FIXME Unimplement */
215 DxFlipOverlay(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
217 /* FIXME Unimplement */
221 DxFlipVideoPort(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
223 /* FIXME Unimplement */
227 DxGetCurrentAutoflip(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
229 /* FIXME Unimplement */
233 DxGetPreviousAutoflip(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
235 /* FIXME Unimplement */
239 DxRegisterEvent(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
241 /* FIXME Unimplement */
245 DxUnregisterEvent(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
247 /* FIXME Unimplement */
251 DxGetPolarity(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
253 /* FIXME Unimplement */
257 DxOpenVpCatureDevice(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
259 /* FIXME Unimplement */
263 DxAddVpCaptureBuffer(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
265 /* FIXME Unimplement */
269 DxFlushVpCaptureBuffs(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
271 /* FIXME Unimplement */