ホーム › System.SystemInformation › GetDeveloperDriveEnablementState
GetDeveloperDriveEnablementState
関数開発者ドライブ機能の有効化状態を取得する。
シグネチャ
// api-ms-win-core-sysinfo-l1-2-6.dll
#include <windows.h>
DEVELOPER_DRIVE_ENABLEMENT_STATE GetDeveloperDriveEnablementState(void);パラメーターなし。戻り値: DEVELOPER_DRIVE_ENABLEMENT_STATE
各言語での呼び出し定義
// api-ms-win-core-sysinfo-l1-2-6.dll
#include <windows.h>
DEVELOPER_DRIVE_ENABLEMENT_STATE GetDeveloperDriveEnablementState(void);[DllImport("api-ms-win-core-sysinfo-l1-2-6.dll", ExactSpelling = true)]
static extern int GetDeveloperDriveEnablementState();<DllImport("api-ms-win-core-sysinfo-l1-2-6.dll", ExactSpelling:=True)>
Public Shared Function GetDeveloperDriveEnablementState() As Integer
End FunctionDeclare PtrSafe Function GetDeveloperDriveEnablementState Lib "api-ms-win-core-sysinfo-l1-2-6" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GetDeveloperDriveEnablementState = ctypes.windll.LoadLibrary("api-ms-win-core-sysinfo-l1-2-6.dll").GetDeveloperDriveEnablementState
GetDeveloperDriveEnablementState.restype = ctypes.c_int
GetDeveloperDriveEnablementState.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('api-ms-win-core-sysinfo-l1-2-6.dll')
GetDeveloperDriveEnablementState = Fiddle::Function.new(
lib['GetDeveloperDriveEnablementState'],
[],
Fiddle::TYPE_INT)#[link(name = "api-ms-win-core-sysinfo-l1-2-6")]
extern "system" {
fn GetDeveloperDriveEnablementState() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("api-ms-win-core-sysinfo-l1-2-6.dll")]
public static extern int GetDeveloperDriveEnablementState();
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-core-sysinfo-l1-2-6_GetDeveloperDriveEnablementState' -Namespace Win32 -PassThru
# $api::GetDeveloperDriveEnablementState()#uselib "api-ms-win-core-sysinfo-l1-2-6.dll"
#func global GetDeveloperDriveEnablementState "GetDeveloperDriveEnablementState"
; GetDeveloperDriveEnablementState ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "api-ms-win-core-sysinfo-l1-2-6.dll"
#cfunc global GetDeveloperDriveEnablementState "GetDeveloperDriveEnablementState"
; res = GetDeveloperDriveEnablementState(); DEVELOPER_DRIVE_ENABLEMENT_STATE GetDeveloperDriveEnablementState()
#uselib "api-ms-win-core-sysinfo-l1-2-6.dll"
#cfunc global GetDeveloperDriveEnablementState "GetDeveloperDriveEnablementState"
; res = GetDeveloperDriveEnablementState()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
api_ms_win_core_sysinfo_l1_2_6 = windows.NewLazySystemDLL("api-ms-win-core-sysinfo-l1-2-6.dll")
procGetDeveloperDriveEnablementState = api_ms_win_core_sysinfo_l1_2_6.NewProc("GetDeveloperDriveEnablementState")
)
r1, _, err := procGetDeveloperDriveEnablementState.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DEVELOPER_DRIVE_ENABLEMENT_STATEfunction GetDeveloperDriveEnablementState: Integer; stdcall;
external 'api-ms-win-core-sysinfo-l1-2-6.dll' name 'GetDeveloperDriveEnablementState';result := DllCall("api-ms-win-core-sysinfo-l1-2-6\GetDeveloperDriveEnablementState", "Int")●GetDeveloperDriveEnablementState() = DLL("api-ms-win-core-sysinfo-l1-2-6.dll", "int GetDeveloperDriveEnablementState()")
# 呼び出し: GetDeveloperDriveEnablementState()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。