Update windows-rs dependency (#726)
This commit is contained in:
parent
56f54cb0b3
commit
7776c6634a
5 changed files with 41 additions and 70 deletions
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
use super::IoError;
|
||||
use std::marker::PhantomData;
|
||||
use std::ptr;
|
||||
|
||||
use windows::Win32::Foundation::RPC_E_CHANGED_MODE;
|
||||
use windows::Win32::System::Com::{CoInitializeEx, CoUninitialize, COINIT_APARTMENTTHREADED};
|
||||
|
|
@ -15,7 +14,7 @@ thread_local!(static COM_INITIALIZED: ComInitialized = {
|
|||
// This call can fail with RPC_E_CHANGED_MODE if another library initialized COM with MTA.
|
||||
// That's OK though since COM ensures thread-safety/compatibility through marshalling when
|
||||
// necessary.
|
||||
let result = CoInitializeEx(ptr::null_mut(), COINIT_APARTMENTTHREADED);
|
||||
let result = CoInitializeEx(None, COINIT_APARTMENTTHREADED);
|
||||
match result.clone().map_err(|e| e.code()) {
|
||||
Ok(_) |
|
||||
Err(RPC_E_CHANGED_MODE) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue