|
I'm more concerned about, "that which will come after IPv6".
Let Microsoft do all the work, that's why I pay them.
|
|
|
|
|
Another thread came up with:
@"^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}[:][0-9]{1,5}$"
But what if you want to constrain the octets to ONLY values from 0 to 255? And what if you really wanna go whole hog and constrain the port to 0 to 65535?
I don't know regular expressions that well, so I am curious.
Roink
Roink
|
|
|
|
|
Roink wrote: But what if you want to constrain the octets to ONLY values from 0 to 255? And what if you really wanna go whole hog and constrain the port to 0 to 65535?
Then you head over to www.regexplib.com and you do a search[^]
|
|
|
|
|
As they say in Britain, Brilliant! Everything a growing RegEx coder needs! Thank you! Muchas gracias! Merci beaucoup!
Roink
|
|
|
|
|
Roink wrote: As they say in Britain, Brilliant
I think they say that in other countries too, not just here in GB!
|
|
|
|
|
No, it's only there.
|
|
|
|
|
Roink,
Thanks for the solution.
Following is working to check proper ip & port. I found this from regexlib.com.
But still need to do varification for port as 0,00,000, etc or 0*.
<br />
@"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5]):(\d{1,4}|[0-5]\d\d\d\d|[0-5]\d\d\d\d|6[0-4]\d\d\d|65[0-4]\d\d|655[0-2]\d|6553[0-5])$"<br />
Thanks & Regards,
Aniket A. Salunkhe
modified on Wednesday, December 3, 2008 4:47 AM
|
|
|
|
|
Hi guys,
This is a quick question:
I was wondering if it's possible to remove that dotted border on a listview selected item, anyone knows how?
Sorry if I missed some simple thing :P
|
|
|
|
|
You can modify the list view by making is partially owner drawn.
You set the OwnerDraw property on the list view to true, then handle the various Draw events.
listView1.DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(listView1_DrawColumnHeader);
listView1.DrawItem += new DrawListViewItemEventHandler(listView1_DrawItem);
listView1.DrawSubItem += new DrawListViewSubItemEventHandler(listView1_DrawSubItem);
void listView1_DrawSubItem(object sender, DrawListViewSubItemEventArgs e)
{
e.DrawDefault = true;
}
void listView1_DrawItem(object sender, DrawListViewItemEventArgs e)
{
e.DrawDefault = true;
}
void listView1_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
{
e.DrawDefault = true;
}
The events are triggered each time that part of the list view needs redrawing, and you just draw what ever you want onto the graphics object provided. You can call handy methods on the event args object like DrawText() to do the text drawing for you. Then all you do is leave out the focus rectangle, and if required, draw your own focus rectangle in the style you want.
You will need to check e.Item.Selected to see if the item being drawn is selected and if it needs a focus rectangle drawing or not.
Simon
|
|
|
|
|
I'm trying that now,
thanks alot for your quick answer.
|
|
|
|
|
|
i have made setup of my project but i want to add copy protection like no body will able to copy cd or it will be installed only once like that so how can i do this?
Thanks & Regards,
Prashant B. Lavate
Software Engineer
Mobile : +919423872257
Pune(India)
|
|
|
|
|
There are companies that provide services like this such as SafeDisc[^] and SecuROM[^] (http://www.securom.com/[^]).
There are also companies that provide USB key protection like Nexcopy[^] and KeyLok[^].
You could include some form of serial number, and you can obfuscate your code to discourage reverse engineering. and you could include a live validation check with a server you own to watch for duplicate keys.
Nothing is perfect though, there is always someone who finds a way round these things. And all of these things impact negatively on genuine paying customers.
You're better off encouraging your customers to pay through excellent support and customer service, good follow ups, regular updates and sensible prices. Forget the people who copy it, they are a minority anyway.
Simon
|
|
|
|
|
If there is only one if statement that does the check, it really doesn't matter whether you use system registry, usb dongle or computer hash. Every application written in .Net can be easily decompiled and it only takes putting ! in the if statement to make an application work on every computer. Obfuscators make it more difficult but not very much. Even application written in native c++ or vb can be easily cracked. In case it's assembler that does the cracking.
The fact that general users will not be able to make necessary registry manipulation does not mean anything as usually it's crackers you crack the program and not users. Users just download them from warez websites. Crackers on the other hand have much more knowledge than general users and use advanced tools for cracking.
What I suggest is that you put checks at different places in the program and not so obvious. Having a dll called license.dll will attract crackers. On the other hand you can put some code in license.dll which looks like license check but does nothing in reality.
Good luck!
P.S. Remember that it is very difficult to make an application that can not be cracked. The only thing you can and should do is make more difficult your program to crack and put reasonable price on it so that it really does not make sense to crack it.
|
|
|
|
|
Giorgi Dalakishvili wrote: Crackers on the other hand have much more knowledge than general users and use advanced tools for cracking.
Like their brains
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Giorgi Dalakishvili wrote:
What I suggest is that you put checks at different places in the program and not so obvious. Having a dll called license.dll will attract crackers. On the other hand you can put some code in license.dll which looks like license check but does nothing in reality.
I agree.
Giorgi Dalakishvili wrote: Obfuscators make it more difficult but not very much.
Sure they can. I like Skater since it allows you to obfuscate methods and properties with "unprintable" characters and can cause Reflector to crash. I'm sure there's probably ways around it, but making it more difficult can deter the lesser motivated crackers.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
OTOH multi megabuck protection systems like SecureOmgWtfLolBbqDisk don't stop the no cd hacks for more than a few hours or days, so I'd rate it as a lost cause.
The only way to effectively limit piracy is to design an app that can't work without talking to servers owned by the company that wrote it.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
dan neely wrote: only way to effectively limit piracy is to design an app that can't work without talking to servers owned by the company that wrote it.
True. I mentioned that the other day to some guy who didn't want people to copy his app that uses a sql express database. Require your app to "phone home" and it does keep it on a leash so to speak when it is out in the wild
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I'm directing my reply towards the OP.
Paul Conrad wrote: Require your app to "phone home" and it does keep it on a leash so to speak when it is out in the wild Smile
Just a simple phone home isn't any more effective than any other simple in application check. You need to store either a critical portion of the data or application functionality on a remote server.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
dan neely wrote: Just a simple phone home isn't any more effective than any other simple in application check.
Totally agree. I wasn't going to go into deep details as to how I approach my copy protection methods. It's proprietary
dan neely wrote: You need to store either a critical portion of the data or application functionality on a remote server.
That's part of it, but which parts is the question
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul Conrad wrote: Require your app to "phone home" and it does keep it on a leash so to speak when it is out in the wild
I liked the way you described it .. but certainly I would agree on that ... thats what I have been thinking of for an application of mine !
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
Thanks. It should not be just doing an application check, but handling control of the critical parts of the app from remote as well. See dan's post, as well as my reply to him ( I would share how I protect my code, but it's a heavily guarded secret )....
BTW, my app isn't just on a leash, but has a choke collar on the leash. It really isn't getting away
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
Imagine this situation:
Multi-user system over network. When error occurs on either machine, it is logged on a single shared file across the whole system. If one machine trues to write while another one already is, then of course IOException is thrown. (file is being used by another process...)
Question: Is there any logging library that is reliable for this kind of situations? It must be able to wait and try to log the event as long as the target file is in use or for a specified time. Am I asking for too much?
Insert funny quote here.
|
|
|
|
|
Hi blackjack,
well there is a library called log4net http://logging.apache.org/log4net/index.html[^].
If you read through the documentation you will find somthing called RemotingAppender or UDPAppender. What you can do with this is to send all your logging events to a special sink. This sink will get all events and could write them into a single file.
I think this is a much better way than using a shared file...
Hope this helps you a bit.
Regards
Sebastian
|
|
|
|