Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
924 B

/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
wlmacro.h
Abstract:
This header contains a collection of macros used by the wdm library.
Author:
Adrian J. Oney - April 21, 2002
Revision History:
--*/
//
// This is to make all the TEXT(...) macros come out right. As of 07/27/2000,
// UNICODE isn't defined in kernel space by default.
//
#define UNICODE
//
// This macro takes an array and returns the number of elements in it.
//
#define ARRAY_COUNT(array) (sizeof(array)/sizeof(array[0]))
//
// This macro realigns a pointer to a pointer boundary.
//
#define ALIGN_POINTER(Offset) (PVOID) \
((((ULONG_PTR)(Offset) + sizeof(ULONG_PTR)-1)) & (~(sizeof(ULONG_PTR) - 1)))
//
// This macro realigns a ULONG_PTR offset onto a pointer boundary.
//
#define ALIGN_POINTER_OFFSET(Offset) (ULONG_PTR) ALIGN_POINTER(Offset)