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