Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. AddPrinterDriver returning ERROR_IO_PENDING, what should I do?

AddPrinterDriver returning ERROR_IO_PENDING, what should I do?

Scheduled Pinned Locked Moved C / C++ / MFC
helpdelphidebuggingquestion
3 Posts 3 Posters 0 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.
  • S Offline
    S Offline
    sashoalm
    wrote on last edited by
    #1

    bResult = AddPrinterDriver(NULL, 3, (LPBYTE) &di3);
    TRACE("%d", (int) GetLastError());
    if (!bResult)
    return FALSE;

    The call to AddPrinterDriver fails returning FALSE, and GetLastError() returns ERROR_IO_PENDING. The Error Lookup tool shows for this error "Overlapped I/O operation is in progress." What does this mean, and what should I do to work around this problem?

    There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

    C 1 Reply Last reply
    0
    • S sashoalm

      bResult = AddPrinterDriver(NULL, 3, (LPBYTE) &di3);
      TRACE("%d", (int) GetLastError());
      if (!bResult)
      return FALSE;

      The call to AddPrinterDriver fails returning FALSE, and GetLastError() returns ERROR_IO_PENDING. The Error Lookup tool shows for this error "Overlapped I/O operation is in progress." What does this mean, and what should I do to work around this problem?

      There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

      C Offline
      C Offline
      Code o mat
      wrote on last edited by
      #2

      If i check out the documentation of AddPrinterFriver[^], it doesn't mention anywhere that it sets the last error code in case of an error, are you sure you are not getting the error code of something called before AddPrinterDriver OR maybe something that was called inside AddPrinterDriver but doesn't really contain much of information about the problem?

      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <

      D 1 Reply Last reply
      0
      • C Code o mat

        If i check out the documentation of AddPrinterFriver[^], it doesn't mention anywhere that it sets the last error code in case of an error, are you sure you are not getting the error code of something called before AddPrinterDriver OR maybe something that was called inside AddPrinterDriver but doesn't really contain much of information about the problem?

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Strange, it used to say: If the function fails, the return value is zero. To get extended error information, call GetLastError().

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "Man who follows car will be exhausted." - Confucius

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups