I have a fairly basic question. <br>I am trying to map a PyIUnknown interface to a specific (in this case IMAPIStatus) interface. How do I do that?<br><br>Here is what I have:<br><br> import mapi, ...<br><br> tab =
self.session.GetStatusTable(0)<br> rows = mapi.HrQueryAllRows(tab,<br> (PR_ENTRYID, PR_RESOURCE_TYPE), # columns to retrieve<br> None, # all rows
<br> None, # any sort order is fine<br> 0) # any # of results is fine<br> for row in rows:<br> (eid_tag, eid), (res_tag, res_name) = row
<br> if res_tag == PR_RESOURCE_TYPE and res_name == 37: # MAPI_SPOOLER<br> stat = self.session.OpenEntry(eid, None, mapi.MAPI_DEFERRED_ERRORS)<br> stat.FlushQueues(None, None, 0x10) # FLUSH_NO_UI
<br><br>FlushQueues() obviously requires a IMAPIStatus interface. The documentation for OpenEntry() states that passing NULL should give me the correct interface type.<br><br>Thanks<br>