|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Windos XP/2000 rebooti 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 <pa***@poczta.onet.pl> schrieb:
> Declare Function InitiateSystemShutdown Lib "advapi32.dll" Alias Your declaration is wrong. I suggest to use the code which can be found at > "InitiateSystemShutdownA" (ByVal lpMachineName As String, ByVal lpMessage > As String, ByVal dwTimeout As Int32, ByVal bForceAppsClosed As Long, ByVal > bRebootAfterShutdown As Boolean) As Boolean <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/>
Does this look good?
Destroying objects. Run a Citrix App Silent install needed for Visual Basic Express Simple question - Datagrid - how to detect change in a row cell? Install ADO Problem Instance a class at runtime UML tool for vb.net get ip address of NIC Capture username of who is connecting to my machine |
|||||||||||||||||||||||