Source code of Windows XP (NT5)
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.

55 lines
1.9 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 InitVariantFromUINT(VARIANT *pvar, UINT ulVal);
  20. STDAPI InitVariantFromInt(VARIANT *pvar, int lVal);
  21. // -------------------------------------------------------------------
  22. // ANSI- and UNICODE-specific prototypes
  23. STDAPI_(BSTR) SysAllocStringA(LPCSTR);
  24. STDAPI StringToStrRetW(LPCWSTR pszName, STRRET *pStrRet);
  25. STDAPI_(void) DosTimeToDateTimeString(WORD wDate, WORD wTime, LPWSTR pszText, UINT cchText, int fmt);
  26. STDAPI_(LPTSTR) VariantToStr(const VARIANT *pvar, LPWSTR pszBuf, int cchBuf);
  27. STDAPI InitVariantFromStr(VARIANT *pvar, LPCWSTR psz);
  28. STDAPI QueryInterfaceVariant(VARIANT v, REFIID riid, void **ppv);
  29. // -------------------------------------------------------------------
  30. // TCHAR-version defines
  31. #ifdef UNICODE
  32. #define SysAllocStringT(psz) SysAllocString(psz)
  33. #else // UNICODE
  34. #define SysAllocStringT(psz) SysAllocStringA(psz)
  35. #endif // UNICODE
  36. #endif // _VARUTIL_H_