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