2022-04-19 01:20:09 +09:00
|
|
|
#include <fstream>
|
|
|
|
#include <regex>
|
2020-09-28 03:19:37 +09:00
|
|
|
#include <stdint.h>
|
2022-04-19 01:20:09 +09:00
|
|
|
#include <stdlib.h>
|
2022-01-24 01:52:45 +09:00
|
|
|
#include <windows.h>
|
2020-09-28 03:19:37 +09:00
|
|
|
|
2024-01-26 18:49:00 +09:00
|
|
|
#if defined(VERSION_MAJOR) && defined(VERSION_MINOR) && defined(VERSION_PATCH)
|
|
|
|
#define CONFIG_VERSION TEXT(VERSION_MAJOR) L"." TEXT(VERSION_MINOR) L"." TEXT(VERSION_PATCH)
|
|
|
|
#else
|
|
|
|
#define CONFIG_VERSION L"unspecified"
|
|
|
|
#endif
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
#define FSNOTIFY_POWER_OFF 1
|
|
|
|
#define FSNOTIFY_POWER_ON 0
|
2020-09-28 03:19:37 +09:00
|
|
|
|
|
|
|
#define BRAINLILODRV_API __declspec(dllexport)
|
|
|
|
|
|
|
|
#include "BrainLILODrv.h"
|
2022-05-05 22:59:40 +09:00
|
|
|
#include "models.h"
|
2020-09-28 03:19:37 +09:00
|
|
|
|
|
|
|
typedef void (*FileSystemPowerFunctionProc)(DWORD);
|
|
|
|
static FileSystemPowerFunctionProc FileSystemPowerFunction;
|
|
|
|
|
2022-09-23 00:41:59 +09:00
|
|
|
// GEN1
|
|
|
|
// VA
|
|
|
|
#define BOOTLOADER_PRELOADADDR_GEN1 (uint8_t *)0xa0250000
|
|
|
|
#define BOOTLOADER_LOADADDR_GEN1 (uint8_t *)0xa3f00000
|
|
|
|
#define PHYSICAL_INVOKER_INSTALLADDR_GEN1 (uint8_t *)0xb0000000
|
|
|
|
#define TMPA910_REMAP_REGISTER_ADDRESS (uint32_t *)0xaa000004
|
|
|
|
// PA
|
|
|
|
#define BOOTLOADER_LOADADDR_GEN1_PA (uint8_t *)0x43f00000
|
|
|
|
|
|
|
|
// DEFAULT(GEN2)
|
|
|
|
// VA
|
|
|
|
#define BOOTLOADER_PRELOADADDR (uint8_t *)0xa0000000
|
|
|
|
#define BOOTLOADER_LOADADDR (uint8_t *)0xa0200000
|
|
|
|
#define PHYSICAL_INVOKER_INSTALLADDR (uint8_t *)0xa8000000
|
|
|
|
// PA
|
|
|
|
#define BOOTLOADER_LOADADDR_PA (uint8_t *)0x40200000
|
|
|
|
|
|
|
|
// VA
|
|
|
|
uint8_t *bootloader_preload_address = NULL;
|
|
|
|
uint8_t *bootloader_load_address = NULL;
|
|
|
|
uint8_t *physical_invoker_install_address = NULL;
|
|
|
|
// PA
|
|
|
|
uint8_t *bootloader_load_address_pa = NULL;
|
|
|
|
|
2022-05-05 23:49:16 +09:00
|
|
|
DWORD fileSize;
|
2022-05-05 19:03:35 +09:00
|
|
|
int row;
|
|
|
|
int screenW;
|
|
|
|
int screenH;
|
|
|
|
|
|
|
|
static void outputDebugMessage(const wchar_t *format, ...)
|
|
|
|
{
|
|
|
|
wchar_t buffer[256] = {0};
|
|
|
|
va_list args;
|
2022-09-23 00:41:59 +09:00
|
|
|
RECT rcScreen = {.left = 0, .top = 0, .right = screenW, .bottom = screenH};
|
2022-05-05 19:03:35 +09:00
|
|
|
|
|
|
|
va_start(args, format);
|
|
|
|
vswprintf(buffer, format, args);
|
|
|
|
va_end(args);
|
|
|
|
|
|
|
|
OutputDebugString(buffer);
|
2022-09-23 00:41:59 +09:00
|
|
|
ExtTextOut(GetDC(NULL), 0, row * 14, ETO_CLIPPED, &rcScreen, buffer, wcslen(buffer), NULL);
|
2022-05-05 19:03:35 +09:00
|
|
|
|
|
|
|
row++;
|
|
|
|
}
|
2022-01-24 01:39:34 +09:00
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
static void disableInterrupts()
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
asm volatile("mrs r0, cpsr\n"
|
2022-01-24 01:52:45 +09:00
|
|
|
"orr r0,r0,#0x80\n"
|
|
|
|
"msr cpsr_c,r0\n"
|
|
|
|
"mov r0,#1" ::
|
|
|
|
: "r0");
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-09-23 00:41:59 +09:00
|
|
|
extern "C" void EDNA2_physicalInvoker();
|
|
|
|
|
|
|
|
static void EnableMemoryRemapGen1()
|
2022-01-24 01:52:45 +09:00
|
|
|
{
|
2022-09-23 00:41:59 +09:00
|
|
|
*TMPA910_REMAP_REGISTER_ADDRESS = 1;
|
|
|
|
outputDebugMessage(L"BrainLILO: memory remap enable for Gen1\n");
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-09-23 00:41:59 +09:00
|
|
|
static void EDNA2_installPhysicalInvoker(BrainGen gen)
|
2022-01-24 01:52:45 +09:00
|
|
|
{
|
2022-09-23 00:41:59 +09:00
|
|
|
if (gen == Gen1)
|
|
|
|
{
|
|
|
|
EnableMemoryRemapGen1();
|
|
|
|
}
|
|
|
|
outputDebugMessage(L"BrainLILO: copying PhysicalInvoker to 0x%p from 0x%p\n", physical_invoker_install_address,
|
|
|
|
&EDNA2_physicalInvoker);
|
|
|
|
memcpy(physical_invoker_install_address, (const void *)&EDNA2_physicalInvoker, 64 * 4);
|
2022-01-24 01:52:45 +09:00
|
|
|
// clearCache();
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
__attribute__((noreturn)) static void EDNA2_runPhysicalInvoker()
|
|
|
|
{
|
|
|
|
// r0=info
|
|
|
|
asm volatile("msr cpsr_c, #211\n" // to supervisor mode
|
|
|
|
"mrc p15,0,r0,c1,c0,0\n" // read ctrl regs
|
|
|
|
"bic r0, r0, #8192\n" // reset vector to lower
|
|
|
|
"mcr p15,0,r0,c1,c0,0\n" // write ctrl regs
|
|
|
|
);
|
|
|
|
|
2022-09-23 00:41:59 +09:00
|
|
|
memcpy(bootloader_load_address, bootloader_preload_address, fileSize);
|
2022-01-24 01:52:45 +09:00
|
|
|
|
|
|
|
asm volatile("ldr r0, =0x0000\n"
|
|
|
|
"ldr r1, =0x0000\n"
|
|
|
|
"ldr r2, =0x0000\n"
|
|
|
|
"ldr r3, =0x0000\n"
|
|
|
|
"ldr r4, =0x0000\n"
|
|
|
|
"ldr r5, =0x0000\n"
|
|
|
|
"ldr r6, =0x0000\n"
|
|
|
|
"ldr r7, =0x0000\n"
|
2022-09-23 00:41:59 +09:00
|
|
|
"mov r8, %[textbase]\n"
|
2022-01-24 01:52:45 +09:00
|
|
|
"ldr r9, =0x0000\n"
|
|
|
|
|
|
|
|
"mrc p15,0,r10,c1,c0,0\n" // read ctrl regs
|
|
|
|
"bic r10, r10, #5\n" // disable MMU/DCache
|
|
|
|
"mcr p15,0,r10,c1,c0,0\n" // write ctrl regs
|
|
|
|
"swi #0\n" // jump!
|
2022-09-23 00:41:59 +09:00
|
|
|
: /* no outputs */
|
|
|
|
: [textbase] "r"(bootloader_load_address_pa)
|
|
|
|
: "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10");
|
2022-01-24 01:52:45 +09:00
|
|
|
|
|
|
|
// never reach here
|
|
|
|
while (true)
|
|
|
|
;
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-09-23 00:41:59 +09:00
|
|
|
__attribute__((noreturn)) static DWORD EDNA2_callKernelEntryPoint(BrainGen gen)
|
2022-01-24 01:52:45 +09:00
|
|
|
{
|
2022-05-05 19:03:35 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: disabling interrupts");
|
2020-09-28 03:19:37 +09:00
|
|
|
disableInterrupts();
|
2022-05-05 19:03:35 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: injecting code to internal ram");
|
2022-09-23 00:41:59 +09:00
|
|
|
EDNA2_installPhysicalInvoker(gen);
|
2022-05-05 19:03:35 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: invoking");
|
2022-05-05 22:57:51 +09:00
|
|
|
Sleep(1000);
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
EDNA2_runPhysicalInvoker();
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-05-05 22:59:40 +09:00
|
|
|
static void ShowMessage(std::wstring msg, std::wstring title, UINT typ)
|
2022-04-19 01:20:09 +09:00
|
|
|
{
|
2022-05-05 22:59:40 +09:00
|
|
|
MessageBox(NULL, msg.c_str(), title.c_str(), typ);
|
2022-04-19 01:20:09 +09:00
|
|
|
}
|
|
|
|
|
2022-09-23 00:41:59 +09:00
|
|
|
static void SetAddress(BrainGen gen)
|
|
|
|
{
|
|
|
|
switch (gen)
|
|
|
|
{
|
|
|
|
case Gen1:
|
|
|
|
// VA
|
|
|
|
bootloader_preload_address = BOOTLOADER_PRELOADADDR_GEN1;
|
|
|
|
bootloader_load_address = BOOTLOADER_LOADADDR_GEN1;
|
|
|
|
physical_invoker_install_address = PHYSICAL_INVOKER_INSTALLADDR_GEN1;
|
|
|
|
// PA
|
|
|
|
bootloader_load_address_pa = BOOTLOADER_LOADADDR_GEN1_PA;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
// Gen2?
|
|
|
|
// VA
|
|
|
|
bootloader_preload_address = BOOTLOADER_PRELOADADDR;
|
|
|
|
bootloader_load_address = BOOTLOADER_LOADADDR;
|
|
|
|
physical_invoker_install_address = PHYSICAL_INVOKER_INSTALLADDR;
|
|
|
|
// PA
|
|
|
|
bootloader_load_address_pa = BOOTLOADER_LOADADDR_PA;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static BrainGen SelectGen(std::wstring model)
|
|
|
|
{
|
|
|
|
BrainGen brainGen = UnknownGen;
|
|
|
|
if (model == L"gen1.bin")
|
|
|
|
{
|
|
|
|
brainGen = Gen1;
|
|
|
|
}
|
|
|
|
else if (model == L"u-boot.bin")
|
|
|
|
{
|
|
|
|
brainGen = UnknownGen;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
brainGen = Gen2Or3;
|
|
|
|
}
|
|
|
|
return brainGen;
|
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
static bool doLinux()
|
|
|
|
{
|
2022-05-05 22:59:40 +09:00
|
|
|
std::wifstream iVersion;
|
|
|
|
std::wstring line, model;
|
|
|
|
std::wregex modelRe(L"[A-Z]{2}-[A-Z0-9]+");
|
|
|
|
std::wsmatch match;
|
2022-09-23 00:41:59 +09:00
|
|
|
BrainGen brain_gen = UnknownGen;
|
2022-04-19 01:20:09 +09:00
|
|
|
|
2022-05-05 22:59:40 +09:00
|
|
|
std::wstring fn(L"\\Storage Card\\loader\\");
|
2022-04-19 01:20:09 +09:00
|
|
|
HANDLE hUBoot;
|
2022-01-24 01:52:45 +09:00
|
|
|
DWORD wReadSize;
|
|
|
|
|
2024-01-26 18:49:00 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: Version " CONFIG_VERSION);
|
|
|
|
|
2022-04-19 01:20:09 +09:00
|
|
|
iVersion.open("\\NAND\\version.txt");
|
|
|
|
while (getline(iVersion, line))
|
|
|
|
{
|
|
|
|
if (regex_search(line, match, modelRe))
|
|
|
|
{
|
|
|
|
model = match[0].str();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (model.length() == 0)
|
|
|
|
{
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: failed to match the model name");
|
2022-05-05 22:59:40 +09:00
|
|
|
MessageBox(NULL, L"Failed to match the model name", L"BrainLILO", MB_ICONWARNING);
|
2022-04-19 01:20:09 +09:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: internal model name: %s", model.c_str());
|
2022-05-05 22:59:40 +09:00
|
|
|
|
|
|
|
auto iter = models.find(model);
|
|
|
|
if (iter != models.end())
|
|
|
|
{
|
|
|
|
model = iter->second;
|
2022-09-23 00:41:59 +09:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: internal model name %s is unknown, falling back to u-boot.bin", model.c_str());
|
2022-05-05 22:59:40 +09:00
|
|
|
model = L"u-boot.bin";
|
|
|
|
}
|
|
|
|
|
|
|
|
fn += model;
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: opening Bootloader file: %s", fn.c_str());
|
2022-04-19 01:20:09 +09:00
|
|
|
|
2022-09-23 00:41:59 +09:00
|
|
|
brain_gen = SelectGen(model);
|
|
|
|
SetAddress(brain_gen);
|
|
|
|
|
2022-05-05 22:59:40 +09:00
|
|
|
hUBoot = CreateFile(fn.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
2022-04-19 01:20:09 +09:00
|
|
|
if (hUBoot == INVALID_HANDLE_VALUE)
|
2022-01-24 01:52:45 +09:00
|
|
|
{
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: could not open the bootloader: %s", fn.c_str());
|
2022-05-05 22:59:40 +09:00
|
|
|
ShowMessage(L"Could not open the bootloader: " + fn, L"BrainLILO", MB_ICONWARNING);
|
2022-01-24 01:52:45 +09:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: bootloader file handle 0x%p", hUBoot);
|
2022-04-19 01:20:09 +09:00
|
|
|
|
2022-05-05 23:49:16 +09:00
|
|
|
fileSize = GetFileSize(hUBoot, NULL);
|
|
|
|
outputDebugMessage(L"BrainLILO: bootloader file size %d Byte", fileSize);
|
2022-01-24 01:52:45 +09:00
|
|
|
|
2022-09-23 00:41:59 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: preloading bootloader to 0x%p...", bootloader_preload_address);
|
|
|
|
if (!ReadFile(hUBoot, (void *)bootloader_preload_address, fileSize, &wReadSize, NULL))
|
2022-01-24 01:52:45 +09:00
|
|
|
{
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: could not read the bootloader");
|
2022-05-05 22:59:40 +09:00
|
|
|
ShowMessage(L"Could not read the bootloader", L"BrainLILO", MB_ICONWARNING);
|
2022-01-24 01:52:45 +09:00
|
|
|
return false;
|
|
|
|
}
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: bootloader copied! Closing file handle...");
|
2022-04-19 01:20:09 +09:00
|
|
|
CloseHandle(hUBoot);
|
2022-01-24 01:52:45 +09:00
|
|
|
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: notifying power off to filesystems...");
|
2022-01-24 01:52:45 +09:00
|
|
|
if (FileSystemPowerFunction)
|
|
|
|
FileSystemPowerFunction(FSNOTIFY_POWER_OFF);
|
|
|
|
|
2022-05-05 23:49:16 +09:00
|
|
|
outputDebugMessage(L"BrainLILO: starting bootloader call sequence...");
|
2022-09-23 00:41:59 +09:00
|
|
|
EDNA2_callKernelEntryPoint(brain_gen);
|
2022-01-24 01:52:45 +09:00
|
|
|
return true;
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API BOOL LIN_IOControl(DWORD handle, DWORD dwIoControlCode, DWORD *pInBuf, DWORD nInBufSize,
|
|
|
|
DWORD *pOutBuf, DWORD nOutBufSize, PDWORD pBytesReturned)
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
SetLastError(0);
|
2022-01-24 01:52:45 +09:00
|
|
|
|
|
|
|
switch (dwIoControlCode)
|
|
|
|
{
|
|
|
|
case IOCTL_LIN_DO_LINUX:
|
|
|
|
if (!doLinux())
|
|
|
|
{
|
|
|
|
if (FileSystemPowerFunction)
|
|
|
|
FileSystemPowerFunction(FSNOTIFY_POWER_ON);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API BOOL LIN_Read(DWORD handle, LPVOID pBuffer, DWORD dwNumBytes)
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
SetLastError(ERROR_INVALID_FUNCTION);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API BOOL LIN_Write(DWORD handle, LPVOID pBuffer, DWORD dwNumBytes)
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
SetLastError(ERROR_INVALID_FUNCTION);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API DWORD LIN_Seek(DWORD handle, long lDistance, DWORD dwMoveMethod)
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
SetLastError(ERROR_INVALID_FUNCTION);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API void LIN_PowerUp(void)
|
|
|
|
{
|
|
|
|
OutputDebugString(L"BrainLILO: resuming.");
|
|
|
|
}
|
2020-09-28 03:19:37 +09:00
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API void LIN_PowerDown(void)
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API DWORD LIN_Init(LPCTSTR pContext, DWORD dwBusContext)
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
void *ctx;
|
|
|
|
ctx = (void *)LocalAlloc(LPTR, sizeof(4));
|
|
|
|
|
2022-05-05 19:03:35 +09:00
|
|
|
screenW = GetSystemMetrics(SM_CXVIRTUALSCREEN);
|
|
|
|
screenH = GetSystemMetrics(SM_CYVIRTUALSCREEN);
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
return (DWORD)ctx;
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API DWORD LIN_Open(DWORD dwData, DWORD dwAccess, DWORD dwShareMode)
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
void *hnd = (void *)LocalAlloc(LPTR, 4);
|
2022-05-05 19:03:35 +09:00
|
|
|
|
|
|
|
row = 0;
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
return (DWORD)hnd;
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API BOOL LIN_Close(DWORD handle)
|
|
|
|
{
|
|
|
|
LocalFree((void *)handle);
|
2020-09-28 03:19:37 +09:00
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
return TRUE;
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BRAINLILODRV_API BOOL LIN_Deinit(DWORD dwContext)
|
|
|
|
{
|
2020-09-28 03:19:37 +09:00
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
LocalFree((void *)dwContext);
|
|
|
|
return TRUE;
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
|
2022-01-24 01:52:45 +09:00
|
|
|
extern "C" BOOL APIENTRY DllMainCRTStartup(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
2020-09-28 03:19:37 +09:00
|
|
|
{
|
|
|
|
switch (ul_reason_for_call)
|
2022-01-24 01:52:45 +09:00
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
case DLL_THREAD_ATTACH:
|
|
|
|
FileSystemPowerFunction =
|
|
|
|
(FileSystemPowerFunctionProc)GetProcAddress(LoadLibrary(L"COREDLL"), L"FileSystemPowerFunction");
|
|
|
|
|
|
|
|
case DLL_THREAD_DETACH:
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
break;
|
2020-09-28 03:19:37 +09:00
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|