ホーム › UI.Shell.PropertiesSystem › PSGetPropertyDescriptionListFromString
PSGetPropertyDescriptionListFromString
関数文字列からプロパティ説明リストを生成する。
シグネチャ
// PROPSYS.dll
#include <windows.h>
HRESULT PSGetPropertyDescriptionListFromString(
LPCWSTR pszPropList,
const GUID* riid,
void** ppv
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pszPropList | LPCWSTR | in |
| riid | GUID* | in |
| ppv | void** | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// PROPSYS.dll
#include <windows.h>
HRESULT PSGetPropertyDescriptionListFromString(
LPCWSTR pszPropList,
const GUID* riid,
void** ppv
);[DllImport("PROPSYS.dll", ExactSpelling = true)]
static extern int PSGetPropertyDescriptionListFromString(
[MarshalAs(UnmanagedType.LPWStr)] string pszPropList, // LPCWSTR
ref Guid riid, // GUID*
IntPtr ppv // void** out
);<DllImport("PROPSYS.dll", ExactSpelling:=True)>
Public Shared Function PSGetPropertyDescriptionListFromString(
<MarshalAs(UnmanagedType.LPWStr)> pszPropList As String, ' LPCWSTR
ByRef riid As Guid, ' GUID*
ppv As IntPtr ' void** out
) As Integer
End Function' pszPropList : LPCWSTR
' riid : GUID*
' ppv : void** out
Declare PtrSafe Function PSGetPropertyDescriptionListFromString Lib "propsys" ( _
ByVal pszPropList As LongPtr, _
ByVal riid As LongPtr, _
ByVal ppv As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PSGetPropertyDescriptionListFromString = ctypes.windll.propsys.PSGetPropertyDescriptionListFromString
PSGetPropertyDescriptionListFromString.restype = ctypes.c_int
PSGetPropertyDescriptionListFromString.argtypes = [
wintypes.LPCWSTR, # pszPropList : LPCWSTR
ctypes.c_void_p, # riid : GUID*
ctypes.c_void_p, # ppv : void** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('PROPSYS.dll')
PSGetPropertyDescriptionListFromString = Fiddle::Function.new(
lib['PSGetPropertyDescriptionListFromString'],
[
Fiddle::TYPE_VOIDP, # pszPropList : LPCWSTR
Fiddle::TYPE_VOIDP, # riid : GUID*
Fiddle::TYPE_VOIDP, # ppv : void** out
],
Fiddle::TYPE_INT)#[link(name = "propsys")]
extern "system" {
fn PSGetPropertyDescriptionListFromString(
pszPropList: *const u16, // LPCWSTR
riid: *const GUID, // GUID*
ppv: *mut *mut () // void** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("PROPSYS.dll")]
public static extern int PSGetPropertyDescriptionListFromString([MarshalAs(UnmanagedType.LPWStr)] string pszPropList, ref Guid riid, IntPtr ppv);
"@
$api = Add-Type -MemberDefinition $sig -Name 'PROPSYS_PSGetPropertyDescriptionListFromString' -Namespace Win32 -PassThru
# $api::PSGetPropertyDescriptionListFromString(pszPropList, riid, ppv)#uselib "PROPSYS.dll"
#func global PSGetPropertyDescriptionListFromString "PSGetPropertyDescriptionListFromString" sptr, sptr, sptr
; PSGetPropertyDescriptionListFromString pszPropList, varptr(riid), ppv ; 戻り値は stat
; pszPropList : LPCWSTR -> "sptr"
; riid : GUID* -> "sptr"
; ppv : void** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "PROPSYS.dll" #cfunc global PSGetPropertyDescriptionListFromString "PSGetPropertyDescriptionListFromString" wstr, var, sptr ; res = PSGetPropertyDescriptionListFromString(pszPropList, riid, ppv) ; pszPropList : LPCWSTR -> "wstr" ; riid : GUID* -> "var" ; ppv : void** out -> "sptr" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "PROPSYS.dll" #cfunc global PSGetPropertyDescriptionListFromString "PSGetPropertyDescriptionListFromString" wstr, sptr, sptr ; res = PSGetPropertyDescriptionListFromString(pszPropList, varptr(riid), ppv) ; pszPropList : LPCWSTR -> "wstr" ; riid : GUID* -> "sptr" ; ppv : void** out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT PSGetPropertyDescriptionListFromString(LPCWSTR pszPropList, GUID* riid, void** ppv) #uselib "PROPSYS.dll" #cfunc global PSGetPropertyDescriptionListFromString "PSGetPropertyDescriptionListFromString" wstr, var, intptr ; res = PSGetPropertyDescriptionListFromString(pszPropList, riid, ppv) ; pszPropList : LPCWSTR -> "wstr" ; riid : GUID* -> "var" ; ppv : void** out -> "intptr" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT PSGetPropertyDescriptionListFromString(LPCWSTR pszPropList, GUID* riid, void** ppv) #uselib "PROPSYS.dll" #cfunc global PSGetPropertyDescriptionListFromString "PSGetPropertyDescriptionListFromString" wstr, intptr, intptr ; res = PSGetPropertyDescriptionListFromString(pszPropList, varptr(riid), ppv) ; pszPropList : LPCWSTR -> "wstr" ; riid : GUID* -> "intptr" ; ppv : void** out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
propsys = windows.NewLazySystemDLL("PROPSYS.dll")
procPSGetPropertyDescriptionListFromString = propsys.NewProc("PSGetPropertyDescriptionListFromString")
)
// pszPropList (LPCWSTR), riid (GUID*), ppv (void** out)
r1, _, err := procPSGetPropertyDescriptionListFromString.Call(
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(pszPropList))),
uintptr(riid),
uintptr(ppv),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction PSGetPropertyDescriptionListFromString(
pszPropList: PWideChar; // LPCWSTR
riid: PGUID; // GUID*
ppv: Pointer // void** out
): Integer; stdcall;
external 'PROPSYS.dll' name 'PSGetPropertyDescriptionListFromString';result := DllCall("PROPSYS\PSGetPropertyDescriptionListFromString"
, "WStr", pszPropList ; LPCWSTR
, "Ptr", riid ; GUID*
, "Ptr", ppv ; void** out
, "Int") ; return: HRESULT●PSGetPropertyDescriptionListFromString(pszPropList, riid, ppv) = DLL("PROPSYS.dll", "int PSGetPropertyDescriptionListFromString(char*, void*, void*)")
# 呼び出し: PSGetPropertyDescriptionListFromString(pszPropList, riid, ppv)
# pszPropList : LPCWSTR -> "char*"
# riid : GUID* -> "void*"
# ppv : void** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。