<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6800934446457898793.post7080898641294242243..comments</id><updated>2010-07-04T08:47:18.577-04:00</updated><category term='trueskill'/><category term='aes'/><title type='text'>Comments on Moserware: Using Obscure Windows COM APIs in .NET</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.moserware.com/feeds/7080898641294242243/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html'/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Zfbv3mHcYrc/SLDM--5fn8I/AAAAAAAAA1w/EZtLwWvYhdI/S220/facebook+beard2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-8637302942973329013</id><published>2009-04-26T20:02:00.000-04:00</published><updated>2009-04-26T20:02:00.000-04:00</updated><title type='text'>tjarvis:

Thanks for stopping by! Enums cross boun...</title><content type='html'>tjarvis:&lt;br /&gt;&lt;br /&gt;Thanks for stopping by! Enums cross boundaries like normal integers, so you can make them as friendly as you like. You can use documentation hints from &lt;A HREF="http://msdn.microsoft.com/en-us/library/bb762473(VS.85).aspx" REL="nofollow"&gt;ASSOCIATIONTYPE&lt;/A&gt; and &lt;A HREF="http://msdn.microsoft.com/en-us/library/bb762472(VS.85).aspx" REL="nofollow"&gt;ASSOCIATIONLEVEL&lt;/A&gt; to get:&lt;br /&gt;&lt;br /&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// Specifies the type of association for an application. Used by methods of the &lt;br /&gt;/// &amp;lt;see cref=&amp;quot;IApplicationAssociationRegistration&amp;quot;/&amp;gt; interface.&lt;br /&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;enum AssociationType&lt;br /&gt;{&lt;br /&gt;    /// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// Indicates a file extension, such as .htm or .mp3.&lt;br /&gt;    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;    FileExtension = 0,&lt;br /&gt;    /// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// Indicates a protocol, such as http or mailto.&lt;br /&gt;    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;    UrlProtocol = (FileExtension + 1),&lt;br /&gt;    /// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// Indicates the owner of the start menu client for a mail or Internet hyperlink.&lt;br /&gt;    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;    StartMenuClient = (UrlProtocol + 1),&lt;br /&gt;    /// &amp;lt;summary&amp;gt;&lt;br /&gt;    /// Indicates the MIME type, such as audio/mp3.&lt;br /&gt;    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;    MimeType = (StartMenuClient + 1) &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Note how I removed the prefixes (e.g. AT_) and made it non-SCREAMING_CASE.&lt;br /&gt;&lt;br /&gt;The other is very similar:&lt;br /&gt;&lt;br /&gt;enum AssociationLevel&lt;br /&gt;{ &lt;br /&gt;    Machine = 0,&lt;br /&gt;    Effective = ( Machine + 1 ) ,&lt;br /&gt;    User = ( Effective + 1 ) &lt;br /&gt;}</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default/8637302942973329013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default/8637302942973329013'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html?showComment=1240790520000#c8637302942973329013' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Zfbv3mHcYrc/SLDM--5fn8I/AAAAAAAAA1w/EZtLwWvYhdI/S220/facebook+beard2.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-7080898641294242243' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/7080898641294242243' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-3633292044670862905</id><published>2009-04-26T19:47:00.000-04:00</published><updated>2009-04-26T19:47:00.000-04:00</updated><title type='text'>Hi Jeff, very useful post. I guess this is the kin...</title><content type='html'>Hi Jeff, very useful post. I guess this is the kind of thing that you can waste a couple hours trying to figure out. Its handy to have an example :-)&lt;br /&gt;&lt;br /&gt;BTW what is the syntax for importing the Enums ?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default/3633292044670862905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default/3633292044670862905'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html?showComment=1240789620000#c3633292044670862905' title=''/><author><name>tjarvis</name><uri>http://tjarvis.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-7080898641294242243' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/7080898641294242243' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1201797380'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-7433649479444495910</id><published>2009-04-24T22:04:00.000-04:00</published><updated>2009-04-24T22:04:00.000-04:00</updated><title type='text'>Huseyin Tufekcilerli:

Does the assistant work on ...</title><content type='html'>Huseyin Tufekcilerli:&lt;br /&gt;&lt;br /&gt;Does the assistant work on COM interfaces? When I looked at it I couldn't get beyond simple P/Invoke calls that were just Win32-ish like ShowWindow.&lt;br /&gt;&lt;br /&gt;Good tip on the AddMemoryPressure. I hadn't thought about that, but it brings up a good point.&lt;br /&gt;&lt;br /&gt;Thanks for the comments!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default/7433649479444495910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default/7433649479444495910'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html?showComment=1240625040000#c7433649479444495910' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Zfbv3mHcYrc/SLDM--5fn8I/AAAAAAAAA1w/EZtLwWvYhdI/S220/facebook+beard2.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-7080898641294242243' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/7080898641294242243' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-1726496492001143736</id><published>2009-04-24T09:30:00.000-04:00</published><updated>2009-04-24T09:30:00.000-04:00</updated><title type='text'>Great, concise explanation!

&lt;b&gt;P/Invoke Interop A...</title><content type='html'>Great, concise explanation!&lt;br /&gt;&lt;br /&gt;&lt;B&gt;P/Invoke Interop Assistant&lt;/B&gt; project on CodePlex from Microsoft can also help sometimes to convert these IDL definitions to their managed equivalents.&lt;br /&gt;&lt;br /&gt;One thing about memory management. The real COM objects that are hidden by RCWs can hold huge chunks of memory but since those managed RCW objects are just proxies and don't use large memory on heap, this can mislead the GC. In .NET 2.0, a new method called &lt;B&gt;AddMemoryPressure&lt;/B&gt; is added on &lt;B&gt;System.GC&lt;/B&gt; static class to able to inform the GC about these kind of situations. For more info:&lt;br /&gt;&lt;br /&gt;&lt;A HREF="http://dotnetdebug.net/2005/09/22/gcaddmemorypressure-net-20-gc-improvments/" REL="nofollow"&gt;GC.AddMemoryPressure - .NET 2.0 GC Improvments&lt;/A&gt;I am looking forward more blog posts from you about your COM/.NET interop challenges :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default/1726496492001143736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/7080898641294242243/comments/default/1726496492001143736'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html?showComment=1240579800000#c1726496492001143736' title=''/><author><name>Huseyin Tufekcilerli</name><uri>http://www.blogger.com/profile/02347426647143991400</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2009/04/using-obscure-windows-com-apis-in-net.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-7080898641294242243' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/7080898641294242243' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1206007806'/></entry></feed>
