Commit 1da29717 authored by Jon Griffiths's avatar Jon Griffiths Committed by Alexandre Julliard

Implement and test rtl bitmap functions.

Add a couple of other misc rtl functions.
parent c97d2a7d
......@@ -14096,7 +14096,7 @@ MAKE_TEST_RULES=dlls/Maketest.rules
MAKE_PROG_RULES=programs/Makeprog.rules
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/d3d8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wpp/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile"
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/d3d8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wpp/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile"
cat >confcache <<\_ACEOF
......@@ -14623,6 +14623,7 @@ do
"dlls/msvideo/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/msvideo/Makefile" ;;
"dlls/netapi32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/netapi32/Makefile" ;;
"dlls/ntdll/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ntdll/Makefile" ;;
"dlls/ntdll/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ntdll/tests/Makefile" ;;
"dlls/odbc32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/odbc32/Makefile" ;;
"dlls/ole32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/ole32/Makefile" ;;
"dlls/oleaut32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/oleaut32/Makefile" ;;
......
......@@ -1397,6 +1397,7 @@ dlls/msvcrt20/Makefile
dlls/msvideo/Makefile
dlls/netapi32/Makefile
dlls/ntdll/Makefile
dlls/ntdll/tests/Makefile
dlls/odbc32/Makefile
dlls/ole32/Makefile
dlls/oleaut32/Makefile
......
......@@ -106,6 +106,7 @@ C_SRCS = \
reg.c \
rtl.c \
rtlstr.c \
rtlbitmap.c \
string.c \
sec.c \
signal_i386.c \
......@@ -120,6 +121,8 @@ GEN_ASM_SRCS = \
EXTRA_OBJS = $(MODULE).glue.o
SUBDIRS = tests
EXTRASUBDIRS = \
$(TOPOBJDIR)/files \
$(TOPOBJDIR)/if1632 \
......
......@@ -283,14 +283,14 @@
@ stub RtlApplyRXactNoFlush
@ stub RtlAreAllAccessesGranted
@ stub RtlAreAnyAccessesGranted
@ stub RtlAreBitsClear
@ stub RtlAreBitsSet
@ stdcall RtlAreBitsClear(ptr long long) RtlAreBitsClear
@ stdcall RtlAreBitsSet(ptr long long) RtlAreBitsSet
@ stdcall RtlAssert(ptr ptr long long) RtlAssert
@ stub RtlCaptureStackBackTrace
@ stub RtlCharToInteger
@ stub RtlCheckRegistryKey
@ stub RtlClearAllBits
@ stdcall RtlClearBits(long long long) RtlClearBits
@ stdcall RtlClearAllBits(ptr) RtlClearAllBits
@ stdcall RtlClearBits(ptr long long) RtlClearBits
@ stdcall RtlCompactHeap(long long) RtlCompactHeap
@ stdcall RtlCompareMemory(ptr ptr long) RtlCompareMemory
@ stub RtlCompareMemoryUlong
......@@ -367,14 +367,22 @@
@ stdcall -ret64 RtlExtendedLargeIntegerDivide(long long long ptr) RtlExtendedLargeIntegerDivide
@ stub RtlExtendedMagicDivide
@ stdcall RtlFillMemory(ptr long long) RtlFillMemory
@ stub RtlFillMemoryUlong
@ stdcall RtlFindClearBits(long long long) RtlFindClearBits
@ stub RtlFindClearBitsAndSet
@ stub RtlFindLongestRunClear
@ stub RtlFindLongestRunSet
@ stdcall RtlFillMemoryUlong(ptr long long) RtlFillMemoryUlong
@ stdcall RtlFindClearBits(ptr long long) RtlFindClearBits
@ stdcall RtlFindClearBitsAndSet(ptr long long) RtlFindClearBitsAndSet
@ stdcall RtlFindClearRuns(ptr ptr long long) RtlFindClearRuns
@ stdcall RtlFindLastBackwardRunClear(ptr long ptr) RtlFindLastBackwardRunClear
@ stdcall RtlFindLastBackwardRunSet(ptr long ptr) RtlFindLastBackwardRunSet
@ stdcall RtlFindLeastSignificantBit(ptr long long) RtlFindLeastSignificantBit
@ stdcall RtlFindLongestRunClear(ptr long) RtlFindLongestRunClear
@ stdcall RtlFindLongestRunSet(ptr long) RtlFindLongestRunSet
@ stub RtlFindMessage
@ stub RtlFindSetBits
@ stub RtlFindSetBitsAndClear
@ stdcall RtlFindMostSignificantBit(ptr long long) RtlFindMostSignificantBit
@ stdcall RtlFindNextForwardRunClear(ptr long ptr) RtlFindNextForwardRunClear
@ stdcall RtlFindNextForwardRunSet(ptr long ptr) RtlFindNextForwardRunSet
@ stdcall RtlFindSetBits(ptr long long) RtlFindSetBits
@ stdcall RtlFindSetBitsAndClear(ptr long long) RtlFindSetBitsAndClear
@ stdcall RtlFindSetRuns(ptr ptr long long) RtlFindSetRuns
@ stdcall RtlFirstFreeAce(ptr ptr) RtlFirstFreeAce
@ stdcall RtlFormatCurrentUserKeyPath(ptr) RtlFormatCurrentUserKeyPath
@ stub RtlFormatMessage
......@@ -395,7 +403,7 @@
@ stub RtlGetElementGenericTable
@ stub RtlGetFullPathName_U
@ stdcall RtlGetGroupSecurityDescriptor(ptr ptr ptr) RtlGetGroupSecurityDescriptor
@ stub RtlGetLongestNtPathLength
@ stdcall RtlGetLongestNtPathLength() RtlGetLongestNtPathLength
@ stub RtlGetNtGlobalFlags
@ stdcall RtlGetNtProductType(ptr) RtlGetNtProductType
@ stdcall RtlGetOwnerSecurityDescriptor(ptr ptr ptr) RtlGetOwnerSecurityDescriptor
......@@ -413,7 +421,7 @@
@ stub RtlInitNlsTables
@ stdcall RtlInitString(ptr str) RtlInitString
@ stdcall RtlInitUnicodeString(ptr wstr) RtlInitUnicodeString
@ stdcall RtlInitializeBitMap(long long long) RtlInitializeBitMap
@ stdcall RtlInitializeBitMap(ptr long long) RtlInitializeBitMap
@ stub RtlInitializeContext
@ stdcall RtlInitializeCriticalSection(ptr) RtlInitializeCriticalSection
@ stdcall RtlInitializeCriticalSectionAndSpinCount(ptr long) RtlInitializeCriticalSectionAndSpinCount
......@@ -454,8 +462,8 @@
@ stdcall RtlNormalizeProcessParams(ptr) RtlNormalizeProcessParams
@ stdcall RtlNtStatusToDosError(long) RtlNtStatusToDosError
@ stub RtlNumberGenericTableElements
@ stub RtlNumberOfClearBits
@ stub RtlNumberOfSetBits
@ stdcall RtlNumberOfClearBits(ptr) RtlNumberOfClearBits
@ stdcall RtlNumberOfSetBits(ptr) RtlNumberOfSetBits
@ stdcall RtlOemStringToUnicodeSize(ptr) RtlOemStringToUnicodeSize
@ stdcall RtlOemStringToUnicodeString(ptr ptr long) RtlOemStringToUnicodeString
@ stdcall RtlOemToUnicodeN(ptr long ptr ptr long) RtlOemToUnicodeN
......@@ -489,8 +497,8 @@
@ stdcall RtlSecondsSince1970ToTime(long ptr) RtlSecondsSince1970ToTime
@ stdcall RtlSecondsSince1980ToTime(long ptr) RtlSecondsSince1980ToTime
@ stub RtlSelfRelativeToAbsoluteSD
@ stub RtlSetAllBits
@ stdcall RtlSetBits(long long long) RtlSetBits
@ stdcall RtlSetAllBits(ptr) RtlSetAllBits
@ stdcall RtlSetBits(ptr long long) RtlSetBits
@ stub RtlSetCurrentDirectory_U
@ stub RtlSetCurrentEnvironment
@ stdcall RtlSetDaclSecurityDescriptor(ptr long ptr long) RtlSetDaclSecurityDescriptor
......
......@@ -380,46 +380,6 @@ DWORD WINAPI RtlInitializeGenericTable(void)
}
/******************************************************************************
* RtlInitializeBitMap [NTDLL.@]
*
*/
NTSTATUS WINAPI RtlInitializeBitMap(DWORD x1,DWORD x2,DWORD x3)
{
FIXME("(0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3);
return 0;
}
/******************************************************************************
* RtlSetBits [NTDLL.@]
*
*/
NTSTATUS WINAPI RtlSetBits(DWORD x1,DWORD x2,DWORD x3)
{
FIXME("(0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3);
return 0;
}
/******************************************************************************
* RtlFindClearBits [NTDLL.@]
*
*/
NTSTATUS WINAPI RtlFindClearBits(DWORD x1,DWORD x2,DWORD x3)
{
FIXME("(0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3);
return 0;
}
/******************************************************************************
* RtlClearBits [NTDLL.@]
*
*/
NTSTATUS WINAPI RtlClearBits(DWORD x1,DWORD x2,DWORD x3)
{
FIXME("(0x%08lx,0x%08lx,0x%08lx),stub\n",x1,x2,x3);
return 0;
}
/******************************************************************************
* RtlCopyMemory [NTDLL]
*
*/
......@@ -503,3 +463,41 @@ void WINAPI RtlGetNtVersionNumbers(LPDWORD major, LPDWORD minor, LPDWORD build)
*build = (0xF0000000 | versionInfo.dwBuildNumber);
}
}
/*************************************************************************
* RtlFillMemoryUlong [NTDLL.@]
*
* Fill memory with a 32 bit (dword) value.
*
* PARAMS
* lpDest [I] Bitmap pointer
* ulCount [I] Number of dwords to write
* ulValue [I] Value to fill with
*
* RETURNS
* Nothing.
*/
VOID WINAPI RtlFillMemoryUlong(ULONG* lpDest, ULONG ulCount, ULONG ulValue)
{
TRACE("(%p,%ld,%ld)\n", lpDest, ulCount, ulValue);
while(ulCount--)
*lpDest++ = ulValue;
}
/*************************************************************************
* RtlGetLongestNtPathLength [NTDLL.@]
*
* Get the longest allowed path length
*
* PARAMS
* None.
*
* RETURNS
* The longest allowed path length (277 characters under Win2k).
*/
DWORD WINAPI RtlGetLongestNtPathLength(void)
{
TRACE("()\n");
return 277;
}
Makefile
ntdll_test.exe.spec.c
rtlbitmap.ok
testlist.c
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../../..
SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = ntdll.dll
IMPORTS = ntdll
CTESTS = \
rtlbitmap.c
@MAKE_TEST_RULES@
### Dependencies:
......@@ -1095,6 +1095,86 @@ NtAccessCheck(
OUT PULONG GrantedAccess,
OUT PBOOLEAN AccessStatus);
/* bitmap functions */
/* Bitmap data type */
typedef struct tagRTL_BITMAP
{
ULONG SizeOfBitMap; /* Number of bits in the bitmap */
LPBYTE BitMapBuffer; /* Bitmap data, assumed sized to a DWORD boundary */
} RTL_BITMAP, *PRTL_BITMAP;
typedef const RTL_BITMAP* PCRTL_BITMAP;
/* Bit run data type */
typedef struct tagRTL_BITMAP_RUN
{
ULONG StartOfRun; /* Bit position at which run starts - FIXME: Name? */
ULONG SizeOfRun; /* Size of the run in bits - FIXME: Name? */
} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
typedef const RTL_BITMAP_RUN* PCRTL_BITMAP_RUN;
/* Bitmap functions */
VOID WINAPI RtlInitializeBitMap(PRTL_BITMAP,LPBYTE,ULONG);
VOID WINAPI RtlSetAllBits(PRTL_BITMAP);
VOID WINAPI RtlClearAllBits(PRTL_BITMAP);
VOID WINAPI RtlSetBits(PRTL_BITMAP,ULONG,ULONG);
VOID WINAPI RtlClearBits(PRTL_BITMAP,ULONG,ULONG);
ULONG WINAPI RtlFindSetBits(PCRTL_BITMAP,ULONG,ULONG);
ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP,ULONG,ULONG);
ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
ULONG WINAPI RtlFindClearBitsAndSet(PRTL_BITMAP,ULONG,ULONG);
ULONG WINAPI RtlNumberOfSetBits(PCRTL_BITMAP);
ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP);
ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
ULONG WINAPI RtlFindClearRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
ULONG WINAPI RtlFindLongestRunSet(PCRTL_BITMAP,PULONG);
ULONG WINAPI RtlFindLongestRunClear(PCRTL_BITMAP,PULONG);
BOOLEAN WINAPI RtlAreBitsSet(PCRTL_BITMAP,ULONG,ULONG);
BOOLEAN WINAPI RtlAreBitsClear(PCRTL_BITMAP,ULONG,ULONG);
ULONG WINAPI RtlFindLastBackwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
ULONG WINAPI RtlFindLastBackwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
ULONG WINAPI RtlFindNextForwardRunSet(PCRTL_BITMAP,ULONG,PULONG);
ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP,ULONG,PULONG);
CCHAR WINAPI RtlFindMostSignificantBit(ULONGLONG);
CCHAR WINAPI RtlFindLeastSignificantBit(ULONGLONG);
/* Inline the trivial calls */
#define RtlInitializeBitMap(p,b,s) \
do { \
PRTL_BITMAP _p = (p); \
_p->SizeOfBitMap = (s); \
_p->BitMapBuffer = (b); \
} while(0)
#define RtlSetAllBits(p) \
do { \
PRTL_BITMAP _p = (p); \
memset(_p->BitMapBuffer,0xff,((_p->SizeOfBitMap + 31) & 0xffffffe0) >> 3); \
} while(0)
#define RtlClearAllBits(p) \
do {\
PRTL_BITMAP _p = (p);\
memset(_p->BitMapBuffer,0,((_p->SizeOfBitMap + 31) & 0xffffffe0) >> 3); \
} while(0)
inline static BOOLEAN RtlCheckBit(PCRTL_BITMAP lpBits, ULONG ulBit)
{
if (lpBits && ulBit < lpBits->SizeOfBitMap &&
lpBits->BitMapBuffer[ulBit >> 3] & (1 << (ulBit & 7)))
return TRUE;
return FALSE;
}
/* Endianness */
#define RtlStoreUlong(p,v) do { ULONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
#define RtlRetrieveUlong(p,s) memcpy((p), (s), sizeof(ULONG))
#define RtlStoreUlonglong(p,v) do { ULONGLONG _v = (v); memcpy((p), &_v, sizeof(_v)); } while (0)
#define RtlRetrieveUlonglong(p,s) memcpy((p), (s), sizeof(ULONGLONG))
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment