General information
Category:
Windows API functions
>>Hi Scott!
>>
>>Instead of ExitwindowEx function you should use InitiateSystemShutdown
>>function (the prototype shown below):
>>
>>BOOL InitiateSystemShutdown(
>> LPTSTR lpMachineName, // address of name of computer to shut down
>> LPTSTR lpMessage, // address of message to display in dialog box
>> DWORD dwTimeout, // time to display dialog box
>> BOOL bForceAppsClosed, // force applications with unsaved changes flag
>> BOOL bRebootAfterShutdown // reboot flag
>> );
>>
>>
>>>I'm trying to implement a full NT 4.0 shutdown from a Vis. Fox 5.0
>>>App. I've found info on DECLAREing the ExitWindowsEx function and
>>>according to the WINUSER.H file, by passing a 2 to the function
>>>should signal a system shutdown. Instead it only cycles to the login
>>>screen (Press Ctrl+ALt+Del to Login)
>>>
>>>Am I missing something?
>>>
>>>Scott O'Donnell
>>>scotto@iworksys.com
>
>I hope this isn't to much to ask, I've just started using the API functions
>under VFP and don't know it too well yet. I've tried this, but it doesn't work
>Am I not mapping types correctly?
>
>Declare integer InitiateSystemShutdown in win32api as DownIt STRING,STRING,Long,INTeger ,INTeger
Always pass strings as reference:
Declare integer InitiateSystemShutdown in win32api as DownIt;
STRING @, STRING @, INTEGER, INTEGER, INTEGER
>Does the STRING Keyword map back to LPTSTR?
Yes, but you must pass it by reference (also, declare it as passed by reference).
>Does INTEGER Keyword Map back to BOOL?
Yes.
Vlad
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only