<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx</link><description>One issue that keeps on coming up day after day has to do with what RPC (or COM) does with pointers as parameters in RPC (or COM) interfaces. I&amp;rsquo;m going to talk about string parameters, since they&amp;rsquo;re relatively simple, but everything I say</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx#144686</link><pubDate>Sun, 30 May 2004 22:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:144686</guid><dc:creator>Dru Nelson</dc:creator><description>Actually, I would like to hear some good references on the 'standard' or 'universal' marshaller in this context. It's too much pain to use the other marshallers.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=144686" width="1" height="1"&gt;</description></item><item><title>re: Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx#143100</link><pubDate>Thu, 27 May 2004 15:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:143100</guid><dc:creator>runtime</dc:creator><description>BSTRs are length-prefixed, but they ALSO include a NUL-terminator!&lt;br&gt;&lt;br&gt;Larry, I would love to hear more about the BSTR vs LPCWSTR debate. I really enjoy reading your behind-the-scenes stories.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=143100" width="1" height="1"&gt;</description></item><item><title>re: Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx#142610</link><pubDate>Wed, 26 May 2004 22:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:142610</guid><dc:creator>Larry Osterman</dc:creator><description>Absolutely Mike Dimmick.  I think it's facility win32 because it's a win32 error code?&lt;br&gt;&lt;br&gt;Mike Dunn: If you passed a structure as a parameter to a routine and the structure contained a pointer, then that pointer value is controled by pointer_default().&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=142610" width="1" height="1"&gt;</description></item><item><title>re: Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx#142604</link><pubDate>Wed, 26 May 2004 21:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:142604</guid><dc:creator>Rob</dc:creator><description>Via structures or unions.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=142604" width="1" height="1"&gt;</description></item><item><title>re: Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx#142580</link><pubDate>Wed, 26 May 2004 21:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:142580</guid><dc:creator>Mike Dunn</dc:creator><description>&amp;gt;The pointer_default attribute on the interface specifies the behavior of all pointers EXCEPT the pointers passed in as parameters to routines.&lt;br&gt; &lt;br&gt;I'm unclear what you mean there. How else would a routine get a pointer other than via a parameter?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=142580" width="1" height="1"&gt;</description></item><item><title>re: Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx#142498</link><pubDate>Wed, 26 May 2004 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:142498</guid><dc:creator>Mike Dimmick</dc:creator><description>Just a quick note: 0x800706f4 == MAKE_HRESULT( SEVERITY_ERROR, FACILITY_WIN32, RPC_X_NULL_REF_POINTER ). Basically, COM's telling us about the underlying RPC error.&lt;br&gt;&lt;br&gt;Odd that it doesn't get a FACILITY_RPC code, but there you go...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=142498" width="1" height="1"&gt;</description></item><item><title>re: Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx#142433</link><pubDate>Wed, 26 May 2004 17:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:142433</guid><dc:creator>Larry Osterman</dc:creator><description>Sort-of.&lt;br&gt;&lt;br&gt;COM will quite happily use zero terminated strings.  It also uses BSTRs.&lt;br&gt;&lt;br&gt;AUTOMATION uses BSTR's, but automation isn't COM.  Automation's all about interoperability with Visual Basic.  But COM's a lot more than just making stuff that can be called from VB.&lt;br&gt;&lt;br&gt;The interface above was taken from one of the COM objects I work with - nary a BSTR there.&lt;br&gt;&lt;br&gt;The BSTR vs LPCWSTR is a fascinating internal debate that I may write about some day (if I can figure out what the pros and cons of each side are, to be honest it's too esoteric for me).&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=142433" width="1" height="1"&gt;</description></item><item><title>re: Unique pointers in COM interfaces</title><link>http://blogs.msdn.com/b/larryosterman/archive/2004/05/26/142401.aspx#142430</link><pubDate>Wed, 26 May 2004 17:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:142430</guid><dc:creator>Jerry Pisk</dc:creator><description>AFAIK COM does not use zero terminated strings. It uses BSTR type, which is a Lstring and can contain embedded zero byte characters.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=142430" width="1" height="1"&gt;</description></item></channel></rss>