Results 1 to 20 of 20

Thread: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???

    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

    If i use windows.h. It will not run on the linux machine.
    Correct. This means that you need to use something like:
    Qt Code:
    1. #ifdef _WIN_32_
    2. #include "my_bus_type_win.h"
    3. #else
    4. #include "my_bus_type_lin.h"
    5. #endif
    To copy to clipboard, switch view to plain text mode 
    or something similiar to distinguish between different operating systems you want to support.
    Again - you need to implement this on your own. No Qt.

  3. #3
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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.

  4. #4
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

  5. #5
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default 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???

  6. #6
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???

    Quote Originally Posted by Gokulnathvc View Post
    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.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to Find the Bus Type in QT? Using STORAGE_ADAPTER_DESCRIPTOR???

    I'm closing the topic, we're not getting anywhere here.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 7
    Last Post: 19th April 2011, 12:20
  2. Replies: 2
    Last Post: 22nd December 2009, 20:52
  3. Replies: 17
    Last Post: 31st March 2006, 05:57
  4. Type and User Type
    By campana in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2006, 23:22

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.