I'm using rust for windows to use the win32 API.
However, I need to initialize com library to use some windows APIs, but I cannot find some classes ID (CLSID), to create an instance.
I need to find the Speech ISpVoice CLSID to use in my instance creation.
CLSID_SpVoice
is the CLSID.
Also, I cannot find some macros like "FAILED", and "SUCCEEDED".
If anyone can direct me, that would be appreciated!
Also, if there's any error in my code, please highlight it me.
Code:
use windows::Win32::System::Com::{CoInitializeEx, CoCreateInstance};
use windows::Win32::System::{Com, Ole};
use windows::core::{ HRESULT, Error };
use windows::Win32::Media::Speech::ISpVoice;
fn main() {
let speaker: ISpVoice;
unsafe {
if CoInitializeEx(std::ptr::null(), Com::COINIT_MULTITHREADED) ==Result::Ok(()) {
let hr: HRESULT = CoCreateInstance(, punkouter, dwclscontext)
}
}
}
If anything is unclear, please let me know!