Win32 API 日本語リファレンス
ホームSecurity.Cryptography › CertFreeCertificateChainList

CertFreeCertificateChainList

関数
選択された証明書チェーンの一覧を解放する。
DLLCRYPT32.dll呼出規約winapi対応OSWindows 7 以降

シグネチャ

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

void CertFreeCertificateChainList(
    CERT_CHAIN_CONTEXT** prgpSelection
);

パラメーター

名前方向
prgpSelectionCERT_CHAIN_CONTEXT**in

戻り値の型: void

各言語での呼び出し定義

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

void CertFreeCertificateChainList(
    CERT_CHAIN_CONTEXT** prgpSelection
);
[DllImport("CRYPT32.dll", ExactSpelling = true)]
static extern void CertFreeCertificateChainList(
    IntPtr prgpSelection   // CERT_CHAIN_CONTEXT**
);
<DllImport("CRYPT32.dll", ExactSpelling:=True)>
Public Shared Sub CertFreeCertificateChainList(
    prgpSelection As IntPtr   ' CERT_CHAIN_CONTEXT**
)
End Sub
' prgpSelection : CERT_CHAIN_CONTEXT**
Declare PtrSafe Sub CertFreeCertificateChainList Lib "crypt32" ( _
    ByVal prgpSelection As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

CertFreeCertificateChainList = ctypes.windll.crypt32.CertFreeCertificateChainList
CertFreeCertificateChainList.restype = None
CertFreeCertificateChainList.argtypes = [
    ctypes.c_void_p,  # prgpSelection : CERT_CHAIN_CONTEXT**
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('CRYPT32.dll')
CertFreeCertificateChainList = Fiddle::Function.new(
  lib['CertFreeCertificateChainList'],
  [
    Fiddle::TYPE_VOIDP,  # prgpSelection : CERT_CHAIN_CONTEXT**
  ],
  Fiddle::TYPE_VOID)
#[link(name = "crypt32")]
extern "system" {
    fn CertFreeCertificateChainList(
        prgpSelection: *mut *mut CERT_CHAIN_CONTEXT  // CERT_CHAIN_CONTEXT**
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("CRYPT32.dll")]
public static extern void CertFreeCertificateChainList(IntPtr prgpSelection);
"@
$api = Add-Type -MemberDefinition $sig -Name 'CRYPT32_CertFreeCertificateChainList' -Namespace Win32 -PassThru
# $api::CertFreeCertificateChainList(prgpSelection)
#uselib "CRYPT32.dll"
#func global CertFreeCertificateChainList "CertFreeCertificateChainList" sptr
; CertFreeCertificateChainList varptr(prgpSelection)
; prgpSelection : CERT_CHAIN_CONTEXT** -> "sptr"
出力引数:
#uselib "CRYPT32.dll"
#func global CertFreeCertificateChainList "CertFreeCertificateChainList" var
; CertFreeCertificateChainList prgpSelection
; prgpSelection : CERT_CHAIN_CONTEXT** -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; void CertFreeCertificateChainList(CERT_CHAIN_CONTEXT** prgpSelection)
#uselib "CRYPT32.dll"
#func global CertFreeCertificateChainList "CertFreeCertificateChainList" var
; CertFreeCertificateChainList prgpSelection
; prgpSelection : CERT_CHAIN_CONTEXT** -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	crypt32 = windows.NewLazySystemDLL("CRYPT32.dll")
	procCertFreeCertificateChainList = crypt32.NewProc("CertFreeCertificateChainList")
)

// prgpSelection (CERT_CHAIN_CONTEXT**)
r1, _, err := procCertFreeCertificateChainList.Call(
	uintptr(prgpSelection),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure CertFreeCertificateChainList(
  prgpSelection: Pointer   // CERT_CHAIN_CONTEXT**
); stdcall;
  external 'CRYPT32.dll' name 'CertFreeCertificateChainList';
result := DllCall("CRYPT32\CertFreeCertificateChainList"
    , "Ptr", prgpSelection   ; CERT_CHAIN_CONTEXT**
    , "Int")   ; return: void
●CertFreeCertificateChainList(prgpSelection) = DLL("CRYPT32.dll", "int CertFreeCertificateChainList(void*)")
# 呼び出し: CertFreeCertificateChainList(prgpSelection)
# prgpSelection : CERT_CHAIN_CONTEXT** -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。