<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=926310023-09032006><FONT face=Arial color=#0000ff size=2>I'm
afraid IMAPIStatus isn't exposed via pywin32 - depending on your patience, I
could probably get it done within a week or so, maybe even in time for build 208
:)</FONT></SPAN></DIV>
<DIV><SPAN class=926310023-09032006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=926310023-09032006><FONT face=Arial color=#0000ff
size=2>Mark</FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
python-win32-bounces@python.org [mailto:python-win32-bounces@python.org]<B>On
Behalf Of </B>Amrit Jassal<BR><B>Sent:</B> Friday, 10 March 2006 7:21
AM<BR><B>To:</B> Python-win32@python.org<BR><B>Subject:</B> [python-win32]
Casting to a specific interface<BR><BR></FONT></DIV>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></BLOCKQUOTE></BODY></HTML>