AuroraRuntime/Source/Process/AuPaths.cpp

326 lines
8.0 KiB
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuPaths.cpp
Date: 2021-7-14
2021-06-27 21:25:29 +00:00
Author: Reece
***/
2021-09-30 14:57:41 +00:00
#include <Source/RuntimeInternal.hpp>
#include "AuPaths.hpp"
2021-06-27 21:25:29 +00:00
2021-09-06 10:58:08 +00:00
#if defined(AURORA_IS_POSIX_DERIVED)
2021-06-27 21:25:29 +00:00
#include <stdlib.h>
#include <unistd.h>
#define _USE_GET_CWD
#endif
#include <Source/IO/FS/FS.hpp>
2021-06-27 21:25:29 +00:00
namespace Aurora::Process
{
AUKN_SYM bool GetWorkingDirectory(AuString &path)
{
2023-12-22 00:17:19 +00:00
#if !defined(AURORA_IS_MODERNNT_DERIVED)
2021-09-06 10:58:08 +00:00
if (!AuTryResize(path, 0x4000))
2021-06-27 21:25:29 +00:00
{
return false;
}
2023-12-22 00:17:19 +00:00
#endif
2021-09-06 10:58:08 +00:00
#if defined(AURORA_IS_MODERNNT_DERIVED)
2021-06-27 21:25:29 +00:00
std::wstring eh;
2023-12-22 00:17:19 +00:00
if (!AuTryResize(eh, 0x4000))
{
return false;
}
2021-06-27 21:25:29 +00:00
auto length = ::GetCurrentDirectoryW(eh.size(), eh.data());
if (length == 0)
{
return false;
}
2023-12-22 00:17:19 +00:00
path = AuMove(Locale::ConvertFromWChar(eh.data(), length));
2021-06-27 21:25:29 +00:00
2023-12-22 00:17:19 +00:00
try
{
2023-12-22 00:17:19 +00:00
if (!path.ends_with(AuFS::kPathSplitter))
{
path += AuFS::kPathSplitter;
}
}
catch (...)
{
SysPushErrorCatch();
return false;
}
2021-06-27 21:25:29 +00:00
return true;
#elif defined(AURORA_PLATFORM_ANDROID)
2021-09-06 10:58:08 +00:00
// TODO: consider pulling internal storage package directory
2021-06-27 21:25:29 +00:00
return false;
#elif defined(_USE_GET_CWD)
if (getcwd(path.data(), path.size()) == nullptr)
{
return false;
}
path.resize(strlen(path.data())); // downsize shouldn't throw
2021-06-27 21:25:29 +00:00
if (!path.ends_with(AuFS::kPathSplitter))
{
path += AuFS::kPathSplitter;
}
2021-06-27 21:25:29 +00:00
return true;
#endif
return false;
}
static bool GetModulePathSlow(AuString &path, char &splitter)
{
path.clear();
splitter = 0;
[*/+/-] MEGA COMMIT. ~2 weeks compressed. The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api. [+] AuMakeSharedArray [+] Technet ArgvQuote [+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.) [+] auEndianness -> Endian swap utils [+] AuGet<N>(...) [*] AUE_DEFINE conversion for ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump [+] ConsoleMessage ByteBuffer serialization [+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks [*] Split logger from console subsystem [+] StartupParameters -> A part of a clean up effort under Process [*] Refactor SysErrors header + get caller hack [+] Atomic APIs [+] popcnt [+] Ring Buffer sink [+] Added more standard errors Catch, Submission, LockError, NoAccess, ResourceMissing, ResourceLocked, MalformedData, InSandboxContext, ParseError [+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace [+] IExitSubscriber, ETriggerLevel [*] Write bias the high performance RWLockImpl read-lock operation operation [+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem) [*] Updated API style Digests [+] CpuId::CpuBitCount [+] GetUserProgramsFolder [+] GetPackagePath [*] Split IStreamReader with an inl file [*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer [+] ICharacterProvider [+] ICharacterProviderEx [+] IBufferedCharacterConsumer [+] ProviderFromSharedString [+] ProviderFromString [+] BufferConsumerFromProvider [*] Parse Subsystem uses character io bufferer [*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore] [+] ByteBuffer::ResetReadPointer [*] Bug fix bytebuffer base not reset on free and some scaling issues [+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section [*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing [+] Added 64 *byte* fast RNG seeds [+] File Advisorys/File Lock Awareness [+] Added extended IAuroraThread from OS identifier caches for debug purposes [*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions. [*] Broke AuroraUtils/Typedefs out into a separate library [*] Update build script [+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media [*] Improved public API documentation [*] Bug fix `SetConsoleCtrlHandler` [+] Locale TimeDateToFileNameISO8601 [+] Console config stdOutShortTime [*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl) [*] Bug fixes in decoders [*] Major bug fix, AuMax [+] RateLimiter [+] Binary file sink [+] Log directory sink [*] Data header usability (more operators) [+] AuRemoveRange [+] AuRemove [+] AuTryRemove [+] AuTryRemoveRange [+] auCastUtils [+] Finish NewLSWin32Source [+] AuTryFindByTupleN, AuTryRemoveByTupleN [+] Separated AuRead/Write types, now in auTypeUtils [+] Added GetPosition/SetPosition to FileWriter [*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp [*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position) [*] Hack back in the sched deinit [+] File AIO loop source interop [+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw [+] Stub code for networking [+] Compression BaseStream/IngestableStreamBase [*] Major: read/write locks now support write-entrant read routines. [*] Compression subsystem now uses the MemoryView concept [*] Rewrite the base stream compressions, made them less broken [*] Update hashing api [*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing [+] Added new AuByteBuffer apis Trim, Pad, WriteFrom, WriteString, [TODO: ReadString] [+] Added ByteBufferPushReadState [+] Added ByteBufferPushWriteState [*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16. [*] ELogLevel is now an Aurora enum [+] Raised arbitrary limit in header to 255, the max filter buffer [+] Explicit GZip support [+] Explicit Zip support [+] Added [some] compressors et al
2022-02-17 00:11:40 +00:00
// TODO: BSD alternative sysctl CTL_KERN KERN_PROC KERN_PROC_PATHNAME -1
2021-09-06 10:58:08 +00:00
#if defined(AURORA_IS_MODERNNT_DERIVED)
2021-06-27 21:25:29 +00:00
wchar_t chungus[0x4000];
auto len = GetModuleFileNameW(
NULL,
chungus,
2021-09-06 10:58:08 +00:00
AuArraySize(chungus)
2021-06-27 21:25:29 +00:00
);
if (!len)
{
return false;
}
path = Aurora::Locale::ConvertFromWChar(chungus, len);
splitter = '\\';
[*/+/-] MEGA COMMIT. ~2 weeks compressed. The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api. [+] AuMakeSharedArray [+] Technet ArgvQuote [+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.) [+] auEndianness -> Endian swap utils [+] AuGet<N>(...) [*] AUE_DEFINE conversion for ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump [+] ConsoleMessage ByteBuffer serialization [+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks [*] Split logger from console subsystem [+] StartupParameters -> A part of a clean up effort under Process [*] Refactor SysErrors header + get caller hack [+] Atomic APIs [+] popcnt [+] Ring Buffer sink [+] Added more standard errors Catch, Submission, LockError, NoAccess, ResourceMissing, ResourceLocked, MalformedData, InSandboxContext, ParseError [+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace [+] IExitSubscriber, ETriggerLevel [*] Write bias the high performance RWLockImpl read-lock operation operation [+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem) [*] Updated API style Digests [+] CpuId::CpuBitCount [+] GetUserProgramsFolder [+] GetPackagePath [*] Split IStreamReader with an inl file [*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer [+] ICharacterProvider [+] ICharacterProviderEx [+] IBufferedCharacterConsumer [+] ProviderFromSharedString [+] ProviderFromString [+] BufferConsumerFromProvider [*] Parse Subsystem uses character io bufferer [*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore] [+] ByteBuffer::ResetReadPointer [*] Bug fix bytebuffer base not reset on free and some scaling issues [+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section [*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing [+] Added 64 *byte* fast RNG seeds [+] File Advisorys/File Lock Awareness [+] Added extended IAuroraThread from OS identifier caches for debug purposes [*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions. [*] Broke AuroraUtils/Typedefs out into a separate library [*] Update build script [+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media [*] Improved public API documentation [*] Bug fix `SetConsoleCtrlHandler` [+] Locale TimeDateToFileNameISO8601 [+] Console config stdOutShortTime [*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl) [*] Bug fixes in decoders [*] Major bug fix, AuMax [+] RateLimiter [+] Binary file sink [+] Log directory sink [*] Data header usability (more operators) [+] AuRemoveRange [+] AuRemove [+] AuTryRemove [+] AuTryRemoveRange [+] auCastUtils [+] Finish NewLSWin32Source [+] AuTryFindByTupleN, AuTryRemoveByTupleN [+] Separated AuRead/Write types, now in auTypeUtils [+] Added GetPosition/SetPosition to FileWriter [*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp [*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position) [*] Hack back in the sched deinit [+] File AIO loop source interop [+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw [+] Stub code for networking [+] Compression BaseStream/IngestableStreamBase [*] Major: read/write locks now support write-entrant read routines. [*] Compression subsystem now uses the MemoryView concept [*] Rewrite the base stream compressions, made them less broken [*] Update hashing api [*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing [+] Added new AuByteBuffer apis Trim, Pad, WriteFrom, WriteString, [TODO: ReadString] [+] Added ByteBufferPushReadState [+] Added ByteBufferPushWriteState [*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16. [*] ELogLevel is now an Aurora enum [+] Raised arbitrary limit in header to 255, the max filter buffer [+] Explicit GZip support [+] Explicit Zip support [+] Added [some] compressors et al
2022-02-17 00:11:40 +00:00
if (AuEndsWith(path, ".dll"))
{
path.clear();
return false;
}
2021-06-27 21:25:29 +00:00
return true;
2021-09-06 10:58:08 +00:00
#elif defined(AURORA_IS_XNU_DERIVED)
[*/+/-] MEGA COMMIT. ~2 weeks compressed. The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api. [+] AuMakeSharedArray [+] Technet ArgvQuote [+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.) [+] auEndianness -> Endian swap utils [+] AuGet<N>(...) [*] AUE_DEFINE conversion for ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump [+] ConsoleMessage ByteBuffer serialization [+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks [*] Split logger from console subsystem [+] StartupParameters -> A part of a clean up effort under Process [*] Refactor SysErrors header + get caller hack [+] Atomic APIs [+] popcnt [+] Ring Buffer sink [+] Added more standard errors Catch, Submission, LockError, NoAccess, ResourceMissing, ResourceLocked, MalformedData, InSandboxContext, ParseError [+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace [+] IExitSubscriber, ETriggerLevel [*] Write bias the high performance RWLockImpl read-lock operation operation [+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem) [*] Updated API style Digests [+] CpuId::CpuBitCount [+] GetUserProgramsFolder [+] GetPackagePath [*] Split IStreamReader with an inl file [*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer [+] ICharacterProvider [+] ICharacterProviderEx [+] IBufferedCharacterConsumer [+] ProviderFromSharedString [+] ProviderFromString [+] BufferConsumerFromProvider [*] Parse Subsystem uses character io bufferer [*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore] [+] ByteBuffer::ResetReadPointer [*] Bug fix bytebuffer base not reset on free and some scaling issues [+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section [*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing [+] Added 64 *byte* fast RNG seeds [+] File Advisorys/File Lock Awareness [+] Added extended IAuroraThread from OS identifier caches for debug purposes [*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions. [*] Broke AuroraUtils/Typedefs out into a separate library [*] Update build script [+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media [*] Improved public API documentation [*] Bug fix `SetConsoleCtrlHandler` [+] Locale TimeDateToFileNameISO8601 [+] Console config stdOutShortTime [*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl) [*] Bug fixes in decoders [*] Major bug fix, AuMax [+] RateLimiter [+] Binary file sink [+] Log directory sink [*] Data header usability (more operators) [+] AuRemoveRange [+] AuRemove [+] AuTryRemove [+] AuTryRemoveRange [+] auCastUtils [+] Finish NewLSWin32Source [+] AuTryFindByTupleN, AuTryRemoveByTupleN [+] Separated AuRead/Write types, now in auTypeUtils [+] Added GetPosition/SetPosition to FileWriter [*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp [*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position) [*] Hack back in the sched deinit [+] File AIO loop source interop [+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw [+] Stub code for networking [+] Compression BaseStream/IngestableStreamBase [*] Major: read/write locks now support write-entrant read routines. [*] Compression subsystem now uses the MemoryView concept [*] Rewrite the base stream compressions, made them less broken [*] Update hashing api [*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing [+] Added new AuByteBuffer apis Trim, Pad, WriteFrom, WriteString, [TODO: ReadString] [+] Added ByteBufferPushReadState [+] Added ByteBufferPushWriteState [*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16. [*] ELogLevel is now an Aurora enum [+] Raised arbitrary limit in header to 255, the max filter buffer [+] Explicit GZip support [+] Explicit Zip support [+] Added [some] compressors et al
2022-02-17 00:11:40 +00:00
// TODO: _NSGetExecutablePath() or CFBundleCopyExecutableURL?
// i think it would make sense to use NS over CoreFoundation
// i think we're also going to have to use CF's libevent abstraction - runloop source
// to pass through kqueue structures with the mach window message loop, like how
// user32 has MsgWaitMultipleObjects.
// t. windows and loonix dev
//
// TODO: if macos >= 10.12 || quarantine xattr
// /Applications/<app name>
2021-09-06 10:58:08 +00:00
CFURLRef bundleURL = CFBundleCopyExecutableURL(CFBundleGetMainBundle());
CFStringRef pathRef = CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle);
auto utf16length = CFStringGetLength(pathRef);
auto maxUtf8len = CFStringGetMaximumSizeForEncoding(utf16length, kCFStringEncodingUTF8);
path.resize(maxUtf8len);
if (!CFStringGetCString(pathRef, path.data(), maxUtf8len, kCFStringEncodingUTF8))
{
path.clear();
return false;
}
path.resize(std::strlen(path.c_str()));
splitter = '/';
2021-09-06 10:58:08 +00:00
#elif defined(AURORA_PLATFORM_ANDROID)
// SELinux gets in the way in some instances
// There is no reason we should be searching for the jre binary
// I'm also not convined pulling a cached apk path is the best thing to do here
// Why should we even bother pulling /system/bin/app_process?
2021-09-06 10:58:08 +00:00
return false;
#elif defined(AURORA_IS_POSIX_DERIVED)
2021-06-27 21:25:29 +00:00
static const AuList<AuString> procFsPaths = {
"/proc/self/exe",
"/proc/self/file",
"/proc/curproc/exe",
"/proc/curproc/file"
};
2022-04-13 11:38:26 +00:00
if (!AuTryResize(path, 8192))
{
return false;
}
2021-06-27 21:25:29 +00:00
for (const auto &name : procFsPaths)
{
2022-04-13 11:38:26 +00:00
ssize_t count;
if ((count = readlink(name.c_str(), &path[0], path.size())) > 0)
2021-06-27 21:25:29 +00:00
{
2022-04-13 11:38:26 +00:00
if (!AuTryResize(path, count))
{
return false;
}
2021-06-27 21:25:29 +00:00
splitter = '/';
return true;
}
}
return false;
2021-07-05 13:33:05 +00:00
2021-06-27 21:25:29 +00:00
#endif
}
2023-12-13 18:11:35 +00:00
static bool GetModulePath(const AuString *&module, const AuString *&partialPath, const AuString *&fullPath)
2021-06-27 21:25:29 +00:00
{
static AuString cachedModule, cachedPartialPath, cachedFullPath;
2023-12-22 00:17:19 +00:00
static AuInitOnce gInitOnce;
if (!AuThreading::InitOnceLocker::TryLock(&gInitOnce, true))
2021-06-27 21:25:29 +00:00
{
2023-12-22 00:17:19 +00:00
gInitOnce.Wait();
2021-06-27 21:25:29 +00:00
}
2023-12-22 00:17:19 +00:00
else
2021-06-27 21:25:29 +00:00
{
2023-12-23 03:24:21 +00:00
bool bFailed {};
2023-12-22 00:17:19 +00:00
try
{
char spitter;
2021-06-27 21:25:29 +00:00
2023-12-22 00:17:19 +00:00
if (GetModulePathSlow(cachedFullPath, spitter))
{
auto indexA = cachedFullPath.find_last_of(spitter);
if (indexA != AuString::npos)
{
cachedModule = cachedFullPath.substr(indexA + 1);
cachedPartialPath = cachedFullPath.substr(0, indexA);
2023-12-23 03:24:21 +00:00
if (!cachedPartialPath.ends_with(AuFS::kPathSplitter))
{
cachedPartialPath += AuFS::kPathSplitter;
}
2023-12-22 00:17:19 +00:00
}
else
{
bFailed = true;
}
}
else
{
bFailed = true;
}
}
catch (...)
2021-06-27 21:25:29 +00:00
{
2023-12-22 00:17:19 +00:00
bFailed = true;
SysPushErrorCatch();
2021-06-27 21:25:29 +00:00
}
2023-12-22 00:17:19 +00:00
AuThreading::InitOnceLocker::Finish(&gInitOnce, bFailed);
2021-06-27 21:25:29 +00:00
}
2023-12-23 03:24:21 +00:00
if (gInitOnce.IsUninitialized())
{
2023-12-22 00:17:19 +00:00
return false;
}
2023-12-13 18:11:35 +00:00
module = &cachedModule;
fullPath = &cachedFullPath;
partialPath = &cachedPartialPath;
2021-06-27 21:25:29 +00:00
return true;
}
2023-12-13 18:11:35 +00:00
AUKN_SYM const AuString *GetProcessName()
2021-06-27 21:25:29 +00:00
{
2023-12-13 18:11:35 +00:00
const AuString *pModule, *pPartial, *pFull;
2021-06-27 21:25:29 +00:00
try
{
2023-12-13 18:11:35 +00:00
if (GetModulePath(pModule, pPartial, pFull) &&
pModule &&
pModule->size())
{
2023-12-13 18:11:35 +00:00
return pModule;
}
}
catch (...)
2021-06-27 21:25:29 +00:00
{
2023-12-13 18:11:35 +00:00
SysPushErrorCatch();
2021-06-27 21:25:29 +00:00
}
2023-12-13 18:11:35 +00:00
return nullptr;
2021-06-27 21:25:29 +00:00
}
2023-12-13 18:11:35 +00:00
AUKN_SYM const AuString *GetProcessDirectory()
2021-06-27 21:25:29 +00:00
{
2023-12-13 18:11:35 +00:00
const AuString *pModule, *pPartial, *pFull;
2021-06-27 21:25:29 +00:00
try
2021-06-27 21:25:29 +00:00
{
2023-12-13 18:11:35 +00:00
if (GetModulePath(pModule, pPartial, pFull) &&
pPartial &&
pPartial->size())
{
2023-12-13 18:11:35 +00:00
return pPartial;
}
2021-06-27 21:25:29 +00:00
{
2023-12-13 18:11:35 +00:00
static AuString cwd;
static AuInitOnce gInitOnce;
gInitOnce.Call([]()
{
GetWorkingDirectory(cwd);
});
if (cwd.size())
{
return &cwd;
}
}
}
catch (...)
2021-09-06 10:58:08 +00:00
{
2023-12-13 18:11:35 +00:00
SysPushErrorCatch();
2021-09-06 10:58:08 +00:00
}
2023-12-13 18:11:35 +00:00
return nullptr;
2021-06-27 21:25:29 +00:00
}
2023-12-13 18:11:35 +00:00
AUKN_SYM const AuString *GetProcessFullPath()
2021-06-27 21:25:29 +00:00
{
2023-12-13 18:11:35 +00:00
const AuString *pModule, *pPartial, *pFull;
2021-06-27 21:25:29 +00:00
try
{
2023-12-13 18:11:35 +00:00
if (GetModulePath(pModule, pPartial, pFull) &&
pFull &&
pFull->size())
{
2023-12-13 18:11:35 +00:00
return pFull;
}
}
catch (...)
2021-06-27 21:25:29 +00:00
{
2023-12-13 18:11:35 +00:00
SysPushErrorCatch();
2021-06-27 21:25:29 +00:00
}
2023-12-13 18:11:35 +00:00
return nullptr;
2021-06-27 21:25:29 +00:00
}
}