mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-27 15:54:03 +08:00
exits
This commit is contained in:
parent
02119e9c7e
commit
64258ad5cc
@ -334,6 +334,7 @@ namespace{
|
|||||||
//flutter of birds~鳥達の羽ばたき~
|
//flutter of birds~鳥達の羽ばたき~
|
||||||
//https://vndb.org/v2379
|
//https://vndb.org/v2379
|
||||||
//需要注意的是,不能把文本跳到最快,不然2~4行无法显示。
|
//需要注意的是,不能把文本跳到最快,不然2~4行无法显示。
|
||||||
|
//这个有一大堆候选
|
||||||
bool elf3(){
|
bool elf3(){
|
||||||
bool succ=false;
|
bool succ=false;
|
||||||
BYTE sig[]={
|
BYTE sig[]={
|
||||||
|
@ -3,9 +3,14 @@
|
|||||||
class Elf:public ENGINE{
|
class Elf:public ENGINE{
|
||||||
public:
|
public:
|
||||||
Elf(){
|
Elf(){
|
||||||
|
check_by=CHECK_BY::CUSTOM;
|
||||||
check_by=CHECK_BY::FILE_ALL;
|
check_by_target=[](){
|
||||||
check_by_target=check_by_list{L"data.arc",L"effect.arc",L"mes.arc"};
|
//flutter of birds~鳥達の羽ばたき~
|
||||||
|
//https://vndb.org/v2379
|
||||||
|
//很奇怪,FindFirstFileW在win7上true,在win11上false,但PathFileExists在两者都是true
|
||||||
|
auto paks={L"data.arc",L"effect.arc",L"mes.arc"};
|
||||||
|
return std::all_of(paks.begin(),paks.end(),[](auto f){return Util::CheckFile_exits(f,true);}) ;
|
||||||
|
};
|
||||||
//Util::CheckFile(L"Silkys.exe") || // It might or might not have Silkys.exe
|
//Util::CheckFile(L"Silkys.exe") || // It might or might not have Silkys.exe
|
||||||
// data, effect, layer, mes, music
|
// data, effect, layer, mes, music
|
||||||
};
|
};
|
||||||
|
@ -221,10 +221,14 @@ DWORD FindImportEntry(DWORD hModule, DWORD fun)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool CheckFile(LPCWSTR name)
|
bool CheckFile(LPCWSTR name)
|
||||||
|
{
|
||||||
|
return CheckFile_exits(name,false);
|
||||||
|
}
|
||||||
|
bool CheckFile_exits(LPCWSTR name,bool if_exits_also_ok)
|
||||||
{
|
{
|
||||||
WIN32_FIND_DATAW unused;
|
WIN32_FIND_DATAW unused;
|
||||||
HANDLE file = FindFirstFileW(name, &unused);
|
HANDLE file = FindFirstFileW(name, &unused);
|
||||||
if (file != INVALID_HANDLE_VALUE)
|
if ((file != INVALID_HANDLE_VALUE)||(if_exits_also_ok &&PathFileExists(name)))
|
||||||
{
|
{
|
||||||
FindClose(file);
|
FindClose(file);
|
||||||
return true;
|
return true;
|
||||||
@ -234,7 +238,7 @@ bool CheckFile(LPCWSTR name)
|
|||||||
while (*(--end) != L'\\');
|
while (*(--end) != L'\\');
|
||||||
wcscpy_s(end + 1, MAX_PATH, name);
|
wcscpy_s(end + 1, MAX_PATH, name);
|
||||||
file = FindFirstFileW(path, &unused);
|
file = FindFirstFileW(path, &unused);
|
||||||
if (file != INVALID_HANDLE_VALUE)
|
if ((file != INVALID_HANDLE_VALUE)||(if_exits_also_ok &&PathFileExists(path)))
|
||||||
{
|
{
|
||||||
FindClose(file);
|
FindClose(file);
|
||||||
return true;
|
return true;
|
||||||
|
@ -33,6 +33,7 @@ DWORD FindCallAndEntryRel(DWORD fun, DWORD size, DWORD pt, DWORD sig);
|
|||||||
DWORD FindImportEntry(DWORD hModule, DWORD fun);
|
DWORD FindImportEntry(DWORD hModule, DWORD fun);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool CheckFile_exits(LPCWSTR name, bool if_exits_also_ok);
|
||||||
bool CheckFile(LPCWSTR name);
|
bool CheckFile(LPCWSTR name);
|
||||||
|
|
||||||
bool SearchResourceString(LPCWSTR str);
|
bool SearchResourceString(LPCWSTR str);
|
||||||
|
Loading…
Reference in New Issue
Block a user