1 /*++
2
3 Copyright (c) 1997-1999  Microsoft Corporation
4
5 Module Name:
6
7       httpfilt.h
8
9 Abstract:
10
11       This module contains the Microsoft HTTP filter extension info
12
13 Revision History:
14
15 --*/
16
17 #ifndef _HTTPFILT_H_
18 #define _HTTPFILT_H_
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 //
25 // Define ULONG_PTR if necessary
26 //
27
28 #if !defined(__midl) && defined(_X86_) && _MSC_VER >= 1300
29 #define _W64 __w64
30 #else
31 #define _W64
32 #endif
33
34 //
35 // The INT_PTR is guaranteed to be the same size as a pointer.  Its
36 // size with change with pointer size (32/64).  It should be used
37 // anywhere that a pointer is cast to an integer type. UINT_PTR is
38 // the unsigned variation.
39 //
40 // __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler.
41 //
42 #if ( 501 < __midl )
43
44       typedef unsigned __int3264 ULONG_PTR, *PULONG_PTR;
45
46 #else  // midl64
47 // old midl and C++ compiler
48
49 #if defined(_WIN64)
50       typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
51 #else
52       typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;
53 #endif
54 #endif // midl64
55
56
57 //
58 //  Current version of the filter spec is 7.0
59 //
60
61 #define HTTP_FILTER_REVISION      MAKELONG( 0, 7 )
62
63 #define SF_MAX_USERNAME               (256+1)
64 #define SF_MAX_PASSWORD               (256+1)
65 #define SF_MAX_AUTH_TYPE             (32+1)
66
67 #define SF_MAX_FILTER_DESC_LEN  (256+1)
68
69
70 //
71 //  These values can be used with the pfnSFCallback function supplied in
72 //  the filter context structure
73 //
74
75 enum SF_REQ_TYPE
76 {
77       //
78       //  Sends a complete HTTP server response header including
79       //  the status, server version, message time and MIME version.
80       //
81       //  Server extensions should append other information at the end,
Lines 82 ... 641 are skipped.
642       //
643
644       DWORD  dwFilterVersion;
645       CHAR     lpszFilterDesc[SF_MAX_FILTER_DESC_LEN];
646       DWORD  dwFlags;
647
648
649 } HTTP_FILTER_VERSION, *PHTTP_FILTER_VERSION;
650
651
652
653 //
654 //  A filter DLL's entry point looks like this.  The return code should be
655 //  an SF_STATUS_TYPE
656 //
657 //  NotificationType - Type of notification
658 //  pvNotification - Pointer to notification specific data
659 //
660
661 DWORD
662 WINAPI
663 HttpFilterProc(
664       HTTP_FILTER_CONTEXT *          pfc,
665       DWORD                                    NotificationType,
666       VOID *                                   pvNotification
667       );
668
669 BOOL
670 WINAPI
671 GetFilterVersion(
672       HTTP_FILTER_VERSION * pVer
673       );
674
675 BOOL
676 WINAPI
677 TerminateFilter(
678       DWORD dwFlags
679       );
680
681
682 #ifdef __cplusplus
683 }
684 #endif
685
686 #endif //_HTTPFILT_H_
687
688
689
690