mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
- Some of my work on NDIS 6.0
- Doesn't compile yet - Part 1 of X svn path=/branches/aicom-network-fixes/; revision=36699
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS NDIS library
|
||||
* FILE: object.c
|
||||
* PURPOSE: Implements the NDIS 6.0 object interface
|
||||
* PROGRAMMERS: Cameron Gutman ([email protected])
|
||||
*/
|
||||
|
||||
#include "ndissys.h"
|
||||
|
||||
PNDIS_GENERIC_OBJECT
|
||||
EXPORT
|
||||
NdisAllocateGenericObject(
|
||||
IN PDRIVER_OBJECT DriverObject OPTIONAL,
|
||||
IN ULONG Tag,
|
||||
IN USHORT Size)
|
||||
{
|
||||
PNDIS_GENERIC_OBJECT Object;
|
||||
|
||||
Object = ExAllocatePoolWithTag(NonPagedPool, sizeof(NDIS_GENERIC_OBJECT) + Size, Tag);
|
||||
if (!Object) return NULL;
|
||||
|
||||
RtlZeroMemory(Object, sizeof(NDIS_GENERIC_OBJECT) + Size);
|
||||
|
||||
Object->DriverObject = DriverObject;
|
||||
Object->Header.Type = NDIS_OBJECT_TYPE_GENERIC_OBJECT;
|
||||
Object->Header.Revision = NDIS_GENERIC_OBJECT_REVISION_1;
|
||||
Object->Header.Size = sizeof(NDIS_GENERIC_OBJECT);
|
||||
|
||||
return Object;
|
||||
}
|
||||
|
||||
VOID
|
||||
EXPORT
|
||||
NdisFreeGenericObject(
|
||||
IN PNDIS_GENERIC_OBJECT NdisGenericObject)
|
||||
{
|
||||
ExFreePool(NdisGenericObject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user