ReactOS 0.4.15-dev-8241-g63935f8
kcom.c
Go to the documentation of this file.
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 "precomp.h"
11
12#define NDEBUG
13#include <debug.h>
14
15const 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 */
20 IN REFCLSID ClassId,
21 IN IUnknown* UnkOuter OPTIONAL,
22 IN ULONG ClsContext,
23 IN REFIID InterfaceId,
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");
35 }
36
37 if (IsEqualGUIDAligned(InterfaceId, &IID_IUnknown))
38 {
39 DPRINT("KoCreateInstance: InterfaceId cannot be IID_IUnknown\n");
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}
LONG NTSTATUS
Definition: precomp.h:26
const GUID IID_IUnknown
Definition: kcom.c:15
COMDDKAPI NTSTATUS NTAPI KoCreateInstance(IN REFCLSID ClassId, IN IUnknown *UnkOuter OPTIONAL, IN ULONG ClsContext, IN REFIID InterfaceId, OUT PVOID *Interface)
Definition: kcom.c:19
#define COMDDKAPI
Definition: kcom.h:62
#define CLSCTX_KERNEL_SERVER
Definition: kcom.h:37
#define STATUS_INVALID_PARAMETER_4
Definition: ntstatus.h:478
#define STATUS_INVALID_PARAMETER_3
Definition: ntstatus.h:477
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235