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.

81 lines
1.7 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1994 - 1999
  3. Module Name:
  4. uuidsup.hxx
  5. Abstract:
  6. Data structures and functions avaliable in uuidsup.cxx
  7. This file is shared between all systems.
  8. Author:
  9. Mario Goertzel (MarioGo) May 25, 1994
  10. Revision History:
  11. --*/
  12. #ifndef __UUIDSUP_HXX__
  13. #define __UUIDSUP_HXX__
  14. #define KERNEL_UUIDS
  15. // This is the "true" OSF DCE format for Uuids. We use this
  16. // when generating Uuids. The NodeId is faked on systems w/o
  17. // a netcard.
  18. typedef struct _RPC_UUID_GENERATE
  19. {
  20. unsigned long TimeLow;
  21. unsigned short TimeMid;
  22. unsigned short TimeHiAndVersion;
  23. unsigned char ClockSeqHiAndReserved;
  24. unsigned char ClockSeqLow;
  25. unsigned char NodeId[6];
  26. } RPC_UUID_GENERATE;
  27. #ifdef MPPC
  28. #define InterlockedDecrement(x) ((x)--)
  29. #endif
  30. #define RPC_UUID_TIME_HIGH_MASK 0x0FFF
  31. #define RPC_UUID_VERSION 0x1000
  32. #define RPC_RAND_UUID_VERSION 0x4000
  33. #define RPC_UUID_RESERVED 0x80
  34. #define RPC_UUID_CLOCK_SEQ_HI_MASK 0x3F
  35. typedef struct _UUID_CACHED_VALUES_STRUCT
  36. {
  37. ULARGE_INTEGER Time; // Time of last uuid allocation
  38. long AllocatedCount; // Number of UUIDs allocated
  39. unsigned char ClockSeqHiAndReserved;
  40. unsigned char ClockSeqLow;
  41. unsigned char NodeId[6];
  42. } UUID_CACHED_VALUES_STRUCT;
  43. RPC_STATUS __RPC_API
  44. UuidGlobalMutexRequest(void);
  45. void __RPC_API
  46. UuidGlobalMutexClear(void);
  47. #ifdef KERNEL_UUIDS
  48. #define UuidGlobalMutexRequest() RPC_S_OK
  49. #define UuidGlobalMutexClear()
  50. #endif
  51. RPC_STATUS __RPC_API
  52. GetNodeId(unsigned char __RPC_FAR *NodeId);
  53. RPC_STATUS __RPC_API
  54. UuidGetValues(UUID_CACHED_VALUES_STRUCT __RPC_FAR *);
  55. #endif // __UUIDSUP_HXX__