ホーム › System.TpmBaseServices › Tbsi_Is_Tpm_Present
Tbsi_Is_Tpm_Present
関数システムにTPMが存在するかどうかを判定する。
シグネチャ
// tbs.dll
#include <windows.h>
BOOL Tbsi_Is_Tpm_Present(void);パラメーターなし。戻り値: BOOL
各言語での呼び出し定義
// tbs.dll
#include <windows.h>
BOOL Tbsi_Is_Tpm_Present(void);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("tbs.dll", ExactSpelling = true)]
static extern bool Tbsi_Is_Tpm_Present();<DllImport("tbs.dll", ExactSpelling:=True)>
Public Shared Function Tbsi_Is_Tpm_Present() As Boolean
End FunctionDeclare PtrSafe Function Tbsi_Is_Tpm_Present Lib "tbs" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
Tbsi_Is_Tpm_Present = ctypes.windll.tbs.Tbsi_Is_Tpm_Present
Tbsi_Is_Tpm_Present.restype = wintypes.BOOL
Tbsi_Is_Tpm_Present.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('tbs.dll')
Tbsi_Is_Tpm_Present = Fiddle::Function.new(
lib['Tbsi_Is_Tpm_Present'],
[],
Fiddle::TYPE_INT)#[link(name = "tbs")]
extern "system" {
fn Tbsi_Is_Tpm_Present() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("tbs.dll")]
public static extern bool Tbsi_Is_Tpm_Present();
"@
$api = Add-Type -MemberDefinition $sig -Name 'tbs_Tbsi_Is_Tpm_Present' -Namespace Win32 -PassThru
# $api::Tbsi_Is_Tpm_Present()#uselib "tbs.dll"
#func global Tbsi_Is_Tpm_Present "Tbsi_Is_Tpm_Present"
; Tbsi_Is_Tpm_Present ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "tbs.dll"
#cfunc global Tbsi_Is_Tpm_Present "Tbsi_Is_Tpm_Present"
; res = Tbsi_Is_Tpm_Present(); BOOL Tbsi_Is_Tpm_Present()
#uselib "tbs.dll"
#cfunc global Tbsi_Is_Tpm_Present "Tbsi_Is_Tpm_Present"
; res = Tbsi_Is_Tpm_Present()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
tbs = windows.NewLazySystemDLL("tbs.dll")
procTbsi_Is_Tpm_Present = tbs.NewProc("Tbsi_Is_Tpm_Present")
)
r1, _, err := procTbsi_Is_Tpm_Present.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction Tbsi_Is_Tpm_Present: BOOL; stdcall;
external 'tbs.dll' name 'Tbsi_Is_Tpm_Present';result := DllCall("tbs\Tbsi_Is_Tpm_Present", "Int")●Tbsi_Is_Tpm_Present() = DLL("tbs.dll", "bool Tbsi_Is_Tpm_Present()")
# 呼び出し: Tbsi_Is_Tpm_Present()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。