@pymethod int|PyIObjectArray|GetCount|Returns number of objects in collection
| 30 | |
| 31 | // @pymethod int|PyIObjectArray|GetCount|Returns number of objects in collection |
| 32 | PyObject *PyIObjectArray::GetCount(PyObject *self, PyObject *args) |
| 33 | { |
| 34 | IObjectArray *pIOA = GetI(self); |
| 35 | if ( pIOA == NULL ) |
| 36 | return NULL; |
| 37 | UINT cObjects; |
| 38 | HRESULT hr; |
| 39 | PY_INTERFACE_PRECALL; |
| 40 | hr = pIOA->GetCount( &cObjects ); |
| 41 | PY_INTERFACE_POSTCALL; |
| 42 | |
| 43 | if ( FAILED(hr) ) |
| 44 | return PyCom_BuildPyException(hr, pIOA, IID_IObjectArray ); |
| 45 | return PyLong_FromUnsignedLong(cObjects); |
| 46 | } |
| 47 | |
| 48 | // @pymethod <o PyIUnknown>|PyIObjectArray|GetAt|Retrieves an item by zero-based index |
| 49 | PyObject *PyIObjectArray::GetAt(PyObject *self, PyObject *args) |
no test coverage detected