From: Dominic Sisneros Date: 2012-06-15T07:32:27+09:00 Subject: WIN32OLE & VT_RECORD --20cf305b125c87a72304c27629a2 Content-Type: text/plain; charset=ISO-8859-1 Is there any way to get VT_RECORD support in WIN32OLE? Python in pywin32 uses GetRecordInfoFromTypeInfo and uses this to populate generated classes for the structs defined PyObject *pythoncom_GetRecordFromTypeInfo(PyObject *self, PyObject *args) { PyObject *obtypeinfo, *ret; ITypeInfo *pITI=NULL; IRecordInfo *pIRI=NULL; HRESULT hr; if (!PyArg_ParseTuple(args, "O:GetRecordFromTypeInfo", &obtypeinfo)) // @pyparm |TypeInfo||The type information to be converted into a PyRecord object return NULL; if (!PyCom_InterfaceFromPyInstanceOrObject(obtypeinfo, IID_ITypeInfo, (void **)&pITI, FALSE)) return NULL; hr=GetRecordInfoFromTypeInfo(pITI, &pIRI); if (FAILED(hr)) ret=PyCom_BuildPyException(hr); else ret = PyObject_FromRecordInfo(pIRI, NULL, 0); pITI->Release(); if (pIRI!=NULL) pIRI->Release(); return ret; } --20cf305b125c87a72304c27629a2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Is there any way to get VT_RECORD support in WIN32OLE?

Python in pyw= in32 uses GetRecordInfoFromTypeInfo and uses this to populate generated cla= sses for the structs defined


PyObject *pythoncom_GetRecordFromTy= peInfo(PyObject *self, PyObject *args)
{
=A0=A0=A0 PyObject *obtypeinfo, *ret;
=A0=A0=A0 ITypeInfo *pITI=3DN= ULL;
=A0=A0=A0 IRecordInfo *pIRI=3DNULL;
=A0=A0=A0 HRESULT hr;
=A0= =A0=A0 if (!PyArg_ParseTuple(args, "O:GetRecordFromTypeInfo", =A0=A0=A0 =A0=A0=A0 &obtypeinfo)) // @pyparm <o PyITypeInfo>|Typ= eInfo||The type information to be converted into a PyRecord object
=A0=A0=A0 =A0=A0=A0 return NULL;
=A0=A0=A0 if (!PyCom_InterfaceFromPyIns= tanceOrObject(obtypeinfo, IID_ITypeInfo, (void **)&pITI, FALSE))
=A0= =A0=A0 =A0=A0=A0 return NULL;

=A0=A0=A0 hr=3DGetRecordInfoFromTypeIn= fo(pITI, &pIRI);
=A0=A0=A0 if (FAILED(hr))
=A0=A0=A0 =A0=A0=A0 ret=3DPyCom_BuildPyException(hr);
=A0=A0=A0 else
= =A0=A0=A0 =A0=A0=A0 ret =3D PyObject_FromRecordInfo(pIRI, NULL, 0);
=A0= =A0=A0 pITI->Release();
=A0=A0=A0 if (pIRI!=3DNULL)
=A0=A0=A0 =A0= =A0=A0 pIRI->Release();
=A0=A0=A0 return ret;
}


--20cf305b125c87a72304c27629a2--