Synchronize with trunk revision 59636 (just before Alex's CreateProcess revamp).
[reactos.git] / 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 const GUID IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46}};
13
14 /* http://msdn2.microsoft.com/en-us/library/ms809781.aspx */
15 COMDDKAPI NTSTATUS NTAPI
16 KoCreateInstance(
17 IN REFCLSID ClassId,
18 IN IUnknown* UnkOuter OPTIONAL,
19 IN ULONG ClsContext,
20 IN REFIID InterfaceId,
21 OUT PVOID* Interface)
22 {
23 /* If UnkOuter isn't NULL, it must be IUnknown - TODO: CHECK THIS PARAM */
24 /* TODO: Check IRQL? */
25
26 DPRINT("KoCreateInstance called\n");
27
28 if ( ClsContext != CLSCTX_KERNEL_SERVER )
29 {
30 DPRINT("KoCreateInstance: ClsContext must be CLSCTX_KERNEL_SERVER\n");
31 return STATUS_INVALID_PARAMETER_3;
32 }
33
34 if (IsEqualGUIDAligned(InterfaceId, &IID_IUnknown))
35 {
36 DPRINT("KoCreateInstance: InterfaceId cannot be IID_IUnknown\n");
37 return STATUS_INVALID_PARAMETER_4;
38 }
39
40
41 /*
42 Find the desired interface and create an instance.
43
44 But we also need to supply a
45 pointer which will be set to a list of available interfaces, to
46 IoGetDeviceInterfaces.
47
48 We can then create a file based on this information and thus talk
49 to the appropriate device.
50
51 Useful references:
52 http://www.freelists.org/archives/wdmaudiodev/01-2003/msg00023.html
53
54 TODO
55 */
56
57 DPRINT("** FAKING SUCCESS **\n");
58
59 return STATUS_SUCCESS;
60 }