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

CertAddCertificateContextToStore

関数
証明書コンテキストをストアに追加する。
DLLCRYPT32.dll呼出規約winapiSetLastErrorあり対応OSWindows XP 以降

シグネチャ

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

BOOL CertAddCertificateContextToStore(
    HCERTSTORE hCertStore,   // optional
    const CERT_CONTEXT* pCertContext,
    DWORD dwAddDisposition,
    CERT_CONTEXT** ppStoreContext   // optional
);

パラメーター

名前方向説明
hCertStoreHCERTSTOREinoptional証明書ストアのハンドル。
pCertContextCERT_CONTEXT*inストアに追加する CERT_CONTEXT 構造体へのポインター。
dwAddDispositionDWORDin

一致する証明書、または一致する証明書へのリンクがストアに既に存在する場合に実行する処理を指定します。現在定義されている処理 (disposition) の値とその用途は次のとおりです。

意味
CERT_STORE_ADD_ALWAYS
関数は、一致する既存の証明書や一致する証明書へのリンクを確認しません。新しい証明書は常にストアに追加されます。このため、ストア内に重複が生じる可能性があります。
CERT_STORE_ADD_NEW
一致する証明書、または一致する証明書へのリンクが存在する場合、操作は失敗します。 GetLastErrorCRYPT_E_EXISTS コードを返します。
CERT_STORE_ADD_NEWER
一致する証明書、または一致する証明書へのリンクが存在し、既存コンテキストの NotBefore 時刻が、追加しようとしている新しいコンテキストの NotBefore 時刻以上である場合、操作は失敗し、GetLastErrorCRYPT_E_EXISTS コードを返します。

既存コンテキストの NotBefore 時刻が、追加しようとしている新しいコンテキストの NotBefore 時刻より前である場合、既存の証明書またはリンクが削除され、新しい証明書が作成されてストアに追加されます。一致する証明書または一致する証明書へのリンクが存在しない場合は、新しいリンクが追加されます。

証明書失効リスト (CRL) または 証明書信頼リスト (CTL) を比較する場合は、ThisUpdate 時刻が使用されます。

CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES
一致する証明書、または一致する証明書へのリンクが存在し、既存コンテキストの NotBefore 時刻が、追加しようとしている新しいコンテキストの NotBefore 時刻以上である場合、操作は失敗し、GetLastErrorCRYPT_E_EXISTS コードを返します。

既存コンテキストの NotBefore 時刻が、追加しようとしている新しいコンテキストの NotBefore 時刻より前である場合、新しいコンテキストを作成して追加する前に、既存コンテキストが削除されます。新しく追加されたコンテキストは、既存の証明書からプロパティを継承します。

CRL または CTL を比較する場合は、ThisUpdate 時刻が使用されます。

CERT_STORE_ADD_REPLACE_EXISTING
一致する証明書へのリンクが存在する場合、その既存の証明書またはリンクが削除され、新しい証明書が作成されてストアに追加されます。一致する証明書または一致する証明書へのリンクが存在しない場合は、新しいリンクが追加されます。
CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES
一致する証明書がストアに存在する場合、既存コンテキストは置き換えられません。既存コンテキストは、新しい証明書からプロパティを継承します。
CERT_STORE_ADD_USE_EXISTING
一致する証明書、または一致する証明書へのリンクが存在する場合、その既存の証明書またはリンクが使用され、新しい証明書のプロパティが追加されます。関数は失敗しませんが、新しいコンテキストは追加されません。pCertContextNULL でない場合、既存コンテキストが複製されます。

一致する証明書、または一致する証明書へのリンクが存在しない場合は、新しい証明書が追加されます。

ppStoreContextCERT_CONTEXT**outoptional

ストアに追加された証明書から作成されるコピーへのポインターへのポインター。

ppStoreContext パラメーターは NULL にすることができ、これは呼び出し元のアプリケーションが追加された証明書のコピーを必要としないことを示します。コピーが作成された場合は、 CertFreeCertificateContext を使用して解放する必要があります。

戻り値の型: BOOL

公式ドキュメント

証明書コンテキストを証明書ストアに追加します。

戻り値

関数が成功した場合、戻り値は TRUE です。

関数が失敗した場合、戻り値は FALSE です。拡張エラー情報を取得するには、 GetLastError を呼び出します。発生し得るエラーコードの一部を次に示します。

戻り値コード 説明
CRYPT_E_EXISTS
この値は、CERT_STORE_ADD_NEW が設定されていて証明書がストアに既に存在する場合、または CERT_STORE_ADD_NEWER が設定されていて、追加する証明書の NotBefore 日付以上の NotBefore 日付を持つ証明書がストアに存在する場合に返されます。
E_INVALIDARG
dwAddDisposition パラメーターに無効な処理 (disposition) の値が指定されました。

呼び出された関数 CertAddEncodedCertificateToStore および CertSetCertificateContextProperty からのエラーが、この関数に伝播される場合があります。

解説(Remarks)

証明書 コンテキストCertDuplicateCertificateContext を使用して複製されるわけではありません。代わりに、関数はコンテキストの新しいコピーを作成して ストア に追加します。

エンコードされた証明書に加えて、CertDuplicateCertificateContext はコンテキストのプロパティもコピーします。ただし、CERT_KEY_PROV_HANDLE_PROP_ID および CERT_KEY_CONTEXT_PROP_ID プロパティは除きます。

証明書ストアから証明書コンテキストを削除するには、CertDeleteCertificateFromStore 関数を使用します。

ストア内で証明書コンテキストの順序が保持されない場合があります。 特定の証明書にアクセスするには、ストア内の証明書を反復処理する必要があります。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での呼び出し定義

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

BOOL CertAddCertificateContextToStore(
    HCERTSTORE hCertStore,   // optional
    const CERT_CONTEXT* pCertContext,
    DWORD dwAddDisposition,
    CERT_CONTEXT** ppStoreContext   // optional
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("CRYPT32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool CertAddCertificateContextToStore(
    IntPtr hCertStore,   // HCERTSTORE optional
    IntPtr pCertContext,   // CERT_CONTEXT*
    uint dwAddDisposition,   // DWORD
    IntPtr ppStoreContext   // CERT_CONTEXT** optional, out
);
<DllImport("CRYPT32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function CertAddCertificateContextToStore(
    hCertStore As IntPtr,   ' HCERTSTORE optional
    pCertContext As IntPtr,   ' CERT_CONTEXT*
    dwAddDisposition As UInteger,   ' DWORD
    ppStoreContext As IntPtr   ' CERT_CONTEXT** optional, out
) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function
' hCertStore : HCERTSTORE optional
' pCertContext : CERT_CONTEXT*
' dwAddDisposition : DWORD
' ppStoreContext : CERT_CONTEXT** optional, out
Declare PtrSafe Function CertAddCertificateContextToStore Lib "crypt32" ( _
    ByVal hCertStore As LongPtr, _
    ByVal pCertContext As LongPtr, _
    ByVal dwAddDisposition As Long, _
    ByVal ppStoreContext As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

CertAddCertificateContextToStore = ctypes.windll.crypt32.CertAddCertificateContextToStore
CertAddCertificateContextToStore.restype = wintypes.BOOL
CertAddCertificateContextToStore.argtypes = [
    wintypes.HANDLE,  # hCertStore : HCERTSTORE optional
    ctypes.c_void_p,  # pCertContext : CERT_CONTEXT*
    wintypes.DWORD,  # dwAddDisposition : DWORD
    ctypes.c_void_p,  # ppStoreContext : CERT_CONTEXT** optional, out
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('CRYPT32.dll')
CertAddCertificateContextToStore = Fiddle::Function.new(
  lib['CertAddCertificateContextToStore'],
  [
    Fiddle::TYPE_VOIDP,  # hCertStore : HCERTSTORE optional
    Fiddle::TYPE_VOIDP,  # pCertContext : CERT_CONTEXT*
    -Fiddle::TYPE_INT,  # dwAddDisposition : DWORD
    Fiddle::TYPE_VOIDP,  # ppStoreContext : CERT_CONTEXT** optional, out
  ],
  Fiddle::TYPE_INT)
#[link(name = "crypt32")]
extern "system" {
    fn CertAddCertificateContextToStore(
        hCertStore: *mut core::ffi::c_void,  // HCERTSTORE optional
        pCertContext: *const CERT_CONTEXT,  // CERT_CONTEXT*
        dwAddDisposition: u32,  // DWORD
        ppStoreContext: *mut *mut CERT_CONTEXT  // CERT_CONTEXT** optional, out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("CRYPT32.dll", SetLastError = true)]
public static extern bool CertAddCertificateContextToStore(IntPtr hCertStore, IntPtr pCertContext, uint dwAddDisposition, IntPtr ppStoreContext);
"@
$api = Add-Type -MemberDefinition $sig -Name 'CRYPT32_CertAddCertificateContextToStore' -Namespace Win32 -PassThru
# $api::CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext)
#uselib "CRYPT32.dll"
#func global CertAddCertificateContextToStore "CertAddCertificateContextToStore" sptr, sptr, sptr, sptr
; CertAddCertificateContextToStore hCertStore, varptr(pCertContext), dwAddDisposition, varptr(ppStoreContext)   ; 戻り値は stat
; hCertStore : HCERTSTORE optional -> "sptr"
; pCertContext : CERT_CONTEXT* -> "sptr"
; dwAddDisposition : DWORD -> "sptr"
; ppStoreContext : CERT_CONTEXT** optional, out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "CRYPT32.dll"
#cfunc global CertAddCertificateContextToStore "CertAddCertificateContextToStore" sptr, var, int, var
; res = CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext)
; hCertStore : HCERTSTORE optional -> "sptr"
; pCertContext : CERT_CONTEXT* -> "var"
; dwAddDisposition : DWORD -> "int"
; ppStoreContext : CERT_CONTEXT** optional, out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; BOOL CertAddCertificateContextToStore(HCERTSTORE hCertStore, CERT_CONTEXT* pCertContext, DWORD dwAddDisposition, CERT_CONTEXT** ppStoreContext)
#uselib "CRYPT32.dll"
#cfunc global CertAddCertificateContextToStore "CertAddCertificateContextToStore" intptr, var, int, var
; res = CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext)
; hCertStore : HCERTSTORE optional -> "intptr"
; pCertContext : CERT_CONTEXT* -> "var"
; dwAddDisposition : DWORD -> "int"
; ppStoreContext : CERT_CONTEXT** optional, out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	crypt32 = windows.NewLazySystemDLL("CRYPT32.dll")
	procCertAddCertificateContextToStore = crypt32.NewProc("CertAddCertificateContextToStore")
)

// hCertStore (HCERTSTORE optional), pCertContext (CERT_CONTEXT*), dwAddDisposition (DWORD), ppStoreContext (CERT_CONTEXT** optional, out)
r1, _, err := procCertAddCertificateContextToStore.Call(
	uintptr(hCertStore),
	uintptr(pCertContext),
	uintptr(dwAddDisposition),
	uintptr(ppStoreContext),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function CertAddCertificateContextToStore(
  hCertStore: THandle;   // HCERTSTORE optional
  pCertContext: Pointer;   // CERT_CONTEXT*
  dwAddDisposition: DWORD;   // DWORD
  ppStoreContext: Pointer   // CERT_CONTEXT** optional, out
): BOOL; stdcall;
  external 'CRYPT32.dll' name 'CertAddCertificateContextToStore';
result := DllCall("CRYPT32\CertAddCertificateContextToStore"
    , "Ptr", hCertStore   ; HCERTSTORE optional
    , "Ptr", pCertContext   ; CERT_CONTEXT*
    , "UInt", dwAddDisposition   ; DWORD
    , "Ptr", ppStoreContext   ; CERT_CONTEXT** optional, out
    , "Int")   ; return: BOOL
●CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext) = DLL("CRYPT32.dll", "bool CertAddCertificateContextToStore(void*, void*, dword, void*)")
# 呼び出し: CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext)
# hCertStore : HCERTSTORE optional -> "void*"
# pCertContext : CERT_CONTEXT* -> "void*"
# dwAddDisposition : DWORD -> "dword"
# ppStoreContext : CERT_CONTEXT** optional, out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
const std = @import("std");

extern "crypt32" fn CertAddCertificateContextToStore(
    hCertStore: ?*anyopaque, // HCERTSTORE optional
    pCertContext: [*c]CERT_CONTEXT, // CERT_CONTEXT*
    dwAddDisposition: u32, // DWORD
    ppStoreContext: [*c][*c]CERT_CONTEXT // CERT_CONTEXT** optional, out
) callconv(std.os.windows.WINAPI) i32;
proc CertAddCertificateContextToStore(
    hCertStore: pointer,  # HCERTSTORE optional
    pCertContext: ptr CERT_CONTEXT,  # CERT_CONTEXT*
    dwAddDisposition: uint32,  # DWORD
    ppStoreContext: ptr CERT_CONTEXT  # CERT_CONTEXT** optional, out
): int32 {.importc: "CertAddCertificateContextToStore", stdcall, dynlib: "CRYPT32.dll".}
pragma(lib, "crypt32");
extern(Windows)
int CertAddCertificateContextToStore(
    void* hCertStore,   // HCERTSTORE optional
    CERT_CONTEXT* pCertContext,   // CERT_CONTEXT*
    uint dwAddDisposition,   // DWORD
    CERT_CONTEXT** ppStoreContext   // CERT_CONTEXT** optional, out
);
ccall((:CertAddCertificateContextToStore, "CRYPT32.dll"), stdcall, Int32,
      (Ptr{Cvoid}, Ptr{CERT_CONTEXT}, UInt32, Ptr{CERT_CONTEXT}),
      hCertStore, pCertContext, dwAddDisposition, ppStoreContext)
# hCertStore : HCERTSTORE optional -> Ptr{Cvoid}
# pCertContext : CERT_CONTEXT* -> Ptr{CERT_CONTEXT}
# dwAddDisposition : DWORD -> UInt32
# ppStoreContext : CERT_CONTEXT** optional, out -> Ptr{CERT_CONTEXT}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
local ffi = require("ffi")
ffi.cdef[[
int32_t CertAddCertificateContextToStore(
    void* hCertStore,
    void* pCertContext,
    uint32_t dwAddDisposition,
    void* ppStoreContext);
]]
local crypt32 = ffi.load("crypt32")
-- crypt32.CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext)
-- hCertStore : HCERTSTORE optional
-- pCertContext : CERT_CONTEXT*
-- dwAddDisposition : DWORD
-- ppStoreContext : CERT_CONTEXT** optional, out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
const koffi = require('koffi');
const lib = koffi.load('CRYPT32.dll');
const CertAddCertificateContextToStore = lib.func('__stdcall', 'CertAddCertificateContextToStore', 'int32_t', ['void *', 'void *', 'uint32_t', 'void *']);
// CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext)
// hCertStore : HCERTSTORE optional -> 'void *'
// pCertContext : CERT_CONTEXT* -> 'void *'
// dwAddDisposition : DWORD -> 'uint32_t'
// ppStoreContext : CERT_CONTEXT** optional, out -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("CRYPT32.dll", {
  CertAddCertificateContextToStore: { parameters: ["pointer", "pointer", "u32", "pointer"], result: "i32" },
});
// lib.symbols.CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext)
// hCertStore : HCERTSTORE optional -> "pointer"
// pCertContext : CERT_CONTEXT* -> "pointer"
// dwAddDisposition : DWORD -> "u32"
// ppStoreContext : CERT_CONTEXT** optional, out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
int32_t CertAddCertificateContextToStore(
    void* hCertStore,
    void* pCertContext,
    uint32_t dwAddDisposition,
    void* ppStoreContext);
C, "CRYPT32.dll");
// $ffi->CertAddCertificateContextToStore(hCertStore, pCertContext, dwAddDisposition, ppStoreContext);
// hCertStore : HCERTSTORE optional
// pCertContext : CERT_CONTEXT*
// dwAddDisposition : DWORD
// ppStoreContext : CERT_CONTEXT** optional, 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 Crypt32 extends StdCallLibrary {
    Crypt32 INSTANCE = Native.load("crypt32", Crypt32.class);
    boolean CertAddCertificateContextToStore(
        Pointer hCertStore,   // HCERTSTORE optional
        Pointer pCertContext,   // CERT_CONTEXT*
        int dwAddDisposition,   // DWORD
        Pointer ppStoreContext   // CERT_CONTEXT** optional, out
    );
}
@[Link("crypt32")]
lib LibCRYPT32
  fun CertAddCertificateContextToStore = CertAddCertificateContextToStore(
    hCertStore : Void*,   # HCERTSTORE optional
    pCertContext : CERT_CONTEXT*,   # CERT_CONTEXT*
    dwAddDisposition : UInt32,   # DWORD
    ppStoreContext : CERT_CONTEXT**   # CERT_CONTEXT** optional, out
  ) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef CertAddCertificateContextToStoreNative = Int32 Function(Pointer<Void>, Pointer<Void>, Uint32, Pointer<Void>);
typedef CertAddCertificateContextToStoreDart = int Function(Pointer<Void>, Pointer<Void>, int, Pointer<Void>);
final CertAddCertificateContextToStore = DynamicLibrary.open('CRYPT32.dll')
    .lookupFunction<CertAddCertificateContextToStoreNative, CertAddCertificateContextToStoreDart>('CertAddCertificateContextToStore');
// hCertStore : HCERTSTORE optional -> Pointer<Void>
// pCertContext : CERT_CONTEXT* -> Pointer<Void>
// dwAddDisposition : DWORD -> Uint32
// ppStoreContext : CERT_CONTEXT** optional, out -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function CertAddCertificateContextToStore(
  hCertStore: THandle;   // HCERTSTORE optional
  pCertContext: Pointer;   // CERT_CONTEXT*
  dwAddDisposition: DWORD;   // DWORD
  ppStoreContext: Pointer   // CERT_CONTEXT** optional, out
): BOOL; stdcall;
  external 'CRYPT32.dll' name 'CertAddCertificateContextToStore';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "CertAddCertificateContextToStore"
  c_CertAddCertificateContextToStore :: Ptr () -> Ptr () -> Word32 -> Ptr () -> IO CInt
-- hCertStore : HCERTSTORE optional -> Ptr ()
-- pCertContext : CERT_CONTEXT* -> Ptr ()
-- dwAddDisposition : DWORD -> Word32
-- ppStoreContext : CERT_CONTEXT** optional, out -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let certaddcertificatecontexttostore =
  foreign "CertAddCertificateContextToStore"
    ((ptr void) @-> (ptr void) @-> uint32_t @-> (ptr void) @-> returning int32_t)
(* hCertStore : HCERTSTORE optional -> (ptr void) *)
(* pCertContext : CERT_CONTEXT* -> (ptr void) *)
(* dwAddDisposition : DWORD -> uint32_t *)
(* ppStoreContext : CERT_CONTEXT** optional, out -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library crypt32 (t "CRYPT32.dll"))
(cffi:use-foreign-library crypt32)

(cffi:defcfun ("CertAddCertificateContextToStore" cert-add-certificate-context-to-store :convention :stdcall) :int32
  (h-cert-store :pointer)   ; HCERTSTORE optional
  (p-cert-context :pointer)   ; CERT_CONTEXT*
  (dw-add-disposition :uint32)   ; DWORD
  (pp-store-context :pointer))   ; CERT_CONTEXT** optional, out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $CertAddCertificateContextToStore = Win32::API::More->new('CRYPT32',
    'BOOL CertAddCertificateContextToStore(HANDLE hCertStore, LPVOID pCertContext, DWORD dwAddDisposition, LPVOID ppStoreContext)');
# my $ret = $CertAddCertificateContextToStore->Call($hCertStore, $pCertContext, $dwAddDisposition, $ppStoreContext);
# hCertStore : HCERTSTORE optional -> HANDLE
# pCertContext : CERT_CONTEXT* -> LPVOID
# dwAddDisposition : DWORD -> DWORD
# ppStoreContext : CERT_CONTEXT** optional, out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。

関連項目

公式の関連項目
使用する型