24#define MAX_REF_COUNT 100
26#define CHANNEL_SLOT_IS_IN_USE(x) (ChannelRefCount[(x)] > 0)
211 *TargetChannel =
NULL;
228 *TargetChannel = Channel;
263 if (!(ThisChannel->
Flags & 1))
429 *Channel = NewChannel;
464 *TargetChannel = FoundChannel;
472 *TargetChannel =
NULL;
504 *TargetChannel =
NULL;
527 LONG ChannelIndex, StartIndex;
539 ChannelFound =
FALSE;
573 *TargetChannel = FoundChannel;
588 return Channel->ChannelDestroy(Channel);
NTSTATUS NTAPI ChanMgrGetByIndex(IN LONG TargetIndex, IN PSAC_CHANNEL *TargetChannel)
NTSTATUS NTAPI ChanMgrGetChannelIndex(IN PSAC_CHANNEL Channel, IN PLONG ChannelIndex)
NTSTATUS NTAPI ChanMgrGetNextActiveChannel(IN PSAC_CHANNEL CurrentChannel, IN PULONG TargetIndex, OUT PSAC_CHANNEL *TargetChannel)
PSAC_CHANNEL ChannelArray[SAC_MAX_CHANNELS]
FORCEINLINE VOID ChannelDereferenceToZeroByIndex(IN LONG Index)
NTSTATUS NTAPI ChanMgrGetChannelCount(OUT PULONG ChannelCount)
FORCEINLINE LONG ChannelGetReferenceCount(IN LONG Index)
FORCEINLINE LONG ChannelDereferenceByIndex(IN LONG Index)
NTSTATUS NTAPI ChanMgrReapChannel(IN ULONG ChannelIndex)
NTSTATUS NTAPI ChanMgrGetChannelByName(IN PWCHAR Name, OUT PSAC_CHANNEL *Channel)
NTSTATUS NTAPI ChanMgrChannelDestroy(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI ChanMgrReleaseChannel(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI ChanMgrIsFull(OUT PBOOLEAN IsFull)
BOOLEAN NTAPI ChanMgrIsUniqueName(IN PWCHAR ChannelName)
NTSTATUS NTAPI ChanMgrGetByHandleAndFileObject(IN SAC_CHANNEL_ID ChannelId, IN PFILE_OBJECT FileObject, OUT PSAC_CHANNEL *TargetChannel)
FORCEINLINE VOID ChannelReferenceToOneByIndex(IN LONG Index)
FORCEINLINE LONG ChannelReferenceByIndex(IN LONG Index)
NTSTATUS NTAPI ChanMgrInitialize(VOID)
NTSTATUS NTAPI ChanMgrCreateChannel(OUT PSAC_CHANNEL *Channel, IN PSAC_CHANNEL_ATTRIBUTES Attributes)
NTSTATUS NTAPI ChanMgrShutdown(VOID)
FORCEINLINE VOID ChannelReferenceToOneByIndexWithLock(IN LONG Index)
#define CHANNEL_SLOT_IS_IN_USE(x)
NTSTATUS NTAPI ChanMgrCloseChannel(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI ChanMgrReapChannels(VOID)
SAC_CHANNEL_LOCK ChannelSlotLock[SAC_MAX_CHANNELS]
NTSTATUS NTAPI ChanMgrCloseChannelsWithFileObject(IN PFILE_OBJECT FileObject)
NTSTATUS NTAPI ChanMgrGenerateUniqueCmdName(IN PWCHAR ChannelName)
SAC_CHANNEL_LOCK ChannelCreateLock
LONG ChannelReaped[SAC_MAX_CHANNELS]
FORCEINLINE LONG ChannelReferenceByIndexWithLock(IN LONG Index)
LONG ChannelRefCount[SAC_MAX_CHANNELS]
FORCEINLINE VOID ChannelDereferenceByIndexWithLock(IN LONG Index)
BOOLEAN ChannelCreateEnabled
NTSTATUS NTAPI ChanMgrGetByHandle(IN SAC_CHANNEL_ID ChannelId, OUT PSAC_CHANNEL *TargetChannel)
FORCEINLINE PSAC_CHANNEL ChannelFromIndex(IN ULONG Index)
NTSTATUS NTAPI ChannelClose(IN PSAC_CHANNEL Channel)
NTSTATUS NTAPI ChannelGetName(IN PSAC_CHANNEL Channel, OUT PWCHAR *Name)
BOOLEAN NTAPI ChannelIsEqual(IN PSAC_CHANNEL Channel, IN PSAC_CHANNEL_ID ChannelId)
NTSTATUS NTAPI ChannelCreate(IN PSAC_CHANNEL Channel, IN PSAC_CHANNEL_ATTRIBUTES Attributes, IN SAC_CHANNEL_ID ChannelId)
BOOLEAN NTAPI ChannelIsActive(IN PSAC_CHANNEL Channel)
PSAC_CHANNEL CurrentChannel
NTSTATUS NTAPI ConMgrHandleEvent(IN ULONG EventCode, IN PSAC_CHANNEL Channel, OUT PVOID Data)
#define NT_SUCCESS(StatCode)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define InterlockedCompareExchangePointer
long __cdecl _InterlockedIncrement(_Interlocked_operand_ long volatile *_Addend)
long __cdecl _InterlockedExchange(_Interlocked_operand_ long volatile *_Target, long _Value)
long __cdecl _InterlockedDecrement(_Interlocked_operand_ long volatile *_Addend)
NTKERNELAPI NTSTATUS ExUuidCreate(OUT UUID *Uuid)
#define STATUS_DUPLICATE_NAME
#define STATUS_ALREADY_DISCONNECTED
#define STATUS_NOT_IMPLEMENTED
FORCEINLINE BOOLEAN ChannelHasNewOBufferData(IN PSAC_CHANNEL Channel)
#define CHECK_PARAMETER2(x)
#define SacAllocatePool(Length, Tag)
#define CHECK_PARAMETER3(x)
#define ChannelSlotUnlock(x)
#define CHECK_PARAMETER1(x)
#define CHECK_PARAMETER_WITH_STATUS(Condition, Status)
#define ChannelLockCreates()
FORCEINLINE VOID SacInitializeLock(IN PSAC_CHANNEL_LOCK Lock)
FORCEINLINE BOOLEAN ChannelHasNewIBufferData(IN PSAC_CHANNEL Channel)
#define CHECK_PARAMETER(x)
#define ChannelUnlockCreates()
#define CHANNEL_BLOCK_TAG
FORCEINLINE LONG ChannelGetIndex(IN PSAC_CHANNEL Channel)
#define SacFreePool(Pointer)
LONG ChannelHasNewOBufferData
#define RtlZeroMemory(Destination, Length)
#define STATUS_UNSUCCESSFUL
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject