Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenbinhive.cGo to the documentation of this file.00001 /* 00002 * ReactOS kernel 00003 * Copyright (C) 2006 ReactOS Team 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 /* COPYRIGHT: See COPYING in the top level directory 00020 * PROJECT: ReactOS hive maker 00021 * FILE: tools/mkhive/binhive.c 00022 * PURPOSE: Binary hive export code 00023 * PROGRAMMER: Hervé Poussineau 00024 */ 00025 00026 /* INCLUDES *****************************************************************/ 00027 00028 #include <stdio.h> 00029 00030 #include "mkhive.h" 00031 00032 BOOL 00033 ExportBinaryHive( 00034 IN PCSTR FileName, 00035 IN PCMHIVE Hive) 00036 { 00037 FILE *File; 00038 BOOL ret; 00039 00040 printf (" Creating binary hive: %s\n", FileName); 00041 00042 /* Create new hive file */ 00043 File = fopen (FileName, "w+b"); 00044 if (File == NULL) 00045 { 00046 printf(" Error creating/opening file\n"); 00047 return FALSE; 00048 } 00049 00050 fseek (File, 0, SEEK_SET); 00051 00052 Hive->FileHandles[HFILE_TYPE_PRIMARY] = (HANDLE)File; 00053 ret = HvWriteHive(&Hive->Hive); 00054 fclose (File); 00055 return ret; 00056 } 00057 00058 /* EOF */ Generated on Tue May 15 04:41:08 2012 for ReactOS by
1.6.3
|