ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

hivesum.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:   registry manipulation library
00003  * LICENSE:   GPL - See COPYING in the top level directory
00004  * COPYRIGHT: Copyright 2005 Filip Navara <navaraf@reactos.org>
00005  *            Copyright 2001 - 2005 Eric Kohl
00006  */
00007 
00008 #include "cmlib.h"
00009 
00016 ULONG CMAPI
00017 HvpHiveHeaderChecksum(
00018    PHBASE_BLOCK HiveHeader)
00019 {
00020    PULONG Buffer = (PULONG)HiveHeader;
00021    ULONG Sum = 0;
00022    ULONG i;
00023 
00024    for (i = 0; i < 127; i++)
00025       Sum ^= Buffer[i];
00026    if (Sum == (ULONG)-1)
00027       Sum = (ULONG)-2;
00028    if (Sum == 0)
00029       Sum = 1;
00030 
00031    return Sum;
00032 }

Generated on Thu May 24 2012 04:36:24 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.