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.

140 lines
4.6 KiB

  1. /*****************************************************************************
  2. * *
  3. * LL.H *
  4. * *
  5. * Copyright (C) Microsoft Corporation 1989. *
  6. * All Rights reserved. *
  7. * *
  8. ******************************************************************************
  9. * *
  10. * Program Description: Exports link list functions *
  11. * *
  12. ******************************************************************************
  13. * *
  14. * Revision History: *
  15. * *
  16. * *
  17. ******************************************************************************
  18. * *
  19. * Known Bugs: None *
  20. * *
  21. * *
  22. * *
  23. *****************************************************************************/
  24. /*****************************************************************************
  25. * *
  26. * Defines *
  27. * *
  28. *****************************************************************************/
  29. #define nilHAND (HANDLE)NULL
  30. #define nilLL nilHAND
  31. #define nilHLLN nilHAND
  32. /*****************************************************************************
  33. * *
  34. * Typedefs *
  35. * *
  36. *****************************************************************************/
  37. typedef HANDLE LL;
  38. typedef HANDLE HLLN;
  39. /*******************
  40. **
  41. ** Name: LLCreate
  42. **
  43. ** Purpose: Creates a link list
  44. **
  45. ** Arguments: None.
  46. **
  47. ** Returns: Link list. nilLL is returned if an error occurred.
  48. **
  49. *******************/
  50. LL FAR APIENTRY LLCreate(VOID);
  51. /*******************
  52. **
  53. ** Name: InsertLL
  54. **
  55. ** Purpose: Inserts a new node at the head of the linked list
  56. **
  57. ** Arguments: ll - link list
  58. ** vpData - pointer to data to be associated with
  59. ** c - count of the bytes pointed to by vpData
  60. **
  61. ** Returns: TRUE iff insertion is successful.
  62. **
  63. *******************/
  64. BOOL FAR APIENTRY InsertLL(LL, VOID FAR *, LONG);
  65. /*******************
  66. **
  67. ** Name: WalkLL
  68. **
  69. ** Purpose: Mechanism for walking the nodes in the linked list
  70. **
  71. ** Arguments: ll - linked list
  72. ** hlln - handle to a linked list node
  73. **
  74. ** Returns: a handle to a link list node or NIL_HLLN if at the
  75. ** end of the list (or an error).
  76. **
  77. ** Notes: To get the first node, pass NIL_HLLN as the hlln - further
  78. ** calls should use the HLLN returned by this function.
  79. **
  80. *******************/
  81. HLLN FAR APIENTRY WalkLL(LL, HLLN);
  82. /*******************
  83. **
  84. ** Name: QVLockHLLN
  85. **
  86. ** Purpose: Locks a LL node returning a pointer to the data
  87. **
  88. ** Arguments: hlln - handle to a linked list node
  89. **
  90. ** Returns: pointer to data or NULL if an error occurred
  91. **
  92. *******************/
  93. VOID FAR * FAR QVLockHLLN(HLLN);
  94. /*******************
  95. **
  96. ** Name: QVUnlockHLLN
  97. **
  98. ** Purpose: Unlocks a LL node
  99. **
  100. ** Arguments: hlln - handle to a link list node
  101. **
  102. ** Returns: TRUE iff the handle is successfully locked.
  103. **
  104. *******************/
  105. VOID FAR UnlockHLLN(HLLN);
  106. /*******************
  107. **
  108. ** Name: DestroyLL
  109. **
  110. ** Purpose: Deletes a LL and all of its contents
  111. **
  112. ** Arguments: ll - linked list
  113. **
  114. ** Returns: Nothing.
  115. **
  116. *******************/
  117. VOID FAR APIENTRY DestroyLL(LL);