PathCchCombineEx
関数オプション指定で2つのパスを安全に連結し正規化する。
シグネチャ
// api-ms-win-core-path-l1-1-0.dll
#include <windows.h>
HRESULT PathCchCombineEx(
LPWSTR pszPathOut,
UINT_PTR cchPathOut,
LPCWSTR pszPathIn, // optional
LPCWSTR pszMore, // optional
PATHCCH_OPTIONS dwFlags
);パラメーター
| 名前 | 型 | 方向 | 説明 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| pszPathOut | LPWSTR | out | この関数が正常に終了したときに、結合されたパス文字列を受け取るバッファーへのポインターです。このパラメーターは、pszPathIn または pszMore と同じバッファーを指すこともできます。 | ||||||||||||||
| cchPathOut | UINT_PTR | in | pszPathOut が指すバッファーのサイズ(文字数単位)です。 | ||||||||||||||
| pszPathIn | LPCWSTR | inoptional | 1 つ目のパス文字列へのポインターです。この値は NULL でもかまいません。 | ||||||||||||||
| pszMore | LPCWSTR | inoptional | 2 つ目のパス文字列へのポインターです。このパスが単一のバックスラッシュで始まる場合は、pszPathIn が指すパスのルートのみと結合されます。このパスが完全修飾されている場合は、もう一方のパスと結合されずに、そのまま出力バッファーにコピーされます。この値は NULL でもかまいません。 | ||||||||||||||
| dwFlags | PATHCCH_OPTIONS | in | 次のフラグの 1 つ以上を指定します。
|
戻り値の型: HRESULT
公式ドキュメント
2 つのパスフラグメントを 1 つのパスに結合します。(PathCchCombineEx)
戻り値
この関数は、次を含む HRESULT コードを返します。
| 戻り値 | 説明 |
|---|---|
| 関数は成功しました。これには、ピリオドの後に文字が続かない場合など、拡張子が空のケースも含まれる点に注意してください。その場合、元の文字列は変更されずに返されます。 | |
| この値は、pszPathOut パラメーターが NULL に設定されている、または cchPathOut の値が 0 もしくは PATHCCH_MAX_CCH より大きい値に設定されているなど、いくつかの原因によって発生する可能性があります。 | |
| 関数は、操作を実行するのに十分なメモリを割り当てることができませんでした。 | |
|
元のパスの一方または両方のサイズが PATHCCH_MAX_CCH を超えました。 |
解説(Remarks)
pszPathIn と pszMore の両方が NULL または空の文字列を指している場合、pszPathOut が指すバッファーには単一のバックスラッシュがコピーされます。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// api-ms-win-core-path-l1-1-0.dll
#include <windows.h>
HRESULT PathCchCombineEx(
LPWSTR pszPathOut,
UINT_PTR cchPathOut,
LPCWSTR pszPathIn, // optional
LPCWSTR pszMore, // optional
PATHCCH_OPTIONS dwFlags
);[DllImport("api-ms-win-core-path-l1-1-0.dll", ExactSpelling = true)]
static extern int PathCchCombineEx(
[MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pszPathOut, // LPWSTR out
UIntPtr cchPathOut, // UINT_PTR
[MarshalAs(UnmanagedType.LPWStr)] string pszPathIn, // LPCWSTR optional
[MarshalAs(UnmanagedType.LPWStr)] string pszMore, // LPCWSTR optional
uint dwFlags // PATHCCH_OPTIONS
);<DllImport("api-ms-win-core-path-l1-1-0.dll", ExactSpelling:=True)>
Public Shared Function PathCchCombineEx(
<MarshalAs(UnmanagedType.LPWStr)> pszPathOut As System.Text.StringBuilder, ' LPWSTR out
cchPathOut As UIntPtr, ' UINT_PTR
<MarshalAs(UnmanagedType.LPWStr)> pszPathIn As String, ' LPCWSTR optional
<MarshalAs(UnmanagedType.LPWStr)> pszMore As String, ' LPCWSTR optional
dwFlags As UInteger ' PATHCCH_OPTIONS
) As Integer
End Function' pszPathOut : LPWSTR out
' cchPathOut : UINT_PTR
' pszPathIn : LPCWSTR optional
' pszMore : LPCWSTR optional
' dwFlags : PATHCCH_OPTIONS
Declare PtrSafe Function PathCchCombineEx Lib "api-ms-win-core-path-l1-1-0" ( _
ByVal pszPathOut As LongPtr, _
ByVal cchPathOut As LongPtr, _
ByVal pszPathIn As LongPtr, _
ByVal pszMore As LongPtr, _
ByVal dwFlags As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
PathCchCombineEx = ctypes.windll.LoadLibrary("api-ms-win-core-path-l1-1-0.dll").PathCchCombineEx
PathCchCombineEx.restype = ctypes.c_int
PathCchCombineEx.argtypes = [
wintypes.LPWSTR, # pszPathOut : LPWSTR out
ctypes.c_size_t, # cchPathOut : UINT_PTR
wintypes.LPCWSTR, # pszPathIn : LPCWSTR optional
wintypes.LPCWSTR, # pszMore : LPCWSTR optional
wintypes.DWORD, # dwFlags : PATHCCH_OPTIONS
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('api-ms-win-core-path-l1-1-0.dll')
PathCchCombineEx = Fiddle::Function.new(
lib['PathCchCombineEx'],
[
Fiddle::TYPE_VOIDP, # pszPathOut : LPWSTR out
Fiddle::TYPE_UINTPTR_T, # cchPathOut : UINT_PTR
Fiddle::TYPE_VOIDP, # pszPathIn : LPCWSTR optional
Fiddle::TYPE_VOIDP, # pszMore : LPCWSTR optional
-Fiddle::TYPE_INT, # dwFlags : PATHCCH_OPTIONS
],
Fiddle::TYPE_INT)#[link(name = "api-ms-win-core-path-l1-1-0")]
extern "system" {
fn PathCchCombineEx(
pszPathOut: *mut u16, // LPWSTR out
cchPathOut: usize, // UINT_PTR
pszPathIn: *const u16, // LPCWSTR optional
pszMore: *const u16, // LPCWSTR optional
dwFlags: u32 // PATHCCH_OPTIONS
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("api-ms-win-core-path-l1-1-0.dll")]
public static extern int PathCchCombineEx([MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pszPathOut, UIntPtr cchPathOut, [MarshalAs(UnmanagedType.LPWStr)] string pszPathIn, [MarshalAs(UnmanagedType.LPWStr)] string pszMore, uint dwFlags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-core-path-l1-1-0_PathCchCombineEx' -Namespace Win32 -PassThru
# $api::PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags)#uselib "api-ms-win-core-path-l1-1-0.dll"
#func global PathCchCombineEx "PathCchCombineEx" sptr, sptr, sptr, sptr, sptr
; PathCchCombineEx varptr(pszPathOut), cchPathOut, pszPathIn, pszMore, dwFlags ; 戻り値は stat
; pszPathOut : LPWSTR out -> "sptr"
; cchPathOut : UINT_PTR -> "sptr"
; pszPathIn : LPCWSTR optional -> "sptr"
; pszMore : LPCWSTR optional -> "sptr"
; dwFlags : PATHCCH_OPTIONS -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "api-ms-win-core-path-l1-1-0.dll" #cfunc global PathCchCombineEx "PathCchCombineEx" var, sptr, wstr, wstr, int ; res = PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags) ; pszPathOut : LPWSTR out -> "var" ; cchPathOut : UINT_PTR -> "sptr" ; pszPathIn : LPCWSTR optional -> "wstr" ; pszMore : LPCWSTR optional -> "wstr" ; dwFlags : PATHCCH_OPTIONS -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "api-ms-win-core-path-l1-1-0.dll" #cfunc global PathCchCombineEx "PathCchCombineEx" sptr, sptr, wstr, wstr, int ; res = PathCchCombineEx(varptr(pszPathOut), cchPathOut, pszPathIn, pszMore, dwFlags) ; pszPathOut : LPWSTR out -> "sptr" ; cchPathOut : UINT_PTR -> "sptr" ; pszPathIn : LPCWSTR optional -> "wstr" ; pszMore : LPCWSTR optional -> "wstr" ; dwFlags : PATHCCH_OPTIONS -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT PathCchCombineEx(LPWSTR pszPathOut, UINT_PTR cchPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore, PATHCCH_OPTIONS dwFlags) #uselib "api-ms-win-core-path-l1-1-0.dll" #cfunc global PathCchCombineEx "PathCchCombineEx" var, intptr, wstr, wstr, int ; res = PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags) ; pszPathOut : LPWSTR out -> "var" ; cchPathOut : UINT_PTR -> "intptr" ; pszPathIn : LPCWSTR optional -> "wstr" ; pszMore : LPCWSTR optional -> "wstr" ; dwFlags : PATHCCH_OPTIONS -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT PathCchCombineEx(LPWSTR pszPathOut, UINT_PTR cchPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore, PATHCCH_OPTIONS dwFlags) #uselib "api-ms-win-core-path-l1-1-0.dll" #cfunc global PathCchCombineEx "PathCchCombineEx" intptr, intptr, wstr, wstr, int ; res = PathCchCombineEx(varptr(pszPathOut), cchPathOut, pszPathIn, pszMore, dwFlags) ; pszPathOut : LPWSTR out -> "intptr" ; cchPathOut : UINT_PTR -> "intptr" ; pszPathIn : LPCWSTR optional -> "wstr" ; pszMore : LPCWSTR optional -> "wstr" ; dwFlags : PATHCCH_OPTIONS -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
api_ms_win_core_path_l1_1_0 = windows.NewLazySystemDLL("api-ms-win-core-path-l1-1-0.dll")
procPathCchCombineEx = api_ms_win_core_path_l1_1_0.NewProc("PathCchCombineEx")
)
// pszPathOut (LPWSTR out), cchPathOut (UINT_PTR), pszPathIn (LPCWSTR optional), pszMore (LPCWSTR optional), dwFlags (PATHCCH_OPTIONS)
r1, _, err := procPathCchCombineEx.Call(
uintptr(pszPathOut),
uintptr(cchPathOut),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(pszPathIn))),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(pszMore))),
uintptr(dwFlags),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction PathCchCombineEx(
pszPathOut: PWideChar; // LPWSTR out
cchPathOut: NativeUInt; // UINT_PTR
pszPathIn: PWideChar; // LPCWSTR optional
pszMore: PWideChar; // LPCWSTR optional
dwFlags: DWORD // PATHCCH_OPTIONS
): Integer; stdcall;
external 'api-ms-win-core-path-l1-1-0.dll' name 'PathCchCombineEx';result := DllCall("api-ms-win-core-path-l1-1-0\PathCchCombineEx"
, "Ptr", pszPathOut ; LPWSTR out
, "UPtr", cchPathOut ; UINT_PTR
, "WStr", pszPathIn ; LPCWSTR optional
, "WStr", pszMore ; LPCWSTR optional
, "UInt", dwFlags ; PATHCCH_OPTIONS
, "Int") ; return: HRESULT●PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags) = DLL("api-ms-win-core-path-l1-1-0.dll", "int PathCchCombineEx(char*, int, char*, char*, dword)")
# 呼び出し: PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags)
# pszPathOut : LPWSTR out -> "char*"
# cchPathOut : UINT_PTR -> "int"
# pszPathIn : LPCWSTR optional -> "char*"
# pszMore : LPCWSTR optional -> "char*"
# dwFlags : PATHCCH_OPTIONS -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "api-ms-win-core-path-l1-1-0" fn PathCchCombineEx(
pszPathOut: [*c]u16, // LPWSTR out
cchPathOut: usize, // UINT_PTR
pszPathIn: [*c]const u16, // LPCWSTR optional
pszMore: [*c]const u16, // LPCWSTR optional
dwFlags: u32 // PATHCCH_OPTIONS
) callconv(std.os.windows.WINAPI) i32;proc PathCchCombineEx(
pszPathOut: ptr uint16, # LPWSTR out
cchPathOut: uint, # UINT_PTR
pszPathIn: WideCString, # LPCWSTR optional
pszMore: WideCString, # LPCWSTR optional
dwFlags: uint32 # PATHCCH_OPTIONS
): int32 {.importc: "PathCchCombineEx", stdcall, dynlib: "api-ms-win-core-path-l1-1-0.dll".}pragma(lib, "api-ms-win-core-path-l1-1-0");
extern(Windows)
int PathCchCombineEx(
wchar* pszPathOut, // LPWSTR out
size_t cchPathOut, // UINT_PTR
const(wchar)* pszPathIn, // LPCWSTR optional
const(wchar)* pszMore, // LPCWSTR optional
uint dwFlags // PATHCCH_OPTIONS
);ccall((:PathCchCombineEx, "api-ms-win-core-path-l1-1-0.dll"), stdcall, Int32,
(Ptr{UInt16}, Csize_t, Cwstring, Cwstring, UInt32),
pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags)
# pszPathOut : LPWSTR out -> Ptr{UInt16}
# cchPathOut : UINT_PTR -> Csize_t
# pszPathIn : LPCWSTR optional -> Cwstring
# pszMore : LPCWSTR optional -> Cwstring
# dwFlags : PATHCCH_OPTIONS -> UInt32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t PathCchCombineEx(
uint16_t* pszPathOut,
uintptr_t cchPathOut,
const uint16_t* pszPathIn,
const uint16_t* pszMore,
uint32_t dwFlags);
]]
local api-ms-win-core-path-l1-1-0 = ffi.load("api-ms-win-core-path-l1-1-0")
-- api-ms-win-core-path-l1-1-0.PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags)
-- pszPathOut : LPWSTR out
-- cchPathOut : UINT_PTR
-- pszPathIn : LPCWSTR optional
-- pszMore : LPCWSTR optional
-- dwFlags : PATHCCH_OPTIONS
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('api-ms-win-core-path-l1-1-0.dll');
const PathCchCombineEx = lib.func('__stdcall', 'PathCchCombineEx', 'int32_t', ['uint16_t *', 'uintptr_t', 'str16', 'str16', 'uint32_t']);
// PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags)
// pszPathOut : LPWSTR out -> 'uint16_t *'
// cchPathOut : UINT_PTR -> 'uintptr_t'
// pszPathIn : LPCWSTR optional -> 'str16'
// pszMore : LPCWSTR optional -> 'str16'
// dwFlags : PATHCCH_OPTIONS -> 'uint32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("api-ms-win-core-path-l1-1-0.dll", {
PathCchCombineEx: { parameters: ["buffer", "usize", "buffer", "buffer", "u32"], result: "i32" },
});
// lib.symbols.PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags)
// pszPathOut : LPWSTR out -> "buffer"
// cchPathOut : UINT_PTR -> "usize"
// pszPathIn : LPCWSTR optional -> "buffer"
// pszMore : LPCWSTR optional -> "buffer"
// dwFlags : PATHCCH_OPTIONS -> "u32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t PathCchCombineEx(
uint16_t* pszPathOut,
size_t cchPathOut,
const uint16_t* pszPathIn,
const uint16_t* pszMore,
uint32_t dwFlags);
C, "api-ms-win-core-path-l1-1-0.dll");
// $ffi->PathCchCombineEx(pszPathOut, cchPathOut, pszPathIn, pszMore, dwFlags);
// pszPathOut : LPWSTR out
// cchPathOut : UINT_PTR
// pszPathIn : LPCWSTR optional
// pszMore : LPCWSTR optional
// dwFlags : PATHCCH_OPTIONS
// 構造体/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 Api-ms-win-core-path-l1-1-0 extends StdCallLibrary {
Api-ms-win-core-path-l1-1-0 INSTANCE = Native.load("api-ms-win-core-path-l1-1-0", Api-ms-win-core-path-l1-1-0.class);
int PathCchCombineEx(
char[] pszPathOut, // LPWSTR out
long cchPathOut, // UINT_PTR
WString pszPathIn, // LPCWSTR optional
WString pszMore, // LPCWSTR optional
int dwFlags // PATHCCH_OPTIONS
);
}@[Link("api-ms-win-core-path-l1-1-0")]
lib Libapi-ms-win-core-path-l1-1-0
fun PathCchCombineEx = PathCchCombineEx(
pszPathOut : UInt16*, # LPWSTR out
cchPathOut : LibC::SizeT, # UINT_PTR
pszPathIn : UInt16*, # LPCWSTR optional
pszMore : UInt16*, # LPCWSTR optional
dwFlags : UInt32 # PATHCCH_OPTIONS
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef PathCchCombineExNative = Int32 Function(Pointer<Utf16>, UintPtr, Pointer<Utf16>, Pointer<Utf16>, Uint32);
typedef PathCchCombineExDart = int Function(Pointer<Utf16>, int, Pointer<Utf16>, Pointer<Utf16>, int);
final PathCchCombineEx = DynamicLibrary.open('api-ms-win-core-path-l1-1-0.dll')
.lookupFunction<PathCchCombineExNative, PathCchCombineExDart>('PathCchCombineEx');
// pszPathOut : LPWSTR out -> Pointer<Utf16>
// cchPathOut : UINT_PTR -> UintPtr
// pszPathIn : LPCWSTR optional -> Pointer<Utf16>
// pszMore : LPCWSTR optional -> Pointer<Utf16>
// dwFlags : PATHCCH_OPTIONS -> Uint32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function PathCchCombineEx(
pszPathOut: PWideChar; // LPWSTR out
cchPathOut: NativeUInt; // UINT_PTR
pszPathIn: PWideChar; // LPCWSTR optional
pszMore: PWideChar; // LPCWSTR optional
dwFlags: DWORD // PATHCCH_OPTIONS
): Integer; stdcall;
external 'api-ms-win-core-path-l1-1-0.dll' name 'PathCchCombineEx';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "PathCchCombineEx"
c_PathCchCombineEx :: CWString -> CUIntPtr -> CWString -> CWString -> Word32 -> IO Int32
-- pszPathOut : LPWSTR out -> CWString
-- cchPathOut : UINT_PTR -> CUIntPtr
-- pszPathIn : LPCWSTR optional -> CWString
-- pszMore : LPCWSTR optional -> CWString
-- dwFlags : PATHCCH_OPTIONS -> Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let pathcchcombineex =
foreign "PathCchCombineEx"
((ptr uint16_t) @-> size_t @-> (ptr uint16_t) @-> (ptr uint16_t) @-> uint32_t @-> returning int32_t)
(* pszPathOut : LPWSTR out -> (ptr uint16_t) *)
(* cchPathOut : UINT_PTR -> size_t *)
(* pszPathIn : LPCWSTR optional -> (ptr uint16_t) *)
(* pszMore : LPCWSTR optional -> (ptr uint16_t) *)
(* dwFlags : PATHCCH_OPTIONS -> uint32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library api-ms-win-core-path-l1-1-0 (t "api-ms-win-core-path-l1-1-0.dll"))
(cffi:use-foreign-library api-ms-win-core-path-l1-1-0)
(cffi:defcfun ("PathCchCombineEx" path-cch-combine-ex :convention :stdcall) :int32
(psz-path-out :pointer) ; LPWSTR out
(cch-path-out :uint64) ; UINT_PTR
(psz-path-in (:string :encoding :utf-16le)) ; LPCWSTR optional
(psz-more (:string :encoding :utf-16le)) ; LPCWSTR optional
(dw-flags :uint32)) ; PATHCCH_OPTIONS
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $PathCchCombineEx = Win32::API::More->new('api-ms-win-core-path-l1-1-0',
'int PathCchCombineEx(LPWSTR pszPathOut, WPARAM cchPathOut, LPCWSTR pszPathIn, LPCWSTR pszMore, DWORD dwFlags)');
# my $ret = $PathCchCombineEx->Call($pszPathOut, $cchPathOut, $pszPathIn, $pszMore, $dwFlags);
# pszPathOut : LPWSTR out -> LPWSTR
# cchPathOut : UINT_PTR -> WPARAM
# pszPathIn : LPCWSTR optional -> LPCWSTR
# pszMore : LPCWSTR optional -> LPCWSTR
# dwFlags : PATHCCH_OPTIONS -> DWORD
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
類似 API
- f PathCchCombine — 2つのパス文字列を安全に連結して正規化する。
公式の関連項目
- f PathCchCanonicalize — パス内の相対要素を解決して正規形に変換する。
- f PathCchCanonicalizeEx — オプション指定でパスを正規化し冗長な要素を解決する。
使用する型