CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2004
    Posts
    391

    what does ERROR_IO_PENDING means?

    I get this error a lot while trying to start and stop a windows service.

    What does this mean and how to prevent it?

    This error is in system error codes on msdn with error code 997

  2. #2
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: what does ERROR_IO_PENDING means?

    Well..which function does return this error?

  3. #3
    Join Date
    Dec 2002
    Location
    Candia, NH
    Posts
    374

    Re: what does ERROR_IO_PENDING means?

    It often means that an overlapped write or read operation has not completed. It is usually not an error per se when you are using asynchronous reads and writes of files (or in my case serial ports). It simply means that the WriteFile or ReadFile has been called and the operation returns without finishing the task. That is what you want; the task goes on in the background while you do something else. When the operation is completed a WaitOnXXXEvent() type function is called and then you do whatever needs to be done.

  4. #4
    Join Date
    Aug 2004
    Posts
    391

    Re: what does ERROR_IO_PENDING means?

    The functions returning this are
    ::StartService and ::StopService in services API.

    I try to dc all conenctions from a DB before restoring. One of these conenctions is a custom service. So whever i try to stop it and start it I get this error.

    Also When i try to schedule automatic backups, i check wether SQl Server Agent is running or not. If not is start it. I get this when starting SQL Server Agent too.

    Is there a way I can prevent this error or atleast wait till the service in question is finished doing what it is doing(unless it's forever );

    What I don't understand is why will starting a service will be a problem, sicne it's stopped so there should be no IO concerning it?

    Thanks for your answers

  5. #5
    Join Date
    Dec 2002
    Location
    Candia, NH
    Posts
    374

    Re: what does ERROR_IO_PENDING means?

    I can't help you there; I only know what the error is from my own experiences with programming overlapped I/O. I have never even heard of the items you are talking about. Maybe you should show some code (if you are coding). Without any code, there is no way (I) can say anything.

    Brian

  6. #6
    Join Date
    Aug 2004
    Posts
    391

    Re: what does ERROR_IO_PENDING means?

    It's like this in simple terms.

    There is a windows service called SQL Server Agent.

    What I am trying to do is before I do whatever I do I want to make sure this service is running. I check if it's running. If it's not I configure it using
    ChangeServiceConfig function in windows services api to start in automatic mode.

    Everything goes fine to thsi point.

    Then i start the service by using StartService function in same API.

    But it returns often that the error overlapped io in progress ( description for code ERROR_IO_PENDING).

    I think I migth ahve solved the problem though. I will get back with code if it still persists with the error.

    Thanks for your help.

  7. #7
    Join Date
    Aug 2005
    Posts
    5

    Re: what does ERROR_IO_PENDING means?

    I'm having a problem where NetShareAddEx returns 5 (Access Denied) and GetLastError returns
    ERROR_IO_PENDING.

    Now what does that mean? Is it really an access denied problem or is there some other operation pending? (This isn't happening on my computer, so it's not easy for me to debug...)

    Thanks!
    __________________________________________
    Boilerplate texts in Outlook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured