Top Description Inners Fields Methods
com.sun.jna.platform.win32

public Interface Wininet

extends StdCallLibrary
Imports
com.sun.jna.Native, .Pointer, .Structure, .Structure.FieldOrder, .Union, com.sun.jna.platform.win32.WinNT.HANDLE, com.sun.jna.ptr.IntByReference, com.sun.jna.win32.StdCallLibrary, .W32APIOptions

Functions in WinInet.dll

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Wininet.INTERNET_CACHE_ENTRY_INFO

Contains information about an entry in the Internet cache.

Field Summary

Modifier and TypeField and Description
public static final int
EDITED_CACHE_ENTRY

Cache entry file that has been edited externally.

public static final Wininet
INSTANCE

A usable instance of this interface

public static final int
NORMAL_CACHE_ENTRY

Normal cache entry; can be deleted to recover space for new entries.

public static final int
SPARSE_CACHE_ENTRY

Partial response cache entry.

public static final int
STICKY_CACHE_ENTRY

Sticky cache entry that is exempt from scavenging for the amount of time specified by dwExemptDelta.

public static final int
TRACK_OFFLINE_CACHE_ENTRY

Not currently implemented.

public static final int
TRACK_ONLINE_CACHE_ENTRY

Not currently implemented.

public static final int
URLHISTORY_CACHE_ENTRY

Visited link cache entry.

Inherited from com.sun.jna.win32.StdCallLibrary:
FUNCTION_MAPPERSTDCALL_CONVENTION

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

Returns TRUE if successful, or FALSE otherwise.
To get extended error information, call GetLastError.
Possible error values include the following.
  • ERROR_ACCESS_DENIED:The file is locked or in use. The entry is marked and deleted when the file is unlocked.
  • ERROR_FILE_NOT_FOUND:The file is not in the cache.
DeleteUrlCacheEntry
(String
String that contains the name of the source that corresponds to the cache entry.
lpszUrlName
)

public boolean

Returns:

Returns TRUE if successful, or FALSE otherwise. To get extended error information, call GetLastError.
FindCloseUrlCache
(WinNT.HANDLE
Handle returned by a previous call to the FindFirstUrlCacheEntry function.
hFind
)

Closes the specified cache enumeration handle.

public WinNT.HANDLE

Returns:

Returns a handle that the application can use in the FindNextUrlCacheEntry function to retrieve subsequent entries in the cache.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
ERROR_INSUFFICIENT_BUFFER indicates that the size of lpFirstCacheEntryInfo as specified by lpdwFirstCacheEntryInfoBufferSize is not sufficient to contain all the information.
The value returned in lpdwFirstCacheEntryInfoBufferSize indicates the buffer size necessary to contain all the information.
FindFirstUrlCacheEntry
(String
A pointer to a string that contains the source name pattern to search for.
This parameter can only be set to "cookie:", "visited:", or NULL.
Set this parameter to "cookie:" to enumerate the cookies or "visited:" to enumerate the URL History entries in the cache.
If this parameter is NULL, FindFirstUrlCacheEntry returns all content entries in the cache.
lpszUrlSearchPattern
,
Wininet.INTERNET_CACHE_ENTRY_INFO
Pointer to an INTERNET_CACHE_ENTRY_INFO structure.
lpFirstCacheEntryInfo
,
IntByReference
Pointer to a variable that specifies the size of the lpFirstCacheEntryInfo buffer, in bytes.
When the function returns, the variable contains the number of bytes copied to the buffer, or the required size needed to retrieve the cache entry, in bytes.
lpcbCacheEntryInfo
)

Begins the enumeration of the Internet cache.

public boolean

Returns:

Returns TRUE if successful, or FALSE otherwise.
To get extended error information, call GetLastError.
Possible error values include the following.
  • ERROR_INSUFFICIENT_BUFFER:The size of lpNextCacheEntryInfo as specified by lpdwNextCacheEntryInfoBufferSize is not sufficient to contain all the information.
    The value returned in lpdwNextCacheEntryInfoBufferSize indicates the buffer size necessary to contain all the information.
  • ERROR_NO_MORE_ITEMS:The enumeration completed.
FindNextUrlCacheEntry
(WinNT.HANDLE
Handle to the enumeration obtained from a previous call to FindFirstUrlCacheEntry.
hEnumHandle
,
Wininet.INTERNET_CACHE_ENTRY_INFO
Pointer to an INTERNET_CACHE_ENTRY_INFO structure that receives information about the cache entry.
lpNextCacheEntryInfo
,
IntByReference
Pointer to a variable that specifies the size of the lpNextCacheEntryInfo buffer, in bytes.
When the function returns, the variable contains the number of bytes copied to the buffer, or the size of the buffer required to retrieve the cache entry, in bytes.
lpcbCacheEntryInfo
)

Field Detail

COOKIE_CACHE_ENTRYback to summary
public static final int COOKIE_CACHE_ENTRY

Cookie cache entry.

EDITED_CACHE_ENTRYback to summary
public static final int EDITED_CACHE_ENTRY

Cache entry file that has been edited externally. This cache entry type is exempt from scavenging.

INSTANCEback to summary
public static final Wininet INSTANCE

A usable instance of this interface

NORMAL_CACHE_ENTRYback to summary
public static final int NORMAL_CACHE_ENTRY

Normal cache entry; can be deleted to recover space for new entries.

SPARSE_CACHE_ENTRYback to summary
public static final int SPARSE_CACHE_ENTRY

Partial response cache entry.

STICKY_CACHE_ENTRYback to summary
public static final int STICKY_CACHE_ENTRY

Sticky cache entry that is exempt from scavenging for the amount of time specified by dwExemptDelta.
The default value set by CommitUrlCacheEntryA and CommitUrlCacheEntryW is one day.

TRACK_OFFLINE_CACHE_ENTRYback to summary
public static final int TRACK_OFFLINE_CACHE_ENTRY

Not currently implemented.

TRACK_ONLINE_CACHE_ENTRYback to summary
public static final int TRACK_ONLINE_CACHE_ENTRY

Not currently implemented.

URLHISTORY_CACHE_ENTRYback to summary
public static final int URLHISTORY_CACHE_ENTRY

Visited link cache entry.

Method Detail

DeleteUrlCacheEntryback to summary
public boolean DeleteUrlCacheEntry(String lpszUrlName)
Parameters
lpszUrlName:String

String that contains the name of the source that corresponds to the cache entry.

Returns:boolean

Returns TRUE if successful, or FALSE otherwise.
To get extended error information, call GetLastError.
Possible error values include the following.

  • ERROR_ACCESS_DENIED:The file is locked or in use. The entry is marked and deleted when the file is unlocked.
  • ERROR_FILE_NOT_FOUND:The file is not in the cache.
FindCloseUrlCacheback to summary
public boolean FindCloseUrlCache(WinNT.HANDLE hFind)

Closes the specified cache enumeration handle.

Parameters
hFind:WinNT.HANDLE

Handle returned by a previous call to the FindFirstUrlCacheEntry function.

Returns:boolean

Returns TRUE if successful, or FALSE otherwise. To get extended error information, call GetLastError.

FindFirstUrlCacheEntryback to summary
public WinNT.HANDLE FindFirstUrlCacheEntry(String lpszUrlSearchPattern, Wininet.INTERNET_CACHE_ENTRY_INFO lpFirstCacheEntryInfo, IntByReference lpcbCacheEntryInfo)

Begins the enumeration of the Internet cache.

Parameters
lpszUrlSearchPattern:String

A pointer to a string that contains the source name pattern to search for.
This parameter can only be set to "cookie:", "visited:", or NULL.
Set this parameter to "cookie:" to enumerate the cookies or "visited:" to enumerate the URL History entries in the cache.
If this parameter is NULL, FindFirstUrlCacheEntry returns all content entries in the cache.

lpFirstCacheEntryInfo:Wininet.INTERNET_CACHE_ENTRY_INFO

Pointer to an INTERNET_CACHE_ENTRY_INFO structure.

lpcbCacheEntryInfo:IntByReference

Pointer to a variable that specifies the size of the lpFirstCacheEntryInfo buffer, in bytes.
When the function returns, the variable contains the number of bytes copied to the buffer, or the required size needed to retrieve the cache entry, in bytes.

Returns:WinNT.HANDLE

Returns a handle that the application can use in the FindNextUrlCacheEntry function to retrieve subsequent entries in the cache.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
ERROR_INSUFFICIENT_BUFFER indicates that the size of lpFirstCacheEntryInfo as specified by lpdwFirstCacheEntryInfoBufferSize is not sufficient to contain all the information.
The value returned in lpdwFirstCacheEntryInfoBufferSize indicates the buffer size necessary to contain all the information.

FindNextUrlCacheEntryback to summary
public boolean FindNextUrlCacheEntry(WinNT.HANDLE hEnumHandle, Wininet.INTERNET_CACHE_ENTRY_INFO lpNextCacheEntryInfo, IntByReference lpcbCacheEntryInfo)
Parameters
hEnumHandle:WinNT.HANDLE

Handle to the enumeration obtained from a previous call to FindFirstUrlCacheEntry.

lpNextCacheEntryInfo:Wininet.INTERNET_CACHE_ENTRY_INFO

Pointer to an INTERNET_CACHE_ENTRY_INFO structure that receives information about the cache entry.

lpcbCacheEntryInfo:IntByReference

Pointer to a variable that specifies the size of the lpNextCacheEntryInfo buffer, in bytes.
When the function returns, the variable contains the number of bytes copied to the buffer, or the size of the buffer required to retrieve the cache entry, in bytes.

Returns:boolean

Returns TRUE if successful, or FALSE otherwise.
To get extended error information, call GetLastError.
Possible error values include the following.

  • ERROR_INSUFFICIENT_BUFFER:The size of lpNextCacheEntryInfo as specified by lpdwNextCacheEntryInfoBufferSize is not sufficient to contain all the information.
    The value returned in lpdwNextCacheEntryInfoBufferSize indicates the buffer size necessary to contain all the information.
  • ERROR_NO_MORE_ITEMS:The enumeration completed.
com.sun.jna.platform.win32 back to summary

public Class Wininet.INTERNET_CACHE_ENTRY_INFO

extends Structure
Class Inheritance
Annotations
@FieldOrder:dwStructSize, lpszSourceUrlName, lpszLocalFileName, CacheEntryType, dwUseCount, dwHitRate, dwSizeLow, dwSizeHigh, LastModifiedTime, ExpireTime, LastAccessTime, LastSyncTime, lpHeaderInfo, dwHeaderInfoSize, lpszFileExtension, u, additional

Contains information about an entry in the Internet cache.

typedef struct _INTERNET_CACHE_ENTRY_INFO {
  DWORD    dwStructSize;
  LPTSTR   lpszSourceUrlName;
  LPTSTR   lpszLocalFileName;
  DWORD    CacheEntryType;
  DWORD    dwUseCount;
  DWORD    dwHitRate;
  DWORD    dwSizeLow;
  DWORD    dwSizeHigh;
  FILETIME LastModifiedTime;
  FILETIME ExpireTime;
  FILETIME LastAccessTime;
  FILETIME LastSyncTime;
  LPTSTR   lpHeaderInfo;
  DWORD    dwHeaderInfoSize;
  LPTSTR   lpszFileExtension;
  union {
    DWORD dwReserved;
    DWORD dwExemptDelta;
  };
} INTERNET_CACHE_ENTRY_INFO, *LPINTERNET_CACHE_ENTRY_INFO;

    
See Also
MSDN

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Wininet.INTERNET_CACHE_ENTRY_INFO.UNION

A union of the last two distinct fields in INTERNET_CACHE_ENTRY_INFO


            union {
                DWORD dwReserved;
                DWORD dwExemptDelta;
            };

Field Summary

Modifier and TypeField and Description
public byte[]
additional

Additional data (the path and URLs mentioned previously, and more)

public int
CacheEntryType

A bitmask indicating the type of cache entry and its properties.

public int
dwHeaderInfoSize

Size of the lpHeaderInfo buffer, in TCHARs.

public int
dwHitRate

Number of times the cache entry was retrieved.

public int
dwSizeHigh

High-order portion of the file size, in bytes.

public int
dwSizeLow

Low-order portion of the file size, in bytes.

public int
dwStructSize

Size of this structure, in bytes.

public int
dwUseCount

Current number of WinInet callers using the cache entry.

public WinBase.FILETIME
ExpireTime

FILETIME structure that contains the expiration time of this file, in Greenwich mean time format.

public WinBase.FILETIME
LastAccessTime

FILETIME structure that contains the last accessed time, in Greenwich mean time format.

public WinBase.FILETIME
LastModifiedTime

FILETIME structure that contains the last modified time of this URL, in Greenwich mean time format.

public WinBase.FILETIME
LastSyncTime

FILETIME structure that contains the last time the cache was synchronized.

public Pointer
lpHeaderInfo

Pointer to a buffer that contains the header information.

public Pointer
lpszFileExtension

Pointer to a string that contains the file name extension used to retrieve the data as a file.

public Pointer
lpszLocalFileName

Pointer to a null-terminated string that contains the local file name.

public Pointer
lpszSourceUrlName

Pointer to a null-terminated string that contains the URL name.

public Wininet.INTERNET_CACHE_ENTRY_INFO.UNION
u

A union of the last two distinct fields in INTERNET_CACHE_ENTRY_INFO

Inherited from com.sun.jna.Structure:
ALIGN_DEFAULTALIGN_GNUCALIGN_MSVCALIGN_NONECALCULATE_SIZE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides com.sun.jna.Structure.toString.

If jna.dump_memory is true, will include a native memory dump of the Structure's backing memory.
Inherited from com.sun.jna.Structure:
allocateMemoryallocateMemoryautoAllocateautoReadautoReadautoWriteautoWritecacheTypeInfocalculateSizeclearcreateFieldsOrdercreateFieldsOrdercreateFieldsOrdercreateFieldsOrderdataEqualsdataEqualsensureAllocatedequalsfieldOffsetgetAutoReadgetAutoWritegetFieldListgetFieldOrdergetFieldsgetNativeAlignmentgetNativeSizegetNativeSizegetPointergetStringEncodinggetStructAlignmenthashCodenewInstancenewInstancereadreadFieldreadFieldsetAlignTypesetAutoReadsetAutoSynchsetAutoWritesetStringEncodingsizesortFieldstoArraytoArraytoStringuseMemoryuseMemorywritewriteFieldwriteFieldwriteField

Field Detail

additionalback to summary
public byte[] additional

Additional data (the path and URLs mentioned previously, and more)

CacheEntryTypeback to summary
public int CacheEntryType

A bitmask indicating the type of cache entry and its properties.
The cache entry types include: history entries (URLHISTORY_CACHE_ENTRY), cookie entries (COOKIE_CACHE_ENTRY), and normal cached content (NORMAL_CACHE_ENTRY).

This member can be zero or more of the following property flags, and cache type flags listed below.

  • EDITED_CACHE_ENTRY: Cache entry file that has been edited externally. This cache entry type is exempt from scavenging.
  • SPARSE_CACHE_ENTRY: Partial response cache entry.
  • STICKY_CACHE_ENTRY: Sticky cache entry that is exempt from scavenging for the amount of time specified by dwExemptDelta.
    The default value set by CommitUrlCacheEntryA and CommitUrlCacheEntryW is one day.
  • TRACK_OFFLINE_CACHE_ENTRY: Not currently implemented.
  • TRACK_ONLINE_CACHE_ENTRY: Not currently implemented.

The following list contains the cache type flags.
  • COOKIE_CACHE_ENTRY: Cookie cache entry.
  • NORMAL_CACHE_ENTRY: Normal cache entry; can be deleted to recover space for new entries.
  • URLHISTORY_CACHE_ENTRY: Visited link cache entry.
dwHeaderInfoSizeback to summary
public int dwHeaderInfoSize

Size of the lpHeaderInfo buffer, in TCHARs.

dwHitRateback to summary
public int dwHitRate

Number of times the cache entry was retrieved.

dwSizeHighback to summary
public int dwSizeHigh

High-order portion of the file size, in bytes.

dwSizeLowback to summary
public int dwSizeLow

Low-order portion of the file size, in bytes.

dwStructSizeback to summary
public int dwStructSize

Size of this structure, in bytes. This value can be used to help determine the version of the cache system.

dwUseCountback to summary
public int dwUseCount

Current number of WinInet callers using the cache entry.

ExpireTimeback to summary
public WinBase.FILETIME ExpireTime

FILETIME structure that contains the expiration time of this file, in Greenwich mean time format.

LastAccessTimeback to summary
public WinBase.FILETIME LastAccessTime

FILETIME structure that contains the last accessed time, in Greenwich mean time format.

LastModifiedTimeback to summary
public WinBase.FILETIME LastModifiedTime

FILETIME structure that contains the last modified time of this URL, in Greenwich mean time format.

LastSyncTimeback to summary
public WinBase.FILETIME LastSyncTime

FILETIME structure that contains the last time the cache was synchronized.

lpHeaderInfoback to summary
public Pointer lpHeaderInfo

Pointer to a buffer that contains the header information. The buffer occupies the memory at the end of this structure.

lpszFileExtensionback to summary
public Pointer lpszFileExtension

Pointer to a string that contains the file name extension used to retrieve the data as a file. The string occupies the memory area at the end of this structure.

lpszLocalFileNameback to summary
public Pointer lpszLocalFileName

Pointer to a null-terminated string that contains the local file name. The string occupies the memory area at the end of this structure.

lpszSourceUrlNameback to summary
public Pointer lpszSourceUrlName

Pointer to a null-terminated string that contains the URL name. The string occupies the memory area at the end of this structure.

uback to summary
public Wininet.INTERNET_CACHE_ENTRY_INFO.UNION u

A union of the last two distinct fields in INTERNET_CACHE_ENTRY_INFO

Constructor Detail

INTERNET_CACHE_ENTRY_INFOback to summary
public INTERNET_CACHE_ENTRY_INFO(int size)

Method Detail

toStringback to summary
public String toString()

Overrides com.sun.jna.Structure.toString.

Doc from com.sun.jna.Structure.toString.

If jna.dump_memory is true, will include a native memory dump of the Structure's backing memory.

Returns:String

String representation of this object.

Annotations
@Override
com.sun.jna.platform.win32 back to summary

public Class Wininet.INTERNET_CACHE_ENTRY_INFO.UNION

extends Union
Class Inheritance

A union of the last two distinct fields in INTERNET_CACHE_ENTRY_INFO

            union {
                DWORD dwReserved;
                DWORD dwExemptDelta;
            };

Field Summary

Modifier and TypeField and Description
public int
dwExemptDelta

Exemption time from the last accessed time, in seconds.

public int
dwReserved

Reserved.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from com.sun.jna.Union:
getFieldOrdergetNativeAlignmentgetTypedValuereadFieldreadFieldsetTypesetTypesetTypedValuewriteFieldwriteFieldwriteField

Field Detail

dwExemptDeltaback to summary
public int dwExemptDelta

Exemption time from the last accessed time, in seconds.

dwReservedback to summary
public int dwReserved

Reserved. Must be zero.

Constructor Detail

UNIONback to summary
public UNION()