ReactOS  0.4.15-dev-3294-ge98684e
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 
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 */
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 }
#define IN
Definition: typedefs.h:39
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define COMDDKAPI
Definition: kcom.h:62
LONG NTSTATUS
Definition: precomp.h:26
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:240
#define STATUS_INVALID_PARAMETER_3
Definition: ntstatus.h:477
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define CLSCTX_KERNEL_SERVER
Definition: kcom.h:37
COMDDKAPI NTSTATUS NTAPI KoCreateInstance(IN REFCLSID ClassId, IN IUnknown *UnkOuter OPTIONAL, IN ULONG ClsContext, IN REFIID InterfaceId, OUT PVOID *Interface)
Definition: kcom.c:19
const GUID IID_IUnknown
Definition: kcom.c:15
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
#define OUT
Definition: typedefs.h:40
unsigned int ULONG
Definition: retypes.h:1
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
#define STATUS_INVALID_PARAMETER_4
Definition: ntstatus.h:478
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68