Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


CheckInterfaceSupport Method


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Queequeg   Members   -  Reputation: 139

Like
0Likes
Like

Posted 24 October 2012 - 11:49 PM

Regarding the CheckInterfaceSupport Method:

The following code tells me that my driver version is 2251872828981390, yet when I check dxdiag it claims a driver version of 8.17.13.142. I am not quite sure what is wrong and would be most appreciative of any guidance.

IDXGIAdapter* test_dxgiAdapter = 0;
int num_adapters = 0;
LARGE_INTEGER lrg_int;
while ( dxgiFactory->EnumAdapters(num_adapters,&test_dxgiAdapter) != DXGI_ERROR_NOT_FOUND) {
  HR(test_dxgiAdapter->CheckInterfaceSupport( __uuidof(ID3D10Device),&lrg_int));
  num_adapters++;
}
std::wostringstream outs; 
outs << L"Your computer has " << num_adapters << L" display adapter(s). D3D driver version is " << lrg_int.QuadPart << L".";
MessageBox(0, outs.str().c_str(), 0, 0);

(HR macro is just checking for a failed HRESULT)

Sponsor:

#2 adeyblue   Members   -  Reputation: 518

Like
1Likes
Like

Posted 25 October 2012 - 09:53 AM

There's nothing wrong really. If you convert that number to hex you get:

0x80011000D008E
..8|17| 13| 142


it's just packed into word sized values with the larger value. You can get the individual parts using the high and low parts of the large_integer with the word extraction macros:
std::wostringstream outs;
outs << L"Your computer has " << num_adapters << L" display adapter(s). D3D driver version is " <<
	HIWORD(lrg_int.HighPart) << L'.' <<
	LOWORD(lrg_int.HighPart) << L'.' <<
	HIWORD(lrg_int.LowPart) << L'.' <<
	LOWORD(lrg_int.LowPart);
It would be nice if the CheckInterfaceSupport help page documented this, but maybe it's dependent on what the driver vendor provides so there's no set format for it.

#3 Queequeg   Members   -  Reputation: 139

Like
0Likes
Like

Posted 25 October 2012 - 11:26 AM

Thanks for your help!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS