DLL Files  
Author Message
JavaBoy





PostPosted: Visual C# General, DLL Files Top


Visual C#17  
 
 
jainvikr2





PostPosted: Visual C# General, DLL Files Top

You can try to view the code using LUZZ .NET REFLECTOR utility . You can get it on net . Try this

 
 
Mattias Sjogren





PostPosted: Visual C# General, DLL Files Top

http://www.ecma-international.org/publications/standards/Ecma-335.htm

http://msdn.microsoft.com/net/sscli/

plus books like Essential .NET Volume I: The Common Language Runtime by Don Box and CLR via C# by Jeffrey Richter



 
 
Ilya Tumanov





PostPosted: Visual C# General, DLL Files Top

This forum is smart device development related. Since your question is not related to smart device development, it's off topic here.

If you’re having a hardware issue, please contact hardware manufacturer or reseller. If you having an issue with 3rd party software, please contact respective software manufacturer or reseller. Otherwise please post to relevant forum or news group:

http://support.microsoft.com/newsgroups/default.aspx

Closing as off topic.



 
 
PJ. van de Sande





PostPosted: Visual C# General, DLL Files Top

You can create an DLL so that you can easy deploy this with more projects.

There are no performance penalties, when a DLL is needed it will be loaded and it stays loaded untill the application ends.

For your development it can be handy to have multiple projects (DLL's) and for the update process it can be usefull to. The user doesn't have to download a very large .EXE file when you only updated one class for example. You can sepperate them by namespace, just as the .NET Framework does.
  • MyApp.Data < MyApp.Data.dll >
    • MyApp.Data.Gateway
    • MyApp.Data.Gateway.Mssql
    • MyApp.Data.Gateway.Access
    • MyApp.Data.Gateway.Webservice
  • MyApp.Net < MyApp.Net.dll >
    • MyApp.Net.Update
  • MyApp.Drawing < MyApp.Drawing.dll >
    • MyApp.Drawing.Imaging
It can olso be handy for reusing some DLL's in other projects. So maybe when you write an extra AddIn for you application, the AddIn can use the DLL's as well.



 
 
a_takavci





PostPosted: Visual C# General, DLL Files Top

i'm trying to find out why two different builds of visual studio produce different dll files.
Scenario is :
build a project, get a copy of the dll,
then clean and rebuild the project without changing source code,
then get the newly created dll file and compare with first dll by content ,
files are not identical,
i wonder why


 
 
mert-1





PostPosted: Visual C# General, DLL Files Top

So, would you answer the following questions
1 ) Can we say that all different packages have different DLL files
2 ) When we compile any project, is it true that the classes of the package of that project is compiled
3 ) By knowing what DLL files means, now we can refer internal keywords. So Can we say that internal keyword has the same meaning with protected keyword in Java

Thanks


 
 
Pradeep Gupta





PostPosted: Visual C# General, DLL Files Top

hai,

thanx for ur help

i downloaded from the net.

i saw everything , but i didn't find the system.data.sqlclient dll

can u pls tell me.

Once again thanx


 
 
jainvikr2





PostPosted: Visual C# General, DLL Files Top

You can get System.data.SqlCilent namespace in System.data.dll assembly. Just add reference for system.data namespace.

 
 
PJ. van de Sande





PostPosted: Visual C# General, DLL Files Top

1 ) Can we say that all different packages have different DLL files


I try to seperate unrealated projects from each other. For example i have an CompanyName.Controls.dll. This library contains all controls that we have created for our applications. In each application is use controls from that library. When someone has found a bug in a control, i can fix it and this will fix it for all projects that are using that library.
I don't want to re-create the controls for each project, so i bundle them into one library.

2 ) When we compile any project, is it true that the classes of the package of that project is compiled


I'm not sure what you mean with package But when you compile a project, the full project will be compiled. So all source files that are in this project and all resources will be compiled to an assembly.

3 ) By knowing what DLL files means, now we can refer internal keywords. So Can we say that internal keyword has the same meaning with protected keyword in Java


I don't have a lot of experience with java, but you can find the exact meaning of the protected keyword here: protected (C# Reference).
You can also take and look to the following article that will show the difference between the available access modifiers: Accessibility Levels (C# Reference).


 
 
Mattias Sjogren





PostPosted: Visual C# General, DLL Files Top

The binary contains, among other things, time stamps that change from one build to another.

 
 
a_takavci





PostPosted: Visual C# General, DLL Files Top

ok then,
is there a chance to compiling source code without a timestamp (or may bu using same timestamp)
because i want to differentiate if change is only for timestamp or because of changes on source code.
think the situation as you dont have source code and you have two dll files.
You want to know they are compiled from same source or not
what would you do


 
 
RizwanSharp





PostPosted: Visual C# General, DLL Files Top

File - > Open Cache - > System.Data -> Open

Browse the Tree and Go to SqlConnection.....

Best Regards,



 
 
mert-1





PostPosted: Visual C# General, DLL Files Top

Hi ,
Firstly thanks very much for your explanatory reply.
I also want to ask something about assemblies.
I think all assemblies are constructed by namespaces which include the classes that is compiled at that time, is not it
So, internal keywords provide us to access the only classes which are located in that namespace(Assembly's namespace), is it true


 
 
Matthew Watson





PostPosted: Visual C# General, DLL Files Top

You are correct.

 
 
a_takavci





PostPosted: Visual C# General, DLL Files Top

in fact my question is simple,
i'm looking for a way to do a source code based comparison on two .net dll files.

may be i can extract a dll file and draw a file layout like this:
- from first byte to tenth byte is section that hold dll version
-from eleven to twelve is timestamp
-from ... to .. is method stubs
-from .. to .. is code section

i know it will be a complex layout but if i can find the format , then anything can be done about this comparison issue.

 
 
Pradeep Gupta





PostPosted: Visual C# General, DLL Files Top

hai,

thanx for ur help , i got it.

suppose if we want to know the code of sqlconnection(), means how they develop the code for sqlconnection and open().

in .Net.

how is it possiblie to know. tell me pls..

Thanx...


 
 
jainvikr2





PostPosted: Visual C# General, DLL Files Top

Yaa can open dll and go to SQL connection class, look for Open method .

 
 
Mattias Sjogren





PostPosted: Visual C# General, DLL Files Top

I would disassemble both binaries to IL assembler source files with Ildasm.exe, then compare the source using a textual diff tool (like WInDiff).



 
 
mert-1





PostPosted: Visual C# General, DLL Files Top

Thanks very much, this is the answer that I am willing to hear after studying on it too much.

Best wishes,

Mert(JavaBoy)


 
 
a_takavci





PostPosted: Visual C# General, DLL Files Top

thank you very much Mattias, it is very heplful for me.
it's hard to find out changes even using il code(because compiler locates some guid in code).
thank you again.



 
 
Pradeep Gupta





PostPosted: Visual C# General, DLL Files Top

hai sir,

iam using the console application, so, iam unable to see the dll file of the corresponding open() method, can u suggest me to break the exe file and to find the code for open method.

Thanx for ur help..


 
 
PJ. van de Sande





PostPosted: Visual C# General, DLL Files Top

 
Hi ,
Firstly thanks very much for your explanatory reply.
I also want to ask something about assemblies.
I think all assemblies are constructed by namespaces which include the classes that is compiled at that time, is not it
So, internal keywords provide us to access the only classes which are located in that namespace(Assembly's namespace), is it true


This is correct indeed.

Quote of deleted reply
 
I heard that internal keyword means that the visiblity for classes which is kept in the same DLL library(File). So, I wonder that internal keywords provides the visibility for classses which are in the same namespaces.


No, the internal keyword is an access modifier for types and type members. Internal types or members are accessible only within files in the same assembly. You can read the full details and see and example here: internal (C# Reference).

 
The reason for my this opinion is that I know that DLL files is constructed by allocating the classes who have similar functions or are a little bit related with each other.
For example, we use using keywords to call any class of ant specified namespaces. So, does it have the same meaning with this : we call the DLL files of the class that we wnat to use in our project (or files)


No, a DLL can contain one or more namespaces. Most of the time you have a Namespace like CompanyName.Controls and meybe extra namespaces related to it like CompanyName.Controls.Painting, CompanyName.Controls.Input and CompanyName.Controls.Grid.

 
And, Does creating namespaces have the same meaning with creating DLL files


No... the same reason as one quote above



 
 
Pradeep Gupta





PostPosted: Visual C# General, DLL Files Top

hai ,

iam not viewing that sql client.

SqlConnection conn = new SqlConnection("CONNECT TIMEOUT=10; SERVER=192.168.10.7,1433; DATABASE=Northwind; USER ID=sa ;PASSWORD=sa; ENCRYPT=false; POOLING=false;");

using that command , we are trying to connect to database of a remote server..

so my problem is to know the internal code of the above command.

can anybody tell me ..


 
 
mert-1





PostPosted: Visual C# General, DLL Files Top

Hmm,
I supposed that at the below codes, that are form the link that you sent, should not have created any error since both class are in the same default namespaces as in the Java.
So I would like to ask that is not there any default namespaces concept in C#
So if there is, why does the following ocde snippets create an error


// Assembly1.cs
// compile with: /target:library
internal class BaseClass
{
public static int intM = 0;
}
// Assembly1_a.cs
// compile with: /reference:Assembly1.dll
class TestAccess
{
static void Main()
{
BaseClass myBase = new BaseClass(); // CS0122
}
}


 
 
mert-1





PostPosted: Visual C# General, DLL Files Top

Oh,
I also add that my question is valid for the classes that are compiled at the same time(in the same Assembly).


 
 
PJ. van de Sande





PostPosted: Visual C# General, DLL Files Top


Hmm,
I supposed that at the below codes, that are form the link that you sent, should not have created any error since both class are in the same default namespaces as in the Java.
So I would like to ask that is not there any default namespaces concept in C#
So if there is, why does the following ocde snippets create an error


The namespace isn't related to the internal access modifier, it is the assembly that is creating the hence around your class.
Every class in every namespace can use your internal BaseClass as long as they are in the same assembly as the BaseClass.


 
 
PJ. van de Sande





PostPosted: Visual C# General, DLL Files Top

Oh,
I also add that my question is valid for the classes that are compiled at the same time(in the same Assembly).


Yes, then it should not give any errors.


 
 
mert-1





PostPosted: Visual C# General, DLL Files Top

So, we do not know that wheter the following snippet are compiled at the same time or not.
So how can Ms programmer claim that the following code cretae error
That is what I mean to ask before

// Assembly1.cs
// compile with: /target:library
internal class BaseClass
{
public static int intM = 0;
}
// Assembly1_a.cs
// compile with: /reference:Assembly1.dll
class TestAccess
{
static void Main()
{
BaseClass myBase = new BaseClass(); // CS0122
}



 
 
mert-1





PostPosted: Visual C# General, DLL Files Top

Also can we implicitly say that ; assembly == DLL file is true
If not why
The reas n for my generilization is that assembly contains the same main(biggest) namespaces with the DLL file, is not it


 
 
mert-1





PostPosted: Visual C# General, DLL Files Top

Another question is that can we say that all default namespaces are specific(not default) according to themselves(their classes and members)