mirror of
https://github.com/PashaBibko/LX.git
synced 2026-04-03 17:39:02 +00:00
General clean up
- Moved some classes from Lexer.h to seperate (non-Global files) - Deleted dllmain as it wasn't used for the most part
This commit is contained in:
@@ -159,7 +159,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Console.cpp" />
|
||||
<ClCompile Include="src\dllmain.cpp" />
|
||||
<ClCompile Include="src\Logger.cpp" />
|
||||
<ClCompile Include="src\pch.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
|
||||
@@ -9,31 +9,25 @@
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\Sections">
|
||||
<UniqueIdentifier>{f3a1ae14-8b71-41d9-ba66-60c952867261}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="LX-Common.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="inc\Console.h">
|
||||
<Filter>Header Files\Sections</Filter>
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="inc\Error.h">
|
||||
<Filter>Header Files\Sections</Filter>
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="inc\Logger.h">
|
||||
<Filter>Header Files\Sections</Filter>
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="inc\ThrowIf.h">
|
||||
<Filter>Header Files\Sections</Filter>
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\pch.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -37,9 +37,6 @@ namespace LX
|
||||
}
|
||||
|
||||
private:
|
||||
// Allows ProcAttach to manage the log //
|
||||
friend bool ProcAttach(HMODULE hModule);
|
||||
|
||||
// Initalises the log (Called by DllMain) //
|
||||
static void Init();
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
#include <LX-Common.h>
|
||||
|
||||
namespace LX
|
||||
{
|
||||
// All the different functions that can be called by the system //
|
||||
// Currently all empty but here for easier future development //
|
||||
|
||||
using DllFunc = bool(HMODULE);
|
||||
|
||||
static bool ProcAttach(HMODULE hModule)
|
||||
{
|
||||
Log::Init(); // Initalises the log before the main process starts
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ProcDetach(HMODULE hModule)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ThreadAttach(HMODULE hModule) { return true; }
|
||||
static bool ThreadDetach(HMODULE hModule) { return true; }
|
||||
}
|
||||
|
||||
BOOL __stdcall DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
// All the functions that might be called with their relevant state //
|
||||
static const std::unordered_map<DWORD, LX::DllFunc&> funcs =
|
||||
{
|
||||
{ DLL_PROCESS_ATTACH, LX::ProcAttach },
|
||||
{ DLL_PROCESS_DETACH, LX::ProcDetach },
|
||||
{ DLL_THREAD_ATTACH , LX::ThreadAttach },
|
||||
{ DLL_THREAD_DETACH , LX::ThreadDetach }
|
||||
};
|
||||
|
||||
// Returns the output of the relavant function //
|
||||
return funcs.at(ul_reason_for_call)(hModule);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user