|
The dotGNU people is currently looking still looking doing an ASP.NET implementation. Come chat on IRC irc://irc.freenode.org/dotgnu , I'm sure quite a few people will be interested on hearing some details!
Cheers
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
I have just spent about 3 months writing a program for PocketPC and a PC version in C# just to find out that within seconds it can be decompiled into readable source code. Does that not bother anyone else but me? I know it's my fault for not checking out the language more before starting but I need a way to protect my code. Any ideas. I am a single programmer selling software and I can't afford the expensive obfuscation tools. Any help would be appreciated. If I can't get a work around I will have to rewrite the application in c++. Thanks.
|
|
|
|
|
Hi. You can use an obfuscator tool on your assemblies. Do a web search for ".net obfuscator" and you'll find a bunch.
<oops>
I just read your message more carefully. I don't know of a freeware obfuscation tool... keep searching though - there may be one out there.
</oops>
|
|
|
|
|
Obfuscator tools wont really help you out much in this area. It might dissuade people who aren’t very driven to see how your code works, but for every obfuscator out there, there is a de-obfuscator that will unscramble the code. Besides, from my understanding, an obfuscator just scrambles the local variable names, to make it harder to follow the code. But the basic code; if, else, for, switch statements, as well as Function calls will still be very clear to read. I’ve looked at obfucatored code before using Anikrino and was still able to follow the algorithm used.
john C
|
|
|
|
|
This is the problem with knowing a language/syntax and knowing a technology. All language compilers targeting the CLR compile to IL (so the source language really doesn't matter, sans some specific compiler optimizations), which is in many ways like assembler. The IL is JIT'd to native code and executed. Of course it can be disassembled.
But any good programs should fear very little. Copyright your work and make a good product that users want to buy, not buy because they don't really have any better choices. There are many programs out there written in .NET. Heck, Java is no different.
If you're using cryptography anywhere, it's always been said and written by leading cryptoanalysts that the best cryptographic libraries are open. Your algorithms should be so good that you don't need to depend on data-hiding.
Finally, if pieces of your application are really so important and you can't deal with the fact that some schmoe wants to copy pieces of it, make a native library and P/Invoke the functions (or, if using COM, create an RCW for your native COM object). This way, the majority of your application is still managed (which mainly gets that name from its memory management capabilities) and is faster to write and maintain.
Just something to think about.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Just something to add.
VS.Net 2003 comes with a free obsfucator.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
Support Bone
It's a weird Life
|
|
|
|
|
I'd like to compare a user specified file mask with a given file.
I can write my own function, but many of the .NET methods use this ability and I was wondering if it was hiding someplace ?
So my question is simple, does anyone know of a .Net method that will allow me to compare a file and file spec (file mask) ?
i.e. compare all the files in System32 to *.d??
|
|
|
|
|
See the DirectoryInfo.GetFiles method:
DirectoryInfo di = new DirectoryInfo(
Environment.GetFolderPath(Environment.SpecialFolder.System));
FileInfo[] fis = di.GetFiles("*.d");
if (fis != null)
foreach (FileInfo fi in fis)
Console.WriteLine(fi.FullName);
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
This is the way I'm doing it now.
I'm actually getting the filename off a socket. So I create a dir and write a zero-length file using the file name then use the Directory.GetFiles() method. I just didn't know if there was a method that I could specify the file name and mask and get a boolean result, or something along those lines, so I don't have to write to disk. Thanks for your help as usual Heath.
-Mike
|
|
|
|
|
Well, you could generate a regex out of the mask.
Add "^" to the beginning.
Add "$" to the end.
Replace "*" with ".*".
Replace "?" with ".".
And that should do it.
Although you'll need to escape some characters like "(", "+", "." and "[" and a lot more.
|
|
|
|
|
how to change the tab contol background color?
thnx in advance
|
|
|
|
|
You'll have to handle painting yourself since TabControl.BackColor always returns SystemColors.Control . You'll have to extend TabControl with your own class and override OnPaint to do so. There should be several articles here on CP ( I knew of a good one, but the bastard went commercial and pulled all his articles off CP after he got all our free help and beta testing! )
Why is this so hard? Because almost every control in System.Windows.Forms is just a wrapper for its Windows Common Controls equivalent where such details are often abstracted or don't fit the .NET pattern at all times. It is possible, though. I used a similar approach to override the painting for the actual TagPage s in order to make them use the Theme API (for Visual Styles) correctly (they don't by default).
[EDIT]
Note: this is only for the TabControl itself. To paint the TabPage s, see the next message I posted (memory slipped!).
[/EDIT]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
You can set the TabControl.DrawMode to TabDrawMode.OwnerDrawFixed and 1) handle the TabControl.DrawItem event if handling the painting from another control, or 2) override the TabControl.OnDrawItem if extending the TabControl with your own class (faster than handling the event inside a derivitive class).
[EDIT]
Note: this is only for the TabPage s. See the previous message about the TabControl itself.
[/EDIT]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi,
I am goin to make a Toolbar (band) for the Internet Explorer. But I can't find any good examples on that subject. I need to have a concrete example of a toolbar, that's all I need to advance..
Thank You!
//- UP THE IRONS, MORTEN S. KRISTENSEN -\\
|
|
|
|
|
Since you're in the C# forum, I assume you're going to do this in C#. Therefore, see this article: Extending Explorer with Band Objects using .NET and Windows Forms[^]. This provides a simple base class and attribute to make DeskBands.
I should warn you, however, that this is somewhat limited. You'd be better off using C++ and write one using COM or ATL (wrapper classes for COM). For documentation, search MSDN[^] for IDeskBand . You'll find LOTS of information.
Even if you use the first link I gave you, you should still read some of the information from the search results I mentioned directly above. It's important to understand how things work.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Yeah I read the example over a couple of times, but I'd like a more concrete example. That is if that is possible of course. And I also have to say that I code in notepad/mono =)- Dont have VS.NET.
And yes there is indeed mostly information in C++, but there has to be some good ones in C# too.
Hmm..
//- UP THE IRONS, MORTEN S. KRISTENSEN -\\
|
|
|
|
|
Morten Kristensen wrote:
And I also have to say that I code in notepad/mono =)- Dont have VS.NET.
Good for you. I do a lot of coding in GViM, but what does that have to do with anything? You don't need VS.NET to code these solutions.
Morten Kristensen wrote:
but there has to be some good ones in C# too.
There has to be? Someone has to be first. If you do a search on CP like I said, you'll find plenty of related articles about how to emulate a console window. The first link was how to actually embed the cmd.exe console window. If you can't find decent material in .NET, P/Invoke the functions required in the good C++ articles. Not everything is available in .NET, not even when Longhorn comes out (though a LOT more APIs will be available for managed applications).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath Stewart wrote:
but what does that have to do with anything?
Yeah so right... =)
Okay I think im gonna study again.. Thx Man
//- UP THE IRONS, MORTEN S. KRISTENSEN -\\
|
|
|
|
|
Does anyone know of any examples of a document/view model in c#?
Thanks a ton,
|
|
|
|
|
There's been a recent multi-part article on document-centric applications on the Microsoft Developer Network (MSDN): http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms09182003.asp[^]. As a developer, you should frequent not only CodeProject but MSDN as well - it contains a HUGE library of API and framework documentation, plus thousands of articles and tutorials on practically any Microsoft-related technology (and even some non-Microsoft technologies) you can think of.
Note: I gave you the link to part 1. See the table of contents (TOC) on the left of the page for other other 2 or 3 parts.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have a regular window application project by C#. I like to embed this window application on the browser which is a ASP.NET application. I used to program ASPX page with ActiveX control component from 3rd party.
How do I convert C# based application to activeX control so I can run on the browser? Once I create dll files within .NET 2003 environment (C# compiler), can I program a activeX control by either C#, VB and/or C++ in .NET?
Or is it impossible to use .NET dll with VB6.0 in order to create activeX control?
Thank you,
Young
Java and C# programmer
|
|
|
|
|
You don't - you can embed .NET controls in Internet Explorer. You can make an CCW (COM-callable wrapper) for your .NET control, though, so that you can script it. I've been working on converting an older article from another site, but this should help you: User Controls for Windows and the Web[^]. There's also an article by Nick Parker that goes a little more in depth about how to create a CCW for your .NET control here: Creating a CCW for COM enabled non .NET applications[^].
Note that all this still uses the <object> tag, but with a different format for the classid parameter: it is a URL to the assembly, followed by a # sign, then the fully-qualified type name for the Type that you want to embed. There is more information in MSDN about this deployment method: Deploying a Runtime Application Using Internet Explorer[^].
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Is there a simple way to emulate console mode on a GUI form or dialog box? Perhaps an article or control somewhere? Would it be logical to create one as a derived Rich Text box?
Thank you,
Ray Gregory
|
|
|
|
|
Ray Gregory wrote:
Would it be logical to create one as a derived Rich Text box?
No! The RichTextBox is not really a line-driven control and would be left parsing lines - perhaps even RTF for multi-line commands or commands with tabs - and it would not be worth it.
There is one article here on CP that I know about that actually embeds a console window in an Explorer bar: Command Prompt Explorer Bar[^]. This might give you some tips about embedding it in your application, but make sure you know how to P/Invoke native functions.
You should also search[^] the CodeProject site for "console". There are many pages worth of hits, and the link above only searching C#/.NET/VB.NET article topics. Add MFC/C++ in there if you feel comfortable P/Invoking native functions.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi, Guru
How to know at any time the Shift or Control key up or down. (console application)
Thank You.
Sorry for bad English.
|
|
|
|