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

AppCacheGetManifestUrl

関数
アプリケーションキャッシュのマニフェストURLを取得する。
DLLWININET.dll呼出規約winapi

シグネチャ

// WININET.dll
#include <windows.h>

DWORD AppCacheGetManifestUrl(
    void* hAppCache,
    LPWSTR* ppwszManifestUrl
);

パラメーター

名前方向
hAppCachevoid*in
ppwszManifestUrlLPWSTR*out

戻り値の型: DWORD

各言語での呼び出し定義

// WININET.dll
#include <windows.h>

DWORD AppCacheGetManifestUrl(
    void* hAppCache,
    LPWSTR* ppwszManifestUrl
);
[DllImport("WININET.dll", ExactSpelling = true)]
static extern uint AppCacheGetManifestUrl(
    IntPtr hAppCache,   // void*
    IntPtr ppwszManifestUrl   // LPWSTR* out
);
<DllImport("WININET.dll", ExactSpelling:=True)>
Public Shared Function AppCacheGetManifestUrl(
    hAppCache As IntPtr,   ' void*
    ppwszManifestUrl As IntPtr   ' LPWSTR* out
) As UInteger
End Function
' hAppCache : void*
' ppwszManifestUrl : LPWSTR* out
Declare PtrSafe Function AppCacheGetManifestUrl Lib "wininet" ( _
    ByVal hAppCache As LongPtr, _
    ByVal ppwszManifestUrl As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

AppCacheGetManifestUrl = ctypes.windll.wininet.AppCacheGetManifestUrl
AppCacheGetManifestUrl.restype = wintypes.DWORD
AppCacheGetManifestUrl.argtypes = [
    ctypes.POINTER(None),  # hAppCache : void*
    ctypes.c_void_p,  # ppwszManifestUrl : LPWSTR* out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('WININET.dll')
AppCacheGetManifestUrl = Fiddle::Function.new(
  lib['AppCacheGetManifestUrl'],
  [
    Fiddle::TYPE_VOIDP,  # hAppCache : void*
    Fiddle::TYPE_VOIDP,  # ppwszManifestUrl : LPWSTR* out
  ],
  -Fiddle::TYPE_INT)
#[link(name = "wininet")]
extern "system" {
    fn AppCacheGetManifestUrl(
        hAppCache: *mut (),  // void*
        ppwszManifestUrl: *mut *mut u16  // LPWSTR* out
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("WININET.dll")]
public static extern uint AppCacheGetManifestUrl(IntPtr hAppCache, IntPtr ppwszManifestUrl);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_AppCacheGetManifestUrl' -Namespace Win32 -PassThru
# $api::AppCacheGetManifestUrl(hAppCache, ppwszManifestUrl)
#uselib "WININET.dll"
#func global AppCacheGetManifestUrl "AppCacheGetManifestUrl" sptr, sptr
; AppCacheGetManifestUrl hAppCache, varptr(ppwszManifestUrl)   ; 戻り値は stat
; hAppCache : void* -> "sptr"
; ppwszManifestUrl : LPWSTR* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "WININET.dll"
#cfunc global AppCacheGetManifestUrl "AppCacheGetManifestUrl" sptr, var
; res = AppCacheGetManifestUrl(hAppCache, ppwszManifestUrl)
; hAppCache : void* -> "sptr"
; ppwszManifestUrl : LPWSTR* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; DWORD AppCacheGetManifestUrl(void* hAppCache, LPWSTR* ppwszManifestUrl)
#uselib "WININET.dll"
#cfunc global AppCacheGetManifestUrl "AppCacheGetManifestUrl" intptr, var
; res = AppCacheGetManifestUrl(hAppCache, ppwszManifestUrl)
; hAppCache : void* -> "intptr"
; ppwszManifestUrl : LPWSTR* out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	wininet = windows.NewLazySystemDLL("WININET.dll")
	procAppCacheGetManifestUrl = wininet.NewProc("AppCacheGetManifestUrl")
)

// hAppCache (void*), ppwszManifestUrl (LPWSTR* out)
r1, _, err := procAppCacheGetManifestUrl.Call(
	uintptr(hAppCache),
	uintptr(ppwszManifestUrl),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function AppCacheGetManifestUrl(
  hAppCache: Pointer;   // void*
  ppwszManifestUrl: PPWideChar   // LPWSTR* out
): DWORD; stdcall;
  external 'WININET.dll' name 'AppCacheGetManifestUrl';
result := DllCall("WININET\AppCacheGetManifestUrl"
    , "Ptr", hAppCache   ; void*
    , "Ptr", ppwszManifestUrl   ; LPWSTR* out
    , "UInt")   ; return: DWORD
●AppCacheGetManifestUrl(hAppCache, ppwszManifestUrl) = DLL("WININET.dll", "dword AppCacheGetManifestUrl(void*, void*)")
# 呼び出し: AppCacheGetManifestUrl(hAppCache, ppwszManifestUrl)
# hAppCache : void* -> "void*"
# ppwszManifestUrl : LPWSTR* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。