Win32 API 日本語リファレンス
ホームUI.Controls › CreatePropertySheetPageA

CreatePropertySheetPageA

関数
プロパティシートページを作成する(ANSI版)。
DLLCOMCTL32.dll文字セットANSI (-A)呼出規約winapi対応OSWindows Vista 以降

シグネチャ

// COMCTL32.dll  (ANSI / -A)
#include <windows.h>

HPROPSHEETPAGE CreatePropertySheetPageA(
    PROPSHEETPAGEA* constPropSheetPagePointer
);

パラメーター

名前方向
constPropSheetPagePointerPROPSHEETPAGEA*inout

戻り値の型: HPROPSHEETPAGE

各言語での呼び出し定義

// COMCTL32.dll  (ANSI / -A)
#include <windows.h>

HPROPSHEETPAGE CreatePropertySheetPageA(
    PROPSHEETPAGEA* constPropSheetPagePointer
);
[DllImport("COMCTL32.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern IntPtr CreatePropertySheetPageA(
    IntPtr constPropSheetPagePointer   // PROPSHEETPAGEA* in/out
);
<DllImport("COMCTL32.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function CreatePropertySheetPageA(
    constPropSheetPagePointer As IntPtr   ' PROPSHEETPAGEA* in/out
) As IntPtr
End Function
' constPropSheetPagePointer : PROPSHEETPAGEA* in/out
Declare PtrSafe Function CreatePropertySheetPageA Lib "comctl32" ( _
    ByVal constPropSheetPagePointer As LongPtr) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

CreatePropertySheetPageA = ctypes.windll.comctl32.CreatePropertySheetPageA
CreatePropertySheetPageA.restype = ctypes.c_void_p
CreatePropertySheetPageA.argtypes = [
    ctypes.c_void_p,  # constPropSheetPagePointer : PROPSHEETPAGEA* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('COMCTL32.dll')
CreatePropertySheetPageA = Fiddle::Function.new(
  lib['CreatePropertySheetPageA'],
  [
    Fiddle::TYPE_VOIDP,  # constPropSheetPagePointer : PROPSHEETPAGEA* in/out
  ],
  Fiddle::TYPE_VOIDP)
#[link(name = "comctl32")]
extern "system" {
    fn CreatePropertySheetPageA(
        constPropSheetPagePointer: *mut PROPSHEETPAGEA  // PROPSHEETPAGEA* in/out
    ) -> *mut core::ffi::c_void;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("COMCTL32.dll", CharSet = CharSet.Ansi)]
public static extern IntPtr CreatePropertySheetPageA(IntPtr constPropSheetPagePointer);
"@
$api = Add-Type -MemberDefinition $sig -Name 'COMCTL32_CreatePropertySheetPageA' -Namespace Win32 -PassThru
# $api::CreatePropertySheetPageA(constPropSheetPagePointer)
#uselib "COMCTL32.dll"
#func global CreatePropertySheetPageA "CreatePropertySheetPageA" sptr
; CreatePropertySheetPageA varptr(constPropSheetPagePointer)   ; 戻り値は stat
; constPropSheetPagePointer : PROPSHEETPAGEA* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "COMCTL32.dll"
#cfunc global CreatePropertySheetPageA "CreatePropertySheetPageA" var
; res = CreatePropertySheetPageA(constPropSheetPagePointer)
; constPropSheetPagePointer : PROPSHEETPAGEA* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; HPROPSHEETPAGE CreatePropertySheetPageA(PROPSHEETPAGEA* constPropSheetPagePointer)
#uselib "COMCTL32.dll"
#cfunc global CreatePropertySheetPageA "CreatePropertySheetPageA" var
; res = CreatePropertySheetPageA(constPropSheetPagePointer)
; constPropSheetPagePointer : PROPSHEETPAGEA* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	comctl32 = windows.NewLazySystemDLL("COMCTL32.dll")
	procCreatePropertySheetPageA = comctl32.NewProc("CreatePropertySheetPageA")
)

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