ホーム › Networking.WinInet › AppCacheGetDownloadList
AppCacheGetDownloadList
関数アプリケーションキャッシュのダウンロード一覧を取得する。
シグネチャ
// WININET.dll
#include <windows.h>
DWORD AppCacheGetDownloadList(
void* hAppCache,
APP_CACHE_DOWNLOAD_LIST* pDownloadList
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hAppCache | void* | in |
| pDownloadList | APP_CACHE_DOWNLOAD_LIST* | out |
戻り値の型: DWORD
各言語での呼び出し定義
// WININET.dll
#include <windows.h>
DWORD AppCacheGetDownloadList(
void* hAppCache,
APP_CACHE_DOWNLOAD_LIST* pDownloadList
);[DllImport("WININET.dll", ExactSpelling = true)]
static extern uint AppCacheGetDownloadList(
IntPtr hAppCache, // void*
IntPtr pDownloadList // APP_CACHE_DOWNLOAD_LIST* out
);<DllImport("WININET.dll", ExactSpelling:=True)>
Public Shared Function AppCacheGetDownloadList(
hAppCache As IntPtr, ' void*
pDownloadList As IntPtr ' APP_CACHE_DOWNLOAD_LIST* out
) As UInteger
End Function' hAppCache : void*
' pDownloadList : APP_CACHE_DOWNLOAD_LIST* out
Declare PtrSafe Function AppCacheGetDownloadList Lib "wininet" ( _
ByVal hAppCache As LongPtr, _
ByVal pDownloadList As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
AppCacheGetDownloadList = ctypes.windll.wininet.AppCacheGetDownloadList
AppCacheGetDownloadList.restype = wintypes.DWORD
AppCacheGetDownloadList.argtypes = [
ctypes.POINTER(None), # hAppCache : void*
ctypes.c_void_p, # pDownloadList : APP_CACHE_DOWNLOAD_LIST* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('WININET.dll')
AppCacheGetDownloadList = Fiddle::Function.new(
lib['AppCacheGetDownloadList'],
[
Fiddle::TYPE_VOIDP, # hAppCache : void*
Fiddle::TYPE_VOIDP, # pDownloadList : APP_CACHE_DOWNLOAD_LIST* out
],
-Fiddle::TYPE_INT)#[link(name = "wininet")]
extern "system" {
fn AppCacheGetDownloadList(
hAppCache: *mut (), // void*
pDownloadList: *mut APP_CACHE_DOWNLOAD_LIST // APP_CACHE_DOWNLOAD_LIST* out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("WININET.dll")]
public static extern uint AppCacheGetDownloadList(IntPtr hAppCache, IntPtr pDownloadList);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_AppCacheGetDownloadList' -Namespace Win32 -PassThru
# $api::AppCacheGetDownloadList(hAppCache, pDownloadList)#uselib "WININET.dll"
#func global AppCacheGetDownloadList "AppCacheGetDownloadList" sptr, sptr
; AppCacheGetDownloadList hAppCache, varptr(pDownloadList) ; 戻り値は stat
; hAppCache : void* -> "sptr"
; pDownloadList : APP_CACHE_DOWNLOAD_LIST* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "WININET.dll" #cfunc global AppCacheGetDownloadList "AppCacheGetDownloadList" sptr, var ; res = AppCacheGetDownloadList(hAppCache, pDownloadList) ; hAppCache : void* -> "sptr" ; pDownloadList : APP_CACHE_DOWNLOAD_LIST* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "WININET.dll" #cfunc global AppCacheGetDownloadList "AppCacheGetDownloadList" sptr, sptr ; res = AppCacheGetDownloadList(hAppCache, varptr(pDownloadList)) ; hAppCache : void* -> "sptr" ; pDownloadList : APP_CACHE_DOWNLOAD_LIST* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD AppCacheGetDownloadList(void* hAppCache, APP_CACHE_DOWNLOAD_LIST* pDownloadList) #uselib "WININET.dll" #cfunc global AppCacheGetDownloadList "AppCacheGetDownloadList" intptr, var ; res = AppCacheGetDownloadList(hAppCache, pDownloadList) ; hAppCache : void* -> "intptr" ; pDownloadList : APP_CACHE_DOWNLOAD_LIST* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD AppCacheGetDownloadList(void* hAppCache, APP_CACHE_DOWNLOAD_LIST* pDownloadList) #uselib "WININET.dll" #cfunc global AppCacheGetDownloadList "AppCacheGetDownloadList" intptr, intptr ; res = AppCacheGetDownloadList(hAppCache, varptr(pDownloadList)) ; hAppCache : void* -> "intptr" ; pDownloadList : APP_CACHE_DOWNLOAD_LIST* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wininet = windows.NewLazySystemDLL("WININET.dll")
procAppCacheGetDownloadList = wininet.NewProc("AppCacheGetDownloadList")
)
// hAppCache (void*), pDownloadList (APP_CACHE_DOWNLOAD_LIST* out)
r1, _, err := procAppCacheGetDownloadList.Call(
uintptr(hAppCache),
uintptr(pDownloadList),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction AppCacheGetDownloadList(
hAppCache: Pointer; // void*
pDownloadList: Pointer // APP_CACHE_DOWNLOAD_LIST* out
): DWORD; stdcall;
external 'WININET.dll' name 'AppCacheGetDownloadList';result := DllCall("WININET\AppCacheGetDownloadList"
, "Ptr", hAppCache ; void*
, "Ptr", pDownloadList ; APP_CACHE_DOWNLOAD_LIST* out
, "UInt") ; return: DWORD●AppCacheGetDownloadList(hAppCache, pDownloadList) = DLL("WININET.dll", "dword AppCacheGetDownloadList(void*, void*)")
# 呼び出し: AppCacheGetDownloadList(hAppCache, pDownloadList)
# hAppCache : void* -> "void*"
# pDownloadList : APP_CACHE_DOWNLOAD_LIST* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。