[Windows] Always use absolute UNC paths and long path aware APIs, add "long path aware" flag to the application manifest.

This commit is contained in:
bruvzg
2024-05-13 14:14:32 +03:00
parent 108c603f91
commit ae334e069c
7 changed files with 261 additions and 167 deletions

View File

@ -40,8 +40,8 @@
int main(int argc, char *argv[]) {
// Get executable name.
WCHAR exe_name[MAX_PATH] = {};
if (!GetModuleFileNameW(nullptr, exe_name, MAX_PATH)) {
WCHAR exe_name[32767] = {};
if (!GetModuleFileNameW(nullptr, exe_name, 32767)) {
wprintf(L"GetModuleFileName failed, error %d\n", GetLastError());
return -1;
}