Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

Class library and dotfuscator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mart_nl@hotmail.com - 08 Sep 2007 08:57 GMT
Hi group,

I have a class library containing a Windows form. I create a dll from
this project and use it in my application like so:

Assembly asm =
System.Reflection.Assembly.LoadFrom("path_to_file.dll");

Form newForm = new Form();
newForm = (Form)asm.CreateInstance("Namespace.frmTestform");

newMDIChild = newForm;

This works like a charm. I now put all the dll's like this in one
directory and load them into my app.

Now the problem comes when I use Dotfuscator. The line that says:
newMDIChild = newForm;

Gives me a null exception error. I can set Dotfuscator to "library"
mode and then my code works again. However the library is easy to
decompile.

So I'd like to know if it is at all possible to load the assembly in
any other way and still be able to fully use dotfuscator. I do I have
to settle for less protection?

Kind regards,
Martin.
Arne Vajhøj - 08 Sep 2007 17:57 GMT
> I have a class library containing a Windows form. I create a dll from
> this project and use it in my application like so:
[quoted text clipped - 20 lines]
> any other way and still be able to fully use dotfuscator. I do I have
> to settle for less protection?

I will assume that when mode library the obfuscator keeps
public names.

Maybe you could change more names to internal.

Else you could look for an obfuscator that allows you to
list names to exclude from obfuscation.

Arne
hagipro@gmail.com - 09 Sep 2007 17:05 GMT
On 8 sep, 18:57, Arne Vajh?j <a...@vajhoej.dk> wrote:
> mart...@hotmail.com wrote:
> > I have a class library containing a Windows form. I create a dll from
[quoted text clipped - 31 lines]
>
> Arne

Hi Arne,

Thank you for your help. I will look at changing names to internal.
And I also thought about making a
seperate class where I would put all the "sensitive" coding. If I
reference the class from the "form class"
I could totally obfuscate that class yet leave the class with the form
untouched (library mode).

Martin.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.