mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
Add real doc for windows.generated_def
This commit is contained in:
@@ -365,3 +365,13 @@ epub_exclude_files = ['search.html']
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {'http://docs.python.org/': None}
|
||||
|
||||
|
||||
def get_rst(app, what, name, obj, options, lines):
|
||||
pass
|
||||
|
||||
def get_rst2(app, what, name, obj, options, signature, return_annotation):
|
||||
pass
|
||||
|
||||
def setup(app):
|
||||
pass
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
``windows.generated_def`` -- generated Windows defines and structures
|
||||
*********************************************************************
|
||||
|
||||
.. module:: windows.generated_def
|
||||
|
||||
:mod:`windows.generated_def` contains ``Python`` files generated by ``ctypes_generation``.
|
||||
|
||||
Those generated files includes:
|
||||
|
||||
- some Windows structures and enums
|
||||
- some Windows defines including some ``NTSTATUS``
|
||||
- some Windows function prototypes
|
||||
|
||||
|
||||
Each value in ``windef`` and ``ntstatus`` is a :class:`Flag` or a :class:`StrFlag`.
|
||||
|
||||
Here is every generated definition by type:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:numbered:
|
||||
|
||||
windef_generated.rst
|
||||
ntstatus_generated.rst
|
||||
winstructs_generated.rst
|
||||
|
||||
|
||||
|
||||
.. class:: Flag
|
||||
|
||||
A :class:`long` with a name
|
||||
|
||||
|
||||
.. class:: StrFlag
|
||||
|
||||
A :class:`str` with a name
|
||||
|
||||
|
||||
Example
|
||||
--------
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
>>> import windows.generated_def
|
||||
>>> import windows.generated_def as gdef
|
||||
>>> gdef
|
||||
<module 'windows.generated_def' from 'c:\users\hakril\documents\work\pythonforwindows\windows\generated_def\__init__.pyc'>
|
||||
|
||||
>>> gdef.PAGE_EXECUTE_READWRITE
|
||||
PAGE_EXECUTE_READWRITE(0x40L)
|
||||
|
||||
>>> gdef.PAGE_EXECUTE_READWRITE == 0x40
|
||||
True
|
||||
|
||||
>>> gdef.PAGE_EXECUTE_READWRITE + 1
|
||||
65L
|
||||
|
||||
>>> gdef.STATUS_ACCESS_VIOLATION
|
||||
STATUS_ACCESS_VIOLATION(0xc0000005L)
|
||||
|
||||
>>> gdef.LDR_DATA_TABLE_ENTRY
|
||||
<class 'windows.generated_def.winstructs._LDR_DATA_TABLE_ENTRY'>
|
||||
|
||||
>>> gdef.LDR_DATA_TABLE_ENTRY._fields_
|
||||
[('Reserved1', <class 'windows.generated_def.winstructs.c_void_p_Array_2'>), ...]
|
||||
|
||||
>>> gdef.MEMORY_INFORMATION_CLASS
|
||||
<class 'windows.generated_def.winstructs._MEMORY_INFORMATION_CLASS'>
|
||||
|
||||
>>> gdef.MEMORY_INFORMATION_CLASS.values
|
||||
[_MEMORY_INFORMATION_CLASS.MemoryBasicInformation(0x0L), _MEMORY_INFORMATION_CLASS.MemoryWorkingSetList(0x1L),
|
||||
_MEMORY_INFORMATION_CLASS.MemorySectionName(0x2L), _MEMORY_INFORMATION_CLASS.MemoryBasicVlmInformation(0x3L),
|
||||
_MEMORY_INFORMATION_CLASS.MemoryWorkingSetListEx(0x4L)]
|
||||
|
||||
>>> gdef.MemoryBasicInformation
|
||||
_MEMORY_INFORMATION_CLASS.MemoryBasicInformation(0x0L)
|
||||
@@ -22,12 +22,11 @@ Contents:
|
||||
com.rst
|
||||
crypto.rst
|
||||
alpc.rst
|
||||
generated.rst
|
||||
iat_hook.rst
|
||||
wip.rst
|
||||
internals.rst
|
||||
sample.rst
|
||||
windef.rst
|
||||
testing.rst
|
||||
|
||||
|
||||
Indices and tables
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
Test generated !
|
||||
****************
|
||||
|
||||
.. module:: windows.generated_def
|
||||
|
||||
List of flags definition in :mod:`windows.generated_def`.
|
||||
Each one inherit from :class:`long` but embded the name of the define and can be used in place of :class:`int`/:class:`long` for context.
|
||||
|
||||
|
||||
Contents:
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user