1
0

doc: add doc for 2 win chapters and fix typo in windows dialog

This commit is contained in:
2026-01-12 17:13:16 +08:00
parent c708e1e672
commit 2b6ac98f27
7 changed files with 90 additions and 98 deletions

31
doc/src/windows/com.dox Normal file
View File

@@ -0,0 +1,31 @@
namespace yycc::windows::com {
/**
\page windows__com COM Helper
This namespace is Windows specific.
It will be invisible on other platforms.
\section windows__com__memory_safe_ptr Memory Safe Pointer Types
This namespace provides various memory-safe types for interacting with COM functions.
Although Microsoft also has similar smart pointer called \c CComPtr.
But this library is eager to hide all Microsoft-related functions calling.
Using \c CComPtr is not corresponding with the philosophy of this library.
So these standard library based smart pointer and corresponding deleter types were created.
\section windows__com__com_guard COM Guard
This namespace contains a COM Guard which make sure COM was initialized in current module when loading current module.
It is essential because all calling to COM functions should be under the premise that COM has been initialized.
This guard also will uninitialize COM when unloading this module.
There is only an exposed function called is_initialized() for user calling.
This function will check whether COM environment is initialized.
If you want YYCC automatically initialize COM environment for you,
you must call this function in your program at least one time.
Otherwise COM Guard code may be unavailable,
because compiler may think these code is not referenced by any other code and drop them.
*/
}