|
I have seen lots of protection schemes, all free ones are (almost) worthless.
The best solutions are:
1. no protection at all (no hassle for the user, no waste of time for the developer; yes you loose some customers who would not have paid for your product anyway);
2. hardware-dependent protection
2a. encode some characteristic (baseboard number, MAC address, disk number) in a license file; disadvantage: lots of hassle; customers don't like their software to stop functioning when they change some hardware, possibly for good reasons.
2b. idem, with server access instead of license file; disadvantage: same plus needs internet every time.
2c. deliver special hardware device (dongle). Costs ca 30$
2d. link to the serial number of a USB stick (best of all these). Still the hassle.
steve76063 wrote: Are there any attributes of a copied file that are different from the original that I can use to detect an unauthorized copy?
There is one: the physical sector number on disk. That is how some programs used to get protected on a floppy or CD. But then you could make binary copies of those disks (before first use).
And good luck if you want your app, run by a non-admin, find out its sector number on modern Windows versions (Vista, 7).
|
|
|
|
|
Well, I may have found what I've been looking for...
Keep in mind, I'm not looking for a foolproof copy protection scheme--there's no such thing. We've used dongles before, but it gets cumbersome--especially when the client's computer already has 4 or 5 other dongles already attached!
I was just looking for a quick simple way to prevent unauthorized copying of my file.
I've found out that when I CreateFile() I can use the FILE_ATTRIBUTE_OFFLINE for the file and it's file icon is a light blue X, and it's Attribute is listed as O. If I copy the file to another location, it loses it's 'O' attribute! I'm can test for the attribute using the GetFileInformationByHandle() and it works just fine.
I'm just trying to deter casual copiers, not dedicated 'crackers', so this should be 'good enough'.
One caveat that I've just discovered is that the Offline attribute is only for NTFS drives, so that leaves out distributing my file via Floppy or CD...it'll have to be an NTFS formatted Flash Drive.
modified on Monday, April 13, 2009 6:21 PM
|
|
|
|
|
|
Hi All
When file is deleted from drive then some where present in hard disk.i want to know where is present in hard disk.Can any one tell me where is present file in hard disk.There is any API or document.
plz help me
|
|
|
|
|
At the file system level, a file does not get moved when it is deleted. The file system simply marks its space as available.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks for reply
How can i get it from Hard disk?Can you give me API?
|
|
|
|
|
No API is available you have to do it to understand File System.
|
|
|
|
|
Here[^] you find some open source project related to File recovery.
Do not trust a computer...
Always check what computer is doing
regards,
Divyang Mithaiwala
Software Engineer
|
|
|
|
|
I have written CDocument derived class's Serialize method to check the version on the archive and throw an exception if it doesn't match. After throwing the exception, the Window title still shows the file name that had an error.
How do I cancel serialization completely and go back to the previous file that was open?
Thank you masters!
|
|
|
|
|
I used the following method to cancel the serializing process:
void CMyAppDoc::Serilize(CArchive &ar)
{
if (
{
ar.abort();
return;
}
}
But it always cause an exception. Any idea?
Thank you masters!
|
|
|
|
|
Hi guz ..
in my project im reading input file from .txt
the file contains has two rows
first row contains A,B,C ans so on, in UPPER mode
second row contains a,b,c ,,, bla bal bla
for exmaple the user input A the program will out put a as well
how i can math this toghther ??
im using two for loops one to hold 1st row
and the other for loop to hold the 2nd row
i tried to output the output was same as format of .txt file
and my question how to input for example A the output will be a?
|
|
|
|
|
As of now, I know that you have a file and a program. If you can rephrase your query to something that we can understand, well, we will reply.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
dr.nokia wrote: in my project im reading input file from .txt
the file contains has two rows
first row contains A,B,C ans so on, in UPPER mode
Do you have something like:
std::ifstream fin;
fin.open("Letters.txt");
std::string strLine;
std::getline(fin, strLine);
std::replace(strLine.begin(), strLine.end(), ',', ' ');
std::stringstream ss(strLine);
std::vector<char> vecUpper;
std::copy(std::istream_iterator<char>(ss), std::istream_iterator<char>(), std::back_inserter(vecUpper));
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
Is it possible to call a visual studio 2008 dll from VS6.0 dll? I am using VC++.
If you guys have some information regarding this, please let me know.
regards,
Rana
|
|
|
|
|
Yes.
It shouldn't be a problem unless you are mixing Managed and Native terminologies.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
_AnsHUMAN_ wrote: It shouldn't be a problem unless you are mixing Managed and Native terminologies.
What is the problem in mixing managed and native terminologies? Especially given the context of this thread, what else other than using a DLL (COM Interoperability) can be a sensible way to consume something written in managed code, if I am on the native code side?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
INTEROPERABILITY, nothing else. My guess was that the OP was developing the dll in the managed environment.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
Well yes and no. If the VS 2008 DLL used dynamically linked MFC, you will likely have problems. If the VS 2008 DLL dynamically linked to the CRT, I'm not sure what the behavior is if you allocate memory in one and free it in the other.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
It has nothing to do with the 'DLL' terminology. If I link dynamically to a third party library from a DLL written with VS6 environment, that would depend on the third party library. This does not mean that a DLL written in VS6 will ALWAYS depend on that third party library.
In other words, you are kinda marrying a DLL with what it is linking to. I was pointing out that a DLL is just well, a DLL.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
There are a lot of articles in this website explain the technical of P/Invoke and inter operation between VC and .NET.
|
|
|
|
|
Hi,
I am a c# developer, i got an c++ application source code which i need to incorprate with my current application in c#.I dont know c++ so i am not understanding the source code in c++.
I have turbo c++ in my system. I am very much confused in c++, How can i start developing application in c++, I need to study the source code in c++ which i got and i need to develop that in c# or add the c++ in to my current application.
My aim is to throughly understand the c++ source code which i got.
Can any body help me?
Thankyou
YPKI
|
|
|
|
|
This forum is for asking specific questions on C++/MFC. If you don't know anything about C++, the ideal way to learn C++ would be to buy a C++ book and read it.
Thinking in C++[^] is an excellent book and the link takes you to a page where you can legally download an electronic copy (both part 1 and part 2) of it for free.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
It would be of great help if you can get the architecture of the application, and the sequence diagrams for your study. This would boost your understanding and decrease the time you would invest in understanding C++ API's which you are not going to use.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Assuming such documentation exists, of course
Dybs
|
|
|
|