Win32 API 日本語リファレンス
ホームNetworking.WinInet › IsProfilesEnabled

IsProfilesEnabled

関数
ユーザープロファイル機能が有効か判定する。
DLLWININET.dll呼出規約winapi

シグネチャ

// WININET.dll
#include <windows.h>

BOOL IsProfilesEnabled(void);

パラメーターなし。戻り値: BOOL

各言語での呼び出し定義

// WININET.dll
#include <windows.h>

BOOL IsProfilesEnabled(void);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WININET.dll", ExactSpelling = true)]
static extern bool IsProfilesEnabled();
<DllImport("WININET.dll", ExactSpelling:=True)>
Public Shared Function IsProfilesEnabled() As Boolean
End Function
Declare PtrSafe Function IsProfilesEnabled Lib "wininet" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

IsProfilesEnabled = ctypes.windll.wininet.IsProfilesEnabled
IsProfilesEnabled.restype = wintypes.BOOL
IsProfilesEnabled.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('WININET.dll')
IsProfilesEnabled = Fiddle::Function.new(
  lib['IsProfilesEnabled'],
  [],
  Fiddle::TYPE_INT)
#[link(name = "wininet")]
extern "system" {
    fn IsProfilesEnabled() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WININET.dll")]
public static extern bool IsProfilesEnabled();
"@
$api = Add-Type -MemberDefinition $sig -Name 'WININET_IsProfilesEnabled' -Namespace Win32 -PassThru
# $api::IsProfilesEnabled()
#uselib "WININET.dll"
#func global IsProfilesEnabled "IsProfilesEnabled"
; IsProfilesEnabled   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "WININET.dll"
#cfunc global IsProfilesEnabled "IsProfilesEnabled"
; res = IsProfilesEnabled()
; BOOL IsProfilesEnabled()
#uselib "WININET.dll"
#cfunc global IsProfilesEnabled "IsProfilesEnabled"
; res = IsProfilesEnabled()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	wininet = windows.NewLazySystemDLL("WININET.dll")
	procIsProfilesEnabled = wininet.NewProc("IsProfilesEnabled")
)

r1, _, err := procIsProfilesEnabled.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function IsProfilesEnabled: BOOL; stdcall;
  external 'WININET.dll' name 'IsProfilesEnabled';
result := DllCall("WININET\IsProfilesEnabled", "Int")
●IsProfilesEnabled() = DLL("WININET.dll", "bool IsProfilesEnabled()")
# 呼び出し: IsProfilesEnabled()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。