From 8d14e585554001acc43ee337328a039b1a6bb85e Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 26 May 2021 13:59:35 -0700 Subject: [PATCH 1/2] Add `PathCchCanonicalizeEx`, `PathCchCombineEx`, and `PathCchAppendEx` functions. Add the `PathCchCanonicalizeEx`, `PathCchCombineEx`, and `PathCchAppendEx` functions, in the `shellapi` module. --- src/um/shellapi.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/um/shellapi.rs b/src/um/shellapi.rs index 2c961c4c5..53eeae996 100644 --- a/src/um/shellapi.rs +++ b/src/um/shellapi.rs @@ -5,7 +5,7 @@ // except according to those terms //! SHELL.DLL functions, types, and definitions use ctypes::{__int64, c_int, c_void}; -use shared::basetsd::{DWORD_PTR, UINT_PTR}; +use shared::basetsd::{DWORD_PTR, UINT_PTR, SIZE_T}; use shared::guiddef::{GUID, REFIID}; use shared::minwindef::{ BOOL, DWORD, FILETIME, HINSTANCE, HKEY, INT, LPARAM, LPVOID, MAX_PATH, UINT, ULONG, WORD, @@ -920,4 +920,23 @@ extern "system" { pszDrive: PCWSTR, pdwMediaContent: *mut DWORD, ) -> HRESULT; + pub fn PathCchCanonicalizeEx( + pszPathOut: PWSTR, + cchPathOut: SIZE_T, + pszPathIn: PCWSTR, + dwFlags: ULONG, + ) -> HRESULT; + pub fn PathCchCombineEx( + pszPathOut: PWSTR, + cchPathOut: SIZE_T, + pszPathIn: PCWSTR, + pszMore: PCWSTR, + dwFlags: ULONG, + ) -> HRESULT; + pub fn PathCchAppendEx( + pszPath: PWSTR, + cchPath: SIZE_T, + pszMore: PCWSTR, + dwFlags: ULONG, + ) -> HRESULT; } From 21971a943edc1fe9fba296fadeb726965da70e5a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 26 May 2021 14:48:17 -0700 Subject: [PATCH 2/2] Fix import order. --- src/um/shellapi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/um/shellapi.rs b/src/um/shellapi.rs index 53eeae996..0a872aaf9 100644 --- a/src/um/shellapi.rs +++ b/src/um/shellapi.rs @@ -5,7 +5,7 @@ // except according to those terms //! SHELL.DLL functions, types, and definitions use ctypes::{__int64, c_int, c_void}; -use shared::basetsd::{DWORD_PTR, UINT_PTR, SIZE_T}; +use shared::basetsd::{DWORD_PTR, SIZE_T, UINT_PTR}; use shared::guiddef::{GUID, REFIID}; use shared::minwindef::{ BOOL, DWORD, FILETIME, HINSTANCE, HKEY, INT, LPARAM, LPVOID, MAX_PATH, UINT, ULONG, WORD,