-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fea, LoadLibrary添加LOAD_LIBRARY_SEARCH_USER_DIRS支持
- 添加 SetDllDirectoryW(A) - 添加 GetDllDirectoryW(A) - 添加 AddDllDirectory - 添加 RemoveDllDirectory
- Loading branch information
1 parent
98f7e93
commit 2772873
Showing
7 changed files
with
4,395 additions
and
3,259 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#pragma once | ||
|
||
namespace YY::Thunks | ||
{ | ||
namespace | ||
{ | ||
template<typename ListEntry> | ||
struct ListEntryImpl | ||
{ | ||
ListEntry* pPrior = nullptr; | ||
ListEntry* pNext = nullptr; | ||
}; | ||
|
||
template<typename ListEntry> | ||
class ListImpl | ||
{ | ||
public: | ||
ListEntry* pFirst = nullptr; | ||
ListEntry* pLast = nullptr; | ||
|
||
void __fastcall PushBack(ListEntry* _pItem) noexcept | ||
{ | ||
if (!_pItem) | ||
return; | ||
|
||
_pItem->pNext = nullptr; | ||
_pItem->pPrior = pLast; | ||
pLast = _pItem; | ||
|
||
if (!pFirst) | ||
pFirst = _pItem; | ||
} | ||
|
||
bool __fastcall Remove(ListEntry* _pItem) noexcept | ||
{ | ||
if (!_pItem) | ||
return false; | ||
|
||
if (!pFirst) | ||
return false; | ||
|
||
auto _pPrior = _pItem->pPrior; | ||
auto _pNext = _pItem->pNext; | ||
if (_pPrior) | ||
{ | ||
_pPrior->pNext = _pNext; | ||
} | ||
|
||
if (_pNext) | ||
{ | ||
_pNext->pPrior = _pPrior; | ||
} | ||
|
||
if (pFirst == _pItem) | ||
{ | ||
pFirst = _pNext; | ||
} | ||
|
||
if (pLast == _pItem) | ||
{ | ||
pLast = _pPrior; | ||
} | ||
|
||
return true; | ||
} | ||
}; | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.