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