📄 dxisapifilter.pas
字号:
// SF_NOTIFY_ORDER_MEDIUM
// SF_NOTIFY_ORDER_LOW - Logging filters that want the results of any other
// filters might specify this order.
//
SF_NOTIFY_ORDER_HIGH = $00080000;
{.$EXTERNALSYM SF_NOTIFY_ORDER_HIGH}
SF_NOTIFY_ORDER_MEDIUM = $00040000;
{.$EXTERNALSYM SF_NOTIFY_ORDER_MEDIUM}
SF_NOTIFY_ORDER_LOW = $00020000;
{.$EXTERNALSYM SF_NOTIFY_ORDER_LOW}
SF_NOTIFY_ORDER_DEFAULT = SF_NOTIFY_ORDER_LOW;
{.$EXTERNALSYM SF_NOTIFY_ORDER_DEFAULT}
SF_NOTIFY_ORDER_MASK = SF_NOTIFY_ORDER_HIGH or
SF_NOTIFY_ORDER_MEDIUM or
SF_NOTIFY_ORDER_LOW;
{.$EXTERNALSYM SF_NOTIFY_ORDER_MASK}
SF_PROPERTY_INSTANCE_NUM_ID = 1;
{.$EXTERNALSYM SF_PROPERTY_INSTANCE_NUM_ID}
//
// pvNotification points to this structure for all request notification types
//
Type
SF_REQ_TYPE = LONGWORD;
SF_STATUS_TYPE = LONGWORD;
PHTTP_FILTER_CONTEXT = ^THTTP_FILTER_CONTEXT;
TFilterGetServerVariableProc = function (pfc: PHTTP_FILTER_CONTEXT;
VariableName: PChar; Buffer: Pointer; var Size: LONGWORD ): BOOLEAN of Object;
// TFilterGetServerVariableProc = function (var pfc{: THTTP_FILTER_CONTEXT};
// VariableName: PChar; Buffer: Pointer; var Size: DWORD ): BOOL of Object;
TFilterAddResponseHeadersProc = function (var pfc{: THTTP_FILTER_CONTEXT};
lpszHeaders: PChar; dwReserved: Longword): BOOLEAN stdcall;
TFilterWriteClientProc = function (var pfc{: THTTP_FILTER_CONTEXT};
Buffer: Pointer; var Bytes: Longword; dwReserved: Longword ): BOOLEAN stdcall;
TFilterAllocMemProc = function (var pfc{: THTTP_FILTER_CONTEXT}; cbSize: Longword;
dwReserved: Longword): Pointer stdcall;
TFilterServerSupportFunctionProc = function (var pfc{: THTTP_FILTER_CONTEXT};
sfReq: Longword; pData: Pointer; ul1, ul2: Longword): BOOLEAN stdcall;
THTTP_FILTER_CONTEXT = record
cbSize: LONGWORD;
//
// This is the structure revision level.
//
Revision: LONGWORD;
//
// Private context information for the server.
//
ServerContext: Pointer;
ulReserved: LONGWORD;
//
// TRUE if this request is coming over a secure port
//
fIsSecurePort: BOOLEAN;
//
// A context that can be used by the filter
//
pFilterContext: Pointer;
//
// Server callbacks
//
GetServerVariable: TFilterGetServerVariableProc;
AddResponseHeaders: TFilterAddResponseHeadersProc;
WriteClient: TFilterWriteClientProc;
AllocMem: TFilterAllocMemProc;
ServerSupportFunction: TFilterServerSupportFunctionProc;
end;
PHTTP_FILTER_RAW_DATA = ^THTTP_FILTER_RAW_DATA;
THTTP_FILTER_RAW_DATA = record
//
// This is a pointer to the data for the filter to process.
//
pvInData: Pointer;
cbInData: LONGWORD; // Number of valid data bytes
cbInBuffer: LONGWORD; // Total size of buffer
dwReserved: LONGWORD;
end;
//
// This structure is the notification info for when the server is about to
// process the client headers
//
TGetHeaderProc = function (var pfc: THTTP_FILTER_CONTEXT; lpszName: PChar;
var lpvBuffer; var lpdwSize: Longword): BOOLEAN stdcall;
TSetHeaderProc = function (var pfc: THTTP_FILTER_CONTEXT; lpszName,
lpszValue: PChar): BOOLEAN stdcall;
TAddHeaderProc = function (var pfc: THTTP_FILTER_CONTEXT; lpszName,
lpszValue: PChar): BOOLEAN stdcall;
PHTTP_FILTER_SEND_RESPONSE = ^THTTP_FILTER_SEND_RESPONSE;
THTTP_FILTER_SEND_RESPONSE = record
AddHeader:TAddHeaderProc;
SetHeader:TSetHeaderProc;
GetHeader:TGetHeaderProc;
HttpStatus:LONGWORD;
dwReserved:LONGWORD;
End;
PHTTP_FILTER_PREPROC_HEADERS = ^THTTP_FILTER_PREPROC_HEADERS;
THTTP_FILTER_PREPROC_HEADERS = record
//
// Retrieves the specified header value. Header names should include
// the trailing ':'. The special values 'method', 'url' and 'version'
// can be used to retrieve the individual portions of the request line
//
GetHeader: TGetHeaderProc;
//
// Replaces this header value to the specified value. To delete a header,
// specified a value of '\0'.
//
SetHeader: TSetHeaderProc;
//
// Adds the specified header and value
//
AddHeader: TAddHeaderProc;
HttpStatus: LONGWORD;
dwReserved: LONGWORD;
end;
//
// Authentication information for this request.
//
PHTTP_FILTER_AUTHENT = ^THTTP_FILTER_AUTHENT;
THTTP_FILTER_AUTHENT = record
//
// Pointer to username and password, empty strings for the anonymous user
//
// Client's can overwrite these buffers which are guaranteed to be at
// least SF_MAX_USERNAME and SF_MAX_PASSWORD bytes large.
//
pszUser: PChar;
cbUserBuff: LONGWORD;
pszPassword: PChar;
cbPasswordBuff: LONGWORD;
end;
//
// Indicates the server is going to use the specific physical mapping for
// the specified URL. Filters can modify the physical path in place.
//
PHTTP_FILTER_URL_MAP = ^THTTP_FILTER_URL_MAP;
THTTP_FILTER_URL_MAP = record
pszURL: PChar;
pszPhysicalPath: PChar;
cbPathBuff: LONGWORD;
end;
PHTTP_FILTER_ACCESS_DENIED = ^THTTP_FILTER_ACCESS_DENIED;
THTTP_FILTER_ACCESS_DENIED = record
pszURL: PChar; // Requesting URL
pszPhysicalPath: PChar; // Physical path of resource
dwReason: LONGWORD; // Bitfield of SF_DENIED flags
end;
//
// The log information about to be written to the server log file. The
// string pointers can be replaced but the memory must remain valid until
// the next notification
//
PHTTP_FILTER_LOG = ^THTTP_FILTER_LOG;
THTTP_FILTER_LOG = record
pszClientHostName: PChar;
pszClientUserName: PChar;
pszServerName: PChar;
pszOperation: PChar;
pszTarget: PChar;
pszParameters: PChar;
dwHttpStatus: LONGWORD;
dwWin32Status: LONGWORD;
dwBytesSent:LONGWORD;
dwBytesRecvd:LONGWORD;
msTimeForProcessing:LONGWORD;
end;
//
// Filter version information, passed to GetFilterVersion
//
PHTTP_FILTER_VERSION = ^THTTP_FILTER_VERSION;
THTTP_FILTER_VERSION = record
//
// Version of the spec the server is using
//
dwServerFilterVersion: LONGWORD;
//
// Fields specified by the client
//
dwFilterVersion: LONGWORD;
lpszFilterDesc: array[0..SF_MAX_FILTER_DESC_LEN - 1] of Char;
dwFlags: LONGWORD;
end;
THttpFilterProc = function (var pfc: THTTP_FILTER_CONTEXT;
Notificationtype: LONGWORD; pvNotification: Pointer): LONGWORD stdcall;
TGetFilterVersion = function (var pVer: THTTP_FILTER_VERSION): BOOLEAN stdcall;
TTerminateFilter = function(flags:LONGWORD): BOOLEAN stdcall;
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -