Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. DeviceIoControl FSCTL_LOCK_VOLUME GetLastError=5
Forum Updated to NodeBB v4.3 + New Features

DeviceIoControl FSCTL_LOCK_VOLUME GetLastError=5

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 602 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lwei2
    wrote on last edited by
    #1
    This post is deleted!
    JonBJ 1 Reply Last reply
    0
    • L lwei2

      This post is deleted!

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @lwei2
      Since this is totally some Windows-specific low level question, I don't think a Qt forum is the best place for help.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lwei2
        wrote on last edited by
        #3

        Maybe, but I'm running as administrator and still can't lock the disk with the control code. The same code runs fine under MFC, but GetLastError() returns 5 under Qt. It seems that Qt is not that compatible with Windows.

        Chris KawaC 1 Reply Last reply
        0
        • L Offline
          L Offline
          lwei2
          wrote on last edited by
          #4

          If Qt forums weren't a place for technical exchange or discussion, I can't imagine finding out what the Qt forums are for!

          1 Reply Last reply
          0
          • L lwei2

            Maybe, but I'm running as administrator and still can't lock the disk with the control code. The same code runs fine under MFC, but GetLastError() returns 5 under Qt. It seems that Qt is not that compatible with Windows.

            Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @lwei2 said:

            It seems that Qt is not that compatible with Windows.

            What are you talking about? DeviceIoControl is a WinAPI function. It has nothing to do with either MFC or Qt, which are ui framework libraries. Neither of them have anything to do with what that function does or what error it returns. Qt is also not a compiler or a linker so it has no control over what privileges your executable requests from the OS.

            I can't imagine finding out what the Qt forums are for!

            The word Qt might give you a hint ;) Anyway - it's ok to ask non-Qt questions (preferably in non-Qt section of the forum), but low level WinAPI questions are probably better served elsewhere. You don't go to cooking forum to ask about cars. Sure there might be some overlap in those two communities but you'll have a better chance in the one dedicated to the topic you're interested in.

            1 Reply Last reply
            3

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved