Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenobject.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS NDIS library 00004 * FILE: object.c 00005 * PURPOSE: Implements the NDIS 6.0 object interface 00006 * PROGRAMMERS: Cameron Gutman (aicommander@gmail.com) 00007 */ 00008 00009 #include "ndissys.h" 00010 00011 PNDIS_GENERIC_OBJECT 00012 EXPORT 00013 NdisAllocateGenericObject( 00014 IN PDRIVER_OBJECT DriverObject OPTIONAL, 00015 IN ULONG Tag, 00016 IN USHORT Size) 00017 { 00018 PNDIS_GENERIC_OBJECT Object; 00019 00020 Object = ExAllocatePoolWithTag(NonPagedPool, sizeof(NDIS_GENERIC_OBJECT) + Size, Tag); 00021 if (!Object) return NULL; 00022 00023 RtlZeroMemory(Object, sizeof(NDIS_GENERIC_OBJECT) + Size); 00024 00025 Object->DriverObject = DriverObject; 00026 Object->Header.Type = NDIS_OBJECT_TYPE_GENERIC_OBJECT; 00027 Object->Header.Revision = NDIS_GENERIC_OBJECT_REVISION_1; 00028 Object->Header.Size = sizeof(NDIS_GENERIC_OBJECT); 00029 00030 return Object; 00031 } 00032 00033 VOID 00034 EXPORT 00035 NdisFreeGenericObject( 00036 IN PNDIS_GENERIC_OBJECT NdisGenericObject) 00037 { 00038 ExFreePool(NdisGenericObject); 00039 } 00040 Generated on Sun May 27 2012 04:23:17 for ReactOS by
1.7.6.1
|