Taptiive / machineid-rs

Create a unique MachineID/HWID/UUID with customizable options, like .Net DeviceId
61 stars 26 forks source link

Maybe Need Closes the WIN32 COM library After Leave Scope #25

Open x-falcon opened 9 months ago

x-falcon commented 9 months ago

Maybe Need Closes the WIN32 COM library After Leave Scope this may cause other create unable to initialize WIN32 COM library

   unsafe {
      CoUninitialize();
      OleUninitialize();
  }
wjx commented 2 months ago

Hi,

I encountered an issue that I believe is caused by this problem:

OleInitialize failed: result was RPC_E_CHANGED_MODE. Make sure other crates are not using the multithreaded COM library on the same thread.

Could you suggest where the above-mentioned close operations should be placed to solve this?

Taptiive commented 1 month ago

Mmm this seems to be quite an important bug. Do you have any code where this can be reproduced?