Win32 API 日本語リファレンス
ホームStorage.FileSystem › FreeEncryptionCertificateHashList

FreeEncryptionCertificateHashList

関数
暗号化証明書ハッシュリストのメモリを解放する。
DLLADVAPI32.dll呼出規約winapi対応OSWindows XP 以降

シグネチャ

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

void FreeEncryptionCertificateHashList(
    ENCRYPTION_CERTIFICATE_HASH_LIST* pUsers
);

パラメーター

名前方向説明
pUsersENCRYPTION_CERTIFICATE_HASH_LIST*in証明書ハッシュリスト構造体 ENCRYPTION_CERTIFICATE_HASH_LIST へのポインター。これは QueryUsersOnEncryptedFile または QueryRecoveryAgentsOnEncryptedFile 関数によって返されたものです。

戻り値の型: void

公式ドキュメント

証明書ハッシュリストを解放します。

解説(Remarks)

ReFS: この関数はサポートされていません。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での呼び出し定義

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

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

FreeEncryptionCertificateHashList = ctypes.windll.advapi32.FreeEncryptionCertificateHashList
FreeEncryptionCertificateHashList.restype = None
FreeEncryptionCertificateHashList.argtypes = [
    ctypes.c_void_p,  # pUsers : ENCRYPTION_CERTIFICATE_HASH_LIST*
]
require 'fiddle'
require 'fiddle/import'

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

var (
	advapi32 = windows.NewLazySystemDLL("ADVAPI32.dll")
	procFreeEncryptionCertificateHashList = advapi32.NewProc("FreeEncryptionCertificateHashList")
)

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

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

typedef FreeEncryptionCertificateHashListNative = Void Function(Pointer<Void>);
typedef FreeEncryptionCertificateHashListDart = void Function(Pointer<Void>);
final FreeEncryptionCertificateHashList = DynamicLibrary.open('ADVAPI32.dll')
    .lookupFunction<FreeEncryptionCertificateHashListNative, FreeEncryptionCertificateHashListDart>('FreeEncryptionCertificateHashList');
// pUsers : ENCRYPTION_CERTIFICATE_HASH_LIST* -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
procedure FreeEncryptionCertificateHashList(
  pUsers: Pointer   // ENCRYPTION_CERTIFICATE_HASH_LIST*
); stdcall;
  external 'ADVAPI32.dll' name 'FreeEncryptionCertificateHashList';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "FreeEncryptionCertificateHashList"
  c_FreeEncryptionCertificateHashList :: Ptr () -> IO ()
-- pUsers : ENCRYPTION_CERTIFICATE_HASH_LIST* -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let freeencryptioncertificatehashlist =
  foreign "FreeEncryptionCertificateHashList"
    ((ptr void) @-> returning void)
(* pUsers : ENCRYPTION_CERTIFICATE_HASH_LIST* -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library advapi32 (t "ADVAPI32.dll"))
(cffi:use-foreign-library advapi32)

(cffi:defcfun ("FreeEncryptionCertificateHashList" free-encryption-certificate-hash-list :convention :stdcall) :void
  (p-users :pointer))   ; ENCRYPTION_CERTIFICATE_HASH_LIST*
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $FreeEncryptionCertificateHashList = Win32::API::More->new('ADVAPI32',
    'void FreeEncryptionCertificateHashList(LPVOID pUsers)');
# my $ret = $FreeEncryptionCertificateHashList->Call($pUsers);
# pUsers : ENCRYPTION_CERTIFICATE_HASH_LIST* -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。

関連項目

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