How to find the bus type in QT??
How to find the bus type in QT?? ATA or SATA.. Pls pls pls help me..
How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
This is a very platform specific task.
Qt doesn't help you in this situation.
You must use plaftform API (better if enclosed in #ifdef code)
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
Any other way to find the type of bus using QT..
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
Quote:
Originally Posted by
Gokulnathvc
Any other way to find the type of bus using QT..
Yes. Qt is open-source so you can implement that functionality into Qt and then use it.
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
Quote:
Originally Posted by
Gokulnathvc
Any other way to find the type of bus using
QT..
No, Qt does not support this. You must use platform specific API as already stated.
EDIT: Or you can do as Wysota says, I'm sure people will be greatful if you manage to get your changes into the trunk.
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
Actually I am building it to support all platforms. If i use windows.h. It will not run on the linux machine.. So It should use the QT functionalities to perform this. Any help to find the bus type.
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
Quote:
So It should use the QT functionalities to perform this. Any help to find the bus type.
As you can find in previous answers, there is no way to do that using current version of Qt. You need to use platform-specific methods, which means -
NO WAY TO FIND THE BUS TYPE IN QT, USE PLATFORM SPECIFIC API TO DO THIS
Quote:
If i use windows.h. It will not run on the linux machine.
Correct. This means that you need to use something like:
Code:
#ifdef _WIN_32_
#include "my_bus_type_win.h"
#else
#include "my_bus_type_lin.h"
#endif
or something similiar to distinguish between different operating systems you want to support.
Again - you need to implement this on your own. No Qt.
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
the STORAGE_ADAPTER_DESCRIPTOR contains the bus type that can be used to find the bus type. That is present in the ntdddisk.h . but it returns some garbage values
for the bus type variable.
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
and? How is this Qt related? ntdddisk.h is part of Win32 API, not Qt.
Re: How to find the bus type in QT??
Do anybody there to help me??
Re: How to find the bus type in QT??
Please stop asking the same questions again and again.
Here several people told you that this is not possible with Qt.
Re: How to find the bus type in QT??
On Linux you can test like this:
Code:
lspci | grep SATA
lspci | grep IDE
The second command will also show SATA-controllers shown by the first command, but it's easy to filter it out.
You have to be root for this to work.
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
Is there any way to get it from the system information about the bus type in QT???
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
Quote:
Originally Posted by
Gokulnathvc
Is there any way to get it from the system information about the bus type in QT???
For the fourth time - no, there is not.
Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???
I'm closing the topic, we're not getting anywhere here.
Finding the bus type in QT?
Am using the following code::: to find the bus type.. but nothing works
please help me to fix this..
Code:
unsigned long ReturnLen;
STORAGE_ADAPTER_DESCRIPTOR AdapDesc;
PSTORAGE_ADAPTER_DESCRIPTOR pAdapDesc;
STORAGE_PROPERTY_QUERY Query; // input param for query
Query.PropertyId = StorageAdapterProperty ;
Query.QueryType = PropertyStandardQuery;
pAdapDesc = &AdapDesc;
pAdapDesc->Size = sizeof(STORAGE_ADAPTER_DESCRIPTOR);
// Query using IOCTL_STORAGE_QUERY_PROPERTY
if (!DeviceIoControl( m_hDev,
IOCTL_STORAGE_QUERY_PROPERTY,
&Query,
sizeof(STORAGE_PROPERTY_QUERY),
pAdapDesc,
pAdapDesc->Size*2,
&ReturnLen,
(LPOVERLAPPED)NULL))
{
pLogFile.LogFileWrite((const char *)"SATA/SCSI Interface Determination ERROR Returning 0\r\n");
return 0;
}
if((pAdapDesc->BusType == BusTypeAta) || (pAdapDesc->BusType == 3) || (pAdapDesc->BusType == 11))
return 2;
else if((pAdapDesc->BusType == BusTypeScsi) || (pAdapDesc->BusType == 10))
return 1;
}
Re: Finding the bus type in QT?
Your code doesn't make sense.
Secondly, how is this anything to do with Qt?
Re: Finding the bus type in QT?
I want to find the bus type whether it is ATA or SCSI.. How to find that in QT???
Re: Finding the bus type in QT?
Threads merged and moved to the appropriate forum.