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.

86 lines
3.0 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. // strbuf.h - interface for string buffer functions in strbuf.c
  24. ////
  25. #ifndef __STRBUF_H__
  26. #define __STRBUF_H__
  27. #include "winlocal.h"
  28. #define STRBUF_VERSION 0x00000100
  29. // handle to string buffer engine
  30. //
  31. DECLARE_HANDLE32(HSTRBUF);
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. // StrBufInit - initialize str buffer engine
  36. // <dwVersion> (i) must be STRBUF_VERSION
  37. // <hInst> (i) instance handle of calling module
  38. // <cBuf> (i) number of string buffers to create
  39. // 0 use default number
  40. // <sizBuf> (i) size of each string buffer
  41. // 0 use default size
  42. // return str buffer engine handle (NULL if error)
  43. //
  44. HSTRBUF DLLEXPORT WINAPI StrBufInit(DWORD dwVersion, HINSTANCE hInst, int cBuf, int sizBuf);
  45. // StrBufTerm - shut down str buffer engine
  46. // <hStrBuf> (i) handle returned by StrBufInit
  47. // return 0 if success
  48. //
  49. int DLLEXPORT WINAPI StrBufTerm(HSTRBUF hStrBuf);
  50. // StrBufLoad - load string with specified id from resource file
  51. // <hStrBuf> (i) handle returned by StrBufInit
  52. // <idString> (i) resource id of string to load
  53. // return ptr to string in next available string buffer (NULL if error)
  54. //
  55. LPTSTR DLLEXPORT WINAPI StrBufLoad(HSTRBUF hStrBuf, UINT idString);
  56. // StrBufSprintf - modified version of wsprintf
  57. // <hStrBuf> (i) handle returned by StrBufInit
  58. // <lpszOutput> (o) buffer to hold formatted string result
  59. // NULL do not copy; return string buffer pointer
  60. // <lpszFormat,...> (i) format string and arguments
  61. // returns pointer to resultant string (NULL if error)
  62. //
  63. LPTSTR DLLEXPORT FAR CDECL StrBufSprintf(HSTRBUF hStrBuf, LPTSTR lpszOutput, LPCTSTR lpszFormat, ...);
  64. // StrBufGetNext - get next available static string buffer
  65. // <hStrBuf> (i) handle returned by StrBufInit
  66. // return string buffer pointer (NULL if error)
  67. // NOTE: buffers are recycled every <cBuf> times function is called
  68. //
  69. LPTSTR DLLEXPORT WINAPI StrBufGetNext(HSTRBUF hStrBuf);
  70. #ifdef __cplusplus
  71. }
  72. #endif
  73. #endif // __STRBUF_H__