ホーム › Security.Cryptography › CertDeleteCRLFromStore
CertDeleteCRLFromStore
関数CRLをストアから削除する。
シグネチャ
// CRYPT32.dll
#include <windows.h>
BOOL CertDeleteCRLFromStore(
CRL_CONTEXT* pCrlContext
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pCrlContext | CRL_CONTEXT* | in |
戻り値の型: BOOL
各言語での呼び出し定義
// CRYPT32.dll
#include <windows.h>
BOOL CertDeleteCRLFromStore(
CRL_CONTEXT* pCrlContext
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("CRYPT32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool CertDeleteCRLFromStore(
IntPtr pCrlContext // CRL_CONTEXT*
);<DllImport("CRYPT32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function CertDeleteCRLFromStore(
pCrlContext As IntPtr ' CRL_CONTEXT*
) As Boolean
End Function' pCrlContext : CRL_CONTEXT*
Declare PtrSafe Function CertDeleteCRLFromStore Lib "crypt32" ( _
ByVal pCrlContext As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CertDeleteCRLFromStore = ctypes.windll.crypt32.CertDeleteCRLFromStore
CertDeleteCRLFromStore.restype = wintypes.BOOL
CertDeleteCRLFromStore.argtypes = [
ctypes.c_void_p, # pCrlContext : CRL_CONTEXT*
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('CRYPT32.dll')
CertDeleteCRLFromStore = Fiddle::Function.new(
lib['CertDeleteCRLFromStore'],
[
Fiddle::TYPE_VOIDP, # pCrlContext : CRL_CONTEXT*
],
Fiddle::TYPE_INT)#[link(name = "crypt32")]
extern "system" {
fn CertDeleteCRLFromStore(
pCrlContext: *mut CRL_CONTEXT // CRL_CONTEXT*
) -> 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 CertDeleteCRLFromStore(IntPtr pCrlContext);
"@
$api = Add-Type -MemberDefinition $sig -Name 'CRYPT32_CertDeleteCRLFromStore' -Namespace Win32 -PassThru
# $api::CertDeleteCRLFromStore(pCrlContext)#uselib "CRYPT32.dll"
#func global CertDeleteCRLFromStore "CertDeleteCRLFromStore" sptr
; CertDeleteCRLFromStore varptr(pCrlContext) ; 戻り値は stat
; pCrlContext : CRL_CONTEXT* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "CRYPT32.dll" #cfunc global CertDeleteCRLFromStore "CertDeleteCRLFromStore" var ; res = CertDeleteCRLFromStore(pCrlContext) ; pCrlContext : CRL_CONTEXT* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "CRYPT32.dll" #cfunc global CertDeleteCRLFromStore "CertDeleteCRLFromStore" sptr ; res = CertDeleteCRLFromStore(varptr(pCrlContext)) ; pCrlContext : CRL_CONTEXT* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; BOOL CertDeleteCRLFromStore(CRL_CONTEXT* pCrlContext) #uselib "CRYPT32.dll" #cfunc global CertDeleteCRLFromStore "CertDeleteCRLFromStore" var ; res = CertDeleteCRLFromStore(pCrlContext) ; pCrlContext : CRL_CONTEXT* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOL CertDeleteCRLFromStore(CRL_CONTEXT* pCrlContext) #uselib "CRYPT32.dll" #cfunc global CertDeleteCRLFromStore "CertDeleteCRLFromStore" intptr ; res = CertDeleteCRLFromStore(varptr(pCrlContext)) ; pCrlContext : CRL_CONTEXT* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
crypt32 = windows.NewLazySystemDLL("CRYPT32.dll")
procCertDeleteCRLFromStore = crypt32.NewProc("CertDeleteCRLFromStore")
)
// pCrlContext (CRL_CONTEXT*)
r1, _, err := procCertDeleteCRLFromStore.Call(
uintptr(pCrlContext),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction CertDeleteCRLFromStore(
pCrlContext: Pointer // CRL_CONTEXT*
): BOOL; stdcall;
external 'CRYPT32.dll' name 'CertDeleteCRLFromStore';result := DllCall("CRYPT32\CertDeleteCRLFromStore"
, "Ptr", pCrlContext ; CRL_CONTEXT*
, "Int") ; return: BOOL●CertDeleteCRLFromStore(pCrlContext) = DLL("CRYPT32.dll", "bool CertDeleteCRLFromStore(void*)")
# 呼び出し: CertDeleteCRLFromStore(pCrlContext)
# pCrlContext : CRL_CONTEXT* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。