473,386 Members | 1,598 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,386 software developers and data experts.

Windos XP/2000 reboot

Hello,
i have problem with rebooting windows
Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias
"InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage As
String, ByVal dwTimeout As Int32, ByVal bForceAppsClosed As Long, ByVal
bRebootAfterShutdown As Boolean) As Boolean

sub test
Systemshutdown = InitiateSystemShutdown(Nothing, "rebooting", 30, True,
True)

end sub

during runtme i have error :
A call to PInvoke function Form1::InitiateSystemShutdown' has unbalanced the
stack. This is likely because the managed PInvoke signature does not match
the unmanaged target signature. Check that the calling convention and
parameters of the PInvoke signature match the target unmanaged signature.

Can some one help me ?
Regards
Rudi
Feb 23 '06 #1
1 1359
<pa***@poczta.onet.pl> schrieb:
Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias
"InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage
As String, ByVal dwTimeout As Int32, ByVal bForceAppsClosed As Long, ByVal
bRebootAfterShutdown As Boolean) As Boolean


Your declaration is wrong. I suggest to use the code which can be found at
<URL:http://www.mentalis.org/soft/class.qpx?id=7>.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 24 '06 #2

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

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
3
by: chunman | last post by:
When I restart the machine, the sql 2000 database files become "Read-Only". In the Enterprise Manager this DB is marked as "suspect". After I remove "read only" attribute form the files, and...
1
by: Dinesh Garg | last post by:
Hi, I am facing one more problem. As soon as i started the sql server first time, my windows 2000 machine reboots and i was not able to start sql server again. I had to uninstall and install...
33
by: john bailo | last post by:
I just noticed something since i upgraded one of my two gateway celerons at work to rh9. with windos, if i press the on/off button, it goes into a windows shutdown. or, more likely, it locks up...
2
by: Madhava Patro | last post by:
Hi All, I have a requirement where i have to Shutdown Windows 2000 from a C# Application, my application is running as windows service. When I shutdown Windows it should not reboot again, It...
5
by: SARS | last post by:
Here's all the OSS Benchmarks run so far -- so far no Windos challengers... http://home.earthlink.net/~jabailo/OSS%20Benchmark.pdf The source is here: ...
1
by: Fred | last post by:
Hi. Is it safe to instll Access 2000 on a system that already has Windows XP and Office 2002 (Word, Excel Access, Powerpoint). Anyone done this? I would install it in a searate directory but...
19
by: Mark C. | last post by:
The company I work for has been running Access 2000 on a Windows NT server with Opportunistic Locking turned off on the server without issue for almost a year. We have just switched to a Windows...
0
by: Deano | last post by:
I know this is a long, long shot since I've never seen anyone else confess to owning this software but..... Does anyone know what the correct sequence is to get the MSI wizard functioning...
6
by: Steve Mauldin | last post by:
I have three websites that were developed by using the same code in .net. They are all located under wwwroot on my desktop running windows 2000 pro.because Windows 2000 pro only supports a single...
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:
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.