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.

59 lines
1.3 KiB

  1. #include <stdlib.h> // Has exit()
  2. #include <stdio.h> // Has printf() and related ...
  3. #include <nt.h>
  4. #include <ntrtl.h>
  5. #include <nturtl.h>
  6. #include <ntioapi.h>
  7. #include <windows.h> // Needs to come after the NT header files. Has DWORD
  8. #include <winbase.h>
  9. //
  10. // Private #defines
  11. //
  12. #define SHARE_ALL (FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
  13. #define GetFileAttributeError 0xFFFFFFFF
  14. #define ATTRIBUTE_TYPE DWORD // ULONG, really
  15. #define GET_ATTRIBUTES(FileName, Attributes) Attributes = GetFileAttributes(FileName)
  16. #define IF_GET_ATTR_FAILS(FileName, Attributes) GET_ATTRIBUTES(FileName, Attributes); if (Attributes == GetFileAttributeError)
  17. //
  18. // Global flags shared throughout.
  19. //
  20. // ParseArgs is the place where they get set and verified for mutual
  21. // consistency.
  22. //
  23. BOOLEAN fAlternateCreateDefault = FALSE;
  24. BOOLEAN fCopy = FALSE;
  25. BOOLEAN fCreate = FALSE;
  26. BOOLEAN fDelete = FALSE;
  27. BOOLEAN fDisplay = FALSE;
  28. BOOLEAN fModify = FALSE;
  29. BOOLEAN fRename = FALSE;
  30. BOOLEAN fVerbose = FALSE;
  31. BOOLEAN fVVerbose = FALSE;
  32. //
  33. // Signatures of internal routines.
  34. //
  35. void
  36. ParseArgs(
  37. int argc,
  38. char *argv[]
  39. );
  40. void
  41. Usage(
  42. void
  43. );