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.

45 lines
896 B

  1. #ifdef __cplusplus
  2. #include "capi.h"
  3. // WinVerifyTrust delay load modelled on shell's urlmonp.h
  4. #define DELAY_LOAD_WVT
  5. class Cwvt
  6. {
  7. public:
  8. #ifdef DELAY_LOAD_WVT
  9. #define DELAYWVTAPI(_fn, _args, _nargs) \
  10. HRESULT _fn _args { \
  11. HRESULT hres = Init(); \
  12. if (SUCCEEDED(hres)) { \
  13. hres = _pfn##_fn _nargs; \
  14. } \
  15. return hres; } \
  16. HRESULT (STDAPICALLTYPE* _pfn##_fn) _args;
  17. HRESULT Init(void);
  18. Cwvt();
  19. ~Cwvt();
  20. BOOL m_fInited;
  21. HMODULE m_hMod;
  22. #else
  23. #define DELAYWVTAPI(_fn, _args, _nargs) \
  24. HRESULT _fn _args { \
  25. HRESULT hr = ::#_fn _nargs; \
  26. }
  27. #endif
  28. private:
  29. DELAYWVTAPI(WinVerifyTrust,
  30. (HWND hwnd, GUID * ActionID, LPVOID ActionData),
  31. (hwnd, ActionID, ActionData));
  32. public:
  33. HRESULT VerifyTrust(HANDLE hFile, HWND hWnd, LPCWSTR szStatusText);
  34. };
  35. #endif