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 ;
102 DxApi(IN DWORD dwFunctionNum
,
103 IN LPVOID lpvInBuffer
,
105 OUT LPVOID lpvOutBuffer
,
106 OUT DWORD cbOutBuffer
)
109 dwFunctionNum
-= DD_FIRST_DXAPI
;
111 if ((lpvOutBuffer
== NULL
) ||
112 (dwFunctionNum
< (DD_FIRST_DXAPI
- DD_FIRST_DXAPI
)) ||
113 (dwFunctionNum
> (DD_DXAPI_FLUSHVPCAPTUREBUFFERS
- DD_FIRST_DXAPI
)) ||
114 (gDxApiEntryPoint
[dwFunctionNum
].pfn
== NULL
) ||
115 (cbInBuffer
!= tblCheckInBuffer
[dwFunctionNum
]) ||
116 (cbOutBuffer
!= tblCheckOutBuffer
[dwFunctionNum
]))
122 gDxApiEntryPoint
[dwFunctionNum
].pfn(lpvInBuffer
, lpvOutBuffer
);
127 * @name DxGetVersionNumber
130 * The function DxGetVersionNumber return dxapi interface version, that is 1.0
140 DxGetVersionNumber(PVOID lpvInBuffer
, LPDDGETVERSIONNUMBER lpvOutBuffer
)
142 lpvOutBuffer
->ddRVal
= DD_OK
;
143 lpvOutBuffer
->dwMajorVersion
= 1;
144 lpvOutBuffer
->dwMinorVersion
= 0;
148 DxCloseHandle(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
150 /* FIXME Unimplement */
154 DxOpenDirectDraw(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
156 /* FIXME Unimplement */
160 DxOpenSurface(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
162 /* FIXME Unimplement */
166 DxOpenVideoPort(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
168 /* FIXME Unimplement */
172 DxGetKernelCaps(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
174 /* FIXME Unimplement */
178 DxGetFieldNumber(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
180 /* FIXME Unimplement */
184 DxSetFieldNumber(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
186 /* FIXME Unimplement */
190 DxSetSkipPattern(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
192 /* FIXME Unimplement */
196 DxGetSurfaceState(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
198 /* FIXME Unimplement */
202 DxSetSurfaceState(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
204 /* FIXME Unimplement */
208 DxLock(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
210 /* FIXME Unimplement */
214 DxFlipOverlay(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
216 /* FIXME Unimplement */
220 DxFlipVideoPort(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
222 /* FIXME Unimplement */
226 DxGetCurrentAutoflip(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
228 /* FIXME Unimplement */
232 DxGetPreviousAutoflip(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
234 /* FIXME Unimplement */
238 DxRegisterEvent(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
240 /* FIXME Unimplement */
244 DxUnregisterEvent(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
246 /* FIXME Unimplement */
250 DxGetPolarity(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
252 /* FIXME Unimplement */
256 DxOpenVpCatureDevice(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
258 /* FIXME Unimplement */
262 DxAddVpCaptureBuffer(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
264 /* FIXME Unimplement */
268 DxFlushVpCaptureBuffs(PVOID lpvInBuffer
, PVOID lpvOutBuffer
)
270 /* FIXME Unimplement */