feat(box): 升级版本号并优化代码执行功能
-将版本号从 0.0.2 修改为 0.1.2 - 移除了异常时抛出的 RuntimeException - 新增了 C 语言和 Java代码的执行功能 - 优化了 Python 代码的执行方式- 添加了代码编辑器的前端界面 - 新增了 QQ音乐文件解密工具的 UI 界面 - 添加了 C++ 解密库的框架
This commit is contained in:
49
src/main/Cpp/UnlockQQ/UnlockQQ.cpp
Normal file
49
src/main/Cpp/UnlockQQ/UnlockQQ.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
#include <iostream>
|
||||
#include <Windows.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
// DLL function declaration
|
||||
extern "C" __declspec(dllimport) void Execute(const wchar_t* src, const wchar_t* dst);
|
||||
|
||||
// Set console to UTF-8 mode
|
||||
void SetConsoleUTF8() {
|
||||
_setmode(_fileno(stdout), _O_U8TEXT);
|
||||
_setmode(_fileno(stderr), _O_U8TEXT);
|
||||
SetConsoleOutputCP(CP_UTF8);
|
||||
}
|
||||
|
||||
int wmain(int argc, wchar_t* argv[]) {
|
||||
// Initialize console encoding
|
||||
SetConsoleUTF8();
|
||||
|
||||
if (argc != 3) {
|
||||
std::wcerr << L"Usage: " << argv[0]
|
||||
<< L" <source_path> <destination_path>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Verify parameters
|
||||
std::wstring src(argv[1]);
|
||||
std::wstring dst(argv[2]);
|
||||
|
||||
try {
|
||||
// Debug output
|
||||
std::wcout << L"Processing file:\nSource: " << src
|
||||
<< L"\nDestination: " << dst << std::endl;
|
||||
|
||||
// Call DLL function
|
||||
Execute(src.c_str(), dst.c_str());
|
||||
|
||||
std::wcout << L"Operation completed successfully!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "Error: " << e.what() << std::endl;
|
||||
return 2;
|
||||
}
|
||||
catch (...) {
|
||||
std::cerr << "Unknown error occurred!" << std::endl;
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user