Содержание
- 2. © 2004 Microsoft Corporation. All rights reserved. What are Contexts? Minifilter defined memory associated with Filter
- 3. © 2004 Microsoft Corporation. All rights reserved. Contexts and 3rd party file systems To support Stream
- 4. © 2004 Microsoft Corporation. All rights reserved. Context Registration Specify an array of FLT_CONTEXT_REGISTRATION structures in
- 5. © 2004 Microsoft Corporation. All rights reserved. Creating Contexts Use: NTSTATUS FltAllocateContext ( IN PFLT_FILTER Filter,
- 6. © 2004 Microsoft Corporation. All rights reserved. Setting contexts Use: FltSetVolumeContext() FltSetInstanceContext() FltSetFileContext() FltSetStreamContext() FltSetStreamHandleContext() Sample:
- 7. © 2004 Microsoft Corporation. All rights reserved. Supports contexts Use: BOOLEAN FltSupportsFileContexts ( IN PFILE_OBJECT FileObject);
- 8. © 2004 Microsoft Corporation. All rights reserved. Getting Contexts Use: FltGetVolumeContext() FltGetInstanceContext() FltGetFileContext() FltGetStreamContext() FltGetStreamHandleContext() Sample:
- 9. © 2004 Microsoft Corporation. All rights reserved. Referencing Contexts Use: VOID FltReferenceContext( IN PFLT_CONTEXT Context); This
- 10. © 2004 Microsoft Corporation. All rights reserved. Releasing Contexts Use: VOID FltReleaseContext ( IN PFLT_CONTEXT Context);
- 11. © 2004 Microsoft Corporation. All rights reserved. Multiple contexts Use: VOID FltGetContexts ( IN PFLT_RELATED_OBJECTS FltObjects,
- 12. © 2004 Microsoft Corporation. All rights reserved. Deleting Contexts Use: FltDeleteContext() FltDeleteVolumeContext() FltDeleteInstanceContext() FltDeleteFileContext() FltDeleteStreamContext() FltDeleteStreamHandleContext()
- 13. © 2004 Microsoft Corporation. All rights reserved. Freeing Contexts Contexts are freed after they are deleted
- 14. © 2004 Microsoft Corporation. All rights reserved. Example: Setting a stream context status = FltAllocateContext( FilterHandle,
- 15. © 2004 Microsoft Corporation. All rights reserved. Performance Suggestions If a filter only supports one instance
- 17. Скачать презентацию