fix: use new method to do the convertion among UTF8, UTF16 and UTF32.

- use std::codevct as the convertion method among UTF8, UTF16 and UTF32.
- fix the issue that COM Guard was accidently dropped by compiler because no reference to it.
This commit is contained in:
2024-06-20 10:16:13 +08:00
parent 1fd132f0c9
commit 3fa05b43d9
5 changed files with 97 additions and 87 deletions

View File

@ -173,6 +173,9 @@ namespace YYCC::DialogHelper {
// prepare result variable
HRESULT hr;
// check whether COM environment has been initialized
if (!COMHelper::IsInitialized()) return false;
// create file dialog instance
// fetch dialog CLSID first
CLSID dialog_clsid;