Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: System wide hook  (Read 768 times)
Canning
Community Member
*
Posts: 320


« on: September 01, 2008, 07:27:29 PM »

I am wanting to implement a system wide hook to stop the client from seeing some files/folders.

Is there any vb6 code out there that I can have a look at?

thanks

Simon Canning
Logged
micmanos
Customers
Community Member
*****
Posts: 420

End of this evil world in 4..3..2..


WWW
« Reply #1 on: September 02, 2008, 07:50:33 AM »

System wide hooks in VB6 to lock certain content are impossible without calling some fancy C routine. I once tried it and searched but never did find anything that could do the job. Even threading is very buggy without some ActiveX component.
Logged

Canning
Community Member
*
Posts: 320


« Reply #2 on: September 08, 2008, 12:35:48 AM »

OK, I have a question..

If I append the following - ".{f39a0dc0-9cc8-11d0-a599-00c04fd64433}" to a folder... it is locked in explorer (you can't open it). So it is hidden... however if i use the dirlistbox, the folder isnt locked. Is there a way around this... or maybe a whole new method.

thanks

Canning
Logged
micmanos
Customers
Community Member
*****
Posts: 420

End of this evil world in 4..3..2..


WWW
« Reply #3 on: September 08, 2008, 01:59:37 AM »

VB6 is not an ideal language to use for security purposes. Hiding a folder requires calls to functions that are very advanced for me to know or may as well be outside the scope and reach of VB6.

Also take into consideration that if your program is going to be installed on someones elses machine, they may not feel comfortable with such operations. Speaking for myself, i get very irritated when windows don't let me see what's on MY hard disk. If you want to hide something, best method is to encrypt/compress it ...

If you don't mind me asking, what's so important that you want to hide?
Logged

Canning
Community Member
*
Posts: 320


« Reply #4 on: September 08, 2008, 04:36:27 AM »

I was wanting to hide the installation date so I could calculate a trial peroid. Also, maybe to hide savegames so they cannot be edited.
Logged
micmanos
Customers
Community Member
*****
Posts: 420

End of this evil world in 4..3..2..


WWW
« Reply #5 on: September 08, 2008, 05:08:19 AM »

Ok, for the trial period, here is a neat trick.

in your code place the following line.

Code:
dim Installationdate as string
InstallationDate="__/__/____"

When your application starts for the first time, scan the executable for the string "__/__/____" and replace it with the current system date. VB6 stores data in ASCII and not UTF8 format so it should be fairly straightforward.

In your code, use that variable to compare it with the system date. It's a rather intuitive way of storing the trial start date and keep it rather private. If you want more security, you could also encrypt the date value itself.

Logged

Raine
Customers
Community Member
*****
Posts: 1190


« Reply #6 on: September 08, 2008, 05:54:47 AM »

oooh that's a neat trick, and so much better than a system hook thingie (which is bound to fail at some point)
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks