473,394 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Obfuscating code with embbeded cursor resourse

Hi

This line works both in the debug and release mode:

Me.Cursor = New Cursor(Me.GetType(), "NoCur.cur")
After obfuscating the release exe I got this error message:

System.ArgumentNullException: Value cannot be null.
Parameter name: dataStream
at System.Windows.Forms.Cursor..ctor(Stream stream)
at System.Windows.Forms.Cursor..ctor(Type type, String resource)
How can I change the code to work after obfuscation?
Thanks in advance

MG

Nov 16 '05 #1
4 2790
Manel G <No****@NoSpam.Net> wrote:
This line works both in the debug and release mode:

Me.Cursor = New Cursor(Me.GetType(), "NoCur.cur")
After obfuscating the release exe I got this error message:

System.ArgumentNullException: Value cannot be null.
Parameter name: dataStream
at System.Windows.Forms.Cursor..ctor(Stream stream)
at System.Windows.Forms.Cursor..ctor(Type type, String resource)
How can I change the code to work after obfuscation?


What options does your obfuscator give you in terms of obfuscation of
resources?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
Jon Skeet [C# MVP] wrote:
Manel G <No****@NoSpam.Net> wrote:
This line works both in the debug and release mode:

Me.Cursor = New Cursor(Me.GetType(), "NoCur.cur")
After obfuscating the release exe I got this error message:

System.ArgumentNullException: Value cannot be null.
Parameter name: dataStream
at System.Windows.Forms.Cursor..ctor(Stream stream)
at System.Windows.Forms.Cursor..ctor(Type type, String resource)
How can I change the code to work after obfuscation?

What options does your obfuscator give you in terms of obfuscation of
resources?


I am using the Dotfuscator Comunity Edition that comes with VS NET 2003.

I can't find 'NoCur.cur' in the Rename tree.

Thank you

MG

Nov 16 '05 #3
Manel G <No****@NoSpam.Net> wrote:
What options does your obfuscator give you in terms of obfuscation of
resources?
I am using the Dotfuscator Comunity Edition that comes with VS NET 2003.


I haven't used that myself - does it give you any options?

I wonder whether the problem is that the type name itself has been
obfuscated, but the resource name *hasn't* been changed appropriately.
I can't find 'NoCur.cur' in the Rename tree.


If you run ildasm on the assembly and look in the resources, can you
find it there?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4
Jon Skeet [C# MVP] wrote:
Manel G <No****@NoSpam.Net> wrote:
What options does your obfuscator give you in terms of obfuscation of
resources?


I am using the Dotfuscator Comunity Edition that comes with VS NET 2003.

I haven't used that myself - does it give you any options?

I wonder whether the problem is that the type name itself has been
obfuscated, but the resource name *hasn't* been changed appropriately.

I can't find 'NoCur.cur' in the Rename tree.

If you run ildasm on the assembly and look in the resources, can you
find it there?

Yes

Please don't take more time. I found an alternative syntaxe supported by
the Dotfuscator:

Me.Cursor = New Cursor(ResourceStream("NoCur.cur"))

ResourceStream is a function that returns a stream

Thanks for taking your time

MG

Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Pastrovick | last post by:
When writing an HTML table after a PHP database query very occasionally (1 out of ten times -- same code) the HTML page is truncated and cells/or full final rows of table are missing. Looking at...
7
by: steve | last post by:
Hi, I know there are a few free and paid php source code encryption scripts around. Has anyone used one, and any feedback? I am interested in encrypting source that is placed on a remote host....
1
by: morteza hamzehi | last post by:
i want a good resourse for to learn replication in sql 2000 inoder to practical learn and implemetion replicat
9
by: Saso Zagoranski | last post by:
Hi! I have recently completed an application, written in C#. When I opened one of the files with a hex editor I was amazed by the lack of protection for the assemblies. My application uses SQL...
7
by: Paul Aspinall | last post by:
Hi I have developed a C# app which uses SQL Stored procs... which I plan to deploy as a single / low user version on MSDE. My SP's all have 'meaningful' names. However, as I want to protect my...
3
by: SStory | last post by:
I would like to see some discussion on what most small-time shops do for protecting there code---obfuscating. I can't afford professional dotfuscator at present, but would like to obfuscate and...
6
by: Lou | last post by:
How do i get an icon from a resourse file Dim IC As New Icon(Icon, "mnu_file_open") That doesn't work?
4
by: jason.awlt | last post by:
Greetings, I recently being bugged by the following error on my DB2. SQL0902C SQLSTATE = 58005 Reason Code = 14 This error comes out everytime i tried to insert some record to a table...
2
by: JJ | last post by:
I'm using Visual Studio 2005. I'm trying to protect my website dll files as best as possible using obfuscating approach. I've tried to use Dotfuscator Community Edition (comes with Vis Studio) to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.