title | description | ms.date | ms.assetid |
---|---|---|---|
IHttpFileInfo Interface |
Describes the IHttpFileInfo interface and details its syntax, methods, derived classes, remarks, and requirements. |
10/07/2016 |
82e00c1a-d54d-64d2-465b-581234ab0d24 |
Extends the IHttpCacheSpecificData interface by adding file-specific information for files that are cached on a server.
class IHttpFileInfo : public IHttpCacheSpecificData
The following table lists the methods exposed by the IHttpFileInfo
class.
Name | Description |
---|---|
AccessCheck | Returns a value that indicates whether the user can access the corresponding file. |
CheckIfFileHasChanged | Returns a value that indicates whether the corresponding file has been changed since it was loaded into a file cache. |
DecrementTTL | (Inherited from IHttpCacheSpecificData.) |
DereferenceCacheData | (Inherited from IHttpCacheSpecificData .) |
GetAttributes | Retrieves the attributes of the corresponding file for an IHttpFileInfo interface. |
GetCacheKey | (Inherited from IHttpCacheSpecificData .) |
GetETag | Retrieves the entity tag of the corresponding file for an IHttpFileInfo interface. |
GetFileBuffer | Returns a buffer in memory loaded from the corresponding file. |
GetFileHandle | Returns the file handle for the corresponding file. |
GetFilePath | Returns the physical path of the file referenced by an IHttpFileInfo interface. |
GetFlushed | (Inherited from IHttpCacheSpecificData .) |
GetHttpCacheAllowed | Returns a value that indicates whether the corresponding file can be cached. |
GetLastModifiedString | Retrieves the last modified string of the corresponding file for an IHttpFileInfo interface. |
GetLastModifiedTime | Retrieves the last modified time structure of the corresponding file for an IHttpFileInfo interface. |
GetModuleContextContainer | Returns an IHttpModuleContextContainer pointer for the corresponding file. |
GetSize | Retrieves the size of the corresponding file for an IHttpFileInfo interface. |
GetVrPath | Returns the virtual path for the corresponding file. |
GetVrToken | Returns the virtual token for the corresponding file. |
ReferenceCacheData | (Inherited from IHttpCacheSpecificData .) |
ResetTTL | (Inherited from IHttpCacheSpecificData .) |
SetFlushed | (Inherited from IHttpCacheSpecificData .) |
This interface contains no derived classes.
CHttpModule derived classes that register for request or response events receive an IHttpContext pointer on the corresponding virtual
method for the event. You can retrieve an IHttpFileInfo
pointer by calling the IHttpContext::GetFileInfo method.
The following code example demonstrates how to use the IHttpContext::GetFileInfo method to create an HTTP module that retrieves a pointer to an IHttpFileInfo
interface. The example then displays the IHttpFileInfo
data to a Web client.
[!code-cppIHttpFileInfo#1]
The following text is a sample of the data output from the preceding code example.
HTTP/1.1 200 OK
content-Type:text/plain
Server: Microsoft-IIS/7.0
Date: Thu, 15 Dec 2005 22:22:09 GMT
Content-Length: 374
Access: -123456789
File Changed: false
Attributes: 32
ETag: "1234567890abcde:0"
ETag Value: 19
File Handle: INVALID_HANDLE_VALUE
File Path: C:\INETPUB\WWWROOT\IISSTART.HTM
Cache Allowed: true
Time-to-Live: -1
Last Modified String: Tue, 13 Dec 2005 10:57:41 GMT
Last Modified Time: 12/13/2005 02:57
Module Container: valid
VR Path: NULL
VR Token: NULL
Your module must export the RegisterModule function. You can export this function by creating a module definition (.def) file for your project, or you can compile the module by using the /EXPORT:RegisterModule
switch. For more information, see Walkthrough: Creating a Request-Level HTTP Module By Using Native Code.
You can optionally compile the code by using the __stdcall (/Gz)
calling convention instead of explicitly declaring the calling convention for each function.
IHttpFileInfo
Type | Description |
---|---|
Client | - IIS 7.0 on [!INCLUDEwinvista] - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on [!INCLUDEwinsrv2008] - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 - [!INCLUDEiisexp75], [!INCLUDEiisexp80], [!INCLUDEiisexp100] |
Header | Httpserv.h |