+1  A: 

I've used the immediate window to manually query the properties of the COM object. The downside is that I don't think you get intellisense so you have to know exactly what you want to inspect.

Tuzo
Yeah it works 'manually'.. but I am looking for a way to display the whole object properly
Jörg B.
+1  A: 
Yoopergeek
Hey there,maybe it depends on the way the variable is initialized/created? How has the first one come to life?-J
Jörg B.
I thought about that as well. I was wondering if you get more information in the locals/watch windows if you instantiate it versus simply getting an object instance returned from a COM object. In the first picture, the 'unsplitShape' is returned from a COM object. In the second picutre 'scratchLayer' is an object that I've instantiated.Are you running VS2003/2005/2008? Service pack level?
Yoopergeek
Jörg B.
+1  A: 

From .NET and COM: The Complete Interoperability Guide:

When an instance of a COM object is returned to you, via a method's return type or a by-reference parameter, and the CLR can't determine the type, you'll get the generic System.__ComObject type because COM objects are always passed/returned as interface pointers.

You might try changing the return type using Marshal.CreateWrapperOfType as in the example below:

MyType newObject = (MyType)Marshal.CreateWrapperOfType(oldObject, typeof(MyType))

Then you can look at newObject in your watch window and it should have the expected properties.

If the call fails, it will throw an InvalidCastException.

C-Pound Guru
Good point...BTW can I have that book back now? :D
Yoopergeek