§
    ÷¢±jW  ã                   óØ   — d Z ddlZddlZddlZddlmZ 	 	 	 dd„Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zedk    r6 e¦   «         \  ZZZZZer ej        ed¬¦  «          eeeeee¬¦  «         dS dS )ax	  Utility functions for writing out gateway C++ files

This module will generate a C++/Python binding for a specific COM
interface.

Can be run from command line (passing required arguments) or the old way
(start Python,  import this module,  change to the directory where the generated code
should be written,  and run the public function).

This module is capable of generating both 'Interfaces' (ie, Python
client side support for the interface) and 'Gateways' (ie, Python
server side support for the interface).  Many COM interfaces are useful
both as Client and Server.  Other interfaces, however, really only make
sense to implement one side or the other.  For example, it would be pointless
for Python to implement Server side for 'IRunningObjectTable', unless we were
implementing core COM for an operating system in Python (hey - now there's an idea!)

Most COM interface code is totally boiler-plate - it consists of
converting arguments, dispatching the call to Python, and processing
any result values.

This module automates the generation of such code.  It has the ability to
parse a .h file generated by the MIDL tool (ie, almost all COM .h files)
and build almost totally complete C++ code.

The module understands some of the well known data types, and how to
convert them.  There are only a couple of places where hand-editing is
necessary, as detailed below:

unsupported types -- If a type is not known, the generator will
pretty much ignore it, but write a comment to the generated code.  You
may want to add custom support for this type.  In some cases, C++ compile errors
will result.  These are intentional - generating code to remove these errors would
imply a false sense of security that the generator has done the right thing.

other return policies -- By default, Python never sees the return SCODE from
a COM function.  The interface usually returns None if OK, else a COM exception
if "FAILED(scode)" is TRUE.  You may need to change this if:
* EXCEPINFO is passed to the COM function.  This is not detected and handled
* For some reason Python should always see the result SCODE, even if it
  did fail or succeed.  For example, some functions return a BOOLEAN result
  in the SCODE, meaning Python should always see it.
* FAILED(scode) for the interface still has valid data to return (by default,
  the code generated does not process the return values, and raise an exception
  to Python/COM
é    Né   )Úmakegwparsec                 ó¬  — t          | ¦  «        }	 t          j        ||¦  «        }|                     ¦   «          n# |                     ¦   «          w xY w|r|rd}n	|r|sd}nd}|j        dd…         dk    r'ddl}|j        j        j        }	|j        j        j	        }
nt          }	t          }
t          t          j                             t          rt          nt          j        ¦   «         d|j        › d	�¦  «        d
¦  «        }	 |                     d|j        › d|› d�¦  «         |                     d|j        z  ¦  «         |r |	||¦  «         |r |
||¦  «         |                     ¦   «          n# |                     ¦   «          w xY wt          t          j                             t          rt          nt          j        ¦   «         d|j        › d�¦  «        d
¦  «        }	 |                     d|j        › d|› d�¦  «         |rt%          ||¦  «         |rt'          ||¦  «         |                     ¦   «          dS # |                     ¦   «          w xY w)a  Generate C++ code for a Python Interface and Gateway

    header_file_name -- The full path to the .h file which defines the interface.
    interface_name -- The name of the interface to search for, and to generate.
    bMakeInterface = 1 -- Should interface (ie, client) support be generated.
    bMakeGatewayInterface = 1 -- Should gateway (ie, server) support be generated.

    This method will write a .cpp and .h file into the current directory,
    (using the name of the interface to build the file name.

    zInterface and GatewayÚ	InterfaceÚGatewayNé   ÚIEnumr   ÚPyz.cppÚwz// This file implements the ú z? for Python.
// Generated by makegw.py

#include "shell_pch.h"
zG#include "Py%s.h"

// @doc - This file contains autoduck documentation
z.hz// This file declares the z' for Python.
// Generated by makegw.py
)Úopenr   Úparse_interface_infoÚcloseÚnameÚwin32com.makegw.makegwenumÚmakegwÚ
makegwenumÚ_write_enumifc_cppÚ_write_enumgw_cppÚ_write_ifc_cppÚ_write_gw_cppÚosÚpathÚjoinÚ	directoryÚgetcwdÚwriteÚ_write_ifc_hÚ_write_gw_h)Úheader_file_nameÚinterface_nameÚbMakeInterfaceÚbMakeGatewayÚoutput_directoryÚfinÚ	interfaceÚdescÚwin32comÚifc_cpp_writerÚgw_cpp_writerÚfouts               úbC:\Users\johnn\AppData\Local\Programs\Python\Python311\Lib\site-packages\win32com/makegw/makegw.pyÚmake_framework_supportr-   7   s¡  € õ$ ÐÑ
 Ô
 €CðÝÔ4°^ÀSÑIÔIˆ	à�	Š	‰Œˆˆøˆ�	Š	‰Œˆˆøøøàð ˜,ð Ø&ˆˆØ	ð  ð ØˆˆàˆØ„~�b�q�bÔ˜WÒ$Ð$Ø)Ð)Ð)Ð)à!œÔ3ÔFˆØ œÔ2ÔDˆˆå'ˆÝ%ˆåÝ
Œ�ŠÝ"Ð3�IˆI­¬	©¬Ð5N¸)¼.Ð5NÐ5NÐ5Nñ	
ô 	
ð 	ñ	ô €DðØ�
Š
ðØ&œ^ðð Ø.2ðð ð ñ	
ô 	
ð 	
ð 	�
Š
ØXØŒnññ	
ô 	
ð 	
ð ð 	,ØˆN˜4 Ñ+Ô+Ð+Øð 	+ØˆM˜$ 	Ñ*Ô*Ð*à�
Š
‰Œˆˆøˆ�
Š
‰ŒˆˆøøøÝÝ
Œ�Š¥)Ð<•Y�Yµ´±´Ð>UÀ9Ä>Ð>UÐ>UÐ>UÑVÔVØñô €DðØ�
Š
ðØ$œ>ðð Ø,0ðð ð ñ	
ô 	
ð 	
ð ð 	*Ý˜˜yÑ)Ô)Ð)Øð 	)Ý˜˜iÑ(Ô(Ð(à�
Š
‰Œˆˆˆøˆ�
Š
‰Œˆˆøøøs#   ‘; »AÄAE2 Å2FÇ"AH= È=Ic                 ó  — |                       d|j        › d|j        › d|j        › d|j        › d�	¦  «         |j        D ]}|                       d|j        z  ¦  «         Œ |                       d|j        › d|j        › d	�¦  «         d S )
Nz\// ---------------------------------------------------
//
// Interface Declaration

class Pyz : public Pyz!
{
public:
    MAKE_PYCOM_CTOR(Pyz);
    static zT *GetI(PyObject *self);
    static PyComTypeObject type;

    // The Python methods
z6	static PyObject *%s(PyObject *self, PyObject *args);
z
protected:
    Pyz(IUnknown *pdisp);
    ~Pyz();
};
)r   r   ÚbaseÚmethods)Úfr&   Úmethods      r,   r   r   –   sí   € Ø‡G‚Gð	ð
 
Œð	ð 	ð
 &/¤^ð	ð 	ð !”~ð	ð 	ð ŒNð	ð 	ð 	ñô ð ð  Ô#ð 
ð 
ˆØ	�ŠØFÈÌÑTñ	
ô 	
ð 	
ð 	
ð ‡G‚Gð	ð „~ð	ð 	ð 	Œð		ð 	ð 	ñô ð ð ð ó    c                 óÂ  — |j         }|                       dj        d*i |j        ¤Ž¦  «         t	          j        dd|j         ¦  «        }|j         |dœ}|j        D �]Ò}|j         |d<   |                       dj        d*i |¤Ž¦  «         dx}x}x}x}	x}
x}x}}d}|j        D �]@}	 t          j	        |¦  «        }| 
                    d¦  «        rÔ|                     ¦   «         }|r¾|                      d	|                     ¦   «         z   d
z   ¦  «         ||z  }|d|                     ¦   «         z   z  }|
|                     ¦   «         z  }
|	|                     ¦   «         z  }	|p|                     ¦   «         }||                     ¦   «         z  }||                     ¦   «         z  }|                     ¦   «         \  }}|r|d|z  z  }|d|z   z  }�Œ,# t          j        $ �r}|                      d                     |j         |j        ¦  «        ¦  «         |                      d	|j        › d|j         › d|j         › d�¦  «         |                      d                     |j        |j         |j         ¦  «        ¦  «         |	d                     |j        |j         |j         ¦  «        z  }	|dz  }|d|j         z  z  }|d|j         z   z  }|d|j        › d|j         › d�z  }Y d }~�Œ:d }~ww xY w|r|                      d¦  «         |                      |
¦  «         |                      |¦  «         |                      d                     ||j         |¦  «        ¦  «         |	r?|                      d¦  «         |                      |	¦  «         |                      d¦  «         |dd …         |d<   ||d<   ||d<   |                       d j        d*i |¤Ž¦  «         dx}x}	x}x}}|j        D ]÷}| 
                    d!¦  «        sŒ	 t          j	        |¦  «        }|                     ¦   «         }|rd||z  }||                     ¦   «         z  }|	|                     ¦   «         z  }	|d|                     ¦   «         z   z  }||                     ¦   «         z  }Œ¨# t          j        $ r>}|                      d"                     |j         |j        |¦  «        ¦  «         Y d }~Œðd }~ww xY w|r-|                      d#                     |||||	¦  «        ¦  «         n|                      d$¦  «         |                      d%¦  «         �ŒÔ|                      d&|z  ¦  «         |                      d'|z  ¦  «         |j        D ]G}|                      d(                     |j         |j         |j         |j         |j         ¦  «        ¦  «         ŒH|j        }|                       d)j        d*i t7          ¦   «         ¤Ž¦  «         d S )+Na/  // ---------------------------------------------------
//
// Interface Implementation

Py{name}::Py{name}(IUnknown *pdisp):
    Py{base}(pdisp)
{{
    ob_type = &type;
}}

Py{name}::~Py{name}()
{{
}}

/* static */ {name} *Py{name}::GetI(PyObject *self)
{{
    return ({name} *)Py{base}::GetI(self);
}}

z[a-z]Ú )ÚinterfacenameÚptrr2   zä// @pymethod |Py{interfacename}|{method}|Description of {method}.
PyObject *Py{interfacename}::{method}(PyObject *self, PyObject *args)
{{
    {interfacename} *p{ptr} = GetI(self);
    if ( p{ptr} == NULL )
        return NULL;
r   Úinú	ú
ú, z	%s;
z‡// *** The input argument {} of type "{}" was not processed ***
//     Please check the conversion function is appropriate and exists!
r   z;
	PyObject *obz;
z,	// @pyparm <o Py{}>|{}||Description for {}
zL	if (bPythonIsHappy && !PyObject_As{}( ob{}, &{} )) bPythonIsHappy = FALSE;
ÚOz, &ob%sz	PyObject_Freeú(ú);
ú	USES_CONVERSION;
z:	if ( !PyArg_ParseTuple(args, "{}:{}"{}) )
		return NULL;
ú	BOOL bPythonIsHappy = TRUE;
z#	if (!bPythonIsHappy) return NULL;
r   ÚargsCOMÚcleanupÚcleanup_gilzã    HRESULT hr;
    PY_INTERFACE_PRECALL;
    hr = p{ptr}->{method}({argsCOM} );
{cleanup}
    PY_INTERFACE_POSTCALL;
{cleanup_gil}
    if ( FAILED(hr) )
        return PyCom_BuildPyException(hr, p{ptr}, IID_{interfacename} );
ÚoutúK// *** The output argument {} of type "{}" was not processed ***
//     {}
zE{}
{}	PyObject *pyretval = Py_BuildValue("{}"{});
{}	return pyretval;z	Py_RETURN_NONE;
z
}

z-// @object Py%s|Description of the interface
z-static struct PyMethodDef Py%s_methods[] =
{
z:	{{ "{}", Py{}::{}, 1 }}, // @pymeth {}|Description of {}
z¸    {{ NULL }}
}};

PyComTypeObject Py{name}::type("Py{name}",
        &Py{interfacebase}::type,
        sizeof(Py{name}),
        Py{name}_methods,
        GET_PYCOM_CTOR(Py{name}));
© )r   r   ÚformatÚ__dict__ÚreÚsubr0   Úargsr   Úmake_arg_converterÚHasAttributeÚGetFormatCharÚGetAutoduckStringÚGetParseTupleArgÚ"DeclareParseArgTupleInputConverterÚGetParsePostCodeÚNeedUSES_CONVERSIONÚGetInterfaceArgCleanupÚGetInterfaceArgCleanupGILÚGetInterfaceCppObjectInfoÚerror_not_supportedÚraw_typeÚtypeÚGetBuildForInterfacePreCodeÚGetBuildForInterfacePostCodeÚGetBuildValueArgr/   Úlocals)r1   r&   r   r7   Ústrdictr2   ÚargsParseTuplerA   ÚformatCharsÚcodePostÚcodePobjectsÚcodeCobjectsrB   rC   ÚneedConversionÚargÚargCvtÚvalÚ
comArgNameÚcomArgDeclStringÚwhyÚcodePreÚcodeVarsPassÚcodeDeclÚ
formatCharÚinterfacebases                             r,   r   r   ¶   sV  € ØŒ>€DØ‡G‚Gð	ð 	ô( ð)	!ð 	!ð( Ôð)	!ð 	!ñô ð õ0 Œ&�˜2˜yœ~Ñ
.Ô
.€CØ )¤°sÐ;Ð;€GØÔ#ð qñ qˆØ"œKˆ�ÑØ	�Šðð ô ðð ð ðð ñ		
ô 		
ð 		
ð %'ð	'ˆð 	'˜ð 	' ;ð 	'°ð 	'¸Lð 	'Øð	'à�kØˆà”;ð '	Gñ '	GˆCð&GÝ$Ô7¸Ñ<Ô<�Ø×#Ò# DÑ)Ô)ð 
JØ ×.Ò.Ñ0Ô0�CØð JØŸš  v×'?Ò'?Ñ'AÔ'AÑ AÀDÑ HÑIÔIÐIØ# sÑ*˜Ø&¨$°×1HÒ1HÑ1JÔ1JÑ*JÑJ˜Ø$¨×(QÒ(QÑ(SÔ(SÑS˜Ø  F×$;Ò$;Ñ$=Ô$=Ñ=˜Ø)7Ð)W¸6×;UÒ;UÑ;WÔ;W˜Ø 6×#@Ò#@Ñ#BÔ#BÑB˜Ø# v×'GÒ'GÑ'IÔ'IÑI˜Ø/5×/OÒ/OÑ/QÔ/QÑ,�
Ð,Ø#ð AØ  IÐ0@Ñ$@Ñ@�LØ˜4 *Ñ,Ñ,�‘øÝÔ2ð Gñ Gð GØ—’ð `÷  gò  gØœ #¤,ñô ñô ð ð —’ÐP˜SœXÐPÐP¨¬ÐPÐPÀ3Ä8ÐPÐPÐPÑQÔQÐQØ—’ØD×KÒKØœ #¤(¨C¬Hñô ñô ð ð
 Ðl×sÒsØ”H˜cœh¨¬ñô ñ �ð ˜sÑ"�Ø )¨c¬hÑ"6Ñ6�à˜4 #¤(™?Ñ*�ØÐF¨S¬XÐFÐF¸¼ÐFÐFÐFÑF�����‘øøøøð+Gøøøð. ð 	,Ø�GŠGÐ*Ñ+Ô+Ð+Ø	�Š�ÑÔÐØ	�Š�ÑÔÐØ	�ŠØM×TÒTØ˜Vœ[¨.ñô ñ	
ô 	
ð 	
ð
 ð 	=Ø�GŠGÐ5Ñ6Ô6Ð6Ø�GŠG�HÑÔÐØ�GŠGÐ;Ñ<Ô<Ð<Ø$ Q R Rœ[ˆ�	ÑØ$ˆ�	ÑØ!,ˆ�ÑØ	�Šðð ô ðð ð ðð ñ
	
ô 
	
ð 
	
ð FHÐGˆÐG�(ÐG˜[ÐG¨<¸(Ø”;ð 	ð 	ˆCØ×#Ò# EÑ*Ô*ð ØðÝ$Ô7¸Ñ<Ô<�Ø#×1Ò1Ñ3Ô3�
Øð LØ :Ñ-�KØ˜v×AÒAÑCÔCÑC�GØ × CÒ CÑ EÔ EÑE�HØ  D¨6×+BÒ+BÑ+DÔ+DÑ$DÑD�LØ × IÒ IÑ KÔ KÑK�HøøÝÔ2ð ð ð Ø—’Øc×jÒjØœ #¤,°ñô ñô ð ð
 ����øøøøðøøøð ð 	+Ø�GŠGØ[×bÒbØ˜g {°LÀ(ñô ñô ð ð ð �GŠGÐ)Ñ*Ô*Ð*Ø	�Š�	ÑÔÐÑà‡G‚GÐ<ÀÑEÑFÔFÐFØ‡G‚GÐ=ÀÑDÑEÔEÐEØÔ#ð 
ð 
ˆØ	�ŠØJ×QÒQØ”˜Yœ^¨V¬[¸&¼+ÀvÄ{ñô ñ	
ô 	
ð 	
ð 	
ð ”N€MØ‡G‚Gð		ð 		ô ð		ð 		õ ‰XŒXð		ð 		ñô ð ð ð s3   Â#D&GÇKÇC8KËKÏ3BRÒSÒ4S
Ó
Sc                 óø  — |j         d         dk    rd|j         dd …         z   }n
d|j         z   }|j         }|j        dk    s|j        dk    rd}n.|j        d         dk    rd|j        dd …         z   }n
d|j        z   }|                      d|› d	|› d
|› d|› d|› d|› d|› d|› d|› d�¦  «         |j        dk    r4|                      d                     |j        |j        ¦  «        ¦  «         n|                      d¦  «         |                      d|z  ¦  «         |j        D ]¯}|                      d|j         z  ¦  «         |j        rt|j        d d…         D ],}|                      d|                     ¦   «         z  ¦  «         Œ-|j        d         }|                      d|                     ¦   «         z  ¦  «         Œš|                      d¦  «         Œ°|                      d¦  «         |                      ¦   «          d S )Nr   ÚIÚPyGr   ÚIUnknownÚ	IDispatchÚPyGatewayBasezX// ---------------------------------------------------
//
// Gateway Declaration

class z
 : public z	, public z
{
protected:
    z(PyObject *instance) : z-(instance) { ; }
    PYGATEWAY_MAKE_SUPPORT2(r;   z, IID_z)

z2	// {}
	// *** Manually add {} method decls here

z

z	// %s
z	STDMETHOD(%s)(
éÿÿÿÿz		%s,
z		%s);

z
		void);

z};
)r   r/   r   rG   r0   rK   ÚGetRawDeclarationr   )r1   r&   Úgnamer   Ú	base_namer2   re   s          r,   r   r   ]  sˆ  € Ø„~�aÔ˜CÒÐØ˜	œ q r rÔ*Ñ*ˆˆà˜	œÑ&ˆØŒ>€DØ„~˜Ò#Ð# y¤~¸Ò'DÐ'DØ#ˆ	ˆ	àŒ>˜!Ô Ò#Ð#Ø 	¤¨q¨r¨rÔ 2Ñ2ˆIˆIà 	¤Ñ.ˆIØ‡G‚Gð	ð
 ð	ð 	ð
 "ð	ð 	ð
 -1ð	ð 	ð ð	ð 	ð $-ð	ð 	ð #ð	ð 	ð '+ð	ð 	ð 37ð	ð 	ð ;Dð	ð 	ð 	ñô ð ð „~˜Ò#Ð#Ø	�ŠØE×LÒLØ” 	¤ñô ñ	
ô 	
ð 	
ð 	
ð 	
�Š�‰Œˆà‡G‚GˆK˜$ÑÑÔÐàÔ#ð &ð &ˆØ	�ŠÐ$ v¤{Ñ2Ñ3Ô3Ð3ØŒ;ð 	&Ø”{ 3 B 3Ô'ð Að A�Ø—’˜ s×'<Ò'<Ñ'>Ô'>Ñ?Ñ@Ô@Ð@Ð@Ø”+˜b”/ˆCØ�GŠG�N c×&;Ò&;Ñ&=Ô&=Ñ>Ñ?Ô?Ð?Ð?à�GŠGÐ$Ñ%Ô%Ð%Ð%à‡G‚GˆF�O„O€OØ‡G‚G�I„I€I€I€Ir3   c           
      óè  — |j         d         dk    rd|j         dd …         z   }n
d|j         z   }|j         }|j        dk    s|j        dk    rd}n.|j        d         dk    rd|j        dd …         z   }n
d|j        z   }|                      d¦  «         |j        D �]×}|                      d	|› d
|j         › d�¦  «         |j        r°|j        d d…         D ]J}d                     |j        ¦  «        }|                      d|› d|                     ¦   «         › d�¦  «         ŒK|j        d         }d                     |j        ¦  «        }|                      d|› d|                     ¦   «         › d�¦  «         n|                      d¦  «         |                      d¦  «         d}dx}	x}
}d}d}d}|j        �rû|j        D �]ò}|                     d¦  «        r-|dz  }|j	        dk    r|                      d|j         z  ¦  «         |                     d¦  «        �r—	 t          j        |¦  «        }|                     ¦   «          |                     ¦   «         }|p|                     ¦   «         }|r6||z  }||                     ¦   «         z  }|d|                     ¦   «         z   z  }|	|                     ¦   «         z  }	|
|                     ¦   «         z  }
�Œ# t          j        $ rÊ}|                      d                     |j         |j        |¦  «        ¦  «         |                      d                     |j         |j        |j         ¦  «        ¦  «         |                      d                     |j         |j         ¦  «        ¦  «         |
d|j         z  z  }
|dz  }|d|j         z  z  }Y d }~�Œêd }~ww xY w�Œô|r|                      d ¦  «         |                      |¦  «         |                      |	¦  «         |r|                      d!¦  «         d"}nd#}|r|› d$|› d%|› �}n|}|                      d&|j         › d'|› d(�¦  «         |                      |
¦  «         |�r|                      d)¦  «         |                      d*¦  «         dx}x}x}
}d}|j        D �]}|                     d¦  «        sŒ	 t          j        |¦  «        }|                     ¦   «          |                     ¦   «         }|rc||z  }|d|                     ¦   «         z   z  }||                     ¦   «         z  }|
|                     ¦   «         z  }
|p|                     ¦   «         }Œ¼# t          j        $ r?}|                      d+                     |j         |j        |¦  «        ¦  «         Y d }~�Œd }~ww xY w|r_t3          |¦  «        dk    rd,}nd-}|r|                      |¦  «         |                      d.                     ||||j         ¦  «        ¦  «         |
rG|                      d/¦  «         |                      |
¦  «         |                      d0|j         z  ¦  «         |                      d1¦  «         |                      d2¦  «         �ŒÙd S )3Nr   rq   rr   r   rs   rt   ru   zT// ---------------------------------------------------
//
// Gateway Implementation
zSTDMETHODIMP z::z(
rv   z][z		/* [z] */ z,
z)
z		void)
z{
	PY_GATEWAY_METHOD;
r5   rD   é   z!	if (%s==NULL) return E_POINTER;
r8   r;   z“// *** The input argument {} of type "{}" was not processed ***
//   - Please ensure this conversion function exists, and is appropriate
//   - {}
z'	PyObject *ob{} = PyObject_From{}({});
z?	if (ob{}==NULL) return MAKE_PYCOM_GATEWAY_FAILURE_CODE("{}");
z	Py_DECREF(ob%s);
r<   z, ob%sr?   z	PyObject *result;
z&resultÚNULLz, "ú"z	HRESULT hr=InvokeViaPolicy("z", r>   z	if (FAILED(hr)) return hr;
zD	// Process the Python results, and convert back to the real params
rE   ÚPyArg_ParseÚPyArg_ParseTuplezK	if (!{}(result, "{}" {}))
		return MAKE_PYCOM_GATEWAY_FAILURE_CODE("{}");
r@   zB	if (!bPythonIsHappy) hr = MAKE_PYCOM_GATEWAY_FAILURE_CODE("%s");
z	Py_DECREF(result);
z	return hr;
}

)r   r/   r   r0   rK   r   Úinoutrw   rM   ÚindirectionLevelr   rL   ÚSetGatewayModerN   rS   rQ   r\   ÚGetBuildForGatewayPreCodeÚGetBuildForGatewayPostCoderW   rG   rX   rY   rP   rR   Úlen)r1   r&   rx   r   ry   r2   re   ÚinoutstrÚcoutrk   ra   ÚcodeVarsÚargStrrd   r`   rf   Ú
formatcharrj   ÚresStrÚ
fullArgStrrb   r_   rg   ÚparseFns                           r,   r   r   ‘  s®  € Ø„~�aÔ˜CÒÐØ˜	œ q r rÔ*Ñ*ˆˆà˜	œÑ&ˆØŒ>€DØ„~˜Ò#Ð# y¤~¸Ò'DÐ'DØ#ˆ	ˆ	àŒ>˜!Ô Ò#Ð#Ø 	¤¨q¨r¨rÔ 2Ñ2ˆIˆIà 	¤Ñ.ˆIØ‡G‚Gð	ñô ð ð Ô#ð @'ñ @'ˆØ	�ŠðØðð Ø”{ðð ð ñ	
ô 	
ð 	
ð Œ;ð 		#Ø”{ 3 B 3Ô'ð Pð P�ØŸ9š9 S¤YÑ/Ô/�Ø—’ÐN 8ÐNÐN°#×2GÒ2GÑ2IÔ2IÐNÐNÐNÑOÔOÐOÐOà”+˜b”/ˆCØ—y’y ¤Ñ+Ô+ˆHØ�GŠGÐJ˜xÐJÐJ¨c×.CÒ.CÑ.EÔ.EÐJÐJÐJÑKÔKÐKÐKà�GŠG�MÑ"Ô"Ð"à	�ŠÐ+Ñ,Ô,Ð,ØˆØ(*Ð*ˆÐ*�(˜XØˆØˆØˆØŒ;ñ %	6Ø”{ð $6ñ $6�Ø×#Ò# EÑ*Ô*ð RØ˜A‘I�DØÔ+¨qÒ0Ð0ØŸšÐ EÈÌÑ PÑQÔQÐQØ×#Ò# DÑ)Ô)ñ 6ð6Ý!,Ô!?ÀÑ!DÔ!D˜Ø×-Ò-Ñ/Ô/Ð/Ø%+×%9Ò%9Ñ%;Ô%;˜
Ø)7Ð)W¸6×;UÒ;UÑ;WÔ;W˜à%ð GØ'¨:Ñ5˜KØ$¨×(QÒ(QÑ(SÔ(SÑS˜HØ" d¨V×-DÒ-DÑ-FÔ-FÑ&FÑF˜FØ 6×#CÒ#CÑ#EÔ#EÑE˜Ø  F×$EÒ$EÑ$GÔ$GÑG˜™øÝ&Ô:ð 6ð 6ð 6ØŸšð u÷  |ò  |Ø #¤¨#¬,¸ñô ñô ð ð
 ŸšØG×NÒNØ #¤¨#¬(°C´Hñô ñô ð ð
 ŸšØ_×fÒfØ #¤¨&¬+ñô ñô ð ð
 !Ð$:¸S¼XÑ$EÑE˜Ø# sÑ*˜Ø (¨S¬XÑ"5Ñ5˜˜˜˜˜™øøøøð%6øøøñ6ðB ð 	,Ø�GŠGÐ*Ñ+Ô+Ð+Ø	�Š�ÑÔÐØ	�Š�ÑÔÐØð 	Ø�GŠGÐ+Ñ,Ô,Ð,ØˆFˆFàˆFàð 	 Ø"Ð=Ð= {Ð=Ð=°VÐ=Ð=ˆJˆJàˆJà	�ŠÐQ°´ÐQÐQÀÐQÐQÐQÑRÔRÐRØ	�Š�ÑÔÐØñ /	.Ø�GŠGÐ4Ñ5Ô5Ð5Ø�GŠGØXñô ð ð FHÐGˆKÐG˜,ÐG¨°NØˆNØ”{ð ñ �Ø×'Ò'¨Ñ.Ô.ð ØðÝ(Ô;¸CÑ@Ô@�FØ×)Ò)Ñ+Ô+Ð+Ø ×.Ò.Ñ0Ô0�CØð XØ# sÑ*˜Ø&¨$°×1HÒ1HÑ1JÔ1JÑ*JÑJ˜Ø$¨×(QÒ(QÑ(SÔ(SÑS˜Ø  F×$;Ò$;Ñ$=Ô$=Ñ=˜Ø)7Ð)W¸6×;UÒ;UÑ;WÔ;W˜øøÝ"Ô6ð ð ð Ø—G’GØg×nÒnØœH c¤l°Cñô ñô ð ð ð ð ð ñ øøøøðøøøð ð Ý�{Ñ#Ô# qÒ(Ð(Ø+�G�Gà0�GØð *Ø—G’G˜LÑ)Ô)Ð)Ø—’Øf×mÒmØ ¨n¸f¼kñô ñô ð ð
 ð Ø—’Ð9Ñ:Ô:Ð:Ø—’˜Ñ!Ô!Ð!Ø—’ØZØ”kñ"ñô ð ð �GŠGÐ,Ñ-Ô-Ð-Ø	�ŠÐ%Ñ&Ô&Ð&Ñ&ðA@'ð @'s3   ÈB8KËN*Ë B?N%Î%N*Ò)B!UÕVÕ4VÖVc                  ó&   — t          dd¦  «         d S )Nzd:\msdev\include\objidl.hÚIStorage)r-   rF   r3   r,   Útestr�   )  s   € åÐ9¸:ÑFÔFÐFÐFÐFr3   c                  ó‚  — t          j        d¬¦  «        } |                      dddd¬¦  «         |                      dd	dd
¬¦  «         |                      ddddd¬¦  «         |                      ddddd¬¦  «         |                      ddd¬¦  «         |                      ¦   «         \  }}|rt	          d|› �¦  «         |j        r$t          j                             |j        ¦  «        s|  	                    dd¬¦  «         |j
        s|  	                    dd¬¦  «         |j        |j
        |j        |j        |j        pd fS )NzCOM interface wrapper generator)Údescriptionz--header_filez-fTzheader file (system) to parse)ÚrequiredÚhelpz--interface_namez-nzinterface name to search forz--no_create_interfacez-iÚstore_falseÚcreate_interfacezdo not generate interface code)ÚactionÚdestr”   z--no_create_gatewayz-gÚcreate_gatewayzdo not generate gateway codez--output_directoryz-oz!directory where to generate files)r”   z%Warning: Ignoring unknown arguments: rv   zInvalid header file
)ÚstatusÚmessagezInvalid interface name
)ÚargparseÚArgumentParserÚadd_argumentÚparse_known_argsÚprintÚheader_filer   r   ÚisfileÚexitr!   r–   r™   r$   )ÚparserrK   Úunks      r,   Úparse_argumentsr¦   2  s­  € ÝÔ$Ð1RÐSÑSÔS€FØ
×ÒØ˜¨Ð3Rð ñ ô ð ð ×ÒØ˜D¨4Ð6Tð ñ ô ð ð ×ÒØØØØØ-ð ñ ô ð ð ×ÒØØØØØ+ð ñ ô ð ð ×ÒØ˜dÐ)Lð ñ ô ð ð ×'Ò'Ñ)Ô)�I€Dˆ#Ø
ð =ÝÐ;°cÐ;Ð;Ñ<Ô<Ð<àÔð @¥2¤7§>¢>°$Ô2BÑ#CÔ#Cð @Ø�Š˜2Ð'>ˆÑ?Ô?Ð?ØÔð CØ�Š˜2Ð'AˆÑBÔBÐBð 	ÔØÔØÔØÔØÔÐ% ðð r3   Ú__main__T)Úexist_ok)r    r!   r"   r#   r$   )r   r   N)Ú__doc__rœ   r   rI   r5   r   r-   r   r   r   r   r�   r¦   Ú__name__r¡   r!   r–   r™   r   ÚmakedirsrF   r3   r,   ú<module>r¬      sP  ðð-ð -ð^ €€€Ø 	€	€	€	Ø 	€	€	€	à Ð Ð Ð Ð Ð ð ØØðUð Uð Uð Uð~ð ð ð@dð dð dðN1ð 1ð 1ðhU'ð U'ð U'ðpGð Gð Gð)ð )ð )ðX ˆzÒÐàˆÑÔñ M€K�Ð!1°>À9ð ð .ØˆŒ�I¨Ð-Ñ-Ô-Ð-ØÐØ$Ø%Ø'Ø#Ø"ðñ ô ð ð ð ð Ðr3   