PathCompactPathEx
機能
パス名をバイト単位で指定した長さの短縮形にする
Declare Function PathCompactPathEx Lib "shlwapi.dll" Alias "PathCompactPathExA" _
(ByVal pszOut As String, ByVal pszSrc As String, ByVal cchMax As Long, ByVal dwFlags As Long) As Long
Declare Function PathCompactPathEx Lib "shlwapi.dll" Alias "PathCompactPathExA" _
(ByVal pszOut As String, ByVal pszSrc As String, ByVal cchMax As Integer, ByVal dwFlags As Integer) As Integer
引数
pszOut
(戻り値)新しいパス名
pszSrc
元のパス名
cchMax
長さを指定するバイト数
dwFlags
区切り符号(0のとき、標準のバックスラッシュ「¥(/)」)
戻り値
正常終了のとき 1
エラーのとき 0
備考
パス名に2バイト文字を含む場合、指定のバイト数が2バイト文字の
1バイト目と2バイト目の中間に当たると文字化けを起こす。
具体的な使い方はサンプルを参照。
サンプル
解説ページに移動