some examples
some examples
first, great library madshi, very good work.
and now, do you have any examples for this packages?
or anybody?
thx for all and again good work.
and now, do you have any examples for this packages?
or anybody?
thx for all and again good work.
Anakein, to protect a file with password, Encrypt it with some password, put an extension like ".YOUR_PROGRAM_NAME". So it will stay like this:
"Your_file.txt.xyz" (assuming that XYZ is any extension of your choice). And then you do a shell extension to open that file with your program, then the user type the password and then Decrypt it.
After that you need to hook FindFIrst, FindFirstEX, FindNext and FindNextEx. Everytime that a file with the extension .XYZ appear, you change the file name.
So...
Someone called FindFirst with "Your_file.txt.xyz"
Then you change the Result to "Your_file.txt".
So the user will think its a single file and when double clicking will open your program instead of NOTEPAD.
But this is not an efficient method. Just create one by your self =P I've just give the Idea. But with MadCodeHook, will not be possible to hook 16 bits programs (like DOS in w9x)
"Your_file.txt.xyz" (assuming that XYZ is any extension of your choice). And then you do a shell extension to open that file with your program, then the user type the password and then Decrypt it.
After that you need to hook FindFIrst, FindFirstEX, FindNext and FindNextEx. Everytime that a file with the extension .XYZ appear, you change the file name.
So...
Someone called FindFirst with "Your_file.txt.xyz"
Then you change the Result to "Your_file.txt".
So the user will think its a single file and when double clicking will open your program instead of NOTEPAD.
But this is not an efficient method. Just create one by your self =P I've just give the Idea. But with MadCodeHook, will not be possible to hook 16 bits programs (like DOS in w9x)
Hi there!madshi wrote:A simple example:
Shares.Delete; // kills all shares
What is your aim? Maybe I can give you an example which first better to your needs.
Maybe that happen only to me but after I executed that code I successfully removed all shares but it also removed the tab [from file and folder properties] where I could share that folder. I tried to restart the "Server" service but it didn't help. Any ideas?
No no no. It's a "hidden" resources for administration and inter process communication as you know.madshi wrote:There are some shares like $C or $IPC or something like that. Maybe those are needed? Are you talking about the tab for drives on your own PC or for network drives?
I mentioned the security tab. Look - I've attached the image 'coz one image is worth 1024 words.
Here is a link:
http://comrade-b.narod.ru/The-Share-tab.png
[I hope you'll understand what I'm talking about]
Also I forgot to ask - Is it possible to get the source code for madSecurity?
I know what you mean. I already knew it when I wrote my previous comment. The problem is that I've no idea how "Shares.Delete" could remove this tab. All it does is deleting all shares. I can't imagine that deleting normal self made share can result in this effect. So I thought, it must be the system shares. Anyway, I'm just guessing, I've never heard about this problem yet!comrade wrote:No no no. It's a "hidden" resources for administration and inter process communication as you know.
I mentioned the security tab. Look - I've attached the image 'coz one image is worth 1024 words.
Are you sure that you didn't change some user privileges at the same time as calling Shares.Delete?
Of course. The commercial edition contains the source code.mdrums wrote:Also I forgot to ask - Is it possible to get the source code for madSecurity?
No. I've just tested this code:madshi wrote: Are you sure that you didn't change some user privileges at the same time as calling Shares.Delete?
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
begin
shares.Delete;
end;
after that I got this:
http://comrade-b.narod.ru/wo-Share-tab.png
I'm not tricking you. I have win2k professional box with SP4 and all the windows updates for the current moment and Delphi 6.
I think as a developer of this collection you must know the very details of how does it actually work.
And I also want to suggest you to organize a special thread here on the forum calles "Examples" or "Snippets/Samples" where we can copy and paste the code, that you've already tested and we can be sure that it is 100 % working.