refactor: move COM type and guard into independent file

- move COM types and guard into independent file and namespace COMHelper because not only dialog, but also other parts also need to use COM related fucntion.
- remove ParserHelper.cpp because it is empty (ParserHelper is header only namespace).
- Add a function fetching LOCALAPPDATA in WinFctHelper.
This commit is contained in:
2024-06-17 12:46:32 +08:00
parent 8465d80a54
commit e20c03a5f1
9 changed files with 153 additions and 85 deletions

View File

@ -217,6 +217,16 @@ namespace YYCCTestbench {
}
}
static void ExceptionTestbench() {
YYCC::ExceptionHelper::Register();
// Perform a div zero exception.
int i = 1, j = 0;
int k = i / j;
YYCC::ExceptionHelper::Unregister();
}
static void WinFctTestbench() {
Console::FormatLine("Current Module HANDLE: 0x%" PRI_XPTR_LEFT_PADDING PRIXPTR, YYCC::WinFctHelper::GetCurrentModule());
@ -256,6 +266,7 @@ int main(int argc, char** args) {
//YYCCTestbench::StringTestbench();
//YYCCTestbench::ParserTestbench();
//YYCCTestbench::DialogTestbench();
//YYCCTestbench::ExceptionTestbench();
//YYCCTestbench::WinFctTestbench();
YYCCTestbench::FsPathPatch();
//YYCCTestbench::FsPathPatch();
}