| 700 | EXTERN_C BOOL __stdcall XMemPreallocateFreeSpace() |
| 701 | { |
| 702 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); |
| 703 | return FALSE; |
| 704 | } |
| 705 | |
| 706 | EXTERN_C BOOL __stdcall XMemGetAllocationStatistics() |
| 707 | { |
| 708 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); |
| 709 | return FALSE; |
| 710 | } |
| 711 | |
| 712 | EXTERN_C HANDLE __stdcall XMemGetAuxiliaryTitleMemory() |
| 713 | { |
| 714 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); |
| 715 | return nullptr; |
| 716 | } |
| 717 | |
| 718 | EXTERN_C void __stdcall XMemReleaseAuxiliaryTitleMemory(_In_opt_ HANDLE hHandle) |
| 719 | { |
| 720 | UNREFERENCED_PARAMETER(hHandle); |
| 721 | SetLastError(ERROR_CALL_NOT_IMPLEMENTED); |
| 722 | } |
| 723 | |
| 724 | |
| 725 | void FixRelativePath(LPCWSTR &lpFileName) |
| 726 | { |
| 727 | static std::wstring convert{}; |
| 728 | std::wstring_view fileName(lpFileName); |
| 729 | |
| 730 | if (fileName.size() == 0) |
| 731 | return; |
| 732 | |
| 733 | int length = fileName.length(); |
| 734 | |
| 735 | if (fileName[0] == '.' && fileName[1] == '\\') |
| 736 | { |
| 737 | static std::wstring trimPath{}; |
| 738 | trimPath = fileName.substr(2); |
| 739 | fileName = trimPath.data(); |
| 740 | convert = std::filesystem::current_path().c_str(); |
| 741 | if (convert.back() != '\\') |
| 742 | { |
| 743 | convert.append(L"\\"); |
| 744 | } |
| 745 | convert.append(fileName); |
| 746 | std::replace(convert.begin(), convert.end(), L'\\', L'/'); |
| 747 | std::replace(convert.begin(), convert.end(), L'//', L'/'); |
| 748 | |
| 749 | lpFileName = convert.data(); |
| 750 | return; |
| 751 | } |
| 752 | if (fileName[1] != ':') |
| 753 | { |
| 754 | convert = std::filesystem::current_path().c_str(); |
| 755 | convert.append(L"\\"); |
| 756 | convert.append(fileName); |
| 757 | std::replace(convert.begin(), convert.end(), L'\\', L'/'); |
| 758 | std::replace(convert.begin(), convert.end(), L'//', L'/'); |
| 759 |
no test coverage detected