Using Win32 functions in Visual FoxPro Image Gallery
Authorization
AdjustTokenPrivileges
GetTokenInformation
LookupPrivilegeDisplayName
LookupPrivilegeName
LookupPrivilegeValue
OpenProcessToken
Code examples:
How to enable the SE_SHUTDOWN_NAME privilege for the application
Reading and setting system access privileges for the current process
How to enable the SE_SHUTDOWN_NAME privilege for the application

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Before you begin:
To shut down or to reboot the system (API calls ExitWindowsEx, InitiateShutdown and others) the process must have the SE_SHUTDOWN_NAME privilege (default behaviour on Vista).



See also:
  • How to initiate System shutdown
  • Closing Windows
  • Using the RestartDialog function
  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    3537 bytes  
    Created: 2009-02-02 13:52:02  
    Modified: 2009-02-03 11:15:14  
    Visits in 7 days: 139  
    Listed functions:
    AdjustTokenPrivileges
    CloseHandle
    ExitWindowsEx
    GetCurrentProcess
    GetLastError
    LookupPrivilegeValue
    OpenProcessToken
    Printer friendly API declarations
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.


    Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

    Privacy policy
    Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.242.188.217)
    2.93 hrs.Example: 'Reading Internet Query options'
    4.83 hrs.Function: 'GetIpNetTable'
    Function group: 'IP Helper'
    5.24 hrs.Example: 'Mapping and disconnecting network drives'
     Example: 'How to print FoxPro form'
    5.35 hrs.Example: 'Storing screen shot of a form to bitmap file'
    5.36 hrs.Function: 'GetModuleFileName'
    7.01 hrs.Example: 'Displaying standard progress dialog box when copying files'
     Example: 'Printing Image File, programmatically set print page orientation to landscape'
    8.65 hrs.Function: 'MAPIFindNext'
    Function group: 'Simple MAPI'
    13.75 hrs.Example: 'Configuring DEVMODE structure for a printer'
    Google
    Advertise here!