amolpg
August 23rd, 2004, 07:00 AM
Hi All,
Currently I am working on a WMI application. There I am using ConnectServer function from IWBEMLocator interface. This function does support timeout in Win2k.
So I am implementation my own timeout by using multiple threads. Documentation for CoInitialize says that I need to call it per thread.
In this particular thread all I am doing is calling ConnectServer & in the main thread I m calling WaitForSingleObject.
Do I really need to call CoInitialize in the ConnectServer thread? If yes then I won't be able to call CoUnitialize if this call times out.
Is there any other solution to handle this timeout?
thanks,
Amol
Currently I am working on a WMI application. There I am using ConnectServer function from IWBEMLocator interface. This function does support timeout in Win2k.
So I am implementation my own timeout by using multiple threads. Documentation for CoInitialize says that I need to call it per thread.
In this particular thread all I am doing is calling ConnectServer & in the main thread I m calling WaitForSingleObject.
Do I really need to call CoInitialize in the ConnectServer thread? If yes then I won't be able to call CoUnitialize if this call times out.
Is there any other solution to handle this timeout?
thanks,
Amol