-
Jul 26th, 2005, 12:16 AM
#1
Thread Starter
Hyperactive Member
Methods For Locking a File
Can someone give me as many methods for locking a file as possible(with examples)? To me, locking a file mean that it can't be read or written to, by any program. Thanks
-
Jul 26th, 2005, 12:19 AM
#2
Re: Methods For Locking a File
Why do you need to do this?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 26th, 2005, 12:41 AM
#3
Fanatic Member
Re: Methods For Locking a File
LOL always with the WHY. Maybe he wants to make a trojan and send it to his friend and lock the win.com file so that windows won't start! Actually, here's a little bit of truth to file locking. IT DOES NOT EXIST (nothing that I know of can do this). What you might want to do is download a third party executable and encrypt the data. You simply CANNOT stop something from reading/writing to a sector of the hard drive.
Visual Basic 6.0
Visual C++ 5
Delphi 5
-
Jul 26th, 2005, 12:52 AM
#4
Re: Methods For Locking a File
It sounds like he just wants to lock it from viewing by a casual user. Something like the usual hijack virus?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jul 26th, 2005, 01:08 AM
#5
Thread Starter
Hyperactive Member
Re: Methods For Locking a File
Why does everyone always assume that I'm trying to create something malicious? I'm just interested in security, so I'm trying to run a program and then lock it so nobody can copy the file somewhere else. It doesn't have to be foolproof. Nothing in Windows is foolproof to hackers because Windows give us to much freedom.
-
Jul 26th, 2005, 01:11 AM
#6
Thread Starter
Hyperactive Member
Re: Methods For Locking a File
Anyways, I have absolutely no idea how to make a virus. The worst thing I would do is make a prank to keep opening and closing someone's CD-ROM drive.
-
Jul 26th, 2005, 02:21 AM
#7
Frenzied Member
Re: Methods For Locking a File
You could look into NTFS permissions.
-
Jul 26th, 2005, 10:11 AM
#8
Re: Methods For Locking a File
Usually setting NTFS permissions programmatically is difficuly. I have seen an example over at allapi.net on it and it sort of worked but
Windows would state that the permissions were corrupt or something like that. You may want to look there for starters.
You could also save data in a protected database.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|