ReactOS  0.4.15-dev-2504-g2b52f3b
pool.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

NDIS_STATUS PrependPacket (PNDIS_PACKET Packet, PCHAR Data, UINT Len, BOOLEAN Copy)
 

Function Documentation

◆ PrependPacket()

NDIS_STATUS PrependPacket ( PNDIS_PACKET  Packet,
PCHAR  Data,
UINT  Len,
BOOLEAN  Copy 
)

Definition at line 394 of file mockbuffer.c.

395  {
398  PCHAR NewBuf;
399 
400  if( Copy ) {
401  NewBuf = PoolAllocateBuffer( Length );
402  if( !NewBuf ) return STATUS_NO_MEMORY;
403  RtlCopyMemory( NewBuf, Data, Length );
404  } else NewBuf = Data;
405 
407  if( Status != NDIS_STATUS_SUCCESS ) return Status;
408 
410 
411  return STATUS_SUCCESS;
412 }
signed char * PCHAR
Definition: retypes.h:7
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1548
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
MDL * PNDIS_BUFFER
Definition: ndis.h:343
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG _In_opt_ PVOID Data
Definition: wdfdevice.h:4527
#define NdisChainBufferAtFront(Packet, Buffer)
Definition: ndis.h:3106
PVOID PoolAllocateBuffer(ULONG Size)
Definition: mockpool.c:13
int NDIS_STATUS
Definition: ntddndis.h:471
Definition: bufpool.h:45
VOID EXPORT NdisAllocateBuffer(OUT PNDIS_STATUS Status, OUT PNDIS_BUFFER *Buffer, IN NDIS_HANDLE PoolHandle, IN PVOID VirtualAddress, IN UINT Length)
Definition: buffer.c:336
Status
Definition: gdiplustypes.h:24
#define NDIS_STATUS_SUCCESS
Definition: ndis.h:346
NDIS_HANDLE GlobalBufferPool
Definition: routines.c:4
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
Definition: mmixer.c:126
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define STATUS_SUCCESS
Definition: shellext.h:65