Source code of Windows XP (NT5)
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.

57 lines
1.5 KiB

  1. /******************************************************************************
  2. *
  3. * Copyright (c) 1999 Microsoft Corporation
  4. *
  5. * Module Name:
  6. * ifsr3.h
  7. *
  8. * Abstract:
  9. * This file contains definitions from ring 0 required in ring 3
  10. *
  11. * Revision History:
  12. * Kanwaljit S Marok ( kmarok ) 05/17/99
  13. * created
  14. *
  15. *****************************************************************************/
  16. #ifndef _IFSR3_H_
  17. #define _IFSR3_H_
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #define CALC_PPATH_SIZE( a ) ( ( a + 3 ) * sizeof( WCHAR ) )
  22. #define MAX_PPATH_SIZE CALC_PPATH_SIZE(MAX_PATH)
  23. typedef struct PathElement PathElement;
  24. typedef struct ParsedPath ParsedPath;
  25. typedef ParsedPath *path_t;
  26. struct PathElement {
  27. unsigned short pe_length;
  28. unsigned short pe_unichars[1];
  29. }; /* PathElement */
  30. struct ParsedPath {
  31. unsigned short pp_totalLength;
  32. unsigned short pp_prefixLength;
  33. struct PathElement pp_elements[1];
  34. }; /* ParsedPath */
  35. #define IFSPathSize(ppath) ((ppath)->pp_totalLength + sizeof(short))
  36. #define IFSPathLength(ppath) ((ppath)->pp_totalLength - sizeof(short)*2)
  37. #define IFSLastElement(ppath) ((PathElement *)((char *)(ppath) + (ppath)->pp_prefixLength))
  38. #define IFSNextElement(pel) ((PathElement *)((char *)(pel) + (pel)->pe_length))
  39. #define IFSIsRoot(ppath) ((ppath)->pp_totalLength == 4)
  40. // New defines
  41. #define IFSPathElemChars(pel) ( (((PathElement*)pel)->pe_length/sizeof(USHORT)) - 1 )
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45. #endif // _IFSR3_H_