<!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>&nbsp;</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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; import mapi, 
  ...<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tab = 
  self.session.GetStatusTable(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  rows = 
  mapi.HrQueryAllRows(tab,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for 
  row in 
  rows:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  (eid_tag, eid), (res_tag, res_name) = row <BR>&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; if res_tag == PR_RESOURCE_TYPE and res_name == 
  37:&nbsp;&nbsp;&nbsp; # 
  MAPI_SPOOLER<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  stat = self.session.OpenEntry(eid, None, 
  mapi.MAPI_DEFERRED_ERRORS)<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  stat.FlushQueues(None, None, 0x10)&nbsp;&nbsp;&nbsp; # 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>