Re: COM problems in Visual Studio 2010

2011-04-26 Thread Scott Baldwin
Thanks David, that sounds feasible. I am only new to this code base, and as
such was makibng the assumption that it was working previously, and that the
exceptions were a sign of an incompatibility that occured as part of
upgrading to VS2010, but if the problem existed all along, and exceptions
were not bubbling up previously, that would make sense.

On Wed, Apr 27, 2011 at 2:30 PM, David Kean wrote:

>  I had a look over it and here’s what I found:
>
>
>
> 1)  The first exception, ArgumentException is occurring because you
> are calling GetDisplay(SIGDN_FILESYSPATH) on a IShellItem that doesn’t
> support it. If you have a look at the docs on this, you can only call this
> on IShellItem that supports SIGDN_FILESYSPATH (ie which you can get via
> IShellItem.GetAttributes)
>
>  2)  The second exception, COMException with HRESULT of E_FAIL when
> calling IFileDialog.GetCurrentSelection, I’m guessing is thrown when there
> is no current selection. The docs aren’t very clear on this – so I’m not
> sure.
>
>
>
> The reason this only occurs under the debugger is because the exception is
> bubbling back into COM and getting converted into a HRESULT. Someone on the
> other side (ie the implementer of IFileDialog) is ignoring the HRESULT and
> going on their merry way. I hate when this happens, because it makes it very
> hard to find bugs like the above in your code. If instead, they failed hard
> - or returned a HRESULT when you attempted to show the dialog, then you
> would have found this back when using Visual Studio 2008.
>
>
>
> I’m not sure why you didn’t hit this in Visual Studio 2008, however,
> perhaps we’re now treating a transition from an exception -> HRESULT as an
> unhandled exception in Visual Studio 2010, and hence the debugger breaks.
>
>
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Jason Keats
> *Sent:* Tuesday, April 26, 2011 9:06 PM
>
> *To:* ozDotNet
> *Subject:* Re: COM problems in Visual Studio 2010
>
>
>
> I tried running compiled versions and in the IDE and stepping through the
> code - because I couldn't make much sense of your message.
>
>
>
> As I said, I encountered no problems/errors/exceptions - so didn't bother
> responding, then.
>
>
>
> There are known "issues" when debugging under a 64 bit O/S, but I don't
> know if that would cause your problem...
>
>
>
>
> http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/
>
>
>
>
>
> On Wed, Apr 27, 2011 at 1:35 PM, Scott Baldwin 
> wrote:
>
> Jason, the problem is that when running in Visual Studio 2010 in debug
> mode, it throws COM Exceptions, whereas it did no such thing in Visual
> Studio 2008. Perhaps the issue only occurs on Windows 7, or perhaps you have
> break on exceptions turned off.
>
>
>
> Ian, I have tried it in a 32bit environment, and the same problem occurs,
> so it's not likely a x64 problem.
>
> On Wed, Apr 27, 2011 at 12:55 PM, Ian Thomas 
> wrote:
>
> 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:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *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 
> 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

RE: COM problems in Visual Studio 2010

2011-04-26 Thread David Kean
I had a look over it and here's what I found:


1)  The first exception, ArgumentException is occurring because you are 
calling GetDisplay(SIGDN_FILESYSPATH) on a IShellItem that doesn't support it. 
If you have a look at the docs on this, you can only call this on IShellItem 
that supports SIGDN_FILESYSPATH (ie which you can get via 
IShellItem.GetAttributes)


2)  The second exception, COMException with HRESULT of E_FAIL when calling 
IFileDialog.GetCurrentSelection, I'm guessing is thrown when there is no 
current selection. The docs aren't very clear on this - so I'm not sure.

The reason this only occurs under the debugger is because the exception is 
bubbling back into COM and getting converted into a HRESULT. Someone on the 
other side (ie the implementer of IFileDialog) is ignoring the HRESULT and 
going on their merry way. I hate when this happens, because it makes it very 
hard to find bugs like the above in your code. If instead, they failed hard  - 
or returned a HRESULT when you attempted to show the dialog, then you would 
have found this back when using Visual Studio 2008.

I'm not sure why you didn't hit this in Visual Studio 2008, however, perhaps 
we're now treating a transition from an exception -> HRESULT as an unhandled 
exception in Visual Studio 2010, and hence the debugger breaks.


From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Jason Keats
Sent: Tuesday, April 26, 2011 9:06 PM
To: ozDotNet
Subject: Re: COM problems in Visual Studio 2010

I tried running compiled versions and in the IDE and stepping through the code 
- because I couldn't make much sense of your message.

As I said, I encountered no problems/errors/exceptions - so didn't bother 
responding, then.

There are known "issues" when debugging under a 64 bit O/S, but I don't know if 
that would cause your problem...

http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/


On Wed, Apr 27, 2011 at 1:35 PM, Scott Baldwin 
mailto:carpenoctur...@gmail.com>> wrote:
Jason, the problem is that when running in Visual Studio 2010 in debug mode, it 
throws COM Exceptions, whereas it did no such thing in Visual Studio 2008. 
Perhaps the issue only occurs on Windows 7, or perhaps you have break on 
exceptions turned off.

Ian, I have tried it in a 32bit environment, and the same problem occurs, so 
it's not likely a x64 problem.
On Wed, Apr 27, 2011 at 12:55 PM, Ian Thomas 
mailto:il.tho...@iinet.net.au>> wrote:
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: ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com> 
[mailto:ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com>] 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 
mailto:carpenoctur...@gmail.com>> 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 International<http://www.qsrinternational.com>

blog: http://sjbdeveloper.blogspot.com




--
Scott Baldwin
Senior Developer - QSR International<http://www.qsrinternational.com>

blog: http://sjbdeveloper.blogspot.com



Re: COM problems in Visual Studio 2010

2011-04-26 Thread Jason Keats
I tried running compiled versions and in the IDE and stepping through the
code - because I couldn't make much sense of your message.

As I said, I encountered no problems/errors/exceptions - so didn't bother
responding, then.

There are known "issues" when debugging under a 64 bit O/S, but I don't know
if that would cause your problem...

http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/


On Wed, Apr 27, 2011 at 1:35 PM, Scott Baldwin wrote:

> Jason, the problem is that when running in Visual Studio 2010 in debug
> mode, it throws COM Exceptions, whereas it did no such thing in Visual
> Studio 2008. Perhaps the issue only occurs on Windows 7, or perhaps you have
> break on exceptions turned off.
>
> Ian, I have tried it in a 32bit environment, and the same problem occurs,
> so it's not likely a x64 problem.
>
> On Wed, Apr 27, 2011 at 12:55 PM, Ian Thomas wrote:
>
>>  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:* ozdotnet-boun...@ozdotnet.com [mailto:
>> ozdotnet-boun...@ozdotnet.com] *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 
>> 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 International <http://www.qsrinternational.com>
>>
>> blog: http://sjbdeveloper.blogspot.com
>>
>>
>>
>
>
>
> --
> Scott Baldwin
> Senior Developer - QSR International <http://www.qsrinternational.com>
>
> blog: http://sjbdeveloper.blogspot.com
>


Re: COM problems in Visual Studio 2010

2011-04-26 Thread Scott Baldwin
Jason, the problem is that when running in Visual Studio 2010 in debug mode,
it throws COM Exceptions, whereas it did no such thing in Visual Studio
2008. Perhaps the issue only occurs on Windows 7, or perhaps you have break
on exceptions turned off.

Ian, I have tried it in a 32bit environment, and the same problem occurs, so
it's not likely a x64 problem.

On Wed, Apr 27, 2011 at 12:55 PM, Ian Thomas  wrote:

>  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:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *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 
> 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 International <http://www.qsrinternational.com>
>
> blog: http://sjbdeveloper.blogspot.com
>
>
>



-- 
Scott Baldwin
Senior Developer - QSR International <http://www.qsrinternational.com>

blog: http://sjbdeveloper.blogspot.com


RE: COM problems in Visual Studio 2010

2011-04-26 Thread Ian Thomas
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: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
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 
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

 



Re: COM problems in Visual Studio 2010

2011-04-26 Thread Jason Keats
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 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 International 
>
> blog: http://sjbdeveloper.blogspot.com
>


RE: COM problems in Visual Studio 2010

2011-04-26 Thread Adrian Halid
I am not sure if this is your issue but I have had issues with Com Interop when 
upgrading from VS2005 to VS2010.

It relates to Aximp not working via the IDE.

We got around it by performing the Aximp via cmd line.

https://connect.microsoft.com/VisualStudio/feedback/details/557722/errors-utilizing-activex-controls-in-vs-2010

"We have a VB6 based ActiveX Control compiled into a .ocx file that we have 
used in one of our .net projects under Visual Studio 2008. However with Visual 
Studio 2010 we found that when we try to create an instance of our object on 
our control surface by double clicking it from the tool box Visual Studio 2010 
throws an error indicating that it doesn't think the ActiveX was registered 
correctly.

We dug into this a bit and I narrowed it down to 2 public interfaces in the 
ActiveX control that Visual Studio 2010 doesn't like. Oddly the behavior is 
different if the target framework is set to 4.0 or if it's set to an earlier 
framework.

When your target framework is .net 4.0, if you have a public interface that 
exposes EITHER the VBRUN.EventInfo class -OR- exposes the VBA.CallType class 
you will have this problem.

When your target framework is set to .net 3.5, if you have a public interface 
that exposes BOTH the VBRUN.EventInfo class -AND- exposes the VBA.CallType 
class you will have this problem. Curiously if one or the other is exposed (but 
not both) the problem doesn't occur.

It is very important that we get this fixed if we are to migrate our project, 
used in 30,000 workstations around the globe, updated to Visual Studio 2010."


It is supposed to get fixed in .NET 4.0 SP1 "if resources and scheduling allows 
them"

Regards

Adrian Halid
Senior Analyst/Programmer

IT Vision Australia Pty Ltd (ABN: 34 309 336 904)
PO Box 881, Canning Bridge WA 6153
Level 3, Kirin Centre, 15 Ogilvie Road, Applecross, WA, 6153
P:  (08) 9315 7000  F:  (08) 9315 7088
E:  adrian.ha...@itvision.com.au<mailto:adrian.ha...@itvision.com.au>W: 
http://www.itvision.com.au<http://www.itvision.com.au/>



___

NOTICE : This e-mail and any attachments are intended for the addressee(s) only 
and may
contain confidential or privileged material. Any unauthorised review, use, 
alteration,
disclosure or distribution of this e-mail (including any attachments) by an 
unintended recipient
is prohibited. If you are not the intended recipient please contact the sender 
as soon as
possible by return e-mail and then delete both messages.
___

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of Scott Baldwin
Sent: Wednesday, 27 April 2011 7:09 AM
To: ozDotNet
Subject: Re: COM problems in Visual Studio 2010

Yes, you are correct Kirsten, it is only valid for .Net 4.0 framework, also it 
is automatically set to false for all system references, so unfortunately this 
is not the answer to my problem.
On Mon, Apr 25, 2011 at 10:42 PM, Kirsten Greed 
mailto:kirst...@jobtalk.com.au>> wrote:
Hi David
I think this property is only relevant for version 4 of the dot net run time.
Right click the reference to the assembly in your project
Select properties
Regards
Kirsten

From: ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com> 
[mailto:ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com>] On 
Behalf Of Peter Maddin
Sent: Monday, 25 April 2011 7:49 PM

To: 'ozDotNet'
Subject: RE: COM problems in Visual Studio 2010

I have a similar problem.
Where do you set this property to false.

I managed to find a reference here 
http://weblogs.asp.net/cazzu/archive/2011/03/11/check-your-embed-interop-types-flag-when-doing-visual-studio-extensibility-work.aspx

But on the assemblies I think are causing me grief, there no "Embed Interop" 
Types property.
Is there something somewhere where you have to set to make this option visible?

Regards Peter

From: ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com> 
[mailto:ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com>] On 
Behalf Of Kirsten Greed
Sent: Monday, 25 April 2011 5:27 PM
To: 'ozDotNet'
Subject: RE: COM problems in Visual Studio 2010

Hi Scott
We had problems with VS2010 that did not occur in VS2008
They were solved by turning  Embed Interop Types Off on the assemblies
Cheers
Kirsten

From: ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com> 
[mailto:ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com>] On 
Behalf Of Scott Baldwin
Sent: Wednesday, 20 April 2011 4:48 PM
To: ozDotNet
Subject: COM problems in Visual Studio 2010

Does anyone know if COM Interop has changed in any way in VS2010?

I am getting COM exceptions when debugging an exist

Re: COM problems in Visual Studio 2010

2011-04-26 Thread Scott Baldwin
Yes, you are correct Kirsten, it is only valid for .Net 4.0 framework, also
it is automatically set to false for all system references, so unfortunately
this is not the answer to my problem.
On Mon, Apr 25, 2011 at 10:42 PM, Kirsten Greed wrote:

>  Hi David
>
> I think this property is only relevant for version 4 of the dot net run
> time.
>
> Right click the reference to the assembly in your project
>
> Select properties
>
> Regards
>
> Kirsten
>  --
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Peter Maddin
> *Sent:* Monday, 25 April 2011 7:49 PM
>
> *To:* 'ozDotNet'
> *Subject:* RE: COM problems in Visual Studio 2010
>
>
>
> I have a similar problem.
>
> Where do you set this property to false.
>
>
>
> I managed to find a reference here
> http://weblogs.asp.net/cazzu/archive/2011/03/11/check-your-embed-interop-types-flag-when-doing-visual-studio-extensibility-work.aspx
>
>
>
> But on the assemblies I think are causing me grief, there no “Embed
> Interop” Types property.
>
> Is there something somewhere where you have to set to make this option
> visible?
>
>
>
> Regards Peter
>
>
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Kirsten Greed
> *Sent:* Monday, 25 April 2011 5:27 PM
> *To:* 'ozDotNet'
> *Subject:* RE: COM problems in Visual Studio 2010
>
>
>
> Hi Scott
>
> We had problems with VS2010 that did not occur in VS2008
>
> They were solved by turning  Embed Interop Types Off on the assemblies
>
> Cheers
>
> Kirsten
>  --
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Scott Baldwin
> *Sent:* Wednesday, 20 April 2011 4:48 PM
> *To:* ozDotNet
> *Subject:* COM problems in Visual Studio 2010
>
>
>
> 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 International <http://www.qsrinternational.com>
>
> blog: http://sjbdeveloper.blogspot.com
>
>
>
> __ Information from ESET NOD32 Antivirus, version of virus
> signature database 6068 (20110424) __
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>



-- 
Scott Baldwin
Senior Developer - QSR International <http://www.qsrinternational.com>

blog: http://sjbdeveloper.blogspot.com


RE: COM problems in Visual Studio 2010

2011-04-25 Thread Kirsten Greed
Hi David

I think this property is only relevant for version 4 of the dot net run
time.

Right click the reference to the assembly in your project

Select properties

Regards

Kirsten

  _  

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Peter Maddin
Sent: Monday, 25 April 2011 7:49 PM
To: 'ozDotNet'
Subject: RE: COM problems in Visual Studio 2010

 

I have a similar problem.

Where do you set this property to false.

 

I managed to find a reference here
http://weblogs.asp.net/cazzu/archive/2011/03/11/check-your-embed-interop-typ
es-flag-when-doing-visual-studio-extensibility-work.aspx

 

But on the assemblies I think are causing me grief, there no "Embed Interop"
Types property.

Is there something somewhere where you have to set to make this option
visible?

 

Regards Peter

 

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Kirsten Greed
Sent: Monday, 25 April 2011 5:27 PM
To: 'ozDotNet'
Subject: RE: COM problems in Visual Studio 2010

 

Hi Scott

We had problems with VS2010 that did not occur in VS2008

They were solved by turning  Embed Interop Types Off on the assemblies

Cheers

Kirsten

  _  

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Scott Baldwin
Sent: Wednesday, 20 April 2011 4:48 PM
To: ozDotNet
Subject: COM problems in Visual Studio 2010

 

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



__ Information from ESET NOD32 Antivirus, version of virus signature
database 6068 (20110424) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



RE: COM problems in Visual Studio 2010

2011-04-25 Thread Peter Maddin
I have a similar problem.

Where do you set this property to false.

 

I managed to find a reference here
http://weblogs.asp.net/cazzu/archive/2011/03/11/check-your-embed-interop-typ
es-flag-when-doing-visual-studio-extensibility-work.aspx

 

But on the assemblies I think are causing me grief, there no "Embed Interop"
Types property.

Is there something somewhere where you have to set to make this option
visible?

 

Regards Peter

 

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Kirsten Greed
Sent: Monday, 25 April 2011 5:27 PM
To: 'ozDotNet'
Subject: RE: COM problems in Visual Studio 2010

 

Hi Scott

We had problems with VS2010 that did not occur in VS2008

They were solved by turning  Embed Interop Types Off on the assemblies

Cheers

Kirsten

  _  

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Scott Baldwin
Sent: Wednesday, 20 April 2011 4:48 PM
To: ozDotNet
Subject: COM problems in Visual Studio 2010

 

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 International <http://www.qsrinternational.com> 

blog: http://sjbdeveloper.blogspot.com



RE: COM problems in Visual Studio 2010

2011-04-25 Thread Kirsten Greed
Hi Scott

We had problems with VS2010 that did not occur in VS2008

They were solved by turning  Embed Interop Types Off on the assemblies

Cheers

Kirsten

  _  

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Scott Baldwin
Sent: Wednesday, 20 April 2011 4:48 PM
To: ozDotNet
Subject: COM problems in Visual Studio 2010

 

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   International

blog: http://sjbdeveloper.blogspot.com



RE: COM problems in Visual Studio 2010

2011-04-20 Thread Peter Maddin
I have a similar problem with RemObject Hydra Delphi plugins
(http://www.remobjects.com/hydra/).

 

Outside of VS2010 it works fine .

In debug in vs2010 the plugin does not always work correctly.

 

I reported this back to RemObjects they said they had not observed this and
they wanted me to build an example.

I might when I have some spare time.

 

Regards Peter

 

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Scott Baldwin
Sent: Wednesday, 20 April 2011 2:48 PM
To: ozDotNet
Subject: COM problems in Visual Studio 2010

 

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 International  

blog: http://sjbdeveloper.blogspot.com