ホーム › Security.Authentication.Identity › SLClose
SLClose
関数ソフトウェアライセンスクライアントのハンドルを閉じる。
シグネチャ
// SLC.dll
#include <windows.h>
HRESULT SLClose(
void* hSLC
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hSLC | void* | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// SLC.dll
#include <windows.h>
HRESULT SLClose(
void* hSLC
);[DllImport("SLC.dll", ExactSpelling = true)]
static extern int SLClose(
IntPtr hSLC // void*
);<DllImport("SLC.dll", ExactSpelling:=True)>
Public Shared Function SLClose(
hSLC As IntPtr ' void*
) As Integer
End Function' hSLC : void*
Declare PtrSafe Function SLClose Lib "slc" ( _
ByVal hSLC As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SLClose = ctypes.windll.slc.SLClose
SLClose.restype = ctypes.c_int
SLClose.argtypes = [
ctypes.POINTER(None), # hSLC : void*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('SLC.dll')
SLClose = Fiddle::Function.new(
lib['SLClose'],
[
Fiddle::TYPE_VOIDP, # hSLC : void*
],
Fiddle::TYPE_INT)#[link(name = "slc")]
extern "system" {
fn SLClose(
hSLC: *mut () // void*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("SLC.dll")]
public static extern int SLClose(IntPtr hSLC);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SLC_SLClose' -Namespace Win32 -PassThru
# $api::SLClose(hSLC)#uselib "SLC.dll"
#func global SLClose "SLClose" sptr
; SLClose hSLC ; 戻り値は stat
; hSLC : void* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "SLC.dll"
#cfunc global SLClose "SLClose" sptr
; res = SLClose(hSLC)
; hSLC : void* -> "sptr"; HRESULT SLClose(void* hSLC)
#uselib "SLC.dll"
#cfunc global SLClose "SLClose" intptr
; res = SLClose(hSLC)
; hSLC : void* -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
slc = windows.NewLazySystemDLL("SLC.dll")
procSLClose = slc.NewProc("SLClose")
)
// hSLC (void*)
r1, _, err := procSLClose.Call(
uintptr(hSLC),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction SLClose(
hSLC: Pointer // void*
): Integer; stdcall;
external 'SLC.dll' name 'SLClose';result := DllCall("SLC\SLClose"
, "Ptr", hSLC ; void*
, "Int") ; return: HRESULT●SLClose(hSLC) = DLL("SLC.dll", "int SLClose(void*)")
# 呼び出し: SLClose(hSLC)
# hSLC : void* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。