Click here to Skip to main content
15,867,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Internet to USB application Pin
2buck5614-Apr-09 5:01
2buck5614-Apr-09 5:01 
QuestionSet Class - Insert Function Pin
aab1990213-Apr-09 7:28
aab1990213-Apr-09 7:28 
AnswerRe: Set Class - Insert Function Pin
David Crow13-Apr-09 7:32
David Crow13-Apr-09 7:32 
QuestionDetect copied file? Pin
steve7606313-Apr-09 6:57
steve7606313-Apr-09 6:57 
AnswerRe: Detect copied file? Pin
David Crow13-Apr-09 7:28
David Crow13-Apr-09 7:28 
GeneralRe: Detect copied file? Pin
steve7606313-Apr-09 8:40
steve7606313-Apr-09 8:40 
GeneralRe: Detect copied file? Pin
Luc 64801113-Apr-09 9:45
Luc 64801113-Apr-09 9:45 
AnswerRe: Detect copied file? [modified] Pin
steve7606313-Apr-09 11:04
steve7606313-Apr-09 11:04 
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

AnswerRe: Detect copied file? Pin
john563213-Apr-09 19:48
john563213-Apr-09 19:48 
QuestionDeleted File Pin
recmisi13-Apr-09 6:34
recmisi13-Apr-09 6:34 
AnswerRe: Deleted File Pin
David Crow13-Apr-09 9:00
David Crow13-Apr-09 9:00 
GeneralRe: Deleted File Pin
recmisi13-Apr-09 16:33
recmisi13-Apr-09 16:33 
GeneralRe: Deleted File Pin
john563213-Apr-09 19:45
john563213-Apr-09 19:45 
AnswerRe: Deleted File Pin
Divyang Mithaiwala13-Apr-09 20:58
Divyang Mithaiwala13-Apr-09 20:58 
QuestionHow to cancel during serialization on CDocument Pin
Joseph Marzbani13-Apr-09 5:21
Joseph Marzbani13-Apr-09 5:21 
QuestionHow to cancel CDocument::Serialaize()? Pin
Joseph Marzbani13-Apr-09 5:17
Joseph Marzbani13-Apr-09 5:17 
QuestionQuestion on I/O stream and for loop Pin
Mohamed_Khalil13-Apr-09 2:02
Mohamed_Khalil13-Apr-09 2:02 
AnswerRe: Question on I/O stream and for loop Pin
Rajesh R Subramanian13-Apr-09 4:50
professionalRajesh R Subramanian13-Apr-09 4:50 
QuestionRe: Question on I/O stream and for loop Pin
David Crow13-Apr-09 5:08
David Crow13-Apr-09 5:08 
QuestionCalling a VS2008 DLL from VS 6.0 dll Pin
rana ray13-Apr-09 0:43
rana ray13-Apr-09 0:43 
AnswerRe: Calling a VS2008 DLL from VS 6.0 dll Pin
_AnsHUMAN_ 13-Apr-09 1:10
_AnsHUMAN_ 13-Apr-09 1:10 
GeneralRe: Calling a VS2008 DLL from VS 6.0 dll Pin
Rajesh R Subramanian13-Apr-09 1:26
professionalRajesh R Subramanian13-Apr-09 1:26 
GeneralRe: Calling a VS2008 DLL from VS 6.0 dll Pin
_AnsHUMAN_ 13-Apr-09 1:34
_AnsHUMAN_ 13-Apr-09 1:34 
AnswerRe: Calling a VS2008 DLL from VS 6.0 dll Pin
Rajesh R Subramanian13-Apr-09 1:13
professionalRajesh R Subramanian13-Apr-09 1:13 
GeneralRe: Calling a VS2008 DLL from VS 6.0 dll Pin
Joe Woodbury13-Apr-09 11:58
professionalJoe Woodbury13-Apr-09 11:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.