pywin32记录备忘
项目地址:http://sourceforge.net/projects/pywin32/
文档地址:http://docs.activestate.com/activepython/2.7/pywin32/win32api.html
- 安装
下载系统对应的版本,全部next即可,无他。 - 常用功能
刚开始接触pywin32是为了批量复制覆盖文件夹,后在下载安装失败了,放弃使用pywin32。最近又看到,所以做了记录以备后用。
Module win32api
A module, encapsulating the Windows Win32 API.
Methods
- AbortSystemShutdown
- Aborts a system shutdown
- InitiateSystemShutdown
- Initiates a shutdown and optional restart of the specified computer.
- Apply
- Calls a Python function, but traps Win32 exceptions.
- Beep
- Generates a simple tone on the speaker.
- BeginUpdateResource
- Begins an update cycle for a PE file.
- ChangeDisplaySettings
- Changes video mode for default display
- ChangeDisplaySettingsEx
- Changes video mode for specified display
- ClipCursor
- Confines the cursor to a rectangular area on the screen.
- CloseHandle
- Closes an open handle.
- CopyFile
- Copy a file.
- DebugBreak
- Breaks into the C debugger.
- DeleteFile
- Deletes the specified file.
- DragQueryFile
- Retrieve the file names for dropped files.
- DragFinish
- Free memory associated with dropped files.
- DuplicateHandle
- Duplicates a handle.
- EndUpdateResource
- Ends a resource update cycle of a PE file.
- EnumDisplayDevices
- Obtain information about the display devices in a system
- EnumDisplayMonitors
- Lists monitors for a device context
- EnumDisplaySettings
- Lists available modes for specified device
- EnumDisplaySettingsEx
- Lists available modes for a display device, with optional flags
- EnumResourceLanguages
- List languages for specified resource
- EnumResourceNames
- Enumerates all the resources of the specified type from the nominated file.
- EnumResourceTypes
- Return list of all resource types contained in module
- ExpandEnvironmentStrings
- Expands environment-variable strings and replaces them with their defined values.
- ExitWindows
- Logs off the current user
- ExitWindowsEx
- either logs off the current user, shuts down the system, or shuts down and restarts the system.
- FindFiles
- Find files matching a file spec.
- FindFirstChangeNotification
- Creates a change notification handle and sets up initial change notification filter conditions.
- FindNextChangeNotification
- Requests that the operating system signal a change notification handle the next time it detects an appropriate change.
- FindCloseChangeNotification
- Closes the change notification handle.
- FindExecutable
- Find an executable associated with a document.
- FormatMessage
- Return an error message string.
- FormatMessageW
- Return an error message string (as a Unicode object).
- FreeLibrary
- Decrements the reference count of the loaded dynamic-link library (DLL) module.
- GenerateConsoleCtrlEvent
- Send a specified signal to a console process group that shares the console associated with the calling process.
- GetAsyncKeyState
- Retrieves the asynch state of a virtual key code.
- GetCommandLine
- Return the application's command line.
- GetComputerName
- Returns the local computer name
- GetComputerNameEx
- Retrieves a NetBIOS or DNS name associated with the local computer
- GetComputerObjectName
- Retrieves the local computer's name in a specified format
- GetMonitorInfo
- Retrieves information for a monitor by handle
- GetUserName
- Returns the current user name.
- GetUserNameEx
- Returns the current user name in format specified by Name* constants
- GetCursorPos
- Returns the position of the cursor, in screen co-ordinates.
- GetCurrentThread
- Returns a pseudohandle for the current thread.
- GetCurrentThreadId
- Returns the thread ID for the current thread.
- GetCurrentProcessId
- Returns the thread ID for the current thread.
- GetCurrentProcess
- Returns a pseudohandle for the current process.
- GetConsoleTitle
- Return the application's console title.
- GetDateFormat
- Formats a date as a date string for a specified locale.
- GetDiskFreeSpace
- Retrieves information about a disk.
- GetDiskFreeSpaceEx
- Retrieves information about a disk.
- GetDllDirectory
- Retrieves the DLL search path
- GetDomainName
- Returns the current domain name
- GetEnvironmentVariable
- Retrieves the value of an environment variable.
- GetFileAttributes
- Retrieves the attributes for the named file.
- GetFileVersionInfo
- Retrieves string version info
- GetFocus
- Retrieves the handle of the keyboard focus window associated with the thread that called the method.
- GetFullPathName
- Returns the full path of a (possibly relative) path
- GetHandleInformation
- Retrieves a handle's flags.
- GetKeyboardLayout
- Retrieves the active input locale identifier
- GetKeyboardLayoutList
- Returns a sequence of all locale ids in the system
- GetKeyboardLayoutName
- Retrieves the name of the active input locale identifier (formerly called the keyboard layout).
- GetKeyboardState
- Retrieves the status of the 256 virtual keys on the keyboard.
- GetKeyState
- Retrives the last known key state for a key.
- GetLastError
- Retrieves the last error code known by the system.
- GetLastInputInfo
- Returns time of last input event in tick count
- GetLocalTime
- Returns the current local time.
- GetLongPathName
- Converts the specified path to its long form.
- GetLongPathNameW
- Converts the specified path to its long form.
- GetLogicalDrives
- Returns a bitmask representing the currently available disk drives.
- GetLogicalDriveStrings
- Returns a list of strings for all the drives.
- GetModuleFileName
- Retrieves the filename of the specified module.
- GetModuleFileNameW
- Retrieves the unicode filename of the specified module.
- GetModuleHandle
- Returns the handle of an already loaded DLL.
- GetPwrCapabilities
- Retrieves system's power capabilities
- GetProfileSection
- Returns a list of entries in an INI file.
- GetProcAddress
- Returns the address of the specified exported dynamic-link library (DLL) function.
- GetProfileVal
- Returns a value from an INI file.
- GetShortPathName
- Returns the 8.3 version of a pathname.
- GetStdHandle
- Returns a handle for the standard input, standard output, or standard error device
- GetSysColor
- Returns the system colors.
- GetSystemDefaultLangID
- Retrieves the system default language identifier.
- GetSystemDefaultLCID
- Retrieves the system default locale identifier.
- GetSystemDirectory
- Returns the Windows system directory.
- GetSystemFileCacheSize
- Returns the amount of memory reserved for file cache
- SetSystemFileCacheSize
- Sets the amount of memory reserved for file cache
- GetSystemInfo
- Retrieves information about the current system.
- GetNativeSystemInfo
- Retrieves information about the current system for a Wow64 process.
- GetSystemMetrics
- Returns the specified system metrics.
- GetSystemTime
- Returns the current system time.
- GetTempFileName
- Creates a temporary file.
- GetTempPath
- Returns the path designated as holding temporary files.
- GetThreadLocale
- Returns the current thread's locale.
- GetTickCount
- Returns the milliseconds since windows started.
- GetTimeFormat
- Formats a time as a time string for a specified locale.
- GetTimeZoneInformation
- Returns the system time-zone information.
- GetVersion
- Returns Windows version information.
- GetVersionEx
- Returns Windows version information as a tuple.
- GetVolumeInformation
- Returns information about a volume and file system attached to the system.
- GetWindowsDirectory
- Returns the windows directory.
- GetWindowLong
- Retrieves a long value at the specified offset into the extra window memory of the given window.
- GetUserDefaultLangID
- Retrieves the user default language identifier.
- GetUserDefaultLCID
- Retrieves the user default locale identifier.
- GlobalMemoryStatus
- Returns systemwide memory usage
- GlobalMemoryStatusEx
- Returns physical and virtual memory usage
- keybd_event
- Simulate a keyboard event
- mouse_event
- Simulate a mouse event
- LoadCursor
- Loads a cursor.
- LoadKeyboardLayout
- Loads a new locale id
- LoadLibrary
- Loads the specified DLL, and returns the handle.
- LoadLibraryEx
- Loads the specified DLL, and returns the handle.
- LoadResource
- Finds and loads a resource from a PE file.
- LoadString
- Loads a string from a resource file.
- MapVirtualKeyEx
- Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code.
- MessageBeep
- Plays a predefined waveform sound.
- MessageBox
- Display a message box.
- MonitorFromPoint
- Finds monitor that contains a point
- MonitorFromRect
- Finds monitor that has largest intersection with a rectangle
- MonitorFromWindow
- Finds monitor that contains a window
- MoveFile
- Moves or renames a file.
- MoveFileEx
- Moves or renames a file.
- OpenProcess
- Retrieves a handle to an existing process.
- OutputDebugString
- Writes output to the Windows debugger.
- PostMessage
- Post a message to a window.
- PostQuitMessage
- Posts a quit message.
- PostThreadMessage
- Post a message to a thread.
- RegCloseKey
- Closes a registry key.
- RegConnectRegistry
- Establishes a connection to a predefined registry handle on another computer.
- RegCopyTree
- Copies an entire registry key to another location
- RegCreateKey
- Creates the specified key, or opens the key if it already exists.
- RegCreateKeyEx
- Extended version of RegCreateKey
- RegDeleteKey
- Deletes the specified key.
- RegDeleteKeyEx
- Deletes a registry key from 32 or 64 bit registry view
- RegDeleteTree
- Recursively deletes a key's subkeys and values
- RegDeleteValue
- Removes a named value from the specified registry key.
- RegEnumKey
- Enumerates subkeys of the specified open registry key.
- RegEnumKeyEx
- Enumerates subkeys of the specified open registry key.
- RegEnumKeyExW
- Unicode version of RegEnumKeyEx
- RegEnumValue
- Enumerates values of the specified open registry key.
- RegFlushKey
- Writes all the attributes of the specified key to the registry.
- RegGetKeySecurity
- Retrieves the security on the specified registry key.
- RegLoadKey
- Creates a subkey under HKEY_USER or HKEY_LOCAL_MACHINE and stores registration information from a specified file into that subkey.
- RegOpenCurrentUser
- Opens HKEY_CURRENT_USER for impersonated user
- RegOpenKey
- Alias for win32api::RegOpenKeyEx
- RegOpenKeyEx
- Opens the specified key.
- RegOpenKeyTransacted
- Opens a registry key as part of a transaction.
- RegOverridePredefKey
- Redirects one of the predefined keys to different key.
- RegQueryValue
- Retrieves the value associated with the unnamed value for a specified key in the registry.
- RegQueryValueEx
- Retrieves the type and data for a specified value name associated with an open registry key.
- RegQueryInfoKey
- Returns information about the specified key.
- RegQueryInfoKeyW
- Returns information about an open registry key
- RegRestoreKey
- Restores a key and subkeys from a saved registry file
- RegSaveKey
- Saves the specified key, and all its subkeys to the specified file.
- RegSaveKeyEx
- Extended version of RegSaveKey
- RegSetKeySecurity
- Sets the security on the specified registry key.
- RegSetValue
- Associates a value with a specified key. Currently, only strings are supported.
- RegSetValueEx
- Stores data in the value field of an open registry key.
- RegUnLoadKey
- Unloads the specified registry key and its subkeys from the registry. The keys must have been loaded previously by a call to RegLoadKey.
- RegisterWindowMessage
- Given a string, return a system wide unique message ID.
- RegNotifyChangeKeyValue
- Watch for registry changes
- SearchPath
- Searches a path for a file.
- SendMessage
- Send a message to a window.
- SetConsoleCtrlHandler
- Adds or removes an application-defined HandlerRoutine function from the list of handler functions for the calling process.
- SetConsoleTitle
- Sets the title for the current console.
- SetCursorPos
- The SetCursorPos function moves the cursor to the specified screen coordinates.
- SetDllDirectory
- Modifies the application-specific DLL search path
- SetErrorMode
- Controls whether the system will handle the specified types of serious errors, or whether the process will handle them.
- SetFileAttributes
- Sets the named file's attributes.
- SetLastError
- Sets the last error code known for the current thread.
- SetSysColors
- Changes color of various window elements
- SetLocalTime
- Changes the system's local time.
- SetSystemTime
- Sets the system time.
- SetClassLong
- Replaces the specified 32-bit (long) value at the specified offset into the extra class memory for the window.
- SetClassWord
- Replaces the specified 32-bit (long) value at the specified offset into the extra class memory for the window.
- SetWindowWord
- SetCursor
- Set the cursor to the HCURSOR object.
- SetEnvironmentVariable
- Creates, deletes, or changes the value of an environment variable.
- SetHandleInformation
- Sets a handles's flags
- SetStdHandle
- Sets a handle for the standard input, standard output, or standard error device
- SetSystemPowerState
- Powers machine down to a suspended state
- SetThreadLocale
- Sets the current thread's locale.
- SetTimeZoneInformation
- Sets the system time-zone information.
- SetWindowLong
- Places a long value at the specified offset into the extra window memory of the given window.
- ShellExecute
- Executes an application.
- ShowCursor
- The ShowCursor method displays or hides the cursor.
- Sleep
- Suspends current application execution
- TerminateProcess
- Terminates a process.
- ToAsciiEx
- Translates the specified virtual-key code and keyboard state to the corresponding character or characters.
- Unicode
- Creates a new PyUnicode object
- UpdateResource
- Updates a resource in a PE file.
- VkKeyScan
- Translates a character to the corresponding virtual-key code and shift state.
- VkKeyScan
- Translates a character to the corresponding virtual-key code and shift state.
- WinExec
- Execute a program.
- WinHelp
- Invokes the Windows Help engine.
- WriteProfileSection
- Writes a complete section to an INI file or registry.
- WriteProfileVal
- Write a value to a Windows INI file.
- HIBYTE
- An interface to the win32api HIBYTE macro.
- LOBYTE
- An interface to the win32api LOBYTE macro.
- HIWORD
- An interface to the win32api HIWORD macro.
- LOWORD
- An interface to the win32api LOWORD macro.
- RGB
- An interface to the win32api RGB macro.
- MAKELANGID
- Creates a language identifier from a primary language identifier and a sublanguage identifier.
- MAKEWORD
- creates a WORD value by concatenating the specified values.
- MAKELONG
- creates a LONG value by concatenating the specified values.
pywin32记录备忘的更多相关文章
- Yii ActiveRecord用法记录备忘
ActiveRecord 使用方法 Example1 in查询 $criteria = new CDbCriteria(); $criteria->select = $select; $crit ...
- java+hadoop+spark+hbase+scala+kafka+zookeeper配置环境变量记录备忘
java+hadoop+spark+hbase+scala 在/etc/profile 下面加上如下环境变量 export JAVA_HOME=/usr/java/jdk1.8.0_102 expor ...
- 增加几个entity framework 的函数 (记录备忘)[转]
public static class DatabaseExtensions { public static DataTable SqlQueryForDataTatable(this Databas ...
- httpwebrequest 模拟登录 获取cookies 以前的代码,记录备忘!
2个类,一个基类,一个构建头信息调用类 关于如何获取到post中的内容,你之需要用http抓包工具把你与目标网站的请求信息抓下来后,打开分析下按照抓下来的包中的数 据进行构建就行了 using Sys ...
- freePBX汉化方法记录——备忘
FreePBX汉化[root@bgcc69:/var/www/html/admin/i18n/zh_CN/LC_MESSAGES]$pwd/var/www/html/admin/i18n/zh_CN/ ...
- [整理记录备忘] CentOS 7 相关记录
CentOS 7 命令行模式安装GNOME.KDE图形界面 一.进入 root 模式 因为权限限制,所以我们需要进入 root 模式,开机使用 root 登陆或者系统运行中切换为 root 用户均可. ...
- [整理记录备忘]oracle数据库相关问题与解决
检查死锁方式 用dba用户执行以下语句,可以查看到被死锁的语句. select sql_text from v$sql where hash_value in (select sql_hash_val ...
- [整理记录备忘] Docker相关
docker安装 linux上安装Docker(非常简单的安装方法) https://blog.csdn.net/qq_36892341/article/details/73918672 修改dock ...
- 微信APP支付整体流程记录备忘
支付整体流程见文档:https://pay.weixin.qq.com/wiki/doc/api/app.php?chapter=8_3 商户系统和微信支付系统主要交互说明: 步骤1: ...
随机推荐
- static关键字的总结
C++的static有两种用法:面向过程程序设计中的static和面向对象程序设计中的static.前者应用于普通变量和函数,不涉及类:后者主要说明static在类中的作用. 1.面向过程设计中的st ...
- MT【148】凸数列
(2018浙江省赛13题) 设实数$x_1,x_2,\cdots,x_{2018}$满足$x_{n+1}^2\le x_nx_{n+2},(n=1,2,\cdots,2016)$和$\prod\lim ...
- 【刷题】BZOJ 5415 [Noi2018]归程
www.lydsy.com/JudgeOnline/upload/noi2018day1.pdf Solution 考试的时候打的可持久化并查集,没调出来QAQ 后面知道了kruskal重构树这个东西 ...
- [洛谷P3829][SHOI2012]信用卡凸包
题目大意:有$n$张一模一样的信用卡,每个角进行了圆滑处理,问这些卡组成的“凸包”的周长 题解:发现是圆滑处理的圆心围成的凸包加上一个圆周即可 卡点:输入长宽弄反,然后以为是卡精 C++ Code: ...
- H5页面遮罩弹框下层还能滚动的问题
在页面上显示一个遮罩层,这是非常常见的操作,在遮罩层上操作,下层也会默认跟随手指滚动 此处就是要在显示遮罩的时候禁止下层滚动. 首先设置一个全局变量 var canScroll=false; 页面初始 ...
- 【BZOJ1455】罗马游戏(左偏树)
[BZOJ1455]罗马游戏(左偏树) 题面 BZOJ 然而权限题. 题解 左偏树模板题. #include<iostream> #include<cstdio> #inclu ...
- 解题:BZOJ 2818 GCD
题面 转化一下题目,即是求$1$到$n$中对于某个素数$pri$使得$gcd(x*pri,y*pri)=pri$的$(x,y)$的数目 这样一来就可以考虑每个质数$pri$对答案的贡献,即为$1$到$ ...
- php 中的错误处理机制
php 里有一套错误处理机制,可以使用 set_error_handler 接管 php 错误处理,也可以使用 trigger_error 函数主动抛出一个错误. set_error_handler( ...
- R语言缺失值高级处理方法
0 引言 对于一些数据集,不可避免的出现缺失值.对缺失值的处理非常重要,它是我们能否继续进行数据分析的关键,也是能否继续大数据分析的数据基础. 1 缺失值分类 在对缺失数据进行处理前,了解数据缺失的机 ...
- nginx反向代理下载文件失败处理
最近遇到了客户在从我们的服务器下载文件失败时的情况.然后把解决方案一并整理一下以备后续.需要说明的是,我们前端都是使用nginx来做反向代理,后面的逻辑处理采用php的方式. 1.缓存目录不可写 ng ...