Merge patchfile.h into registry.h