Can't see code of some assemblies

Explore, browse and analyze .NET assemblies

Can't see code of some assemblies

Postby ilyclem » Fri Mar 04, 2011 5:30 pm

I am in my free trial period and am wondering why I cannot see the code of some methods in some assemblies. For example,

Code: Select all
Public Overridable Property FormatString As <MarshalAs(UnmanagedType.BStr)> String
    <MethodImpl(MethodImplOptions.InternalCall, MethodCodeType:=MethodCodeType.Runtime)> _
    <MethodImpl(MethodImplOptions.InternalCall, MethodCodeType:=MethodCodeType.Runtime)> _
    Set(<[In], MarshalAs(UnmanagedType.BStr)> ByVal str As String)
End Property

There is no option to expand methods. Everything seems to be working as expected for some assemblies, but not others.

Thanks for your help! I love the potential this product has in helping me debug some difficult situations!
Posts: 3
Joined: Fri Mar 04, 2011 5:25 pm

Postby Clive Tong » Fri Mar 04, 2011 6:01 pm

This is the effect you see if you are looking at the "Reference Assemblies" (which are used by the compiler and contain no IL) instead of the real assemblies.

File/Open Cache is useful for finding the real assemblies in order to see the decompiled code.
Clive Tong
Posts: 284
Joined: Thu Dec 04, 2008 4:42 pm

Postby ilyclem » Fri Mar 04, 2011 6:35 pm

I tried that when I read it in another forum post. I get the same results.

I don't know nearly as much about assemblies as I should. How can you tell the difference between a reference assembly and the real one? By using File/Open Cache, does this only let you open a real one?
Posts: 3
Joined: Fri Mar 04, 2011 5:25 pm

Gateway to the unmanaged code

Postby haleyjason » Sat Mar 05, 2011 1:00 pm

It looks to me that you have hit the gateway to the unmanaged code ... meaning that property calls into unmanaged code - so there is no IL to decompile from that point. Reflector won't jump into the unmanaged code and decompile it.

Could be a few reasons that I can think of:
1. the assembly that holds the implementation has been NGen'd
2. the code is calling into the CLR (which is unmanaged)
3. the code is a RCW (runtime callable wrapper) which is a proxy for a COM object (which is unmanaged)
Posts: 78
Joined: Sat Oct 25, 2008 4:34 pm
Location: Seattle, WA

Postby ilyclem » Mon Mar 07, 2011 2:17 pm

That is what I was afraid of. It's got to be #3. I don't understand COM as much as I should either so I wasn't sure what limitations there were. Thanks for the explanation!
Posts: 3
Joined: Fri Mar 04, 2011 5:25 pm

Return to .Net Reflector 6.x and .NET Reflector 6.x Pro

Who is online

Users browsing this forum: No registered users and 0 guests