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

DlgDirListW

関数
ディレクトリ内容をダイアログのリストボックスに一覧表示する(Unicode版)。
DLLUSER32.dll文字セットUnicode (-W)呼出規約winapi対応OSWindows Vista 以降

シグネチャ

// USER32.dll  (Unicode / -W)
#include <windows.h>

INT DlgDirListW(
    HWND hDlg,
    LPWSTR lpPathSpec,
    INT nIDListBox,
    INT nIDStaticPath,
    DLG_DIR_LIST_FILE_TYPE uFileType
);

パラメーター

名前方向説明
hDlgHWNDinリストボックスを含むダイアログボックスへのハンドルです。
lpPathSpecLPWSTRinout

絶対パス、相対パス、またはファイル名を指定する null 終端文字列を含むバッファーへのポインターです。絶対パスは、ドライブ文字 (例: d:) または UNC 名 (例: \ machinename
sharename) で始めることができます。

この関数は、文字列をディレクトリとファイル名に分割します。次に、ディレクトリ内でファイル名に一致する名前を検索します。文字列でディレクトリが指定されていない場合は、カレントディレクトリを検索します。

文字列にファイル名が含まれる場合、そのファイル名には少なくとも 1 つのワイルドカード文字 (? または ) を含める必要があります。文字列にファイル名が含まれない場合、この関数はファイル名としてアスタリスクのワイルドカード文字 () が指定されたものとして動作します。指定したディレクトリ内で、ファイル名に一致し、 uFileType パラメーターで指定された属性を持つすべての名前がリストボックスに追加されます。

nIDListBoxINTin
                <i>hDlg</i> ダイアログボックス内のリストボックスの識別子です。このパラメーターが 0 の場合、<b>DlgDirList</b> はリストボックスを埋めようとしません。
nIDStaticPathINTin
                <i>hDlg</i> ダイアログボックス内のスタティックコントロールの識別子です。<b>DlgDirList</b> は、このコントロールのテキストを設定して、現在のドライブとディレクトリを表示します。現在のドライブとディレクトリを表示しない場合、このパラメーターは 0 にできます。
uFileTypeDLG_DIR_LIST_FILE_TYPEin

リストボックスに追加するファイルまたはディレクトリの属性を指定します。このパラメーターには、次の値のうち 1 つ以上を指定できます。

意味
DDL_ARCHIVE
アーカイブ済みのファイルを含めます。
DDL_DIRECTORY
サブディレクトリを含めます。サブディレクトリ名は角かっこ ([ ]) で囲まれます。
DDL_DRIVES
マップされたすべてのドライブが一覧に追加されます。ドライブは [- x-] の形式で一覧表示されます。ここで x はドライブ文字です。
DDL_EXCLUSIVE
指定した属性を持つファイルのみを含めます。既定では、DDL_READWRITE が指定されていなくても、読み取り/書き込みファイルが一覧表示されます。
DDL_HIDDEN
隠しファイルを含めます。
DDL_READONLY
読み取り専用ファイルを含めます。
DDL_READWRITE
追加の属性を持たない読み取り/書き込みファイルを含めます。これが既定の設定です。
DDL_SYSTEM
システムファイルを含めます。
DDL_POSTMSGS
設定されている場合、DlgDirListPostMessage 関数を使用してリストボックスにメッセージを送信します。設定されていない場合、DlgDirListSendMessage 関数を使用します。

戻り値の型: INT

公式ドキュメント

リストボックスの内容を、指定したディレクトリ内のサブディレクトリおよびファイルの名前で置き換えます。一連のファイル属性を指定することで、名前の一覧をフィルター処理できます。一覧には、マップされたドライブを含めることもできます。(Unicode)

戻り値

型: int

関数が成功した場合、戻り値は 0 以外になります。

関数が失敗した場合、戻り値は 0 になります。たとえば、 lpPathSpec で指定された文字列が有効なパスでない場合、関数は失敗します。拡張エラー情報を取得するには、 を呼び出してください。

解説(Remarks)

            <i>lpPathSpec</i> がディレクトリを指定している場合、<a href="/windows/desktop/api/winuser/nf-winuser-dlgdirlistcomboboxa">DlgDirListComboBox</a> はリストボックスを埋める前に、カレントディレクトリを指定したディレクトリに変更します。
            <i>nIDStaticPath</i> パラメーターで識別されるスタティックコントロールのテキストは、新しいカレントディレクトリの名前に設定されます。

DlgDirList は、リストボックスに LB_RESETCONTENT メッセージと LB_DIR メッセージを送信します。

            <i>uFileType</i> に DDL_DIRECTORY フラグが含まれており、
            <i>lpPathSpec</i> が C:\TEMP のような第 1 レベルのディレクトリを指定している場合、リストボックスには常にルートディレクトリを表す ".." エントリが含まれます。これは、ルートディレクトリが隠し属性またはシステム属性を持ち、DDL_HIDDEN フラグや DDL_SYSTEM フラグが指定されていない場合でも当てはまります。NTFS ボリュームのルートディレクトリは、隠し属性とシステム属性を持ちます。

ディレクトリの一覧には、長いファイル名がある場合はそれが表示されます。

例については、次のトピックを参照してください: 単一選択リストボックスでのディレクトリ一覧の作成 および 複数選択リストボックスの作成

メモ

winuser.h ヘッダーは、DlgDirList を、UNICODE プリプロセッサ定数の定義に基づいてこの関数の ANSI 版または Unicode 版を自動的に選択するエイリアスとして定義します。エンコーディング中立のエイリアスを、エンコーディング中立でないコードと混在させて使用すると、不一致が生じ、コンパイルエラーや実行時エラーの原因となる場合があります。詳細については、関数プロトタイプの規約を参照してください。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での呼び出し定義

// USER32.dll  (Unicode / -W)
#include <windows.h>

INT DlgDirListW(
    HWND hDlg,
    LPWSTR lpPathSpec,
    INT nIDListBox,
    INT nIDStaticPath,
    DLG_DIR_LIST_FILE_TYPE uFileType
);
[DllImport("USER32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int DlgDirListW(
    IntPtr hDlg,   // HWND
    [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpPathSpec,   // LPWSTR in/out
    int nIDListBox,   // INT
    int nIDStaticPath,   // INT
    uint uFileType   // DLG_DIR_LIST_FILE_TYPE
);
<DllImport("USER32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function DlgDirListW(
    hDlg As IntPtr,   ' HWND
    <MarshalAs(UnmanagedType.LPWStr)> lpPathSpec As System.Text.StringBuilder,   ' LPWSTR in/out
    nIDListBox As Integer,   ' INT
    nIDStaticPath As Integer,   ' INT
    uFileType As UInteger   ' DLG_DIR_LIST_FILE_TYPE
) As Integer
End Function
' hDlg : HWND
' lpPathSpec : LPWSTR in/out
' nIDListBox : INT
' nIDStaticPath : INT
' uFileType : DLG_DIR_LIST_FILE_TYPE
Declare PtrSafe Function DlgDirListW Lib "user32" ( _
    ByVal hDlg As LongPtr, _
    ByVal lpPathSpec As LongPtr, _
    ByVal nIDListBox As Long, _
    ByVal nIDStaticPath As Long, _
    ByVal uFileType As Long) 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

DlgDirListW = ctypes.windll.user32.DlgDirListW
DlgDirListW.restype = ctypes.c_int
DlgDirListW.argtypes = [
    wintypes.HANDLE,  # hDlg : HWND
    wintypes.LPWSTR,  # lpPathSpec : LPWSTR in/out
    ctypes.c_int,  # nIDListBox : INT
    ctypes.c_int,  # nIDStaticPath : INT
    wintypes.DWORD,  # uFileType : DLG_DIR_LIST_FILE_TYPE
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('USER32.dll')
DlgDirListW = Fiddle::Function.new(
  lib['DlgDirListW'],
  [
    Fiddle::TYPE_VOIDP,  # hDlg : HWND
    Fiddle::TYPE_VOIDP,  # lpPathSpec : LPWSTR in/out
    Fiddle::TYPE_INT,  # nIDListBox : INT
    Fiddle::TYPE_INT,  # nIDStaticPath : INT
    -Fiddle::TYPE_INT,  # uFileType : DLG_DIR_LIST_FILE_TYPE
  ],
  Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"
#[link(name = "user32")]
extern "system" {
    fn DlgDirListW(
        hDlg: *mut core::ffi::c_void,  // HWND
        lpPathSpec: *mut u16,  // LPWSTR in/out
        nIDListBox: i32,  // INT
        nIDStaticPath: i32,  // INT
        uFileType: u32  // DLG_DIR_LIST_FILE_TYPE
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("USER32.dll", CharSet = CharSet.Unicode)]
public static extern int DlgDirListW(IntPtr hDlg, [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpPathSpec, int nIDListBox, int nIDStaticPath, uint uFileType);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_DlgDirListW' -Namespace Win32 -PassThru
# $api::DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType)
#uselib "USER32.dll"
#func global DlgDirListW "DlgDirListW" wptr, wptr, wptr, wptr, wptr
; DlgDirListW hDlg, varptr(lpPathSpec), nIDListBox, nIDStaticPath, uFileType   ; 戻り値は stat
; hDlg : HWND -> "wptr"
; lpPathSpec : LPWSTR in/out -> "wptr"
; nIDListBox : INT -> "wptr"
; nIDStaticPath : INT -> "wptr"
; uFileType : DLG_DIR_LIST_FILE_TYPE -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "USER32.dll"
#cfunc global DlgDirListW "DlgDirListW" sptr, var, int, int, int
; res = DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType)
; hDlg : HWND -> "sptr"
; lpPathSpec : LPWSTR in/out -> "var"
; nIDListBox : INT -> "int"
; nIDStaticPath : INT -> "int"
; uFileType : DLG_DIR_LIST_FILE_TYPE -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; INT DlgDirListW(HWND hDlg, LPWSTR lpPathSpec, INT nIDListBox, INT nIDStaticPath, DLG_DIR_LIST_FILE_TYPE uFileType)
#uselib "USER32.dll"
#cfunc global DlgDirListW "DlgDirListW" intptr, var, int, int, int
; res = DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType)
; hDlg : HWND -> "intptr"
; lpPathSpec : LPWSTR in/out -> "var"
; nIDListBox : INT -> "int"
; nIDStaticPath : INT -> "int"
; uFileType : DLG_DIR_LIST_FILE_TYPE -> "int"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	user32 = windows.NewLazySystemDLL("USER32.dll")
	procDlgDirListW = user32.NewProc("DlgDirListW")
)

// hDlg (HWND), lpPathSpec (LPWSTR in/out), nIDListBox (INT), nIDStaticPath (INT), uFileType (DLG_DIR_LIST_FILE_TYPE)
r1, _, err := procDlgDirListW.Call(
	uintptr(hDlg),
	uintptr(lpPathSpec),
	uintptr(nIDListBox),
	uintptr(nIDStaticPath),
	uintptr(uFileType),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // INT
function DlgDirListW(
  hDlg: THandle;   // HWND
  lpPathSpec: PWideChar;   // LPWSTR in/out
  nIDListBox: Integer;   // INT
  nIDStaticPath: Integer;   // INT
  uFileType: DWORD   // DLG_DIR_LIST_FILE_TYPE
): Integer; stdcall;
  external 'USER32.dll' name 'DlgDirListW';
result := DllCall("USER32\DlgDirListW"
    , "Ptr", hDlg   ; HWND
    , "Ptr", lpPathSpec   ; LPWSTR in/out
    , "Int", nIDListBox   ; INT
    , "Int", nIDStaticPath   ; INT
    , "UInt", uFileType   ; DLG_DIR_LIST_FILE_TYPE
    , "Int")   ; return: INT
●DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType) = DLL("USER32.dll", "int DlgDirListW(void*, char*, int, int, dword)")
# 呼び出し: DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType)
# hDlg : HWND -> "void*"
# lpPathSpec : LPWSTR in/out -> "char*"
# nIDListBox : INT -> "int"
# nIDStaticPath : INT -> "int"
# uFileType : DLG_DIR_LIST_FILE_TYPE -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。
const std = @import("std");

extern "user32" fn DlgDirListW(
    hDlg: ?*anyopaque, // HWND
    lpPathSpec: [*c]u16, // LPWSTR in/out
    nIDListBox: i32, // INT
    nIDStaticPath: i32, // INT
    uFileType: u32 // DLG_DIR_LIST_FILE_TYPE
) callconv(std.os.windows.WINAPI) i32;
// Unicode(-W): UTF-16LE のヌル終端バッファ([*c]const u16)を渡す。
proc DlgDirListW(
    hDlg: pointer,  # HWND
    lpPathSpec: ptr uint16,  # LPWSTR in/out
    nIDListBox: int32,  # INT
    nIDStaticPath: int32,  # INT
    uFileType: uint32  # DLG_DIR_LIST_FILE_TYPE
): int32 {.importc: "DlgDirListW", stdcall, dynlib: "USER32.dll".}
# Unicode(-W): WideCString は newWideCString("...") で生成。
pragma(lib, "user32");
extern(Windows)
int DlgDirListW(
    void* hDlg,   // HWND
    wchar* lpPathSpec,   // LPWSTR in/out
    int nIDListBox,   // INT
    int nIDStaticPath,   // INT
    uint uFileType   // DLG_DIR_LIST_FILE_TYPE
);
ccall((:DlgDirListW, "USER32.dll"), stdcall, Int32,
      (Ptr{Cvoid}, Ptr{UInt16}, Int32, Int32, UInt32),
      hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType)
# hDlg : HWND -> Ptr{Cvoid}
# lpPathSpec : LPWSTR in/out -> Ptr{UInt16}
# nIDListBox : INT -> Int32
# nIDStaticPath : INT -> Int32
# uFileType : DLG_DIR_LIST_FILE_TYPE -> UInt32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
# Unicode(-W): Cwstring には transcode(UInt16, "...") 等で UTF-16 を渡す。
local ffi = require("ffi")
ffi.cdef[[
int32_t DlgDirListW(
    void* hDlg,
    uint16_t* lpPathSpec,
    int32_t nIDListBox,
    int32_t nIDStaticPath,
    uint32_t uFileType);
]]
local user32 = ffi.load("user32")
-- user32.DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType)
-- hDlg : HWND
-- lpPathSpec : LPWSTR in/out
-- nIDListBox : INT
-- nIDStaticPath : INT
-- uFileType : DLG_DIR_LIST_FILE_TYPE
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
-- Unicode(-W): uint16_t* には UTF-16LE のバッファ(ffi.new("uint16_t[?]", ...))を渡す。
const koffi = require('koffi');
const lib = koffi.load('USER32.dll');
const DlgDirListW = lib.func('__stdcall', 'DlgDirListW', 'int32_t', ['void *', 'uint16_t *', 'int32_t', 'int32_t', 'uint32_t']);
// DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType)
// hDlg : HWND -> 'void *'
// lpPathSpec : LPWSTR in/out -> 'uint16_t *'
// nIDListBox : INT -> 'int32_t'
// nIDStaticPath : INT -> 'int32_t'
// uFileType : DLG_DIR_LIST_FILE_TYPE -> 'uint32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("USER32.dll", {
  DlgDirListW: { parameters: ["pointer", "buffer", "i32", "i32", "u32"], result: "i32" },
});
// lib.symbols.DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType)
// hDlg : HWND -> "pointer"
// lpPathSpec : LPWSTR in/out -> "buffer"
// nIDListBox : INT -> "i32"
// nIDStaticPath : INT -> "i32"
// uFileType : DLG_DIR_LIST_FILE_TYPE -> "u32"
// 文字列は "buffer"。Unicode(-W) は new TextEncoder() ではなく UTF-16LE のバイト列(末尾に \x00\x00)を Uint8Array で渡す。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
int32_t DlgDirListW(
    void* hDlg,
    uint16_t* lpPathSpec,
    int32_t nIDListBox,
    int32_t nIDStaticPath,
    uint32_t uFileType);
C, "USER32.dll");
// $ffi->DlgDirListW(hDlg, lpPathSpec, nIDListBox, nIDStaticPath, uFileType);
// hDlg : HWND
// lpPathSpec : LPWSTR in/out
// nIDListBox : INT
// nIDStaticPath : INT
// uFileType : DLG_DIR_LIST_FILE_TYPE
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。
import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;

public interface User32 extends StdCallLibrary {
    User32 INSTANCE = Native.load("user32", User32.class, W32APIOptions.UNICODE_OPTIONS);
    int DlgDirListW(
        Pointer hDlg,   // HWND
        char[] lpPathSpec,   // LPWSTR in/out
        int nIDListBox,   // INT
        int nIDStaticPath,   // INT
        int uFileType   // DLG_DIR_LIST_FILE_TYPE
    );
}
// Unicode(-W): WString(入力)/char[](出力)で UTF-16 をマーシャリング。
@[Link("user32")]
lib LibUSER32
  fun DlgDirListW = DlgDirListW(
    hDlg : Void*,   # HWND
    lpPathSpec : UInt16*,   # LPWSTR in/out
    nIDListBox : Int32,   # INT
    nIDStaticPath : Int32,   # INT
    uFileType : UInt32   # DLG_DIR_LIST_FILE_TYPE
  ) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef DlgDirListWNative = Int32 Function(Pointer<Void>, Pointer<Utf16>, Int32, Int32, Uint32);
typedef DlgDirListWDart = int Function(Pointer<Void>, Pointer<Utf16>, int, int, int);
final DlgDirListW = DynamicLibrary.open('USER32.dll')
    .lookupFunction<DlgDirListWNative, DlgDirListWDart>('DlgDirListW');
// hDlg : HWND -> Pointer<Void>
// lpPathSpec : LPWSTR in/out -> Pointer<Utf16>
// nIDListBox : INT -> Int32
// nIDStaticPath : INT -> Int32
// uFileType : DLG_DIR_LIST_FILE_TYPE -> Uint32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function DlgDirListW(
  hDlg: THandle;   // HWND
  lpPathSpec: PWideChar;   // LPWSTR in/out
  nIDListBox: Integer;   // INT
  nIDStaticPath: Integer;   // INT
  uFileType: DWORD   // DLG_DIR_LIST_FILE_TYPE
): Integer; stdcall;
  external 'USER32.dll' name 'DlgDirListW';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "DlgDirListW"
  c_DlgDirListW :: Ptr () -> CWString -> Int32 -> Int32 -> Word32 -> IO Int32
-- hDlg : HWND -> Ptr ()
-- lpPathSpec : LPWSTR in/out -> CWString
-- nIDListBox : INT -> Int32
-- nIDStaticPath : INT -> Int32
-- uFileType : DLG_DIR_LIST_FILE_TYPE -> Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let dlgdirlistw =
  foreign "DlgDirListW"
    ((ptr void) @-> (ptr uint16_t) @-> int32_t @-> int32_t @-> uint32_t @-> returning int32_t)
(* hDlg : HWND -> (ptr void) *)
(* lpPathSpec : LPWSTR in/out -> (ptr uint16_t) *)
(* nIDListBox : INT -> int32_t *)
(* nIDStaticPath : INT -> int32_t *)
(* uFileType : DLG_DIR_LIST_FILE_TYPE -> uint32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library user32 (t "USER32.dll"))
(cffi:use-foreign-library user32)

(cffi:defcfun ("DlgDirListW" dlg-dir-list-w :convention :stdcall) :int32
  (h-dlg :pointer)   ; HWND
  (lp-path-spec :pointer)   ; LPWSTR in/out
  (n-idlist-box :int32)   ; INT
  (n-idstatic-path :int32)   ; INT
  (u-file-type :uint32))   ; DLG_DIR_LIST_FILE_TYPE
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $DlgDirListW = Win32::API::More->new('USER32',
    'int DlgDirListW(HANDLE hDlg, LPWSTR lpPathSpec, int nIDListBox, int nIDStaticPath, DWORD uFileType)');
# my $ret = $DlgDirListW->Call($hDlg, $lpPathSpec, $nIDListBox, $nIDStaticPath, $uFileType);
# hDlg : HWND -> HANDLE
# lpPathSpec : LPWSTR in/out -> LPWSTR
# nIDListBox : INT -> int
# nIDStaticPath : INT -> int
# uFileType : DLG_DIR_LIST_FILE_TYPE -> DWORD
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。
# Unicode(-W): LPCWSTR/LPWSTR は Win32::API が UTF-16 変換を行う。

関連項目

文字セット違い
公式の関連項目
使用する型