Win32 API 日本語リファレンス
ホームSystem.WindowsProgramming › WldpIsProductionConfiguration

WldpIsProductionConfiguration

関数
システムが製品版構成かを判定する。
DLLWldp.dll呼出規約winapi

シグネチャ

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

HRESULT WldpIsProductionConfiguration(
    BOOL* IsProductionConfiguration
);

パラメーター

名前方向
IsProductionConfigurationBOOL*out

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT WldpIsProductionConfiguration(
    BOOL* IsProductionConfiguration
);
[DllImport("Wldp.dll", ExactSpelling = true)]
static extern int WldpIsProductionConfiguration(
    out int IsProductionConfiguration   // BOOL* out
);
<DllImport("Wldp.dll", ExactSpelling:=True)>
Public Shared Function WldpIsProductionConfiguration(
    <Out> ByRef IsProductionConfiguration As Integer   ' BOOL* out
) As Integer
End Function
' IsProductionConfiguration : BOOL* out
Declare PtrSafe Function WldpIsProductionConfiguration Lib "wldp" ( _
    ByRef IsProductionConfiguration As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

WldpIsProductionConfiguration = ctypes.windll.wldp.WldpIsProductionConfiguration
WldpIsProductionConfiguration.restype = ctypes.c_int
WldpIsProductionConfiguration.argtypes = [
    ctypes.c_void_p,  # IsProductionConfiguration : BOOL* out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	wldp = windows.NewLazySystemDLL("Wldp.dll")
	procWldpIsProductionConfiguration = wldp.NewProc("WldpIsProductionConfiguration")
)

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