Fix FromApp building for UWP.
This commit is contained in:
parent
d3030445c5
commit
02c9caafc0
@ -76,8 +76,8 @@ inline BOOL DeleteFileFromAppW(_In_ LPCWSTR lpFileName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline BOOL MoveFileExFromAppW(_In_ LPCWSTR lpExistingFileName, _In_ LPCWSTR lpNewFileName, _In_ DWORD dwFlags) {
|
inline BOOL MoveFileExFromAppW(_In_ LPCWSTR lpExistingFileName, _In_ LPCWSTR lpNewFileName, _In_ DWORD dwFlags) {
|
||||||
auto func = get_from_app_function<4>("MoveFileFromAppW", &MoveFile);
|
auto func = get_from_app_function<4>("MoveFileFromAppW", static_cast<BOOL(WINAPI *)(LPCWSTR, LPCWSTR)>(nullptr));
|
||||||
if (func == &MoveFile || (dwFlags & ~MOVEFILE_REPLACE_EXISTING) != 0) {
|
if (func == nullptr || (dwFlags & ~MOVEFILE_REPLACE_EXISTING) != 0) {
|
||||||
// if can't find MoveFileFromAppW or have unsupported flags, call MoveFileEx directly
|
// if can't find MoveFileFromAppW or have unsupported flags, call MoveFileEx directly
|
||||||
return MoveFileEx(lpExistingFileName, lpNewFileName, dwFlags);
|
return MoveFileEx(lpExistingFileName, lpNewFileName, dwFlags);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user