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

SetUrlCacheEntryGroupW

関数
URLキャッシュエントリをグループに追加または削除する(Unicode版)。
DLLWININET.dll文字セットUnicode (-W)呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

BOOL SetUrlCacheEntryGroupW(
    LPCWSTR lpszUrlName,
    DWORD dwFlags,
    LONGLONG GroupId,
    BYTE* pbGroupAttributes,   // optional
    DWORD cbGroupAttributes,   // optional
    void* lpReserved   // optional
);

パラメーター

名前方向説明
lpszUrlNameLPCWSTRinキャッシュされたリソースの URL を指定する null 終端文字列値へのポインタです。
dwFlagsDWORDin

エントリをキャッシュグループに追加するか、キャッシュグループから削除するかを決定します。このパラメータには、次のいずれかの値を指定できます。

意味
INTERNET_CACHE_GROUP_ADD
キャッシュエントリをキャッシュグループに追加します。
INTERNET_CACHE_GROUP_REMOVE
キャッシュグループからエントリを削除します。
GroupIdLONGLONGinエントリの追加先または削除元となるキャッシュグループの識別子です。
pbGroupAttributesBYTE*optionalこのパラメータは予約されており、NULL でなければなりません。
cbGroupAttributesDWORDoptionalこのパラメータは予約されており、0 でなければなりません。
lpReservedvoid*optionalこのパラメータは予約されており、NULL でなければなりません。

戻り値の型: BOOL

公式ドキュメント

SetUrlCacheEntryGroupW (Unicode) 関数 (wininet.h) は、キャッシュグループにエントリを追加するか、キャッシュグループからエントリを削除します。

戻り値

成功した場合は TRUE を返し、それ以外の場合は FALSE を返します。

解説(Remarks)

1 つのキャッシュエントリは、複数のキャッシュグループに属することができます。

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

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

wininet.h ヘッダーは、UNICODE プリプロセッサ定数の定義に基づいて、この関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして SetUrlCacheEntryGroup を定義しています。エンコーディング中立なエイリアスの使用を、エンコーディング中立でないコードと混在させると、不一致が生じてコンパイルエラーや実行時エラーを引き起こす可能性があります。詳細については、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>

BOOL SetUrlCacheEntryGroupW(
    LPCWSTR lpszUrlName,
    DWORD dwFlags,
    LONGLONG GroupId,
    BYTE* pbGroupAttributes,   // optional
    DWORD cbGroupAttributes,   // optional
    void* lpReserved   // optional
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WININET.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern bool SetUrlCacheEntryGroupW(
    [MarshalAs(UnmanagedType.LPWStr)] string lpszUrlName,   // LPCWSTR
    uint dwFlags,   // DWORD
    long GroupId,   // LONGLONG
    IntPtr pbGroupAttributes,   // BYTE* optional
    uint cbGroupAttributes,   // DWORD optional
    IntPtr lpReserved   // void* optional
);
<DllImport("WININET.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function SetUrlCacheEntryGroupW(
    <MarshalAs(UnmanagedType.LPWStr)> lpszUrlName As String,   ' LPCWSTR
    dwFlags As UInteger,   ' DWORD
    GroupId As Long,   ' LONGLONG
    pbGroupAttributes As IntPtr,   ' BYTE* optional
    cbGroupAttributes As UInteger,   ' DWORD optional
    lpReserved As IntPtr   ' void* optional
) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function
' lpszUrlName : LPCWSTR
' dwFlags : DWORD
' GroupId : LONGLONG
' pbGroupAttributes : BYTE* optional
' cbGroupAttributes : DWORD optional
' lpReserved : void* optional
Declare PtrSafe Function SetUrlCacheEntryGroupW Lib "wininet" ( _
    ByVal lpszUrlName As LongPtr, _
    ByVal dwFlags As Long, _
    ByVal GroupId As LongLong, _
    ByVal pbGroupAttributes As LongPtr, _
    ByVal cbGroupAttributes As Long, _
    ByVal lpReserved As LongPtr) As Long
' 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

SetUrlCacheEntryGroupW = ctypes.windll.wininet.SetUrlCacheEntryGroupW
SetUrlCacheEntryGroupW.restype = wintypes.BOOL
SetUrlCacheEntryGroupW.argtypes = [
    wintypes.LPCWSTR,  # lpszUrlName : LPCWSTR
    wintypes.DWORD,  # dwFlags : DWORD
    ctypes.c_longlong,  # GroupId : LONGLONG
    ctypes.POINTER(ctypes.c_ubyte),  # pbGroupAttributes : BYTE* optional
    wintypes.DWORD,  # cbGroupAttributes : DWORD optional
    ctypes.POINTER(None),  # lpReserved : void* optional
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('WININET.dll')
SetUrlCacheEntryGroupW = Fiddle::Function.new(
  lib['SetUrlCacheEntryGroupW'],
  [
    Fiddle::TYPE_VOIDP,  # lpszUrlName : LPCWSTR
    -Fiddle::TYPE_INT,  # dwFlags : DWORD
    Fiddle::TYPE_LONG_LONG,  # GroupId : LONGLONG
    Fiddle::TYPE_VOIDP,  # pbGroupAttributes : BYTE* optional
    -Fiddle::TYPE_INT,  # cbGroupAttributes : DWORD optional
    Fiddle::TYPE_VOIDP,  # lpReserved : void* optional
  ],
  Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"
#[link(name = "wininet")]
extern "system" {
    fn SetUrlCacheEntryGroupW(
        lpszUrlName: *const u16,  // LPCWSTR
        dwFlags: u32,  // DWORD
        GroupId: i64,  // LONGLONG
        pbGroupAttributes: *mut u8,  // BYTE* optional
        cbGroupAttributes: u32,  // DWORD optional
        lpReserved: *mut ()  // void* optional
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WININET.dll", CharSet = CharSet.Unicode)]
public static extern bool SetUrlCacheEntryGroupW([MarshalAs(UnmanagedType.LPWStr)] string lpszUrlName, uint dwFlags, long GroupId, IntPtr pbGroupAttributes, uint cbGroupAttributes, IntPtr lpReserved);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_SetUrlCacheEntryGroupW' -Namespace Win32 -PassThru
# $api::SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved)
#uselib "WININET.dll"
#func global SetUrlCacheEntryGroupW "SetUrlCacheEntryGroupW" wptr, wptr, wptr, wptr, wptr, wptr
; SetUrlCacheEntryGroupW lpszUrlName, dwFlags, GroupId, varptr(pbGroupAttributes), cbGroupAttributes, lpReserved   ; 戻り値は stat
; lpszUrlName : LPCWSTR -> "wptr"
; dwFlags : DWORD -> "wptr"
; GroupId : LONGLONG -> "wptr"
; pbGroupAttributes : BYTE* optional -> "wptr"
; cbGroupAttributes : DWORD optional -> "wptr"
; lpReserved : void* optional -> "wptr"
; ※HSP3.7は int64 引数(64bit値渡し)に非対応です。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "WININET.dll"
#cfunc global SetUrlCacheEntryGroupW "SetUrlCacheEntryGroupW" wstr, int, int64, var, int, sptr
; res = SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved)
; lpszUrlName : LPCWSTR -> "wstr"
; dwFlags : DWORD -> "int"
; GroupId : LONGLONG -> "int64"
; pbGroupAttributes : BYTE* optional -> "var"
; cbGroupAttributes : DWORD optional -> "int"
; lpReserved : void* optional -> "sptr"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
; ※int64 引数の DLL 値渡しは x64 ランタイム(hsp3_64)のみ対応(x86 は未対応)。
出力引数:
; BOOL SetUrlCacheEntryGroupW(LPCWSTR lpszUrlName, DWORD dwFlags, LONGLONG GroupId, BYTE* pbGroupAttributes, DWORD cbGroupAttributes, void* lpReserved)
#uselib "WININET.dll"
#cfunc global SetUrlCacheEntryGroupW "SetUrlCacheEntryGroupW" wstr, int, int64, var, int, intptr
; res = SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved)
; lpszUrlName : LPCWSTR -> "wstr"
; dwFlags : DWORD -> "int"
; GroupId : LONGLONG -> "int64"
; pbGroupAttributes : BYTE* optional -> "var"
; cbGroupAttributes : DWORD optional -> "int"
; lpReserved : void* optional -> "intptr"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	wininet = windows.NewLazySystemDLL("WININET.dll")
	procSetUrlCacheEntryGroupW = wininet.NewProc("SetUrlCacheEntryGroupW")
)

// lpszUrlName (LPCWSTR), dwFlags (DWORD), GroupId (LONGLONG), pbGroupAttributes (BYTE* optional), cbGroupAttributes (DWORD optional), lpReserved (void* optional)
r1, _, err := procSetUrlCacheEntryGroupW.Call(
	uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(lpszUrlName))),
	uintptr(dwFlags),
	uintptr(GroupId),
	uintptr(pbGroupAttributes),
	uintptr(cbGroupAttributes),
	uintptr(lpReserved),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function SetUrlCacheEntryGroupW(
  lpszUrlName: PWideChar;   // LPCWSTR
  dwFlags: DWORD;   // DWORD
  GroupId: Int64;   // LONGLONG
  pbGroupAttributes: Pointer;   // BYTE* optional
  cbGroupAttributes: DWORD;   // DWORD optional
  lpReserved: Pointer   // void* optional
): BOOL; stdcall;
  external 'WININET.dll' name 'SetUrlCacheEntryGroupW';
result := DllCall("WININET\SetUrlCacheEntryGroupW"
    , "WStr", lpszUrlName   ; LPCWSTR
    , "UInt", dwFlags   ; DWORD
    , "Int64", GroupId   ; LONGLONG
    , "Ptr", pbGroupAttributes   ; BYTE* optional
    , "UInt", cbGroupAttributes   ; DWORD optional
    , "Ptr", lpReserved   ; void* optional
    , "Int")   ; return: BOOL
●SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved) = DLL("WININET.dll", "bool SetUrlCacheEntryGroupW(char*, dword, int64, void*, dword, void*)")
# 呼び出し: SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved)
# lpszUrlName : LPCWSTR -> "char*"
# dwFlags : DWORD -> "dword"
# GroupId : LONGLONG -> "int64"
# pbGroupAttributes : BYTE* optional -> "void*"
# cbGroupAttributes : DWORD optional -> "dword"
# lpReserved : void* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。
const std = @import("std");

extern "wininet" fn SetUrlCacheEntryGroupW(
    lpszUrlName: [*c]const u16, // LPCWSTR
    dwFlags: u32, // DWORD
    GroupId: i64, // LONGLONG
    pbGroupAttributes: [*c]u8, // BYTE* optional
    cbGroupAttributes: u32, // DWORD optional
    lpReserved: ?*anyopaque // void* optional
) callconv(std.os.windows.WINAPI) i32;
// Unicode(-W): UTF-16LE のヌル終端バッファ([*c]const u16)を渡す。
proc SetUrlCacheEntryGroupW(
    lpszUrlName: WideCString,  # LPCWSTR
    dwFlags: uint32,  # DWORD
    GroupId: int64,  # LONGLONG
    pbGroupAttributes: ptr uint8,  # BYTE* optional
    cbGroupAttributes: uint32,  # DWORD optional
    lpReserved: pointer  # void* optional
): int32 {.importc: "SetUrlCacheEntryGroupW", stdcall, dynlib: "WININET.dll".}
# Unicode(-W): WideCString は newWideCString("...") で生成。
pragma(lib, "wininet");
extern(Windows)
int SetUrlCacheEntryGroupW(
    const(wchar)* lpszUrlName,   // LPCWSTR
    uint dwFlags,   // DWORD
    long GroupId,   // LONGLONG
    ubyte* pbGroupAttributes,   // BYTE* optional
    uint cbGroupAttributes,   // DWORD optional
    void* lpReserved   // void* optional
);
ccall((:SetUrlCacheEntryGroupW, "WININET.dll"), stdcall, Int32,
      (Cwstring, UInt32, Int64, Ptr{UInt8}, UInt32, Ptr{Cvoid}),
      lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved)
# lpszUrlName : LPCWSTR -> Cwstring
# dwFlags : DWORD -> UInt32
# GroupId : LONGLONG -> Int64
# pbGroupAttributes : BYTE* optional -> Ptr{UInt8}
# cbGroupAttributes : DWORD optional -> UInt32
# lpReserved : void* optional -> Ptr{Cvoid}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
# Unicode(-W): Cwstring には transcode(UInt16, "...") 等で UTF-16 を渡す。
local ffi = require("ffi")
ffi.cdef[[
int32_t SetUrlCacheEntryGroupW(
    const uint16_t* lpszUrlName,
    uint32_t dwFlags,
    int64_t GroupId,
    uint8_t* pbGroupAttributes,
    uint32_t cbGroupAttributes,
    void* lpReserved);
]]
local wininet = ffi.load("wininet")
-- wininet.SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved)
-- lpszUrlName : LPCWSTR
-- dwFlags : DWORD
-- GroupId : LONGLONG
-- pbGroupAttributes : BYTE* optional
-- cbGroupAttributes : DWORD optional
-- lpReserved : void* optional
-- 構造体/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 SetUrlCacheEntryGroupW = lib.func('__stdcall', 'SetUrlCacheEntryGroupW', 'int32_t', ['str16', 'uint32_t', 'int64_t', 'uint8_t *', 'uint32_t', 'void *']);
// SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved)
// lpszUrlName : LPCWSTR -> 'str16'
// dwFlags : DWORD -> 'uint32_t'
// GroupId : LONGLONG -> 'int64_t'
// pbGroupAttributes : BYTE* optional -> 'uint8_t *'
// cbGroupAttributes : DWORD optional -> 'uint32_t'
// lpReserved : void* optional -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("WININET.dll", {
  SetUrlCacheEntryGroupW: { parameters: ["buffer", "u32", "i64", "pointer", "u32", "pointer"], result: "i32" },
});
// lib.symbols.SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved)
// lpszUrlName : LPCWSTR -> "buffer"
// dwFlags : DWORD -> "u32"
// GroupId : LONGLONG -> "i64"
// pbGroupAttributes : BYTE* optional -> "pointer"
// cbGroupAttributes : DWORD optional -> "u32"
// lpReserved : void* optional -> "pointer"
// 文字列は "buffer"。Unicode(-W) は new TextEncoder() ではなく UTF-16LE のバイト列(末尾に \x00\x00)を Uint8Array で渡す。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
int32_t SetUrlCacheEntryGroupW(
    const uint16_t* lpszUrlName,
    uint32_t dwFlags,
    int64_t GroupId,
    uint8_t* pbGroupAttributes,
    uint32_t cbGroupAttributes,
    void* lpReserved);
C, "WININET.dll");
// $ffi->SetUrlCacheEntryGroupW(lpszUrlName, dwFlags, GroupId, pbGroupAttributes, cbGroupAttributes, lpReserved);
// lpszUrlName : LPCWSTR
// dwFlags : DWORD
// GroupId : LONGLONG
// pbGroupAttributes : BYTE* optional
// cbGroupAttributes : DWORD optional
// lpReserved : void* optional
// 構造体/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);
    boolean SetUrlCacheEntryGroupW(
        WString lpszUrlName,   // LPCWSTR
        int dwFlags,   // DWORD
        long GroupId,   // LONGLONG
        byte[] pbGroupAttributes,   // BYTE* optional
        int cbGroupAttributes,   // DWORD optional
        Pointer lpReserved   // void* optional
    );
}
// Unicode(-W): WString(入力)/char[](出力)で UTF-16 をマーシャリング。
@[Link("wininet")]
lib LibWININET
  fun SetUrlCacheEntryGroupW = SetUrlCacheEntryGroupW(
    lpszUrlName : UInt16*,   # LPCWSTR
    dwFlags : UInt32,   # DWORD
    GroupId : Int64,   # LONGLONG
    pbGroupAttributes : UInt8*,   # BYTE* optional
    cbGroupAttributes : UInt32,   # DWORD optional
    lpReserved : Void*   # void* optional
  ) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef SetUrlCacheEntryGroupWNative = Int32 Function(Pointer<Utf16>, Uint32, Int64, Pointer<Uint8>, Uint32, Pointer<Void>);
typedef SetUrlCacheEntryGroupWDart = int Function(Pointer<Utf16>, int, int, Pointer<Uint8>, int, Pointer<Void>);
final SetUrlCacheEntryGroupW = DynamicLibrary.open('WININET.dll')
    .lookupFunction<SetUrlCacheEntryGroupWNative, SetUrlCacheEntryGroupWDart>('SetUrlCacheEntryGroupW');
// lpszUrlName : LPCWSTR -> Pointer<Utf16>
// dwFlags : DWORD -> Uint32
// GroupId : LONGLONG -> Int64
// pbGroupAttributes : BYTE* optional -> Pointer<Uint8>
// cbGroupAttributes : DWORD optional -> Uint32
// lpReserved : void* optional -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function SetUrlCacheEntryGroupW(
  lpszUrlName: PWideChar;   // LPCWSTR
  dwFlags: DWORD;   // DWORD
  GroupId: Int64;   // LONGLONG
  pbGroupAttributes: Pointer;   // BYTE* optional
  cbGroupAttributes: DWORD;   // DWORD optional
  lpReserved: Pointer   // void* optional
): BOOL; stdcall;
  external 'WININET.dll' name 'SetUrlCacheEntryGroupW';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "SetUrlCacheEntryGroupW"
  c_SetUrlCacheEntryGroupW :: CWString -> Word32 -> Int64 -> Ptr Word8 -> Word32 -> Ptr () -> IO CInt
-- lpszUrlName : LPCWSTR -> CWString
-- dwFlags : DWORD -> Word32
-- GroupId : LONGLONG -> Int64
-- pbGroupAttributes : BYTE* optional -> Ptr Word8
-- cbGroupAttributes : DWORD optional -> Word32
-- lpReserved : void* optional -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let seturlcacheentrygroupw =
  foreign "SetUrlCacheEntryGroupW"
    ((ptr uint16_t) @-> uint32_t @-> int64_t @-> (ptr uint8_t) @-> uint32_t @-> (ptr void) @-> returning int32_t)
(* lpszUrlName : LPCWSTR -> (ptr uint16_t) *)
(* dwFlags : DWORD -> uint32_t *)
(* GroupId : LONGLONG -> int64_t *)
(* pbGroupAttributes : BYTE* optional -> (ptr uint8_t) *)
(* cbGroupAttributes : DWORD optional -> uint32_t *)
(* lpReserved : void* optional -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library wininet (t "WININET.dll"))
(cffi:use-foreign-library wininet)

(cffi:defcfun ("SetUrlCacheEntryGroupW" set-url-cache-entry-group-w :convention :stdcall) :int32
  (lpsz-url-name (:string :encoding :utf-16le))   ; LPCWSTR
  (dw-flags :uint32)   ; DWORD
  (group-id :int64)   ; LONGLONG
  (pb-group-attributes :pointer)   ; BYTE* optional
  (cb-group-attributes :uint32)   ; DWORD optional
  (lp-reserved :pointer))   ; void* optional
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $SetUrlCacheEntryGroupW = Win32::API::More->new('WININET',
    'BOOL SetUrlCacheEntryGroupW(LPCWSTR lpszUrlName, DWORD dwFlags, INT64 GroupId, LPVOID pbGroupAttributes, DWORD cbGroupAttributes, LPVOID lpReserved)');
# my $ret = $SetUrlCacheEntryGroupW->Call($lpszUrlName, $dwFlags, $GroupId, $pbGroupAttributes, $cbGroupAttributes, $lpReserved);
# lpszUrlName : LPCWSTR -> LPCWSTR
# dwFlags : DWORD -> DWORD
# GroupId : LONGLONG -> INT64
# pbGroupAttributes : BYTE* optional -> LPVOID
# cbGroupAttributes : DWORD optional -> DWORD
# lpReserved : void* optional -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# Unicode(-W): LPCWSTR/LPWSTR は Win32::API が UTF-16 変換を行う。

関連項目

文字セット違い