Microsoft KB Archive/32264

= System Restart or Shutdown from Mac QuickBASIC Program =

Article ID: 32264

Article Last Modified on 11/21/2006



This article was previously published under Q32264



SUMMARY
The program below allows you to restart or shut down the Macintosh from within a QuickBASIC program. For the program to work, the System file must be Version 4.10 or later. (To obtain the version number, select the System file and choose Get Info from the File menu.)

Before executing the following portion of code, it is very important to be sure all files and resources have been closed. If files and resources are left open when the computer is restarted, the files may be corrupted. DIM restart%(2), ShutDown%(2) setarray restart%(0),&H3F3C,&H2,&HA895 setarray ShutDown%(0),&H3F3C,&H1,&HA895 input &quot;Enter 1 for Restartm 2 for Shut Down&quot;,i if i = 1 then rs = VARPTR(restart%(0)) : CALL rs if i = 2 then sd = VARPTR(ShutDown%(0))  : CALL sd

Additional query words: MQuickB

Keywords: KB32264

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.