Author: silverblade
Date: Sun Jul 8 17:53:39 2007
New Revision: 27474
URL:
http://svn.reactos.org/svn/reactos?rev=27474&view=rev
Log:
A few modifications necessary to get PortCls and KS to build. PortCls
needs restructuring but that will be done later.
Added:
trunk/reactos/drivers/wdm/audio/drm/drmk/stubs.cpp
- copied unchanged from r26560, trunk/reactos/drivers/wdm/audio/drm/drmk/stubs.c
trunk/reactos/drivers/wdm/wdm.rbuild
- copied unchanged from r26560, trunk/reactos/drivers/wdm/directory.rbuild
Removed:
trunk/reactos/drivers/wdm/audio/drm/drmk/stubs.c
trunk/reactos/drivers/wdm/directory.rbuild
Modified:
trunk/reactos/drivers/ksfilter/ks/irp.c
trunk/reactos/drivers/ksfilter/ks/ks.def
trunk/reactos/drivers/ksfilter/ks/ks.rbuild
trunk/reactos/drivers/wdm/audio/backpln/portcls/helper/ResourceList.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/port/factory.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
trunk/reactos/drivers/wdm/audio/backpln/stdunk/stdunk.cpp
trunk/reactos/drivers/wdm/audio/drivers/mpu401_ks/adapter.cpp
trunk/reactos/drivers/wdm/audio/drivers/mpu401_ks/mpu401.rbuild
trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild
trunk/reactos/include/ddk/drmk.h
trunk/reactos/include/ddk/kcom.h
trunk/reactos/include/ddk/portcls.h
trunk/reactos/include/ddk/stdunk.h
trunk/reactos/include/ddk/winddk.h
trunk/reactos/include/psdk/ks.h
Modified: trunk/reactos/drivers/ksfilter/ks/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/irp.c?…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/irp.c (original)
+++ trunk/reactos/drivers/ksfilter/ks/irp.c Sun Jul 8 17:53:39 2007
@@ -280,6 +280,13 @@
IN PIRP Irp)
{
/* Calls a dispatch routine corresponding to the function code of the IRP */
+
+ /*
+ First we need to get the dispatch table. An opaque header is pointed to by
+ FsContext. The first element points to this table. This table is the key
+ to dispatching the IRP correctly.
+ */
+
UNIMPLEMENTED;
return STATUS_UNSUCCESSFUL;
}
Modified: trunk/reactos/drivers/ksfilter/ks/ks.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/ks.def…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/ks.def (original)
+++ trunk/reactos/drivers/ksfilter/ks/ks.def Sun Jul 8 17:53:39 2007
@@ -110,3 +110,6 @@
KsSetTargetState@8
KsSynchronousIoControlDevice@32
KsInitializeDriver@12
+
+; Kernel COM
+KoCreateInstance@20
Modified: trunk/reactos/drivers/ksfilter/ks/ks.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/ks.rbu…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/ks.rbuild (original)
+++ trunk/reactos/drivers/ksfilter/ks/ks.rbuild Sun Jul 8 17:53:39 2007
@@ -7,6 +7,7 @@
<define name="__USE_W32API" />
<define name="BUILDING_KS" />
<define name="_NTDDK_" />
+ <define name="_COMDDK_" />
<file>ks.rc</file>
<file>allocators.c</file>
<file>clocks.c</file>
@@ -18,4 +19,5 @@
<file>properties.c</file>
<file>topology.c</file>
<file>worker.c</file>
+ <file>kcom.c</file>
</module>
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/helper/ResourceList.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/helper/ResourceList.c (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/helper/ResourceList.c Sun Jul 8
17:53:39 2007
@@ -51,7 +51,8 @@
{
struct CUnknown* this = CONTAINING_RECORD(this_container, struct CUnknown,
IUnknown);
- InterlockedIncrement(&this->m_ref_count);
+/* fixme */
+/* ExInterlockedIncrement(&this->m_ref_count); */
return this->m_ref_count;
}
@@ -62,7 +63,8 @@
{
struct CUnknown* this = CONTAINING_RECORD(this_container, struct CUnknown,
IUnknown);
- InterlockedDecrement(&this->m_ref_count);
+/* fixme */
+/* ExInterlockedDecrement(&this->m_ref_count); */
if ( this->m_ref_count == 0 )
{
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port/factory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port/factory.c (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port/factory.c Sun Jul 8 17:53:39
2007
@@ -5,8 +5,12 @@
by Andrew Greenwood
*/
+#define INITGUID
+
#include "../private.h"
#include <portcls.h>
+#include <ks.h>
+#include <kcom.h>
#include "port.h"
/*
@@ -19,14 +23,17 @@
{
/*
ClassId can be one of the following:
- CLSID_PortDMus -> IPortDMus (dmusicks.h)
+ CLSID_PortDMus -> IPortDMus (dmusicks.h) -- TODO
CLSID_PortMidi -> IPortMidi
CLSID_PortTopology -> IPortTopology
CLSID_PortWaveCyclic -> IPortWaveCyclic
CLSID_PortWavePci -> IPortWavePci
+
+ TODO: What about PortWavePciStream?
*/
PPORT new_port = NULL;
+ NTSTATUS status = STATUS_UNSUCCESSFUL;
if ( ! OutPort )
{
@@ -34,26 +41,32 @@
return STATUS_INVALID_PARAMETER;
}
- /* FIXME - do not hack, for it is bad */
- //new_port = new PPortMidi;
+ if ( ( IsEqualGUIDAligned(ClassId, &CLSID_PortMidi) ) ||
+ ( IsEqualGUIDAligned(ClassId, &CLSID_PortTopology) ) ||
+ ( IsEqualGUIDAligned(ClassId, &CLSID_PortWaveCyclic) ) ||
+ ( IsEqualGUIDAligned(ClassId, &CLSID_PortWavePci) ) )
+ {
+ DPRINT("Calling KoCreateInstance\n");
+ /* Call KS.SYS's Kernel-mode COM function */
+ status = KoCreateInstance(ClassId, NULL, CLSCTX_KERNEL_SERVER, &IID_IPort,
&new_port);
+ }
+ else
+ {
-// STD_CREATE_BODY_(CPortMidi, (PUNKNOWN) &new_port, NULL, 0, PUNKNOWN);
+ DPRINT("PcNewPort received a CLSID it does not deal with\n");
+ status = STATUS_NOT_SUPPORTED;
+ }
-/*
- if ( ClassId == CLSID_PortMidi )
- new_port = new IPortMidi;
- else if ( ClassId == CLSID_PortTopology )
- new_port = new IPortTopology;
- else if ( ClassId == CLSID_PortWaveCyclic )
- new_port = new IPortWaveCyclic;
- else if ( ClassId == CLSID_PortWavePci )
- new_port = new IPortWavePci;
- else
-*/
- return STATUS_NOT_SUPPORTED;
+ /* If an unsupported CLSID was handed to us, or the creation failed, we fail */
+ if ( status != STATUS_SUCCESS )
+ {
+ return status;
+ }
/* Fill the caller's PPORT* to point to the new port */
*OutPort = new_port;
+ DPRINT("PcNewPort succeeded\n");
+
return STATUS_SUCCESS;
}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild Sun Jul 8 17:53:39
2007
@@ -4,6 +4,7 @@
<importlibrary definition="portcls.def" />
<define name="__USE_W32API" />
<define name="_NTDDK_" />
+ <define name="DBG" />
<include base="portcls">../include</include>
<library>ntoskrnl</library>
<library>ks</library>
Modified: trunk/reactos/drivers/wdm/audio/backpln/stdunk/stdunk.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/stdunk/stdunk.cpp (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/stdunk/stdunk.cpp Sun Jul 8 17:53:39 2007
@@ -17,12 +17,13 @@
This is a little bit of a hack, but ReactOS doesn't seem to have this
defined. TODO: Make the aligned test truly aligned.
*/
-
+#if 0
#define IsEqualGUID(a, b) \
RtlEqualMemory(&a, &b, sizeof(GUID))
#define IsEqualGUIDAligned(a, b) \
IsEqualGUID(a, b)
+#endif
/*
Shut the linker up - can also pass -defsym ___cxa_pure_virtual=0
@@ -43,7 +44,7 @@
}
else
{
- m_outer_unknown = PUNKNOWN(dynamic_cast<PNONDELEGATINGUNKNOWN>(this));
+ m_outer_unknown = PUNKNOWN(static_cast<PNONDELEGATINGUNKNOWN>(this));
}
}
Modified: trunk/reactos/drivers/wdm/audio/drivers/mpu401_ks/adapter.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/drivers/mpu401_ks/adapter.cpp (original)
+++ trunk/reactos/drivers/wdm/audio/drivers/mpu401_ks/adapter.cpp Sun Jul 8 17:53:39
2007
@@ -15,6 +15,9 @@
#define PUT_GUIDS_HERE
#define INITGUID
+#include <debug.h>
+#include <ntddk.h>
+
#include <portcls.h>
extern "C"
@@ -24,6 +27,8 @@
IN PIRP pIrp,
IN PRESOURCELIST ResourceList)
{
+ DPRINT1("MPU401_KS StartDevice called\n");
+
if ( ! ResourceList )
return STATUS_INVALID_PARAMETER;
@@ -32,41 +37,53 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
+ DPRINT1("Sufficient resources available :)\n");
+
PPORT port;
PMINIPORT miniport;
NTSTATUS status;
+ DPRINT1("Calling PcNewPort with CLSID_PortMidi\n");
status = PcNewPort(&port, CLSID_PortMidi);
if ( ! NT_SUCCESS(status) )
{
+ DPRINT("PcNewPort FAILED with status 0x%08x\n", status);
return status;
}
+ DPRINT1("Calling PcNewMiniport with CLSID_MiniportDriverUart\n");
status = PcNewMiniport(&miniport, CLSID_MiniportDriverUart);
if ( ! NT_SUCCESS(status) )
{
+ DPRINT1("PcNewMiniport FAILED with status 0x%08x\n", status);
return status;
}
+ DPRINT1("Calling Init of port object\n");
status = port->Init(pDeviceObject, pIrp, miniport, NULL, ResourceList);
if ( ! NT_SUCCESS(status) )
{
+ DPRINT1("Init FAILED with status 0x%08x\n", status);
return status;
}
+ DPRINT1("Registering subdevice via PcRegisterSubdevice\n");
status = PcRegisterSubdevice(pDeviceObject, L"Uart", port);
if ( ! NT_SUCCESS(status) )
{
/* just print an error here */
+ DPRINT1("PcRegisterSubdevice FAILED with status 0x%08x\n", status);
}
miniport->Release();
port->Release();
+
+ DPRINT1("Device started\n");
return status;
}
@@ -78,6 +95,7 @@
IN PVOID Context1,
IN PVOID Context2)
{
+ DPRINT1("MPU401_KS AddDevice called, redirecting to
PcAddAdapterDevice\n");
return PcAddAdapterDevice((PDRIVER_OBJECT) Context1,
(PDEVICE_OBJECT) Context2,
StartDevice,
@@ -85,14 +103,41 @@
0);
}
+extern "C"
+{
-extern "C"
-NTSTATUS
+NTSTATUS NTAPI
DriverEntry(
- IN PVOID Context1,
- IN PVOID Context2)
+ IN PDRIVER_OBJECT Context1,
+ IN PUNICODE_STRING Context2)
{
- return PcInitializeAdapterDriver((PDRIVER_OBJECT) Context1,
+ PDEVICE_OBJECT DeviceObject;
+ UNICODE_STRING DeviceName =
RTL_CONSTANT_STRING(L"\\Device\\MPU401Static");
+
+// KeBugCheck(0x0000007F);
+ DPRINT1("MPU401_KS DriverEntry called, redirecting to
PcInitializeAdapterDriver\n");
+
+ NTSTATUS status = PcInitializeAdapterDriver((PDRIVER_OBJECT) Context1,
(PUNICODE_STRING) Context2,
(PDRIVER_ADD_DEVICE) AddDevice);
+ DPRINT1("Result was 0x%08x\n", status);
+
+ /* Create a device (this will be handled by PnP manager really but we fake for now
*/
+
+/*
+ DPRINT1("Creating device\n");
+ status = IoCreateDevice(Context1,
+ 0,
+ &DeviceName,
+ FILE_DEVICE_SOUND,
+ 0,
+ FALSE,
+ &DeviceObject);
+
+ DPRINT1("Result was 0x%08x\n", status);
+*/
+
+ return status;
};
+
+}
Modified: trunk/reactos/drivers/wdm/audio/drivers/mpu401_ks/mpu401.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drivers/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/drivers/mpu401_ks/mpu401.rbuild (original)
+++ trunk/reactos/drivers/wdm/audio/drivers/mpu401_ks/mpu401.rbuild Sun Jul 8 17:53:39
2007
@@ -1,10 +1,11 @@
-<module name="mpu401_ks" type="exportdriver"
installbase="system32/drivers" installname="mpu401_ks.sys"
allowwarnings="true">
+<module name="mpu401" type="kernelmodedriver"
installbase="system32/drivers" installname="mpu401.sys"
allowwarnings="true" entrypoint="DriverEntry">
+ <linkerflag>-Wl,--entry,_DriverEntry@8</linkerflag>
<include base="mpu401">.</include>
<include base="mpu401">..</include>
- <importlibrary definition="mpu401.def" />
- <library>ntoskrnl</library>
- <library>portcls</library>
+ <library>ntoskrnl</library>
+ <library>portcls</library>
+ <define name="DBG" />
<define name="__USE_W32API" />
- <file>mpu401.rc</file>
+ <!--file>mpu401.rc</file-->
<file>adapter.cpp</file>
</module>
Modified: trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drm/drmk…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild (original)
+++ trunk/reactos/drivers/wdm/audio/drm/drmk/drmk.rbuild Sun Jul 8 17:53:39 2007
@@ -7,5 +7,5 @@
<define name="__USE_W32API" />
<define name="BUILDING_DRMK" />
<file>drmk.rc</file>
- <file>stubs.c</file>
+ <file>stubs.cpp</file>
</module>
Removed: trunk/reactos/drivers/wdm/audio/drm/drmk/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/drm/drmk…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/drm/drmk/stubs.c (original)
+++ trunk/reactos/drivers/wdm/audio/drm/drmk/stubs.c (removed)
@@ -1,131 +1,0 @@
-/*
- ReactOS Kernel Streaming
- Digital Rights Management
-
- Please see COPYING in the top-level directory for license information.
-
- Author: Andrew Greenwood
-
- Notes:
- This is just a file containing stub functions. The DRMK kernel library
- deals with Digital Rights Management. This is not essential for the
- operation of audio/video (except in the cases where content has digital
- rights information) but is needed for linking with PORTCLS.
-*/
-
-#include <drmk.h>
-
-/*
- Provide a driver interface consisting of functions for handling DRM
- protected content
-*/
-/*
- * @unimplemented
- */
-NTAPI NTSTATUS
-DrmAddContentHandlers(
- IN ULONG ContentId,
- IN PVOID *paHandlers,
- IN ULONG NumHandlers)
-{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
-
-/*
- Creates a DRM content ID to identify a KS audio stream containing
- mixed content from several input streams.
-*/
-/*
- * @unimplemented
- */
-NTAPI NTSTATUS
-DrmCreateContentMixed(
- IN PULONG paContentId,
- IN ULONG cContentId,
- OUT PULONG pMixedContentId)
-{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
-
-/*
- Deletes a DRM content ID.
-*/
-/*
- * @unimplemented
- */
-NTAPI NTSTATUS
-DrmDestroyContent(
- IN ULONG ContentId)
-{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
-
-/*
- Authenticates a driver, then passes it the DRM content ID, along with
- the content rights which have been assigned to a stream.
-*/
-/*
- * @unimplemented
- */
-NTAPI NTSTATUS
-DrmForwardContentToDeviceObject(
- IN ULONG ContentId,
- IN PVOID Reserved,
- IN PCDRMFORWARD DrmForward)
-{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
-
-/*
- Obsolete because it forces the system to run at a lower DRM security
- level. Returns STATUS_NOT_IMPLEMENTED if a pin associated with
- FileObject doesnt support the rights assigned to ContentId.
-*/
-/*
- * @unimplemented
- */
-NTAPI NTSTATUS
-DrmForwardContentToFileObject(
- IN ULONG ContentId,
- IN PFILE_OBJECT FileObject)
-{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
-
-/*
- Similar to DrmForwardContentToDeviceObject, except this works with a driver
- object rather than just a driver.
-*/
-/*
- * @unimplemented
- */
-NTAPI NTSTATUS
-DrmForwardContentToInterface(
- IN ULONG ContentId,
- IN PUNKNOWN pUnknown,
- IN ULONG NumMethods)
-{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
-
-/*
- Retrieves DRM Content rights that have been assigend to a DRM Content ID.
-*/
-/*
- * @unimplemented
- */
-NTAPI NTSTATUS
-DrmGetContentRights(
- IN ULONG ContentId,
- OUT PDRMRIGHTS DrmRights)
-{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
-
Removed: trunk/reactos/drivers/wdm/directory.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/directory.rbui…
==============================================================================
--- trunk/reactos/drivers/wdm/directory.rbuild (original)
+++ trunk/reactos/drivers/wdm/directory.rbuild (removed)
@@ -1,3 +1,0 @@
-<directory name="audio">
- <xi:include href="audio/directory.rbuild" />
-</directory>
Modified: trunk/reactos/include/ddk/drmk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/drmk.h?rev=274…
==============================================================================
--- trunk/reactos/include/ddk/drmk.h (original)
+++ trunk/reactos/include/ddk/drmk.h Sun Jul 8 17:53:39 2007
@@ -7,6 +7,10 @@
#ifndef DRMK_H
#define DRMK_H
+
+#include <ntddk.h>
+#include <debug.h>
+#include <punknown.h>
typedef struct
{
@@ -28,6 +32,11 @@
Digital Rights Management Functions
TODO: Check calling convention
*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
NTAPI NTSTATUS
DrmAddContentHandlers(
@@ -67,5 +76,8 @@
IN ULONG ContentId,
OUT PDRMRIGHTS DrmRights);
+#ifdef __cplusplus
+}
+#endif
#endif
Modified: trunk/reactos/include/ddk/kcom.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/kcom.h?rev=274…
==============================================================================
--- trunk/reactos/include/ddk/kcom.h (original)
+++ trunk/reactos/include/ddk/kcom.h Sun Jul 8 17:53:39 2007
@@ -1,5 +1,3 @@
-
-
#if !defined(_KS_)
#error KS.H must be included before KCOM.H
#endif
Modified: trunk/reactos/include/ddk/portcls.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/portcls.h?rev=…
==============================================================================
--- trunk/reactos/include/ddk/portcls.h (original)
+++ trunk/reactos/include/ddk/portcls.h Sun Jul 8 17:53:39 2007
@@ -123,11 +123,19 @@
#ifndef PORTCLS_H
#define PORTCLS_H
-#include <wdm.h>
-
-#include <windef.h>
+#ifdef __cplusplus
+extern "C"
+{
+ #include <wdm.h>
+}
+#else
+ #include <wdm.h>
+#endif
+
+//#include <windef.h>
#include <ks.h>
#include <punknown.h>
+#include <ntddk.h>
#include <drmk.h>
/* TODO */
@@ -400,7 +408,7 @@
IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Untranslated) PURE;
STDMETHOD_(NTSTATUS, AddEntryFromParent)( THIS_
- IN struct IResourceList* Parent,
+ IN IResourceList* Parent,
IN CM_RESOURCE_TYPE Type,
IN ULONG Index) PURE;
@@ -427,7 +435,7 @@
IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Untranslated); \
\
STDMETHODIMP_(NTSTATUS) AddEntryFromParent( \
- IN struct IResourceList* Parent, \
+ IN IResourceList* Parent, \
IN CM_RESOURCE_TYPE Type, \
IN ULONG Index); \
\
@@ -893,6 +901,11 @@
IPort Interface
*/
+#if 0
+#define STATIC_IPort 0xb4c90a25L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11,
0xb5, 0x44
+DEFINE_GUIDSTRUCT("0xB4C90A25-5791-11d0-86f9-00a0c911b544", IID_IPort);
+#define IID_IPort DEFINE_GUIDNAMED(IID_IPort)
+#endif
DEFINE_GUID(IID_IPort,
0xb4c90a25L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
@@ -955,6 +968,15 @@
IPortMidi Interface
*/
+#if 0
+#define STATIC_IID_IPortMidi \
+ 0xb4c90a43L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
+DEFINE_GUIDSTRUCT("0xB4C90A43-5791-11d0-86f9-00a0c911b544", IID_IPortMidi);
+#define IID_IPortMidi DEFINE_GUIDNAMED(IID_IPortMidi)
+#endif
+
+DEFINE_GUID(IID_IPortMidi,
+ 0xb4c90a40L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
DEFINE_GUID(CLSID_PortMidi,
0xb4c90a43L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
@@ -984,6 +1006,18 @@
/* ===============================================================
IPortWaveCyclic Interface
*/
+
+#if 0
+#define STATIC_IPortWaveCyclic \
+ 0xb4c90a26L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
+DEFINE_GUIDSTRUCT("0xB4C90A26-5791-11d0-86f9-00a0c911b544",
IID_IPortWaveCyclic);
+#define IID_IPortWaveCyclic DEFINE_GUIDNAMED(IID_IPortWaveCyclic)
+#endif
+
+DEFINE_GUID(IID_IPortWaveCyclic,
+ 0xb4c90a26L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
+DEFINE_GUID(CLSID_PortWaveCyclic,
+ 0xb4c90a2aL, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
DECLARE_INTERFACE_(IPortWaveCyclic, IPort)
{
@@ -1019,6 +1053,18 @@
/* ===============================================================
IPortWavePci Interface
*/
+
+#if 0
+#define STATIC_IID_IPortWavePci \
+ 0xb4c90a50L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
+DEFINE_GUIDSTRUCT("0xB4C90A50-5791-11d0-86f9-00a0c911b544", IID_IPortWavePci);
+#define IID_IPortWavePci DEFINE_GUIDNAMED(IID_IPortWavePci)
+#endif
+
+DEFINE_GUID(IID_IPortWavePci,
+ 0xb4c90a50L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
+DEFINE_GUID(CLSID_PortWavePci,
+ 0xb4c90a54L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
DECLARE_INTERFACE_(IPortWavePci, IPort)
{
@@ -1049,6 +1095,14 @@
IPortWavePciStream Interface
*/
+#define STATIC_IPortWavePciStream \
+ 0xb4c90a51L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
+
+DEFINE_GUIDSTRUCT("0xB4C90A51-5791-11d0-86f9-00a0c911b544",
IID_IPortWavePciStream);
+
+/* ... */
+
+
/* ===============================================================
IMiniPort Interface
@@ -1133,12 +1187,25 @@
IMiniportDriverUart Interface
*/
+DEFINE_GUID(IID_MiniportDriverUart,
+ 0xb4c90ae1L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
DEFINE_GUID(CLSID_MiniportDriverUart,
0xb4c90ae1L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
/* ===============================================================
IPortTopology Interface
*/
+#if 0
+#define STATIC_IPortTopology \
+ 0xb4c90a30L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44
+DEFINE_GUIDSTRUCT("0xB4C90A30-5791-11d0-86f9-00a0c911b544",
IID_IPortTopology);
+#define IID_IPortTopology DEFINE_GUIDNAMED(IID_IPortTopology)
+#endif
+
+DEFINE_GUID(IID_IPortTopology,
+ 0xb4c90a30L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
+DEFINE_GUID(CLSID_PortTopology,
+ 0xb4c90a32L, 0x5791, 0x11d0, 0x86, 0xf9, 0x00, 0xa0, 0xc9, 0x11, 0xb5, 0x44);
DECLARE_INTERFACE_(IPortTopology, IPort)
{
Modified: trunk/reactos/include/ddk/stdunk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/stdunk.h?rev=2…
==============================================================================
--- trunk/reactos/include/ddk/stdunk.h (original)
+++ trunk/reactos/include/ddk/stdunk.h Sun Jul 8 17:53:39 2007
@@ -90,7 +90,7 @@
: CUnknown(outer_unknown) \
{ }
-#else /* Not C++ */
+#else /* Not C++ - this is probably very buggy... */
STDMETHODCALLTYPE
NTSTATUS
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=2…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h (original)
+++ trunk/reactos/include/ddk/winddk.h Sun Jul 8 17:53:39 2007
@@ -110,6 +110,18 @@
#define ALIGN_UP_POINTER(p, t) \
(ALIGN_DOWN_POINTER(((ULONG_PTR)(p) + sizeof(t) - 1), t))
+
+/*
+ * GUID Comparison
+ */
+
+#ifndef __IID_ALIGNED__
+ #define __IID_ALIGNED__
+
+ #define IsEqualGUIDAligned(guid1, guid2) \
+ ( (*(PLONGLONG)(guid1) == *(PLONGLONG)(guid2)) && \
+ (*((PLONGLONG)(guid1) + 1) == *((PLONGLONG)(guid2) + 1)) )
+#endif
/*
** Forward declarations
@@ -5726,7 +5738,7 @@
return Entry;
}
-#if !defined(_WINBASE_H) || _WIN32_WINNT < 0x0501
+#if !defined(_WINBASE_) || _WIN32_WINNT < 0x0501
NTKERNELAPI
PSLIST_ENTRY
Modified: trunk/reactos/include/psdk/ks.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=2747…
==============================================================================
--- trunk/reactos/include/psdk/ks.h (original)
+++ trunk/reactos/include/psdk/ks.h Sun Jul 8 17:53:39 2007
@@ -30,6 +30,8 @@
#ifndef KS_H
#define KS_H
+#define _KS_
+
#if __GNUC__ >=3
#pragma GCC system_header
#endif
@@ -37,6 +39,12 @@
#ifdef __cplusplus
extern "C" {
#endif
+
+/*
+Not sure if this is correct but it causes problems if not included. Can't
+seem to compile without this...
+*/
+#include "ntddk.h"
#ifdef BUILDING_KS
#define KSDDKAPI
@@ -49,6 +57,36 @@
typedef PVOID PKSWORKER;
+
+/* ===============================================================
+ GUID definition helpers
+*/
+
+#ifndef _NTRTL_
+ #ifndef DEFINE_GUIDEX
+ /* CDECL is used here in MS DDK but does this really work?? */
+ #define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name
+ #endif
+
+ #ifndef STATICGUIDOF
+ #define STATICGUIDOF(guid) STATIC_##guid
+ #endif
+#endif
+
+#if defined(__cplusplus) && _MSC_VER >= 1100
+ #define DEFINE_GUIDSTRUCT(guid, name) struct __declspec(uuid(guid)) name
+ #define DEFINE_GUIDNAMED(name) __uidof(struct name)
+#else
+ #define DEFINE_GUIDSTRUCT(guid, name) DEFINE_GUIDEX(name)
+ #define DEFINE_GUIDNAMED(name) name
+#endif
+
+
+#define STATIC_GUID_NULL \
+0x00000000L, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+DEFINE_GUIDSTRUCT("00000000-0000-0000-0000-000000000000", GUID_NULL);
+#define GUID_NULL DEFINE_GUIDNAMED(GUID_NULL)
+
/* ===============================================================
I/O Control Codes
@@ -102,6 +140,86 @@
0x006, \
METHOD_NEITHER, \
FILE_ANY_ACCESS)
+
+
+/* ===============================================================
+ Categories
+*/
+
+#define STATIC_KSCATEGORY_BRIDGE \
+ 0x085AFF00L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
+DEFINE_GUIDSTRUCT("085AFF00-62CE-11CF-A5D6-28DB04C10000", KSCATEGORY_BRIDGE);
+#define KSCATEGORY_BRIDGE DEFINE_GUIDNAMED(KSCATEGORY_BRIDGE)
+
+#define STATIC_KSCATEGORY_CAPTURE \
+ 0x65E8773DL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
+DEFINE_GUIDSTRUCT("65E8773D-8F56-11D0-A3B9-00A0C9223196", KSCATEGORY_CAPTURE);
+#define KSCATEGORY_CAPTURE DEFINE_GUIDNAMED(KSCATEGORY_CAPTURE)
+
+#define STATIC_KSCATEGORY_RENDER \
+ 0x65E8773EL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
+DEFINE_GUIDSTRUCT("65E8773E-8F56-11D0-A3B9-00A0C9223196", KSCATEGORY_RENDER);
+#define KSCATEGORY_RENDER DEFINE_GUIDNAMED(KSCATEGORY_RENDER)
+
+#define STATIC_KSCATEGORY_MIXER \
+ 0xAD809C00L, 0x7B88, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
+DEFINE_GUIDSTRUCT("AD809C00-7B88-11D0-A5D6-28DB04C10000", KSCATEGORY_MIXER);
+#define KSCATEGORY_MIXER DEFINE_GUIDNAMED(KSCATEGORY_MIXER)
+
+#define STATIC_KSCATEGORY_SPLITTER \
+ 0x0A4252A0L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
+DEFINE_GUIDSTRUCT("0A4252A0-7E70-11D0-A5D6-28DB04C10000",
KSCATEGORY_SPLITTER);
+#define KSCATEGORY_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_SPLITTER)
+
+#define STATIC_KSCATEGORY_DATACOMPRESSOR \
+ 0x1E84C900L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
+DEFINE_GUIDSTRUCT("1E84C900-7E70-11D0-A5D6-28DB04C10000",
KSCATEGORY_DATACOMPRESSOR);
+#define KSCATEGORY_DATACOMPRESSOR DEFINE_GUIDNAMED(KSCATEGORY_DATACOMPRESSOR)
+
+#define STATIC_KSCATEGORY_DATADECOMPRESSOR \
+ 0x2721AE20L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
+DEFINE_GUIDSTRUCT("2721AE20-7E70-11D0-A5D6-28DB04C10000",
KSCATEGORY_DATADECOMPRESSOR);
+#define KSCATEGORY_DATADECOMPRESSOR DEFINE_GUIDNAMED(KSCATEGORY_DATADECOMPRESSOR)
+
+#define STATIC_KSCATEGORY_DATATRANSFORM \
+ 0x2EB07EA0L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
+DEFINE_GUIDSTRUCT("2EB07EA0-7E70-11D0-A5D6-28DB04C10000",
KSCATEGORY_DATATRANSFORM);
+#define KSCATEGORY_DATATRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_DATATRANSFORM)
+
+#define STATIC_KSCATEGORY_COMMUNICATIONSTRANSFORM \
+ 0xCF1DDA2CL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
+DEFINE_GUIDSTRUCT("CF1DDA2C-9743-11D0-A3EE-00A0C9223196",
KSCATEGORY_COMMUNICATIONSTRANSFORM);
+#define KSCATEGORY_COMMUNICATIONSTRANSFORM
DEFINE_GUIDNAMED(KSCATEGORY_COMMUNICATIONSTRANSFORM)
+
+#define STATIC_KSCATEGORY_INTERFACETRANSFORM \
+ 0xCF1DDA2DL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
+DEFINE_GUIDSTRUCT("CF1DDA2D-9743-11D0-A3EE-00A0C9223196",
KSCATEGORY_INTERFACETRANSFORM);
+#define KSCATEGORY_INTERFACETRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_INTERFACETRANSFORM)
+
+#define STATIC_KSCATEGORY_MEDIUMTRANSFORM \
+ 0xCF1DDA2EL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
+DEFINE_GUIDSTRUCT("CF1DDA2E-9743-11D0-A3EE-00A0C9223196",
KSCATEGORY_MEDIUMTRANSFORM);
+#define KSCATEGORY_MEDIUMTRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_MEDIUMTRANSFORM)
+
+#define STATIC_KSCATEGORY_FILESYSTEM \
+ 0x760FED5EL, 0x9357, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
+DEFINE_GUIDSTRUCT("760FED5E-9357-11D0-A3CC-00A0C9223196",
KSCATEGORY_FILESYSTEM);
+#define KSCATEGORY_FILESYSTEM DEFINE_GUIDNAMED(KSCATEGORY_FILESYSTEM)
+
+#define STATIC_KSCATEGORY_CLOCK \
+ 0x53172480L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00
+DEFINE_GUIDSTRUCT("53172480-4791-11D0-A5D6-28DB04C10000", KSCATEGORY_CLOCK);
+#define KSCATEGORY_CLOCK DEFINE_GUIDNAMED(KSCATEGORY_CLOCK)
+
+#define STATIC_KSCATEGORY_PROXY \
+ 0x97EBAACAL, 0x95BD, 0x11D0, 0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
+DEFINE_GUIDSTRUCT("97EBAACA-95BD-11D0-A3EA-00A0C9223196", KSCATEGORY_PROXY);
+#define KSCATEGORY_PROXY DEFINE_GUIDNAMED(KSCATEGORY_PROXY)
+
+#define STATIC_KSCATEGORY_QUALITY \
+ 0x97EBAACBL, 0x95BD, 0x11D0, 0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96
+DEFINE_GUIDSTRUCT("97EBAACB-95BD-11D0-A3EA-00A0C9223196", KSCATEGORY_QUALITY);
+#define KSCATEGORY_QUALITY DEFINE_GUIDNAMED(KSCATEGORY_QUALITY)
/* ===============================================================
@@ -2315,12 +2433,13 @@
http://www.osronline.com/ddkx/stream/avstream_5q9f.htm
*/
+#if defined(_NTDDK_)
KSDDKAPI NTSTATUS NTAPI
KsInitializeDriver(
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath,
- IN const KSDEVICE_DESCRIPTOR *Descriptor OPTIONAL
- );
+ IN const KSDEVICE_DESCRIPTOR *Descriptor OPTIONAL);
+#endif
#if 0
typedef void (*PFNKSFILTERFACTORYPOWER)(