- Hermes Belusca: Fix wrong definition of CMHIVE structure (defined only 3 FileHandles when 4 is needed).
See issue #7162 for more details.
svn path=/trunk/; revision=56884
- Finally say goodbye to my "wcsfuncs" experiment started in 2008.
We have (and always had) Wine's "unicode" library for this, which does the same and is more complete.
Now that host tools only use include/host, we only need to include <wine/unicode.h> and it will choose the right file in either include/host or include/reactos.
- Fix some include guards in PSDK headers to match the MS ones.
- Always define WINE_UNICODE_API to an empty string instead of doing this separately for every module.
- Cleanup some empty directories or non-existing include pathes.
svn path=/trunk/; revision=52248
- Make cmlib, newinflib and mkhive use the Wine unicode lib instead of the host_wcsfuncs lib.
- Only the header file include/host/wcsfuncs.h is still used to map str*W functions to wcs* functions in WIN32 builds.
- Remove obsolete rtl functions.
- Make mkhive use the newinflib instead of inflib.
ATTENTION: This might break the build bot although it has been tested on Windows and Linux!!!
svn path=/trunk/; revision=47076
- Flusher lock fixes: wrong kind of lock,total mess (and the wrong kind of lock). Properly fixed throughout cmapi.c, but still missing in many other places.
- Add support for detecting loading of an already loaded hive.
- Start adding calls to CmpReportNotify to support registry callbacks.
- Do work needed to flush notifications for a deleted node (but CmpFlushNotify not yet implemented).
- Add support for adding each newly loaded hive to the HiveList key in the registry (but CmpAddHiveToFileList not yet implemented).
- Add some ViewLock acquire/releases where needed.
- Load the key in a faster way (Ob vs Zw)
- Add checks everywhere for HvMarkCellDirty success. In future (when log/backup file is enabled), it can return FALSE (e.g. when we are out of space).
- Change logic in CmpDoFlushAll to only flush a hive if it won't shrink (in the future, flushing may lead to hive shrinkage for efficiency).
- Add SEH2 protection to all CmApis that may deal with user-mode data.
- Add HvTrackCellRef/HvReleaseCellRef for tracking cell references in scenarios where we might need many GetCell/ReleaseCell calls. For now stubbed to only work with up to 4 static references.
- Properly unlock/free in some failure paths in some of the CM APIs.
- Add some missing HvReleaseCell in paths where it was missing.
- Try to fix hack in enumerate key.
- Fix wrong usage of KeQuerySystemTime. It was called twice to save it in 2 different places. Instead, there should be only one call, and then duplicate the value across.
- Fix logic in CmpSetValueExistingData/Key.
Tested with winetests and .NET framework 1.1 installation which fully completes.
svn path=/trunk/; revision=46702
- Whilst this is non-standard and potentially makes the code less portable, it's supported by both gcc and msvc and should bringg increased compilation speed due to its optimized behaviour (doesn't need to invoke the preprocessor)
- Patch by Amine Khaldi [amine.khaldi@reactos.org]
svn path=/trunk/; revision=45685
- wdm.h: Properly define NTKERNELAPI.
- ntifs.h: Properly define NTKERNELAPI, and don't redefine NTSYSAPI.
- ntoskrnl: Apply the WDK hack for our headers (and gcc) too. Also redefine NTHALAPI for NDK so we don't auto-import KdComPortInUse -- ld complains about this.
- Apply this for cmlib, csq and rossym too.
- Use this in HAL too, and redefine NTSYSAPI so we don't auto import some structures from the kernel. Also, don't define __declspec(dllimport) to nothing -- this doesn't work with gcc, and doesn't seem to be necessary. I tried building HAL with the WDK and this wasn't an issue.
svn path=/trunk/; revision=42461
Instead of copying those functions into every host tool, which needs it (as we did previously), we can now implement them all in this library and link the host tools to it.
If USE_HOST_WCSFUNCS is not defined, the "wcsfuncs.h" file will define them to the CRT functions (so this library does not create overhead, when the code is built for the target platform)
See issue #3285 for more details.
svn path=/trunk/; revision=34050
- Get rid of EREGISTRY_HIVE, and use CMHIVE instead. Although the current ReactOS code doesn't make use of any of the functionality it offers, it's compatible with EREGISTRY_HIVE (our version was a subset) and allows us to get rid of another ros-specifc type, as well as being able to merge code from the cm-branch much more easily.
- Merge cmwraprs.c from the cm-branch, since the only differences were the filehandle fields in EREGISTRY_HIVE vs CMHIVE.
- Enable the #if'ed out code in cminit.c since it now applies to CMHIVE.
svn path=/trunk/; revision=29944
- Remove all the ReactOS-specific versions of those types.
- Change all code referencing the ReactOS-specific versions to use the real NT versions, and fix any related code to properly use the new fields.
svn path=/trunk/; revision=29943
- Fix a bug in CmpInitializeHive which was calling HvInitializeHive with inverted params.
- Fix some host header issues.
svn path=/trunk/; revision=29879
- Copy the "pshpack*.h", "poppack.h" and "typedefs_host.h" (renamed to "typedefs.h") files to this directory
- Modify the Makefiles of cmlib_host, inflib_host, mkhive, unicode, wmc and wrc to remove the "include/psdk" dependency
- Remove the inclusion of "ntstatus.h" in cmlib_host and mkhive
svn path=/trunk/; revision=29042
This is now done by adding a "typedefs64.h" header file, which uses int's instead of long's for 32-bit values. As far as I know, this is the only way to avoid the problem that a long has a size of 64-bit on 64-bit systems.
This header file is now used in the host makefiles of cmlib, inflib and mkhive. It is also suitable for the other host tools, which need 32-bit values (will do some changes there in the next few days).
Unfortunately, Live-CDs still do not work because of another bug (see bug #2290).
But I compared the hives created by 32-bit Debian Linux and 64-bit Debian Linux and after these changes, they are exactly the same.
See issue #2272 for more details.
svn path=/trunk/; revision=28389
- Implement new cmlib routines: HvIsCellAllocated, Doesn't really work fully since we don't support mapped-file hives, but works for the kinds of hives we currently use. HvIsCellDirty, should work as expected.
- Implement new cm routines: CmpMarkValueDataDirty, CmpFreeValueData, CmpFreeValue. There are generic so they can deal with Big, Small or Normal keys.
- Implement CmpAddValueToList, CmpSetValueDataNew.
- Add RtlCheckBit to winddk.h, it's inlined instead of being an actual function call.
svn path=/trunk/; revision=26757
- Rename one more duplicated file in the kernel which wasn't caught previously.
- pseh, rossym, cmlib, kdcom, bootvid, rtl compile & link, and ntoskrnl is now down to only 23 linker errors.
svn path=/trunk/; revision=25956
- Fix HvInitialize definition to match more closely NT's since I need some of the extra parameters for the cm rewrite.
- Implement ExInitializePushLock and ExConvertPushLockSharedToExclusive macros.
svn path=/trunk/; revision=24426