Rémi Bernon (@rbernon) commented about dlls/windows.applicationmodel/tests/application.c:
hr = IStorageFolder_QueryInterface( storage_folder, &IID_IStorageItem, (void **)&storage_item ); ok( hr == S_OK, "got hr %#lx.\n", hr );
- hr = IStorageItem_get_Path( storage_item, &str );
- todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
- GetModuleFileNameW( NULL, buffer, MAX_PATH );
- hr = PathCchRemoveFileSpec( buffer, ARRAY_SIZE(buffer) );
- todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
- hr = WindowsCreateString( buffer, wcslen(buffer), &wine_str );
- ok( hr == S_OK, "got hr %#lx.\n", hr );
- hr = WindowsCompareStringOrdinal( str, wine_str, &res );
- todo_wine ok( hr == S_OK, "got hr %#lx.\n", hr );
- todo_wine ok( !res, "got string %s.\n", debugstr_hstring(str) );
- WindowsDeleteString( str );
- WindowsDeleteString( wine_str );
Fwiw this is not always the location of the executable, especially if it is located in a subfolder of the package, but the package root folder path instead. Anyway, this should be good enough for now.