I also tried the code sometime last week, on Win7 64-bit, and (in debug) got the System.Runtime.InteropServices.COMException There are a number of similar reports of this COM exception on the web.
When poking through the code, I saw exception messages that were something to do with wrong # of parameters - but I haven't seen nor found an explanation. There is a suggestion that it is a 64-bit Windows problem only. As you say, the test app still works (I have not tried it in XP Mode or on a real XP, but I assume that it does there too). _____ Ian Thomas Victoria Park, Western Australia _____ From: [email protected] [mailto:[email protected]] On Behalf Of Jason Keats Sent: Wednesday, April 27, 2011 10:06 AM To: ozDotNet Subject: Re: COM problems in Visual Studio 2010 I tried your code (a week ago) on VS2010, but couldn't get it to fail when running as Administrator on Windows XP 32. What was I doing wrong? :-) On Wed, Apr 20, 2011 at 4:48 PM, Scott Baldwin <[email protected]> wrote: Does anyone know if COM Interop has changed in any way in VS2010? I am getting COM exceptions when debugging an existing application in VS2010 when working with IShellItem. These COM exceptions did not occur in VS2008, and I can't find any difference in the code. The exceptions don't actually change the way in which the application works, and don't come up when not in debug mode, but I would like to get to the bottom of why they are occuring. Attached is a minimal VS2010 solution that exhibits the behaviour, any help would be much appreciated. Thanks. -- Scott Baldwin Senior Developer - QSR <http://www.qsrinternational.com> International blog: http://sjbdeveloper.blogspot.com
