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

CryptXmlClose

関数
CryptXmlで開いたXML署名ハンドルを閉じる。
DLLCRYPTXML.dll呼出規約winapi対応OSWindows 7 以降

シグネチャ

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

HRESULT CryptXmlClose(
    void* hCryptXml
);

パラメーター

名前方向
hCryptXmlvoid*in

戻り値の型: HRESULT

各言語での呼び出し定義

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

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

CryptXmlClose = ctypes.windll.cryptxml.CryptXmlClose
CryptXmlClose.restype = ctypes.c_int
CryptXmlClose.argtypes = [
    ctypes.POINTER(None),  # hCryptXml : void*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('CRYPTXML.dll')
CryptXmlClose = Fiddle::Function.new(
  lib['CryptXmlClose'],
  [
    Fiddle::TYPE_VOIDP,  # hCryptXml : void*
  ],
  Fiddle::TYPE_INT)
#[link(name = "cryptxml")]
extern "system" {
    fn CryptXmlClose(
        hCryptXml: *mut ()  // void*
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("CRYPTXML.dll")]
public static extern int CryptXmlClose(IntPtr hCryptXml);
"@
$api = Add-Type -MemberDefinition $sig -Name 'CRYPTXML_CryptXmlClose' -Namespace Win32 -PassThru
# $api::CryptXmlClose(hCryptXml)
#uselib "CRYPTXML.dll"
#func global CryptXmlClose "CryptXmlClose" sptr
; CryptXmlClose hCryptXml   ; 戻り値は stat
; hCryptXml : void* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "CRYPTXML.dll"
#cfunc global CryptXmlClose "CryptXmlClose" sptr
; res = CryptXmlClose(hCryptXml)
; hCryptXml : void* -> "sptr"
; HRESULT CryptXmlClose(void* hCryptXml)
#uselib "CRYPTXML.dll"
#cfunc global CryptXmlClose "CryptXmlClose" intptr
; res = CryptXmlClose(hCryptXml)
; hCryptXml : void* -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	cryptxml = windows.NewLazySystemDLL("CRYPTXML.dll")
	procCryptXmlClose = cryptxml.NewProc("CryptXmlClose")
)

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