[DXAPI] Fix export names, add missing stubs
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 11 Nov 2013 20:11:23 +0000 (20:11 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Mon, 11 Nov 2013 20:11:23 +0000 (20:11 +0000)
[VIDEOPRT] Add missing WdDdiWatchdogDpcCallback export
[WATCHDOG] Add a dummy watchdog.sys
Now win32k.sys from win 2003 can be loaded.

svn path=/trunk/; revision=60952

reactos/win32ss/drivers/CMakeLists.txt
reactos/win32ss/drivers/videoprt/stubs.c
reactos/win32ss/drivers/videoprt/videoprt.spec
reactos/win32ss/drivers/watchdog/CMakeLists.txt [new file with mode: 0644]
reactos/win32ss/drivers/watchdog/watchdog.c [new file with mode: 0644]
reactos/win32ss/drivers/watchdog/watchdog.spec [new file with mode: 0644]
reactos/win32ss/reactx/dxapi/dxapi.spec
reactos/win32ss/reactx/dxapi/main.c

index 725d635..0e15347 100644 (file)
@@ -3,3 +3,5 @@ add_subdirectory(displays)
 add_subdirectory(font)
 add_subdirectory(miniport)
 add_subdirectory(videoprt)
+add_subdirectory(watchdog)
+
index a07a9e4..debd903 100644 (file)
@@ -91,6 +91,18 @@ VideoPortUnlockPages(
     return 0;
 }
 
+_Function_class_(KDEFERRED_ROUTINE)
+VOID
+NTAPI
+WdDdiWatchdogDpcCallback(
+    _In_ PKDPC Dpc,
+    _In_opt_ PVOID DeferredContext,
+    _In_opt_ PVOID SystemArgument1,
+    _In_opt_ PVOID SystemArgument2)
+{
+    UNIMPLEMENTED;
+}
+
 #ifdef _M_AMD64
 UCHAR
 NTAPI
index 250951c..1ad665a 100644 (file)
 @ stdcall VideoPortZeroMemory(ptr long) NTOSKRNL.RtlZeroMemory
 @ stdcall VideoPortZeroDeviceMemory(ptr long) NTOSKRNL.RtlZeroMemory
 @ stdcall VpNotifyEaData(ptr ptr)
+@ stdcall WdDdiWatchdogDpcCallback(ptr ptr ptr ptr)
diff --git a/reactos/win32ss/drivers/watchdog/CMakeLists.txt b/reactos/win32ss/drivers/watchdog/CMakeLists.txt
new file mode 100644 (file)
index 0000000..87e166b
--- /dev/null
@@ -0,0 +1,11 @@
+
+spec2def(watchdog.sys watchdog.spec)
+
+add_library(watchdog SHARED
+    watchdog.c
+    ${CMAKE_CURRENT_BINARY_DIR}/watchdog.def)
+
+set_module_type(watchdog kernelmodedriver)
+add_importlibs(watchdog ntoskrnl)
+
+add_cd_file(TARGET watchdog DESTINATION reactos/system32/drivers FOR all)
diff --git a/reactos/win32ss/drivers/watchdog/watchdog.c b/reactos/win32ss/drivers/watchdog/watchdog.c
new file mode 100644 (file)
index 0000000..8f17dda
--- /dev/null
@@ -0,0 +1,238 @@
+
+#include <ntifs.h>
+
+#define NDEBUG
+#include <debug.h>
+
+extern char WatchdogPeHeader;
+void Fixup_WatchdogPeHeader(void);
+
+NTSTATUS
+NTAPI
+DriverEntry (
+    _In_ PDRIVER_OBJECT        DriverObject,
+    _In_ PUNICODE_STRING RegistryPath)
+{
+    UNIMPLEMENTED;
+    return STATUS_SUCCESS;
+}
+
+VOID
+NTAPI
+WdAllocateWatchdog(
+    PVOID p1,
+    PVOID p2,
+    ULONG p3)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdAllocateDeferredWatchdog(
+    PVOID p1,
+    PVOID p2,
+    ULONG p3)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdFreeWatchdog(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdFreeDeferredWatchdog(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdStartWatch(
+    PVOID p1,
+    LARGE_INTEGER p2,
+    ULONG p3)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdStartDeferredWatch(
+    PVOID p1,
+    PVOID p2,
+    ULONG p3)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdStopWatch(
+    PVOID p1,
+    ULONG p2)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdStopDeferredWatch(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdSuspendWatch(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+FASTCALL
+WdSuspendDeferredWatch(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdResumeWatch(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+FASTCALL
+WdResumeDeferredWatch(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdResetWatch(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+FASTCALL
+WdResetDeferredWatch(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+FASTCALL
+WdEnterMonitoredSection(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+FASTCALL
+WdExitMonitoredSection(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdAttachContext(
+    PVOID p1,
+    PVOID p2)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdDetachContext(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdGetDeviceObject(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdGetLowestDeviceObject(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdGetLastEvent(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdCompleteEvent(
+    PVOID p1,
+    PVOID p2)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdReferenceObject(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+WdDereferenceObject(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+}
+
+BOOLEAN
+NTAPI
+WdMadeAnyProgress(
+    PVOID p1)
+{
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
+
+
+
+
+
+
+
diff --git a/reactos/win32ss/drivers/watchdog/watchdog.spec b/reactos/win32ss/drivers/watchdog/watchdog.spec
new file mode 100644 (file)
index 0000000..16c45fe
--- /dev/null
@@ -0,0 +1,25 @@
+@ fastcall WdEnterMonitoredSection(ptr)
+@ fastcall WdExitMonitoredSection(ptr)
+@ fastcall WdResetDeferredWatch(ptr)
+@ fastcall WdResumeDeferredWatch(ptr ptr)
+@ fastcall WdSuspendDeferredWatch(ptr)
+@ stdcall WdAllocateDeferredWatchdog(ptr ptr long)
+@ stdcall WdAllocateWatchdog(ptr ptr long)
+@ stdcall WdAttachContext(ptr ptr)
+@ stdcall WdCompleteEvent(ptr ptr)
+@ stdcall WdDereferenceObject(ptr)
+@ stdcall WdDetachContext(ptr)
+@ stdcall WdFreeDeferredWatchdog(ptr)
+@ stdcall WdFreeWatchdog(ptr)
+@ stdcall WdGetDeviceObject(ptr)
+@ stdcall WdGetLastEvent(ptr)
+@ stdcall WdGetLowestDeviceObject(ptr)
+@ stdcall WdMadeAnyProgress(ptr)
+@ stdcall WdReferenceObject(ptr)
+@ stdcall WdResetWatch(ptr)
+@ stdcall WdResumeWatch(ptr ptr)
+@ stdcall WdStartDeferredWatch(ptr ptr long)
+@ stdcall WdStartWatch(ptr double ptr)
+@ stdcall WdStopDeferredWatch(ptr)
+@ stdcall WdStopWatch(ptr long)
+@ stdcall WdSuspendWatch(ptr)
index c40b5cd..4615635 100644 (file)
@@ -1,8 +1,7 @@
-@ stdcall DxApi(long ptr long ptr long)
-@ stdcall DxApiGetVersion()
-;DxApiInitialize
-;DxAutoflipUpdate
-;DxEnableIRQ
-;DxLoseObject
-;DxUpdateCapture
-@ stdcall GsDriverEntry(ptr ptr)
+@ stdcall _DxApi@20(long ptr long ptr long) DxApi
+@ stdcall _DxApiGetVersion@0() DxApiGetVersion
+@ stdcall _DxApiInitialize@32(ptr ptr ptr ptr ptr ptr ptr ptr) DxApiInitialize
+@ stdcall _DxAutoflipUpdate@20(ptr ptr ptr ptr ptr) DxAutoflipUpdate
+@ stdcall _DxEnableIRQ@8(ptr ptr) DxEnableIRQ
+@ stdcall _DxLoseObject@8(ptr ptr) DxLoseObject
+@ stdcall _DxUpdateCapture@12(ptr ptr ptr) DxUpdateCapture
index 5bf9ec3..0f8a946 100644 (file)
 
 #include "dxapi_driver.h"
 
+#define NDEBU
+#include <debug.h>
+
 NTSTATUS NTAPI
 DriverEntry(IN PVOID Context1,
             IN PVOID Context2)
 {
-    /* 
+    /*
      * NOTE this driver will never be load, it only contain export list
      * to win32k eng functions
      */
     return STATUS_SUCCESS;
 }
 
-NTSTATUS NTAPI
-GsDriverEntry(IN PVOID Context1,
-              IN PVOID Context2)
-{
-    return DriverEntry(Context1, Context2);
-}
-
-
-
 /*++
 * @name DxApiGetVersion
 * @implemented
 *
 * The function DxApiGetVersion return the dsound version, and it always return 4.02
 *
-* @return 
+* @return
 * Always return 4.02
 *
 * @remarks.
@@ -46,7 +40,7 @@ GsDriverEntry(IN PVOID Context1,
 *
 *--*/
 ULONG
-PASCAL
+NTAPI
 DxApiGetVersion()
 {
     /* MSDN say this always return Direct Sound version 4.02 */
@@ -59,14 +53,14 @@ DxApiGetVersion()
 * @name DxApi
 * @implemented
 *
-* The function DxApi calls to diffent functions, follow functions 
+* The function DxApi calls to diffent functions, follow functions
 * are supported
 * DxGetVersionNumber, DxCloseHandle, DxOpenDirectDraw, DxOpenSurface,
 * DxOpenVideoPort, DxGetKernelCaps, DxGetFieldNumber, DxSetFieldNumber,
 * DxSetSkipPattern, DxGetSurfaceState, DxSetSurfaceState, DxLock,
 * DxFlipOverlay, DxFlipVideoPort, DxGetCurrentAutoflip, DxGetPreviousAutoflip,
 * DxRegisterEvent, DxUnregisterEvent, DxGetPolarity, DxOpenVpCatureDevice,
-* DxAddVpCaptureBuffer, DxFlushVpCaptureBuffs 
+* DxAddVpCaptureBuffer, DxFlushVpCaptureBuffs
 *
 * See ddkmapi.h as well
 
@@ -89,8 +83,8 @@ DxApiGetVersion()
 * Our size in bytes of the output buffer, rember wrong size will result in the function
 * does not being call.
 *
-* @return 
-* Return Always 0. 
+* @return
+* Return Always 0.
 *
 * @remarks.
 * before call to any of this functions, do not forget set lpvOutBuffer->ddRVal = DDERR_GEN*,
@@ -99,7 +93,7 @@ DxApiGetVersion()
 *--*/
 
 DWORD
-PASCAL
+NTAPI
 DxApi(IN DWORD dwFunctionNum,
       IN LPVOID lpvInBuffer,
       IN DWORD cbInBuffer,
@@ -109,7 +103,7 @@ DxApi(IN DWORD dwFunctionNum,
 
     dwFunctionNum -= DD_FIRST_DXAPI;
 
-    if ((lpvOutBuffer == NULL) || 
+    if ((lpvOutBuffer == NULL) ||
        /*(dwFunctionNum < (DD_FIRST_DXAPI - DD_FIRST_DXAPI)) ||*/
        (dwFunctionNum > (DD_DXAPI_FLUSHVPCAPTUREBUFFERS - DD_FIRST_DXAPI)) ||
        (gDxApiEntryPoint[dwFunctionNum].pfn == NULL) ||
@@ -124,13 +118,69 @@ DxApi(IN DWORD dwFunctionNum,
     return 0;
 }
 
+VOID
+NTAPI
+DxApiInitialize (
+    PVOID p1,
+    PVOID p2,
+    PVOID p3,
+    PVOID p4,
+    PVOID p5,
+    PVOID p6,
+    PVOID p7,
+    PVOID p8)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+DxAutoflipUpdate (
+    PVOID p1,
+    PVOID p2,
+    PVOID p3,
+    PVOID p4,
+    PVOID p5)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+DxEnableIRQ (
+    PVOID p1,
+    PVOID p2)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+DxLoseObject (
+    PVOID p1,
+    PVOID p2)
+{
+    UNIMPLEMENTED;
+}
+
+VOID
+NTAPI
+DxUpdateCapture (
+    PVOID p1,
+    PVOID p2,
+    PVOID p3)
+{
+    UNIMPLEMENTED;
+}
+
+
 /*++
 * @name DxGetVersionNumber
 * @implemented
 *
 * The function DxGetVersionNumber return dxapi interface version, that is 1.0
 *
-* @return 
+* @return
 * Always return 1.0
 *
 * @remarks.