ホーム › Graphics.Printing › CommonPropertySheetUIW
CommonPropertySheetUIW
関数共通UIプロパティシートを表示する(Unicode版)。
シグネチャ
// COMPSTUI.dll (Unicode / -W)
#include <windows.h>
INT CommonPropertySheetUIW(
HWND hWndOwner,
PFNPROPSHEETUI pfnPropSheetUI,
LPARAM lParam,
DWORD* pResult // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hWndOwner | HWND | in |
| pfnPropSheetUI | PFNPROPSHEETUI | in |
| lParam | LPARAM | in |
| pResult | DWORD* | outoptional |
戻り値の型: INT
各言語での呼び出し定義
// COMPSTUI.dll (Unicode / -W)
#include <windows.h>
INT CommonPropertySheetUIW(
HWND hWndOwner,
PFNPROPSHEETUI pfnPropSheetUI,
LPARAM lParam,
DWORD* pResult // optional
);[DllImport("COMPSTUI.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int CommonPropertySheetUIW(
IntPtr hWndOwner, // HWND
IntPtr pfnPropSheetUI, // PFNPROPSHEETUI
IntPtr lParam, // LPARAM
IntPtr pResult // DWORD* optional, out
);<DllImport("COMPSTUI.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function CommonPropertySheetUIW(
hWndOwner As IntPtr, ' HWND
pfnPropSheetUI As IntPtr, ' PFNPROPSHEETUI
lParam As IntPtr, ' LPARAM
pResult As IntPtr ' DWORD* optional, out
) As Integer
End Function' hWndOwner : HWND
' pfnPropSheetUI : PFNPROPSHEETUI
' lParam : LPARAM
' pResult : DWORD* optional, out
Declare PtrSafe Function CommonPropertySheetUIW Lib "compstui" ( _
ByVal hWndOwner As LongPtr, _
ByVal pfnPropSheetUI As LongPtr, _
ByVal lParam As LongPtr, _
ByVal pResult As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CommonPropertySheetUIW = ctypes.windll.compstui.CommonPropertySheetUIW
CommonPropertySheetUIW.restype = ctypes.c_int
CommonPropertySheetUIW.argtypes = [
wintypes.HANDLE, # hWndOwner : HWND
ctypes.c_void_p, # pfnPropSheetUI : PFNPROPSHEETUI
ctypes.c_ssize_t, # lParam : LPARAM
ctypes.POINTER(wintypes.DWORD), # pResult : DWORD* optional, out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('COMPSTUI.dll')
CommonPropertySheetUIW = Fiddle::Function.new(
lib['CommonPropertySheetUIW'],
[
Fiddle::TYPE_VOIDP, # hWndOwner : HWND
Fiddle::TYPE_VOIDP, # pfnPropSheetUI : PFNPROPSHEETUI
Fiddle::TYPE_INTPTR_T, # lParam : LPARAM
Fiddle::TYPE_VOIDP, # pResult : DWORD* optional, out
],
Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "compstui")]
extern "system" {
fn CommonPropertySheetUIW(
hWndOwner: *mut core::ffi::c_void, // HWND
pfnPropSheetUI: *const core::ffi::c_void, // PFNPROPSHEETUI
lParam: isize, // LPARAM
pResult: *mut u32 // DWORD* optional, out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("COMPSTUI.dll", CharSet = CharSet.Unicode)]
public static extern int CommonPropertySheetUIW(IntPtr hWndOwner, IntPtr pfnPropSheetUI, IntPtr lParam, IntPtr pResult);
"@
$api = Add-Type -MemberDefinition $sig -Name 'COMPSTUI_CommonPropertySheetUIW' -Namespace Win32 -PassThru
# $api::CommonPropertySheetUIW(hWndOwner, pfnPropSheetUI, lParam, pResult)#uselib "COMPSTUI.dll"
#func global CommonPropertySheetUIW "CommonPropertySheetUIW" wptr, wptr, wptr, wptr
; CommonPropertySheetUIW hWndOwner, pfnPropSheetUI, lParam, varptr(pResult) ; 戻り値は stat
; hWndOwner : HWND -> "wptr"
; pfnPropSheetUI : PFNPROPSHEETUI -> "wptr"
; lParam : LPARAM -> "wptr"
; pResult : DWORD* optional, out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "COMPSTUI.dll" #cfunc global CommonPropertySheetUIW "CommonPropertySheetUIW" sptr, sptr, sptr, var ; res = CommonPropertySheetUIW(hWndOwner, pfnPropSheetUI, lParam, pResult) ; hWndOwner : HWND -> "sptr" ; pfnPropSheetUI : PFNPROPSHEETUI -> "sptr" ; lParam : LPARAM -> "sptr" ; pResult : DWORD* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "COMPSTUI.dll" #cfunc global CommonPropertySheetUIW "CommonPropertySheetUIW" sptr, sptr, sptr, sptr ; res = CommonPropertySheetUIW(hWndOwner, pfnPropSheetUI, lParam, varptr(pResult)) ; hWndOwner : HWND -> "sptr" ; pfnPropSheetUI : PFNPROPSHEETUI -> "sptr" ; lParam : LPARAM -> "sptr" ; pResult : DWORD* optional, out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; INT CommonPropertySheetUIW(HWND hWndOwner, PFNPROPSHEETUI pfnPropSheetUI, LPARAM lParam, DWORD* pResult) #uselib "COMPSTUI.dll" #cfunc global CommonPropertySheetUIW "CommonPropertySheetUIW" intptr, intptr, intptr, var ; res = CommonPropertySheetUIW(hWndOwner, pfnPropSheetUI, lParam, pResult) ; hWndOwner : HWND -> "intptr" ; pfnPropSheetUI : PFNPROPSHEETUI -> "intptr" ; lParam : LPARAM -> "intptr" ; pResult : DWORD* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; INT CommonPropertySheetUIW(HWND hWndOwner, PFNPROPSHEETUI pfnPropSheetUI, LPARAM lParam, DWORD* pResult) #uselib "COMPSTUI.dll" #cfunc global CommonPropertySheetUIW "CommonPropertySheetUIW" intptr, intptr, intptr, intptr ; res = CommonPropertySheetUIW(hWndOwner, pfnPropSheetUI, lParam, varptr(pResult)) ; hWndOwner : HWND -> "intptr" ; pfnPropSheetUI : PFNPROPSHEETUI -> "intptr" ; lParam : LPARAM -> "intptr" ; pResult : DWORD* optional, out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
compstui = windows.NewLazySystemDLL("COMPSTUI.dll")
procCommonPropertySheetUIW = compstui.NewProc("CommonPropertySheetUIW")
)
// hWndOwner (HWND), pfnPropSheetUI (PFNPROPSHEETUI), lParam (LPARAM), pResult (DWORD* optional, out)
r1, _, err := procCommonPropertySheetUIW.Call(
uintptr(hWndOwner),
uintptr(pfnPropSheetUI),
uintptr(lParam),
uintptr(pResult),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction CommonPropertySheetUIW(
hWndOwner: THandle; // HWND
pfnPropSheetUI: Pointer; // PFNPROPSHEETUI
lParam: NativeInt; // LPARAM
pResult: Pointer // DWORD* optional, out
): Integer; stdcall;
external 'COMPSTUI.dll' name 'CommonPropertySheetUIW';result := DllCall("COMPSTUI\CommonPropertySheetUIW"
, "Ptr", hWndOwner ; HWND
, "Ptr", pfnPropSheetUI ; PFNPROPSHEETUI
, "Ptr", lParam ; LPARAM
, "Ptr", pResult ; DWORD* optional, out
, "Int") ; return: INT●CommonPropertySheetUIW(hWndOwner, pfnPropSheetUI, lParam, pResult) = DLL("COMPSTUI.dll", "int CommonPropertySheetUIW(void*, void*, int, void*)")
# 呼び出し: CommonPropertySheetUIW(hWndOwner, pfnPropSheetUI, lParam, pResult)
# hWndOwner : HWND -> "void*"
# pfnPropSheetUI : PFNPROPSHEETUI -> "void*"
# lParam : LPARAM -> "int"
# pResult : DWORD* optional, out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。