|
|
I have two pcl files containing logos in each. I need to merge the file into a single pcl file. Iam able to merge the same but the problem is i get the two logos one after the other. I need the two logos to appear on the same line at top of the pcl file instead of one below the other. Iam using the code below to achieve what iam getting.
public void fileMerger(string inputFile, string outputFileName,string filetype )
{
{
#region get PCL file from inputFile
String ftype = "*." + filetype;
string[] tmpfiles = Directory.GetFiles(inputFile, ftype);
#endregion get PCL file from inputFile
FileStream output = new FileStream(outputFileName, FileMode.OpenOrCreate);
#region start Processing
foreach (string tempInput in tmpfiles)
{
FileStream inputfiles = new FileStream(tempInput, FileMode.Open);
if (inputFile.EndsWith(Environment.NewLine))
{
inputFile = inputFile.TrimEnd(Environment.NewLine.ToCharArray());
}
//Library.Utils.FlashMessage("inputfiles", "read");
CopyStream(output, inputfiles);
}
#endregion start Processing
}
}
void CopyStream(Stream destination, Stream source)
{
int count;
byte[] buffer = new byte[1000000];
while ((count = source.Read(buffer, 0, buffer.Length)) > 0)
{
destination.Write(buffer, 0, count);
}
}
Please help..
modified 25-May-12 5:49am.
|
|
|
|
|
You need to modify the PCL content to make the information appear on the same line. Just copying one stream followed by the second is the same as sending them direct to the printer one after the other.
Programming is work, it isn't finger painting. Luc Pattyn
|
|
|
|
|
I am looking for a software license management tool. Any suggestions?
|
|
|
|
|
Yeah, don't waste your time and money. Every single one of them has cracks available. All you end up doing is slow down the people who want your software for free and make it harder for the people who want to pay for it to use your software.
|
|
|
|
|
Good idea!
Could you please try to convince the managers of the company where I work?
Here, it is the job of software development to enforce that the user can use only those features of the software on those computers in his organisation our sales team wants him to grant (but never will write it down in a license agreement, everything has to be accomplished by technical limitations, so the user does not exactly know what he is granted to use). And of course, development has to make sure that the user cannot manipulate that...
|
|
|
|
|
Bernhard Hiller wrote: Could you please try to convince the managers of the company where I work?
Ask them how much they want to invest. Then tell them that I can break it. How much protection do you need? Are the users the kind of person that I am? Is it a problem at all, or is it more "a good idea"? I've seen quite some companies invest in copy-protections, and it hardly ever results in more sales.
Bernhard Hiller wrote: And of course, development has to make sure that the user cannot manipulate
that...
Only things that are not on my machine will not be manipulated. Even if you'd keep the information on your server, I'd be sniffing what you're sending (using fiddler2), trying to replicate it on a different server.
Bastard Programmer from Hell
|
|
|
|
|
Eddy Vluggen wrote: Ask them how much they want to invest.
My time.
Eddy Vluggen wrote: Only things that are not on my machine will not be manipulated.
Don't tell my boss how you do that, otherwise I'll have to invent something new, and then we can repeat that some rounds...
|
|
|
|
|
Bernhard Hiller wrote: My time.
Whehe, aight, spoken like a manager. Your time equals a certain amount of money, aka "cost". Is he prepared to keep you on this task until your retirement?
Bernhard Hiller wrote: Don't tell my boss how you do that, otherwise I'll have to invent something new, and then we can repeat that some rounds...
There is no system that cannot be broken - Stuxnet[^] kind of made that clear.
The question should be how much protection do you need, against whom, and what's "reasonable". If you need the kind of protection that Microsoft has on their products, you might need to spend the same amount - and despite the registration key, the registered ownership, and the holographic seal, it's still pirated a lot. Did you install that "Windows Genuine Advantage"-thingy on your Windows machine?
Most software-vendors will be selling to other companies. That means that software is less likely to appear on The Pirate Bay - there aren't that many companies that allow you to run something like bittorrent on their computers. If the product is particularly hard to install/setup, than you might have something that's more effective than most copy-protection scheme's could be.
If your app is more public, then it might be wise to have it "compile on download" and embed a guid in there that makes it a unique application. And then embed the name of the person logged in on the website and show that in the applications title-bar. No, not hard to change the caption with a hex-editor, but it would be hard to identify the guid and change that.
There's an article[^] here on CodeProject on the subject, perhaps you could collaborate?
We used a HASP dongle[^] in the past, first parallel, then the USB-kind. It's a more expensive kind of solution that's harder to crack. If you Google a bit, you'll find that it merely takes more effort.
Bastard Programmer from Hell
|
|
|
|
|
There's a ton of them, most of which do something different that may or may not match what your requirements are. Some are going to cover the entire app as a single "feature", others will let you break up an app into seperate licensable parts, but this will also require you to design your app around the licensing system. Though, if you already have your app, it's a little late to take this approach.
Seriously, you're going to have to do the homework on this yourself. Just Google for "software licensing tools" and start going down the list.
|
|
|
|
|
Bernhard Hiller wrote: his organisation our sales team wants him to grant (but never will write it down
in a license agreement, everything has to be accomplished by technical
limitations
I would suppose that tactic opens your company up to civil judgements, in that a customer might sue based on a lack of a feature (one that I am sure is advertised promoted) but which they do not have.
And your company doesn't have the documentation to prove that they did not buy that.
Bernhard Hiller wrote: And of course, development has to make sure that the user cannot manipulate
that...
For that specific requirement customer specific builds would be one solution. If they don't have the feature then the code they have doesn't exist.
|
|
|
|
|
There are many tools available in the market which u could use to protect ur software against the piracy.
If you want to develop your own algorithm then follow following steps
1. Fetch Unique identifier for the system (Hard Disk id, cpu id, Network card number etc)
2. store this uid on the same computer (dont forget to encrypt it)
3. check the stored value every time at the startup of your software
There could be many variations for this process depending upon the type of licensing that you want to implement e.g. fixed, time based, license on activation.
Hope this will help you start going
Happy Coding
|
|
|
|
|
Amardeep Deshmukh wrote: If you want to develop your own algorithm then follow following steps 1.
Fetch Unique identifier for the system (Hard Disk id, cpu id, Network card
number etc) 2. store this uid on the same computer (dont forget to encrypt
it) 3. check the stored value every time at the startup of your software
This 'solution' accomplishes nothing....
the user takes the DVD, installs it on a new PC, then steps 1-3 are run again.
Voila - a new unauthorized copy.
If it's not broken, fix it until it is
|
|
|
|
|
Kevin,
before replying or voting you should read the comments properly!!!
I said it will start him going....
In last paragraph I did mention that there could be multiple ways of implementing it...
in your below solution as well there is one drawback...User has have a internet connectivity...So are you saying to use this software, you must have a internet access??
In that case why not to develop it as hosted site instead of as a stand alone application?
you will have control over it by providing user level access
Whats say?
Happy Coding
|
|
|
|
|
The only real way to do this is on installation send some unique PC info to your server. Then each time that copy of the software is started, compare it against what's on your sever.
If that copu is being used in more than one place, it's a pirated copy.
The only fly in the ointment is you have to build in some way for the user to move the software to a new PC. An "unregister" function of some sort.
If it's not broken, fix it until it is
|
|
|
|
|
Well,
most of your steps are correct except validating the copy with the value stored on the server.
Instead of that, following steps could be used
1.At the first launch of the application, present user an activation form
2.Provide "Request" button to send the information to some email id
3.Clicking on the button fetch the UID of the system and send these details to server
4.Also, application should write some file say "app.lic" on the machine with identifier indicating the state as requested and the UID related details
5. Write some procedure at your end "Application License Provider"
6. Generate the activation and send to user
7. At user side read the activation key, validate the "app.lic" and if the identifier from both matches activate the license.
Advantages:
1. No internet connectivity required (except for the activation)
2. good for implementing the time based licensing.
Disadvantages:
1. Reformatting or replacing the hardware used as UID leads to invalid license.
2. Not good for life time licensing.
Depending on the requirement algorithm or approach could change.Every approach has its advantages and disadvantages. So, have good thoughts upfront before implementing the copy protection for your application.
Happy Coding
|
|
|
|
|
If you're going with the web-connected stuff anyway, you could go one step further and mode a vital piece of code to the server. Pirates are going to have a pretty bad time with that.
|
|
|
|
|
Check this out. www.cybersurelock.net. Let me know what you think.
|
|
|
|
|
Is ther any component or OCX which we can use it to
generate and print a barcode? when we use the one
printer's facility, it doesn't work correctly for other printers. I want also to know is there a
general software for this purpose? thanks
|
|
|
|
|
Try this font[^].
Bastard Programmer from Hell
|
|
|
|
|
thanks I took a look at that link. I think it may work, but as I understand it can generate only
one format (Code 39). thus user cant select his own
standard. but it will give me good idea.
|
|
|
|
|
There are more barcode-fonts out there, for different formats - just don't forget to add any checksums, if required for that particular format
Bastard Programmer from Hell
|
|
|
|
|
Take a look at some of the results here[^].
When I needed a simple Code128 barcode generator for a site I was working on, I found the base code in one of these articles. It took less than 1 day to adapt the code to my purpose, so it was a very good base.
The specific article I used is this one: GenCode128 - A Code128 Barcode Generator[^] (Edit: I know this is an older article, but it converted very easily to dotnet 4 for me)
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
Thanks, but I didn't need barcode generator, the thing that I need is a program (for example an ActiveX or DLL) which I be able to use them in my own
project. I will search more carefully through the
second link which u sent.
|
|
|
|
|