网站导航网学 原创论文 原创专题 网站设计 最新系统 原创论文 论文降重 发表论文 论文发表 UI设计定制 论文答辩PPT格式排版 期刊发表 论文专题
返回网学首页
网学原创论文
最新论文 推荐专题 热门论文 论文专题
当前位置: 网学 > 设计资源 > 实用代码片段 > 正文

收藏的一些实用代码

论文降重修改服务、格式排版等 获取论文 论文降重及排版 论文发表 相关服务
splays a window in its most recent size and position. The

  active window remains active.

  5 Activates the window and displays it in its current size and

  position.

  6 Minimizes the specified window and activates the next top-level

  window in the Z order.

  7 Displays the window as a minimized window. The active window

  remains active.

  8 Displays the window in its current state. The active window

  remains active.

  9 Activates and displays the window. If the window is minimized or

  maximized, the system restores it to its original size and position. An

  application should specify this flag when restoring a minimized window.

  10 Sets the show state based on the state of the program that

  started the application.

  关机,支持2000,xp

  [PB external function declaration]

  FUNCTION boolean ExitWindowsEx(ulong uFlags, long dwReserved ) &

  LIBRARY 'user32.dll'

  [Powerscript]

  ulong EWX_LOGOFF = 0

  ulong EWX_SHUTDOWN = 1

  ulong EWX_REBOOT = 2

  ExitWindows(EWX_REBOOT, 0)

  NOTE: While you can shutdown from an application in Win95, you can't with WinNT. You need to call first the AdjustTokenPrivileges API function to grant the current process to right to shutdown the workstation. [structure definitions]

  luid

  unsignedlong lowpart

  long highpart

  luid_and_attributes

  luid pluid

  long attributes

  token_privileges

  long privilegecount

  luid_and_attributes privileges

  [functions declaration]

  Function long OpenProcessToken

  (long ProcessHandle, long DesiredAccess, ref long TokenHandle) Library "ADVAPI32.DLL"

  Function long GetCurrentProcess () Library "kernel32"

  Function long LookupPrivilegevalue

  (string lpSystemName, string lpName, ref LUID lpLUID)

  Library "ADVAPI32.DLL" Alias for "LookupPrivilegevalueA"

  Function long AdjustTokenPrivileges

  (long TokenHandle, long DisableAllPrivileges, ref TOKEN_PRIVILEGES newstate, long BufferLength, ref TOKEN_PRIVILEGES PreviousState, ref long ReturnLength)

  Library "ADVAPI32.DLL"

  Function long CloseHandle (long hObject) Library "kernel32"

  FUNCTION long ExitWindowsEx(uint Flags, long dwReserved)

  LIBRARY "User32.dll"

  [Powerscript]

  Constant string SE_SHUTDOWN_NAME = "SeShutdownPrivilege"

  Constant long SE_PRIVILEGE_ENABLED = 2

  Constant long TOKEN_ADJUST_PRIVILEGES = 32

  Constant long TOKEN_QUERY = 8

  CONSTANT long TokenDefaultDacl = 6

  CONSTANT long TokenGroups = 2

  CONSTANT long TokenImpersonationLevel = 9

  CONSTANT long TokenOwner = 4

  CONSTANT long TokenPrimaryGroup = 5

  CONSTANT long TokenPrivileges = 3

  CONSTANT long TokenSource = 7

  CONSTANT long TokenStatistics = 10

  CONSTANT long TokenType = 8

  CONSTANT long TokenUser = 1

  CONSTANT INTEGER EWX_LOGOFF = 0

  CONSTANT INTEGER EWX_SHUTDOW

设为首页 | 加入收藏 | 网学首页 | 原创论文 | 计算机原创
版权所有 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2020 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号 常年法律顾问:王律师