[KS]
[reactos.git] / reactos / drivers / ksfilter / ks / kcom.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Kernel Streaming
4 * FILE: drivers/ksfilter/ks/allocators.c
5 * PURPOSE: KS Allocator functions
6 * PROGRAMMER: Johannes Anderwald
7 Andrew Greenwood
8 */
9
10 #include "priv.h"
11
12 #define NDEBUG
13 #include <debug.h>
14
15 const GUID IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46}};
16
17 /* http://msdn2.microsoft.com/en-us/library/ms809781.aspx */
18 COMDDKAPI NTSTATUS NTAPI
19 KoCreateInstance(
20 IN REFCLSID ClassId,
21 IN IUnknown* UnkOuter OPTIONAL,
22 IN ULONG ClsContext,
23 IN REFIID InterfaceId,
24 OUT PVOID* Interface)
25 {
26 /* If UnkOuter isn't NULL, it must be IUnknown - TODO: CHECK THIS PARAM */
27 /* TODO: Check IRQL? */
28
29 DPRINT("KoCreateInstance called\n");
30
31 if ( ClsContext != CLSCTX_KERNEL_SERVER )
32 {
33 DPRINT("KoCreateInstance: ClsContext must be CLSCTX_KERNEL_SERVER\n");
34 return STATUS_INVALID_PARAMETER_3;
35 }
36
37 if (IsEqualGUIDAligned(InterfaceId, &IID_IUnknown))
38 {
39 DPRINT("KoCreateInstance: InterfaceId cannot be IID_IUnknown\n");
40 return STATUS_INVALID_PARAMETER_4;
41 }
42
43
44 /*
45 Find the desired interface and create an instance.
46
47 But we also need to supply a
48 pointer which will be set to a list of available interfaces, to
49 IoGetDeviceInterfaces.
50
51 We can then create a file based on this information and thus talk
52 to the appropriate device.
53
54 Useful references:
55 http://www.freelists.org/archives/wdmaudiodev/01-2003/msg00023.html
56
57 TODO
58 */
59
60 DPRINT("** FAKING SUCCESS **\n");
61
62 return STATUS_SUCCESS;
63 }