Can't see code of some assemblies

Explore, browse and analyze .NET assemblies

Moderators: Luke Jefferson, Charles Brown, StephenC, Alex.Davies, Greg.Tillman, melvyn.harbour

Can't see code of some assemblies

Postby ilyclem » Fri Mar 04, 2011 6: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)> _
    Get
    <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!
ilyclem
 
Posts: 3
Joined: Fri Mar 04, 2011 6:25 pm

Postby Clive Tong » Fri Mar 04, 2011 7: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: 283
Joined: Thu Dec 04, 2008 5:42 pm

Postby ilyclem » Fri Mar 04, 2011 7: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?
ilyclem
 
Posts: 3
Joined: Fri Mar 04, 2011 6:25 pm

Gateway to the unmanaged code

Postby haleyjason » Sat Mar 05, 2011 2: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)
haleyjason
 
Posts: 78
Joined: Sat Oct 25, 2008 5:34 pm
Location: Seattle, WA

Postby ilyclem » Mon Mar 07, 2011 3: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!
ilyclem
 
Posts: 3
Joined: Fri Mar 04, 2011 6: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 1 guest