Skip to content

Commit

Permalink
Add note directives.
Browse files Browse the repository at this point in the history
  • Loading branch information
junkmd committed Dec 27, 2024
1 parent 8d8343f commit 5a64024
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
9 changes: 6 additions & 3 deletions docs/source/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,12 @@ Some COM objects support events, which allows them to notify the user
of the object when something happens. The standard COM mechanism is
based on so-called *connection points*.

Note: For the rules that you should observe when implementing event
handlers you should read the implementing_COM_methods_ section in the
|comtypes| server document.
.. note::

For the rules that you should observe when implementing event
handlers you should read the implementing_COM_methods_ section in
the |comtypes| server document.


``GetEvents(source, sink, interface=None)``
This functions connects an event sink to the COM object
Expand Down
21 changes: 14 additions & 7 deletions docs/source/com_interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ attributes:

ISomeInterface._methods_ = [...,]

**Note:** All the other attributes ``_iid_``, ``_idlflags_``,
``_case_insensitive_`` must be defined when ``_methods_`` is set.
.. note::

All the other attributes ``_iid_``, ``_idlflags_``,
``_case_insensitive_`` must be defined when ``_methods_`` is set.


The ``_methods_`` list
Expand Down Expand Up @@ -255,9 +257,11 @@ interfaces that your COM object implements must be listed in the
implement the methods of all the interfaces by writing a Python method
for each of them.

**Note**: The ``COMObject`` metaclass provides a default for methods
that are **not** implemented in Python. This default method returns
the standard COM error code ``E_NOTIMPL`` when it is called.
.. note::

The ``COMObject`` metaclass provides a default for methods
that are **not** implemented in Python. This default method returns
the standard COM error code ``E_NOTIMPL`` when it is called.

To implement the COM method named ``MethodName`` for the interface
``ISomeInterface`` you write a Python method either named ``ISomeInterface_MethodName``
Expand Down Expand Up @@ -370,8 +374,11 @@ actual COM method of the object, retrives ``"out"`` parameters from
their container(s) and returns them as the result. If the method has
exactly one ``"out"`` parameter, this is returned. If the method has
two or more ``"out"`` parameters, a tuple of their values is returned.
**Note**: the native return value of the method, usually a ``HRESULT``,
is *not* returned in the presence of "out" parameters.

.. note::

The native return value of the method, usually a ``HRESULT``,
is **not** returned in the presence of "out" parameters.

For the ``IProvideClassInfo`` and ``IProvideClassInfo`` COM interfaces
mentioned above, the metaclass creates methods with these signatures
Expand Down

0 comments on commit 5a64024

Please sign in to comment.