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.

120 lines
3.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // stack.h - interface for stack functions in stack.c
  24. ////
  25. #ifndef __STACK_H__
  26. #define __STACK_H__
  27. #include "winlocal.h"
  28. #define STACK_VERSION 0x00000100
  29. // handle to a stack
  30. //
  31. DECLARE_HANDLE32(HSTACK);
  32. // stack data element
  33. //
  34. typedef LPVOID STACKELEM;
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. ////
  39. // stack constructor and destructor functions
  40. ////
  41. // StackCreate - stack constructor
  42. // <dwVersion> (i) must be STACK_VERSION
  43. // <hInst> (i) instance handle of calling module
  44. // return new stack handle (NULL if error)
  45. //
  46. HSTACK DLLEXPORT WINAPI StackCreate(DWORD dwVersion, HINSTANCE hInst);
  47. // StackDestroy - stack destructor
  48. // <hStack> (i) handle returned from StackCreate
  49. // return 0 if success
  50. //
  51. int DLLEXPORT WINAPI StackDestroy(HSTACK hStack);
  52. ////
  53. // stack status functions
  54. ////
  55. // StackGetCount - return count of nodes in stack
  56. // <hStack> (i) handle returned from StackCreate
  57. // return node count (-1 if error)
  58. //
  59. long DLLEXPORT WINAPI StackGetCount(HSTACK hStack);
  60. // StackIsEmpty - return TRUE if stack has no nodes
  61. // <hStack> (i) handle returned from StackCreate
  62. // return TRUE or FALSE
  63. //
  64. BOOL DLLEXPORT WINAPI StackIsEmpty(HSTACK hStack);
  65. ////
  66. // stack element insertion functions
  67. ////
  68. // StackPush - add new node with data <elem> to bottom of stack
  69. // <hStack> (i) handle returned from StackCreate
  70. // <elem> (i) new data element
  71. // returns 0 if success
  72. //
  73. int DLLEXPORT WINAPI StackPush(HSTACK hStack, STACKELEM elem);
  74. ////
  75. // stack element removal functions
  76. ////
  77. // StackPop - remove node from bottom of stack
  78. // <hStack> (i) handle returned from StackCreate
  79. // returns removed data element (NULL of error or empty)
  80. //
  81. STACKELEM DLLEXPORT WINAPI StackPop(HSTACK hStack);
  82. // StackRemoveAll - remove all nodes from stack
  83. // <hStack> (i) handle returned from StackCreate
  84. // return 0 if success
  85. //
  86. int DLLEXPORT WINAPI StackRemoveAll(HSTACK hStack);
  87. ////
  88. // stack element get value functions
  89. ////
  90. // StackPeek - return node from bottom of stack, but leave it on stack
  91. // <hStack> (i) handle returned from StackCreate
  92. // returns data element (NULL if error or empty)
  93. //
  94. STACKELEM DLLEXPORT WINAPI StackPeek(HSTACK hStack);
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif // __STACK_H__