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.

57 lines
2.0 KiB

  1. #ifndef _VARUTIL_H_
  2. #define _VARUTIL_H_
  3. // -------------------------------------------------------------------
  4. // ANSI/UNICODE-neutral prototypes
  5. STDAPI VariantChangeTypeForRead(VARIANT *pvar, VARTYPE vtDesired);
  6. STDAPI_(LPITEMIDLIST) VariantToIDList(const VARIANT *pv);
  7. STDAPI_(BOOL) VariantToBuffer(const VARIANT* pvar, void *pv, UINT cb);
  8. STDAPI_(BOOL) VariantToGUID(const VARIANT *pvar, GUID *pguid);
  9. STDAPI_(LPCWSTR) VariantToStrCast(const VARIANT *pvar);
  10. STDAPI InitVariantFromBuffer(VARIANT *pvar, const void *pv, UINT cb);
  11. STDAPI InitVariantFromIDList(VARIANT* pvar, LPCITEMIDLIST pidl);
  12. STDAPI InitVariantFromGUID(VARIANT *pvar, REFGUID guid);
  13. STDAPI InitBSTRVariantFromGUID(VARIANT *pvar, REFGUID guid);
  14. STDAPI InitVariantFromStrRet(STRRET *pstrret, LPCITEMIDLIST pidl, VARIANT *pv);
  15. STDAPI InitVariantFromFileTime(const FILETIME *pft, VARIANT *pv);
  16. STDAPI_(BOOL) VariantToBOOL(VARIANT varIn);
  17. STDAPI_(int) VariantToInt(VARIANT varIn);
  18. STDAPI_(UINT) VariantToUINT(VARIANT varIn);
  19. STDAPI_(ULONGLONG) VariantToULONGLONG(VARIANT varIn);
  20. STDAPI InitVariantFromUINT(VARIANT *pvar, UINT ulVal);
  21. STDAPI InitVariantFromInt(VARIANT *pvar, int lVal);
  22. STDAPI InitVariantFromULONGLONG(VARIANT *pvar, ULONGLONG ullVal);
  23. // -------------------------------------------------------------------
  24. // ANSI- and UNICODE-specific prototypes
  25. STDAPI_(BSTR) SysAllocStringA(LPCSTR);
  26. STDAPI StringToStrRetW(LPCWSTR pszName, STRRET *pStrRet);
  27. STDAPI_(void) DosTimeToDateTimeString(WORD wDate, WORD wTime, LPWSTR pszText, UINT cchText, int fmt);
  28. STDAPI_(LPTSTR) VariantToStr(const VARIANT *pvar, LPWSTR pszBuf, int cchBuf);
  29. STDAPI InitVariantFromStr(VARIANT *pvar, LPCWSTR psz);
  30. STDAPI QueryInterfaceVariant(VARIANT v, REFIID riid, void **ppv);
  31. // -------------------------------------------------------------------
  32. // TCHAR-version defines
  33. #ifdef UNICODE
  34. #define SysAllocStringT(psz) SysAllocString(psz)
  35. #else // UNICODE
  36. #define SysAllocStringT(psz) SysAllocStringA(psz)
  37. #endif // UNICODE
  38. #endif // _VARUTIL_H_