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.

100 lines
2.6 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1994-1995 **
  4. //*********************************************************************
  5. //
  6. // WIZARD.H - central header file for ICWCONN
  7. //
  8. // HISTORY:
  9. //
  10. // 05/14/98 donaldm created it
  11. //
  12. #ifndef _ICWUTIL_H_
  13. #define _ICWUTIL_H_
  14. //Defs for tweaking HTML
  15. #define MAX_COLOR_NAME 100
  16. #define HTML_DEFAULT_BGCOLOR TEXT("THREEDFACE")
  17. #define HTML_DEFAULT_SPECIALBGCOLOR TEXT("WINDOW")
  18. #define HTML_DEFAULT_COLOR TEXT("WINDOWTEXT")
  19. //JACOB -- BUGBUG: duplicate defs. clean-up
  20. #define MAX_RES_LEN 255
  21. extern HINSTANCE ghInstance;
  22. extern INT _convert; // For string conversion
  23. extern const TCHAR cszEquals[];
  24. extern const TCHAR cszAmpersand[];
  25. extern const TCHAR cszPlus[];
  26. extern const TCHAR cszQuestion[];
  27. // Trace flags
  28. #define TF_CLASSFACTORY 0x00000010
  29. #define TF_CWEBVIEW 0x00000020
  30. extern const VARIANT c_vaEmpty;
  31. //
  32. // BUGBUG: Remove this ugly const to non-const casting if we can
  33. // figure out how to put const in IDL files.
  34. //
  35. #define PVAREMPTY ((VARIANT*)&c_vaEmpty)
  36. // String conversion in UTIL.CPP
  37. LPWSTR WINAPI A2WHelper(LPWSTR lpw, LPCTSTR lpa, int nChars);
  38. LPTSTR WINAPI W2AHelper(LPTSTR lpa, LPCWSTR lpw, int nChars);
  39. #define A2WHELPER A2WHelper
  40. #define W2AHELPER W2AHelper
  41. #ifdef UNICODE
  42. #define A2W(lpa) (LPTSTR)(lpa)
  43. #define W2A(lpw) (lpw)
  44. #else // UNICODE
  45. #define A2W(lpa) (\
  46. ((LPCTSTR)lpa == NULL) ? NULL : (\
  47. _convert = (lstrlenA((LPTSTR)lpa)+1),\
  48. A2WHELPER((LPWSTR) alloca(_convert*2), (LPTSTR)lpa, _convert)))
  49. #define W2A(lpw) (\
  50. ((LPCWSTR)lpw == NULL) ? NULL : (\
  51. _convert = (lstrlenW(lpw)+1)*2,\
  52. W2AHELPER((LPTSTR) alloca(_convert), lpw, _convert)))
  53. #endif // UNICODE
  54. #define A2CW(lpa) ((LPCWSTR)A2W(lpa))
  55. #define W2CA(lpw) ((LPCTSTR)W2A(lpw))
  56. HRESULT ConnectToConnectionPoint
  57. (
  58. IUnknown *punkThis,
  59. REFIID riidEvent,
  60. BOOL fConnect,
  61. IUnknown *punkTarget,
  62. DWORD *pdwCookie,
  63. IConnectionPoint **ppcpOut
  64. );
  65. #define DELETE_POINTER(p)\
  66. {\
  67. if (NULL != p)\
  68. {\
  69. delete p;\
  70. p = NULL;\
  71. }\
  72. }
  73. void WINAPI URLEncode(TCHAR* pszUrl, size_t bsize);
  74. void WINAPI URLAppendQueryPair
  75. (
  76. LPTSTR lpszQuery,
  77. LPTSTR lpszName,
  78. LPTSTR lpszValue
  79. );
  80. #endif // _ICWUTIL_H_