Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.0 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. copy.h
  5. Abstract:
  6. This the include file for supporting copying files, creating new files, and
  7. copying the registries to the remote server.
  8. Author:
  9. Sean Selitrennikoff - 4/5/98
  10. Revision History:
  11. --*/
  12. #define ALIGN(p,val) (PVOID)((((UINT_PTR)(p) + (val) - 1)) & (~((val) - 1)))
  13. #define U_USHORT(p) (*(USHORT UNALIGNED *)(p))
  14. #define U_ULONG(p) (*(ULONG UNALIGNED *)(p))
  15. //
  16. // Helper functions in regcopy.c
  17. //
  18. DWORD
  19. DoFullRegBackup(
  20. PWCHAR MirrorRoot
  21. );
  22. DWORD
  23. DoSpecificRegBackup(
  24. PWSTR HiveDirectory,
  25. PWSTR HiveDirectoryAndFile,
  26. HKEY HiveRoot,
  27. PWSTR HiveName
  28. );
  29. //
  30. // Global Defines
  31. //
  32. #define TMP_BUFFER_SIZE 1024
  33. #define ARRAYSIZE( _x ) ( sizeof( _x ) / sizeof( _x[ 0 ] ) )
  34. //
  35. // Memory functions
  36. //
  37. #define IMirrorAllocMem(x) LocalAlloc( LPTR, x)
  38. #define IMirrorFreeMem(x) LocalFree(x)
  39. #define IMirrorReallocMem(x, sz) LocalReAlloc(x, sz, LMEM_MOVEABLE)