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.

134 lines
3.8 KiB

  1. //****************************************************************************
  2. //
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. // File: vrsscan.idl
  6. //
  7. // Contents: Interfaces for virus scanning
  8. //
  9. //****************************************************************************
  10. #ifndef DO_NO_IMPORTS
  11. import "objidl.idl";
  12. import "oleidl.idl";
  13. #endif
  14. interface IVirusScanner;
  15. interface IRegisterVirusScanEngine;
  16. interface IVirusScanEngine;
  17. [
  18. uuid(5F47DB70-D9FE-11d0-9564-00609797EA4F), // LIBID_VIRUSSCAN
  19. helpstring("Microsoft Virus Scanning Handlers 1.0"),
  20. lcid(0x0000),
  21. version(1.0)
  22. ]
  23. library VIRUSSCAN
  24. {
  25. cpp_quote("// Virus Scan Error codes")
  26. cpp_quote("#define VSCAN_E_NOPROVIDERS _HRESULT_TYPEDEF_(0x800D1001)")
  27. cpp_quote("#define VSCAN_E_CHECKPARTIAL _HRESULT_TYPEDEF_(0x800D1002)")
  28. cpp_quote("#define VSCAN_E_CHECKFAIL _HRESULT_TYPEDEF_(0x800D1003)")
  29. cpp_quote("#define VSCAN_E_DELETEFAIL _HRESULT_TYPEDEF_(0x800D1004)")
  30. cpp_quote("")
  31. cpp_quote("// Virus Scanner Capabilities flags")
  32. cpp_quote("#define VSC_LIKESISTREAM 0x00000001")
  33. cpp_quote("#define VSC_LIKESFILE 0x00000002")
  34. cpp_quote("#define VSC_LIKESHGLOBAL 0x00000004")
  35. cpp_quote("#define VSC_HASMOREINFO 0x00000008")
  36. cpp_quote("")
  37. cpp_quote("// Virus Scan Engine Error codes")
  38. cpp_quote("#define VSE_E_UNSUPPORTEDINPUTTYPE _HRESULT_TYPEDEF_(0x800D2001)")
  39. cpp_quote("#define VSE_E_CHECKFAIL _HRESULT_TYPEDEF_(0x800D2002)")
  40. cpp_quote("")
  41. const USHORT MAX_DESCRIPTION = 128;
  42. const USHORT MAX_URL_LENGTH = 2048;
  43. typedef struct _tagVIRUSINFO
  44. {
  45. DWORD cbSize;
  46. WCHAR wszVendorDescription[MAX_DESCRIPTION];
  47. HICON hVendorIcon;
  48. WCHAR wszVendorContactInfo[MAX_URL_LENGTH];
  49. WCHAR wszVirusName[MAX_DESCRIPTION];
  50. WCHAR wszVirusDescription[MAX_DESCRIPTION];
  51. } VIRUSINFO;
  52. typedef [unique] VIRUSINFO *LPVIRUSINFO;
  53. cpp_quote("")
  54. cpp_quote("#define SFV_DONTDOUI 0x00000002 ")
  55. cpp_quote("#define SFV_DELETE 0x00000004 ")
  56. cpp_quote("#define SFV_WANTVENDORICON 0x00000008 ")
  57. cpp_quote("#define SFV_ENGINE_DOUI 0x00010000 ")
  58. cpp_quote("")
  59. [
  60. local,
  61. object,
  62. uuid(4589BEE0-B4B1-11CF-AAFA-00AA00B6015C) // IID_IVirusScanner
  63. ]
  64. interface IVirusScanner: IUnknown
  65. {
  66. HRESULT ScanForVirus(
  67. [in] HWND hWnd,
  68. [in] STGMEDIUM *pstgMedium,
  69. [in] LPWSTR pwszItemDescription,
  70. [in] DWORD dwFlags,
  71. [in, out] LPVIRUSINFO pVirusInfo);
  72. }
  73. cpp_quote("#define REGISTERSCANNER_REREGISTER 1")
  74. [
  75. local,
  76. object,
  77. uuid(0825E060-B961-11CF-AAFA-00AA00B6015C) // IID_IRegisterVirusScanEngine
  78. ]
  79. interface IRegisterVirusScanEngine: IUnknown
  80. {
  81. HRESULT RegisterScanEngine(
  82. [in] REFCLSID rclsid,
  83. [in] LPWSTR pwszDescription,
  84. [in] DWORD dwFlags,
  85. [in] DWORD dwReserved,
  86. [in, out] DWORD *pdwCookie);
  87. HRESULT UnRegisterScanEngine(
  88. [in] REFCLSID rclsid,
  89. [in] LPWSTR pwszDescription,
  90. [in] DWORD dwFlags,
  91. [in] DWORD dwReserved,
  92. [in] DWORD dwCookie );
  93. }
  94. [
  95. local,
  96. object,
  97. uuid(083DB180-B4A8-11CF-AAFA-00AA00B6015C) // IID_IVirusScanEngine
  98. ]
  99. interface IVirusScanEngine: IUnknown
  100. {
  101. HRESULT ScanForVirus(
  102. [in] HWND hWnd,
  103. [in] STGMEDIUM *pstgMedium,
  104. [in] LPWSTR pwszItemDescription,
  105. [in] DWORD dwFlags,
  106. [in] DWORD dwReserved,
  107. [in, out] LPVIRUSINFO pVirusInfo);
  108. HRESULT DisplayCustomInfo( void );
  109. }
  110. [
  111. uuid(E88E5DE0-BD3E-11CF-AAFA-00AA00B6015C) // CLSID_VirusScan - the standard implementation
  112. ]
  113. coclass VirusScan
  114. {
  115. [default] interface IVirusScanner;
  116. }
  117. }