-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stream.h
28 lines (20 loc) · 1.26 KB
/
Stream.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include "Tethys/Common/Types.h"
#include <filesystem>
#include <vector>
#include <string>
// Gets the path to a game file as per GetSearchPaths().
std::filesystem::path GetFilePath(const std::filesystem::path& filename, bool searchForMission = false);
// Gets file search paths for a particular asset type.
std::vector<std::filesystem::path> GetSearchPaths(
std::string extension = "", bool searchForMission = false, bool excludeStockDirs = false);
// Prefers loading DLL import dependencies from the new module's file directory first, instead of the base module's.
// Also adds module directory to PATH for the sake of LoadLibrary().
// See https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
HMODULE WINAPI LoadLibraryAltSearchPath(const char* pFilename);
// Adds DLL search paths.
// This does not use AddDllDirectory() because it's not WinXP-compatible, and multiple path search order is undefined.
// See https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
void AddModuleSearchPaths(const std::vector<std::filesystem::path>& paths, bool ifUnique = false);
// Removes DLL search paths.
void RemoveModuleSearchPaths(const std::vector<std::filesystem::path>& paths);