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