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.

76 lines
2.0 KiB

  1. #ifndef WEBUTIL_H
  2. #define WEBUTIL_H
  3. #ifdef __cplusplus // Place this here to prevent decorating of symbols
  4. extern "C" { // when doing C++ stuff.
  5. #endif //
  6. #define WEBLST_BLKSIZE 512
  7. #ifdef __cplusplus
  8. /*************************************\
  9. * CWebLst Class
  10. \*************************************/
  11. class CWebLst {
  12. private:
  13. DWORD m_cbMax; // Maximum size of list-block.
  14. DWORD m_cbLst; // Count of items in list.
  15. PBYTE m_pbPtr; //
  16. DWORD m_cItems; // Count of items in list.
  17. PBYTE m_pbLst; // List of items.
  18. public:
  19. CWebLst(VOID);
  20. ~CWebLst(VOID);
  21. BOOL Add(PCTSTR);
  22. PCTSTR Get(VOID);
  23. BOOL Next(VOID);
  24. VOID Reset(VOID);
  25. DWORD Count(VOID);
  26. };
  27. typedef CWebLst *PWEBLST;
  28. typedef CWebLst FAR *LPWEBLST;
  29. #else
  30. typedef VOID *PWEBLST;
  31. typedef VOID FAR *LPWEBLST;
  32. #endif
  33. LPTSTR webMBtoTC(UINT, LPSTR, DWORD);
  34. LPSTR webTCtoMB(UINT, LPCTSTR, LPDWORD);
  35. DWORD webStrSize(LPCTSTR);
  36. LPVOID webAlloc(DWORD);
  37. BOOL webFree(LPVOID);
  38. LPVOID webRealloc(LPVOID, DWORD, DWORD);
  39. LPTSTR webAllocStr(LPCTSTR);
  40. LPTSTR webFindRChar(LPTSTR, TCHAR);
  41. DWORD webAtoI(LPTSTR);
  42. BOOL IsWebServerInstalled(LPCTSTR pszServer);
  43. BOOL EncodePrinterName (LPCTSTR lpText, LPTSTR lpHTMLStr, LPDWORD lpdwSize);
  44. BOOL DecodePrinterName (LPCTSTR pPrinterName, LPTSTR pDecodedName, LPDWORD lpdwSize);
  45. BYTE AscToHex (TCHAR c);
  46. TCHAR HexToAsc (INT b);
  47. LPTSTR EncodeString (LPCTSTR lpText, BOOL bURL);
  48. BOOL GetWebpnpUrl (LPCTSTR pszServer, LPCTSTR pszPrinterName, LPCTSTR pszQueryString,
  49. BOOL bSecure, LPTSTR pszURL, LPDWORD lpdwSize);
  50. BOOL GetWebUIUrl (LPCTSTR pszServer, LPCTSTR pszPrinterName, LPTSTR pszURL,
  51. LPDWORD lpdwSize);
  52. #ifdef __cplusplus // Place this here to prevent decorating of symbols
  53. } // when doing C++ stuff.
  54. BOOL AssignString (LPTSTR &s, LPCTSTR d);
  55. #endif //
  56. #endif