mirror of
https://github.com/zs-yg/kortapp-z.git
synced 2025-12-07 00:20:43 +08:00
添加内存锻炼器代码
This commit is contained in:
24
others/C/memory/src/init.c
Normal file
24
others/C/memory/src/init.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "../include/memory_trainer.h"
|
||||
#include "../include/log.h"
|
||||
#include <windows.h>
|
||||
|
||||
// 初始化应用程序
|
||||
void initialize_application(HINSTANCE hInstance) {
|
||||
// 初始化日志系统
|
||||
init_logger();
|
||||
|
||||
// 注册窗口类(Unicode版本)
|
||||
WNDCLASSW wc = {0};
|
||||
wc.lpfnWndProc = WndProc;
|
||||
wc.hInstance = hInstance;
|
||||
wc.lpszClassName = L"MemoryTrainer";
|
||||
RegisterClassW(&wc);
|
||||
|
||||
// 记录初始化完成
|
||||
log_message(LOG_INFO, L"应用程序初始化完成");
|
||||
}
|
||||
|
||||
// 获取应用程序实例句柄
|
||||
HINSTANCE get_app_instance(void) {
|
||||
return GetModuleHandleW(NULL);
|
||||
}
|
||||
Reference in New Issue
Block a user