473,383 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

InitiateSystemShutdownEx and Overlapped I/O operation

I have written a service in VB.NET which goes out and periodically
reboots servers on our network based on a set schedule. On occasion,
the API throws this error:

Overlapped I/O operation is in progress.

Which returns a 0 indicating an error and the remote server never
reboots. Sometimes when the tool runs it has no problems, other times
it does. At this point I am thinking that it is a problem with the
remote server which is a W2K machine. Not sure what it could be
though???

I am setting the the DLL call like this:

<DllImport("AdvAPI32.DLL", SetLastError:=True)> _
Public Shared Function InitiateSystemShutdownEx( _
ByVal lpMachineName As String, _
ByVal lpMessage As String, _
ByVal dwTimeout As Int32, _
ByVal bForceAppsClosed As Boolean, _
ByVal bRebootAfterShutdown As Boolean, _
ByVal dwReason As UInt32) As Boolean
End Function

Here is the function call:

Dim InitShutdown As Integer = InitiateSystemShutdownEx( _
_MacName, _
_Message, _
Int32.Parse(_DispMessageTime), _
_ForceClose, _
_BootAfterShutdown, _

Convert.ToUInt32(ReasonMinor.SHTDN_REASON_MINOR_MA INTENANCE))

Any ideas what may cause this?? Could not find much info on this
error...
Nov 21 '05 #1
0 1777

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Michelle Kinsey-Clinton | last post by:
Hello, I am writing an ASP app which is giving me some very frustrating errors. They appear intermittently, no real pattern to them, and often go away if you reload, or back up a few pages and...
3
by: AmyAdmin | last post by:
I am running windows 2000 with IIS 5.0 and I have ASP and .NET apps running on that server, and I've been getting the error message in my event viewer: DCom got error "Overlapped I/O operation is...
1
by: Lewap | last post by:
Hi! I have a problem: Function CreateNamedPipe (a piece of source below) called in a NT service I get an error 997 - Overlapped I/O operation is in progress. When I run the same code as...
1
by: donna rigas | last post by:
Hi - I'm using overlapped i/o on Windows 98 and on XP and am getting different results. Here's the code snippet: // read the command id and the message length BOOL rc;...
2
by: CeZaR | last post by:
Hi, What does the "overlapped" word means in windows programming? I've read about overlapped structures, functions?! What does it mean? Thanks!
4
by: Afterburn | last post by:
Hi, Has anyone ever experienced this error occuring when trying to call AddPrinterConnection() from VC6. This is a microsoft defined method call. I have been able to reproduce it on a windows200...
1
by: man-ab | last post by:
Hello In a W2000 server, we have the message: "Overlapped I/O operation is in progress. (997)" We are using SLNet telnet server, with PIPE. The application is VC++. The code to inicialize...
1
by: dvestal | last post by:
I'm trying to use Overlapped I/O from C#, and utterly failing. I've tried to boil down my code to as simple an example as possible, in hopes that you people can point to where I'm going wrong. ...
7
by: =?Utf-8?B?TmljayBCdXJraXR0?= | last post by:
Hi. I have a C# app that uses named pipes via InteropServices. I have no problems running on a 32-bit machine, or when targeting x86 architecture, but it fails on a 64-bit machine when...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.