home *** CD-ROM | disk | FTP | other *** search
- /* ------------------------------------------------------------------------- *
- * COM+ Runtime Verifier / Validator Interace
- *
- * Purpose: IValidator is used to staticly validate COR images.
- *
- * Protocol:
- *
- * Client CoCreates CorHost.Validator,
- * Calls Validate()
- * [optional - passes in IVEHandler for error callbacks on error]
- *
- * On Error, Validator calls IVEHandler.VEHandler() method.
- * (IVEHandler supplied by the client).
- * VEHandler() could return CONTINUE / STOP ...
- *
- * VEHandler() can call Validator.FormatEventInfo() to get a detailed
- * error message on any error passed to IVEHandler.
- *
- * Copyright (C) 1999 Microsoft Corporation
- * ------------------------------------------------------------------------- */
-
- /* ------------------------------------------------------------------------- *
- * Imported types
- * ------------------------------------------------------------------------- */
-
- #ifndef DO_NO_IMPORTS
- import "ivehandler.idl";
- #endif
-
-
- /* ------------------------------------------------------------------------- *
- * Forward declarations
- * ------------------------------------------------------------------------- */
-
- interface IValidator;
- interface ILoader;
-
-
- /* ------------------------------------------------------------------------- *
- * IValidator interface
- * ------------------------------------------------------------------------- */
- [
- object,
- uuid(A471523E-B299-4F4F-B184-1E78D4C95A95),
- pointer_default(unique)
- ]
- interface IValidator : IUnknown
- {
- HRESULT Validate(
- [in] IVEHandler *veh,
- [in] ILoader *loader,
- [in] unsigned long ulFlags,
- [in] unsigned long ulMaxError,
- [in] unsigned long token,
- [in] LPWSTR fileName,
- [in, size_is(ulSize)] byte *pe,
- [in] unsigned long ulSize);
-
- HRESULT FormatEventInfo(
- [in] HRESULT hVECode,
- [in] VEContext Context,
- [in, out] LPWSTR msg,
- [in] unsigned long ulMaxLength,
- [in] SAFEARRAY(VARIANT) psa);
- };
-
- /* ------------------------------------------------------------------------- *
- * ILoader interface
- * ------------------------------------------------------------------------- */
- [
- object,
- uuid(9C4726CE-4C83-4011-BC22-2823B64CBE81),
- pointer_default(unique)
- ]
- interface ILoader : IUnknown
- {
- HRESULT LoadModule(
- [in] LPWSTR fileName,
- [out] byte *pe,
- [out] unsigned long *pulSize);
- HRESULT UnloadModule(
- [in] LPWSTR fileName,
- [in] byte *pe);
- };
-
-