teleplayr
December 11th, 2003, 10:49 AM
Hello all. I was noticing my app loading very, very slowly, and decided to profile it. It turns out the function that I use to log display device capabilities was taking 15.xx seconds to complete.
When I commented out the GetDeviceIdentifier line, the function time went under 1 second.
Any ideas what could cause GetDeviceIdentifier to take 14 seconds to return?
Here's the code:
HRESULT hr;
DDDEVICEIDENTIFIER2 di;
ZeroMemory(&di, sizeof (DDDEVICEIDENTIFIER2);
// The following line takes up to 14 seconds to return.
hr = lpdd->GetDeviceIdentifier(&di, 0);
if (FAILED(hr))
{
// error handling
}
Thanks,
-Joe
When I commented out the GetDeviceIdentifier line, the function time went under 1 second.
Any ideas what could cause GetDeviceIdentifier to take 14 seconds to return?
Here's the code:
HRESULT hr;
DDDEVICEIDENTIFIER2 di;
ZeroMemory(&di, sizeof (DDDEVICEIDENTIFIER2);
// The following line takes up to 14 seconds to return.
hr = lpdd->GetDeviceIdentifier(&di, 0);
if (FAILED(hr))
{
// error handling
}
Thanks,
-Joe