Red Gate forums :: View topic - Can't see code of some assemblies
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
.Net Reflector 6.x and .NET Reflector 6.x Pro
.Net Reflector 6.x and .NET Reflector 6.x Pro forum

Can't see code of some assemblies

Search in .Net Reflector 6.x and .NET Reflector 6.x Pro forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
ilyclem



Joined: 04 Mar 2011
Posts: 3

PostPosted: Fri Mar 04, 2011 6:30 pm    Post subject: Can't see code of some assemblies Reply with quote

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:

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!
Back to top
View user's profile Send private message
Clive Tong



Joined: 04 Dec 2008
Posts: 283

PostPosted: Fri Mar 04, 2011 7:01 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ilyclem



Joined: 04 Mar 2011
Posts: 3

PostPosted: Fri Mar 04, 2011 7:35 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
haleyjason



Joined: 25 Oct 2008
Posts: 78
Location: Seattle, WA

PostPosted: Sat Mar 05, 2011 2:00 pm    Post subject: Gateway to the unmanaged code Reply with quote

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)
Back to top
View user's profile Send private message
ilyclem



Joined: 04 Mar 2011
Posts: 3

PostPosted: Mon Mar 07, 2011 3:17 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group