Author: hbelusca
Date: Thu Jun 1 23:54:08 2017
New Revision: 74738
URL:
http://svn.reactos.org/svn/reactos?rev=74738&view=rev
Log:
[MKHIVE]: Implement CmpFileRead().
Modified:
trunk/reactos/sdk/tools/mkhive/cmi.c
Modified: trunk/reactos/sdk/tools/mkhive/cmi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/mkhive/cmi.c?rev…
==============================================================================
--- trunk/reactos/sdk/tools/mkhive/cmi.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/mkhive/cmi.c [iso-8859-1] Thu Jun 1 23:54:08 2017
@@ -55,8 +55,12 @@
OUT PVOID Buffer,
IN SIZE_T BufferLength)
{
- DPRINT1("CmpFileRead() unimplemented\n");
- return FALSE;
+ PCMHIVE CmHive = (PCMHIVE)RegistryHive;
+ FILE *File = CmHive->FileHandles[HFILE_TYPE_PRIMARY];
+ if (fseek(File, *FileOffset, SEEK_SET) != 0)
+ return FALSE;
+
+ return (fread(Buffer, 1, BufferLength, File) == BufferLength);
}
static BOOLEAN