Win32 API 日本語リファレンス
ホームNetworking.WinInet › FindFirstUrlCacheEntryW

FindFirstUrlCacheEntryW

関数
URLキャッシュエントリの列挙を開始し最初の項目を取得する(Unicode版)。
DLLWININET.dll文字セットUnicode (-W)呼出規約winapiSetLastErrorあり対応OSWindows 2000 以降

シグネチャ

// WININET.dll  (Unicode / -W)
#include <windows.h>

HANDLE FindFirstUrlCacheEntryW(
    LPCWSTR lpszUrlSearchPattern,   // optional
    INTERNET_CACHE_ENTRY_INFOW* lpFirstCacheEntryInfo,   // optional
    DWORD* lpcbCacheEntryInfo
);

パラメーター

名前方向説明
lpszUrlSearchPatternLPCWSTRinoptional検索するソース名パターンを格納する文字列へのポインターです。このパラメーターには "cookie:"、"visited:"、または NULL のいずれかのみを設定できます。Cookie を列挙するには "cookie:" を、キャッシュ内の URL 履歴エントリを列挙するには "visited:" を設定します。このパラメーターが NULL の場合、FindFirstUrlCacheEntry はキャッシュ内のすべてのコンテンツエントリを返します。
lpFirstCacheEntryInfoINTERNET_CACHE_ENTRY_INFOW*inoutoptionalINTERNET_CACHE_ENTRY_INFO 構造体へのポインターです。
lpcbCacheEntryInfoDWORD*inoutlpFirstCacheEntryInfo バッファーのサイズをバイト単位で指定する変数へのポインターです。関数が返るときには、この変数にはバッファーにコピーされたバイト数、またはキャッシュエントリの取得に必要なサイズがバイト単位で格納されます。

戻り値の型: HANDLE

公式ドキュメント

インターネットキャッシュの列挙を開始します。(Unicode)

戻り値

アプリケーションが FindNextUrlCacheEntry 関数で後続のキャッシュエントリを取得するために使用できるハンドルを返します。関数が失敗した場合、戻り値は NULL です。拡張エラー情報を取得するには、 GetLastError を呼び出します。

ERROR_INSUFFICIENT_BUFFER は、 lpdwFirstCacheEntryInfoBufferSize で指定された lpFirstCacheEntryInfo のサイズが、すべての情報を格納するのに十分でないことを示します。 lpdwFirstCacheEntryInfoBufferSize に返される値は、すべての情報を格納するために必要なバッファーサイズを示します。

解説(Remarks)

FindFirstUrlCacheEntry から返されるハンドルは、それ以降のすべての FindNextUrlCacheEntry の呼び出しで使用されます。列挙の終了時には、アプリケーションは FindCloseUrlCache を呼び出す必要があります。

FindFirstUrlCacheEntryFindNextUrlCacheEntry は可変サイズの情報を返します。ERROR_INSUFFICIENT_BUFFER が返された場合、アプリケーションは lpdwFirstCacheEntryInfoBufferSize で指定されたサイズのバッファーを確保する必要があります。詳細については、 Using Buffers を参照してください。

WinINet API の他のすべての側面と同様に、この関数は DllMain 内やグローバルオブジェクトのコンストラクター・デストラクター内から安全に呼び出すことはできません。

注意 WinINet はサーバー実装をサポートしていません。また、サービスから使用すべきではありません。サーバー実装やサービスでは Microsoft Windows HTTP Services (WinHTTP) を使用してください。
メモ

wininet.h ヘッダーは、UNICODE プリプロセッサ定数の定義に基づいて、この関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして FindFirstUrlCacheEntry を定義しています。エンコーディング中立のエイリアスの使用を、エンコーディング中立でないコードと混在させると、コンパイルエラーや実行時エラーを引き起こす不整合が生じる可能性があります。詳細については、Conventions for Function Prototypes を参照してください。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での呼び出し定義

// WININET.dll  (Unicode / -W)
#include <windows.h>

HANDLE FindFirstUrlCacheEntryW(
    LPCWSTR lpszUrlSearchPattern,   // optional
    INTERNET_CACHE_ENTRY_INFOW* lpFirstCacheEntryInfo,   // optional
    DWORD* lpcbCacheEntryInfo
);
[DllImport("WININET.dll", CharSet = CharSet.Unicode, SetLastError = true, ExactSpelling = true)]
static extern IntPtr FindFirstUrlCacheEntryW(
    [MarshalAs(UnmanagedType.LPWStr)] string lpszUrlSearchPattern,   // LPCWSTR optional
    IntPtr lpFirstCacheEntryInfo,   // INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    ref uint lpcbCacheEntryInfo   // DWORD* in/out
);
<DllImport("WININET.dll", CharSet:=CharSet.Unicode, SetLastError:=True, ExactSpelling:=True)>
Public Shared Function FindFirstUrlCacheEntryW(
    <MarshalAs(UnmanagedType.LPWStr)> lpszUrlSearchPattern As String,   ' LPCWSTR optional
    lpFirstCacheEntryInfo As IntPtr,   ' INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    ByRef lpcbCacheEntryInfo As UInteger   ' DWORD* in/out
) As IntPtr
End Function
' lpszUrlSearchPattern : LPCWSTR optional
' lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out
' lpcbCacheEntryInfo : DWORD* in/out
Declare PtrSafe Function FindFirstUrlCacheEntryW Lib "wininet" ( _
    ByVal lpszUrlSearchPattern As LongPtr, _
    ByVal lpFirstCacheEntryInfo As LongPtr, _
    ByRef lpcbCacheEntryInfo As Long) As LongPtr
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

FindFirstUrlCacheEntryW = ctypes.windll.wininet.FindFirstUrlCacheEntryW
FindFirstUrlCacheEntryW.restype = ctypes.c_void_p
FindFirstUrlCacheEntryW.argtypes = [
    wintypes.LPCWSTR,  # lpszUrlSearchPattern : LPCWSTR optional
    ctypes.c_void_p,  # lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    ctypes.POINTER(wintypes.DWORD),  # lpcbCacheEntryInfo : DWORD* in/out
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('WININET.dll')
FindFirstUrlCacheEntryW = Fiddle::Function.new(
  lib['FindFirstUrlCacheEntryW'],
  [
    Fiddle::TYPE_VOIDP,  # lpszUrlSearchPattern : LPCWSTR optional
    Fiddle::TYPE_VOIDP,  # lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    Fiddle::TYPE_VOIDP,  # lpcbCacheEntryInfo : DWORD* in/out
  ],
  Fiddle::TYPE_VOIDP)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"
#[link(name = "wininet")]
extern "system" {
    fn FindFirstUrlCacheEntryW(
        lpszUrlSearchPattern: *const u16,  // LPCWSTR optional
        lpFirstCacheEntryInfo: *mut INTERNET_CACHE_ENTRY_INFOW,  // INTERNET_CACHE_ENTRY_INFOW* optional, in/out
        lpcbCacheEntryInfo: *mut u32  // DWORD* in/out
    ) -> *mut core::ffi::c_void;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("WININET.dll", CharSet = CharSet.Unicode, SetLastError = true)]
public static extern IntPtr FindFirstUrlCacheEntryW([MarshalAs(UnmanagedType.LPWStr)] string lpszUrlSearchPattern, IntPtr lpFirstCacheEntryInfo, ref uint lpcbCacheEntryInfo);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_FindFirstUrlCacheEntryW' -Namespace Win32 -PassThru
# $api::FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo)
#uselib "WININET.dll"
#func global FindFirstUrlCacheEntryW "FindFirstUrlCacheEntryW" wptr, wptr, wptr
; FindFirstUrlCacheEntryW lpszUrlSearchPattern, varptr(lpFirstCacheEntryInfo), varptr(lpcbCacheEntryInfo)   ; 戻り値は stat
; lpszUrlSearchPattern : LPCWSTR optional -> "wptr"
; lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> "wptr"
; lpcbCacheEntryInfo : DWORD* in/out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "WININET.dll"
#cfunc global FindFirstUrlCacheEntryW "FindFirstUrlCacheEntryW" wstr, var, var
; res = FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo)
; lpszUrlSearchPattern : LPCWSTR optional -> "wstr"
; lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> "var"
; lpcbCacheEntryInfo : DWORD* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HANDLE FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern, INTERNET_CACHE_ENTRY_INFOW* lpFirstCacheEntryInfo, DWORD* lpcbCacheEntryInfo)
#uselib "WININET.dll"
#cfunc global FindFirstUrlCacheEntryW "FindFirstUrlCacheEntryW" wstr, var, var
; res = FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo)
; lpszUrlSearchPattern : LPCWSTR optional -> "wstr"
; lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> "var"
; lpcbCacheEntryInfo : DWORD* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	wininet = windows.NewLazySystemDLL("WININET.dll")
	procFindFirstUrlCacheEntryW = wininet.NewProc("FindFirstUrlCacheEntryW")
)

// lpszUrlSearchPattern (LPCWSTR optional), lpFirstCacheEntryInfo (INTERNET_CACHE_ENTRY_INFOW* optional, in/out), lpcbCacheEntryInfo (DWORD* in/out)
r1, _, err := procFindFirstUrlCacheEntryW.Call(
	uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(lpszUrlSearchPattern))),
	uintptr(lpFirstCacheEntryInfo),
	uintptr(lpcbCacheEntryInfo),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HANDLE
function FindFirstUrlCacheEntryW(
  lpszUrlSearchPattern: PWideChar;   // LPCWSTR optional
  lpFirstCacheEntryInfo: Pointer;   // INTERNET_CACHE_ENTRY_INFOW* optional, in/out
  lpcbCacheEntryInfo: Pointer   // DWORD* in/out
): THandle; stdcall;
  external 'WININET.dll' name 'FindFirstUrlCacheEntryW';
result := DllCall("WININET\FindFirstUrlCacheEntryW"
    , "WStr", lpszUrlSearchPattern   ; LPCWSTR optional
    , "Ptr", lpFirstCacheEntryInfo   ; INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    , "Ptr", lpcbCacheEntryInfo   ; DWORD* in/out
    , "Ptr")   ; return: HANDLE
●FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo) = DLL("WININET.dll", "void* FindFirstUrlCacheEntryW(char*, void*, void*)")
# 呼び出し: FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo)
# lpszUrlSearchPattern : LPCWSTR optional -> "char*"
# lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> "void*"
# lpcbCacheEntryInfo : DWORD* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。
const std = @import("std");

extern "wininet" fn FindFirstUrlCacheEntryW(
    lpszUrlSearchPattern: [*c]const u16, // LPCWSTR optional
    lpFirstCacheEntryInfo: [*c]INTERNET_CACHE_ENTRY_INFOW, // INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    lpcbCacheEntryInfo: [*c]u32 // DWORD* in/out
) callconv(std.os.windows.WINAPI) ?*anyopaque;
// Unicode(-W): UTF-16LE のヌル終端バッファ([*c]const u16)を渡す。
proc FindFirstUrlCacheEntryW(
    lpszUrlSearchPattern: WideCString,  # LPCWSTR optional
    lpFirstCacheEntryInfo: ptr INTERNET_CACHE_ENTRY_INFOW,  # INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    lpcbCacheEntryInfo: ptr uint32  # DWORD* in/out
): pointer {.importc: "FindFirstUrlCacheEntryW", stdcall, dynlib: "WININET.dll".}
# Unicode(-W): WideCString は newWideCString("...") で生成。
pragma(lib, "wininet");
extern(Windows)
void* FindFirstUrlCacheEntryW(
    const(wchar)* lpszUrlSearchPattern,   // LPCWSTR optional
    INTERNET_CACHE_ENTRY_INFOW* lpFirstCacheEntryInfo,   // INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    uint* lpcbCacheEntryInfo   // DWORD* in/out
);
ccall((:FindFirstUrlCacheEntryW, "WININET.dll"), stdcall, Ptr{Cvoid},
      (Cwstring, Ptr{INTERNET_CACHE_ENTRY_INFOW}, Ptr{UInt32}),
      lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo)
# lpszUrlSearchPattern : LPCWSTR optional -> Cwstring
# lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> Ptr{INTERNET_CACHE_ENTRY_INFOW}
# lpcbCacheEntryInfo : DWORD* in/out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
# Unicode(-W): Cwstring には transcode(UInt16, "...") 等で UTF-16 を渡す。
local ffi = require("ffi")
ffi.cdef[[
void* FindFirstUrlCacheEntryW(
    const uint16_t* lpszUrlSearchPattern,
    void* lpFirstCacheEntryInfo,
    uint32_t* lpcbCacheEntryInfo);
]]
local wininet = ffi.load("wininet")
-- wininet.FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo)
-- lpszUrlSearchPattern : LPCWSTR optional
-- lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out
-- lpcbCacheEntryInfo : DWORD* in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
-- Unicode(-W): uint16_t* には UTF-16LE のバッファ(ffi.new("uint16_t[?]", ...))を渡す。
const koffi = require('koffi');
const lib = koffi.load('WININET.dll');
const FindFirstUrlCacheEntryW = lib.func('__stdcall', 'FindFirstUrlCacheEntryW', 'void *', ['str16', 'void *', 'uint32_t *']);
// FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo)
// lpszUrlSearchPattern : LPCWSTR optional -> 'str16'
// lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> 'void *'
// lpcbCacheEntryInfo : DWORD* in/out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("WININET.dll", {
  FindFirstUrlCacheEntryW: { parameters: ["buffer", "pointer", "pointer"], result: "pointer" },
});
// lib.symbols.FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo)
// lpszUrlSearchPattern : LPCWSTR optional -> "buffer"
// lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> "pointer"
// lpcbCacheEntryInfo : DWORD* in/out -> "pointer"
// 文字列は "buffer"。Unicode(-W) は new TextEncoder() ではなく UTF-16LE のバイト列(末尾に \x00\x00)を Uint8Array で渡す。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
void* FindFirstUrlCacheEntryW(
    const uint16_t* lpszUrlSearchPattern,
    void* lpFirstCacheEntryInfo,
    uint32_t* lpcbCacheEntryInfo);
C, "WININET.dll");
// $ffi->FindFirstUrlCacheEntryW(lpszUrlSearchPattern, lpFirstCacheEntryInfo, lpcbCacheEntryInfo);
// lpszUrlSearchPattern : LPCWSTR optional
// lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out
// lpcbCacheEntryInfo : DWORD* in/out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。
import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;

public interface Wininet extends StdCallLibrary {
    Wininet INSTANCE = Native.load("wininet", Wininet.class, W32APIOptions.UNICODE_OPTIONS);
    Pointer FindFirstUrlCacheEntryW(
        WString lpszUrlSearchPattern,   // LPCWSTR optional
        Pointer lpFirstCacheEntryInfo,   // INTERNET_CACHE_ENTRY_INFOW* optional, in/out
        IntByReference lpcbCacheEntryInfo   // DWORD* in/out
    );
}
// Unicode(-W): WString(入力)/char[](出力)で UTF-16 をマーシャリング。
@[Link("wininet")]
lib LibWININET
  fun FindFirstUrlCacheEntryW = FindFirstUrlCacheEntryW(
    lpszUrlSearchPattern : UInt16*,   # LPCWSTR optional
    lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW*,   # INTERNET_CACHE_ENTRY_INFOW* optional, in/out
    lpcbCacheEntryInfo : UInt32*   # DWORD* in/out
  ) : Void*
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef FindFirstUrlCacheEntryWNative = Pointer<Void> Function(Pointer<Utf16>, Pointer<Void>, Pointer<Uint32>);
typedef FindFirstUrlCacheEntryWDart = Pointer<Void> Function(Pointer<Utf16>, Pointer<Void>, Pointer<Uint32>);
final FindFirstUrlCacheEntryW = DynamicLibrary.open('WININET.dll')
    .lookupFunction<FindFirstUrlCacheEntryWNative, FindFirstUrlCacheEntryWDart>('FindFirstUrlCacheEntryW');
// lpszUrlSearchPattern : LPCWSTR optional -> Pointer<Utf16>
// lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> Pointer<Void>
// lpcbCacheEntryInfo : DWORD* in/out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function FindFirstUrlCacheEntryW(
  lpszUrlSearchPattern: PWideChar;   // LPCWSTR optional
  lpFirstCacheEntryInfo: Pointer;   // INTERNET_CACHE_ENTRY_INFOW* optional, in/out
  lpcbCacheEntryInfo: Pointer   // DWORD* in/out
): THandle; stdcall;
  external 'WININET.dll' name 'FindFirstUrlCacheEntryW';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "FindFirstUrlCacheEntryW"
  c_FindFirstUrlCacheEntryW :: CWString -> Ptr () -> Ptr Word32 -> IO (Ptr ())
-- lpszUrlSearchPattern : LPCWSTR optional -> CWString
-- lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> Ptr ()
-- lpcbCacheEntryInfo : DWORD* in/out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let findfirsturlcacheentryw =
  foreign "FindFirstUrlCacheEntryW"
    ((ptr uint16_t) @-> (ptr void) @-> (ptr uint32_t) @-> returning (ptr void))
(* lpszUrlSearchPattern : LPCWSTR optional -> (ptr uint16_t) *)
(* lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> (ptr void) *)
(* lpcbCacheEntryInfo : DWORD* in/out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library wininet (t "WININET.dll"))
(cffi:use-foreign-library wininet)

(cffi:defcfun ("FindFirstUrlCacheEntryW" find-first-url-cache-entry-w :convention :stdcall) :pointer
  (lpsz-url-search-pattern (:string :encoding :utf-16le))   ; LPCWSTR optional
  (lp-first-cache-entry-info :pointer)   ; INTERNET_CACHE_ENTRY_INFOW* optional, in/out
  (lpcb-cache-entry-info :pointer))   ; DWORD* in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $FindFirstUrlCacheEntryW = Win32::API::More->new('WININET',
    'HANDLE FindFirstUrlCacheEntryW(LPCWSTR lpszUrlSearchPattern, LPVOID lpFirstCacheEntryInfo, LPVOID lpcbCacheEntryInfo)');
# my $ret = $FindFirstUrlCacheEntryW->Call($lpszUrlSearchPattern, $lpFirstCacheEntryInfo, $lpcbCacheEntryInfo);
# lpszUrlSearchPattern : LPCWSTR optional -> LPCWSTR
# lpFirstCacheEntryInfo : INTERNET_CACHE_ENTRY_INFOW* optional, in/out -> LPVOID
# lpcbCacheEntryInfo : DWORD* in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# Unicode(-W): LPCWSTR/LPWSTR は Win32::API が UTF-16 変換を行う。

関連項目

文字セット違い
類似 API
使用する型