``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

   windef_generated.rst
   ntstatus_generated.rst
   winstructs_generated.rst
   winerror_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)