437 views

A long time ago I wrote an article about this strange WinAPI function called GetEffectiveRightsFromAcl. There was a problem that I showed how to solve (see my article and the comment in the MSDN doc). However, this function has never been a good way for retrieving the possible access mask. It seems that MS has [...]

548 views

This article is about how to retrieve the owner of a file. If you are experienced with some of the WinAPI security function this can be pretty easy. There are some problems that needs to be addressed though. The first one is the size of the security items like the SID name of the owner. [...]

743 views

JWSCL and FreeAndNil

There is a lot of talking about the usage of FreeAndNil in destructors. I’ve never thought about it before so I used it quite often even in destructors. Although I don’t use it as a universal remedy function, it still seems to be a bad design: a thought shared by many leading Delphi experts.  Thus [...]

428 views

ACTRL_ACCESS Diagram

I had some trouble with this rather complicated COM structure called ACTRL_ACCESS. So I post a diagram to show its design. Otherwise it would be a pity to leave it on my private hard drive.

838 views

Some time ago, I was in the situation to set up a new computer with a Windows XP 64 CD. Well it doesn’t matter that it was 64bit.  However, I always create a separate partitions for Windows XP. And because user profiles tend to get big, I moved a new user to a second partition. [...]

1,405 views

Restrict access to process

The following code is really simple. It restricts access to the current process. In this way no other process can open the process handle and for example terminate this process.
uses
  JwaWindows,
  JwsclSecureObjects,
  JwsclDescriptor,
  JwsclToken,
  JwsclTypes,
  JwsclAcl,
  JwsclKnownSid;
var
  SD : TJwSecurityDescriptor;
  hProcess : TJwProcessHandle;
begin
  JwInitWellKnownSIDs;
  hProcess := OpenProcess(READ_CONTROL or WRITE_DAC, false, GetCurrentProcessId());
  if hProcess <> 0 [...]

2,029 views

Calculating Binary Hashes using TJwFileStreamEx
Why should I use TJwFileStreamEx instead of any other common stream class from the VCL?
Well this question is quite easily answered.
The first thing is that TJwFileStreamEx is based on Memory Mapped Files (MMF). MMF might be the fastest way to access files on your hard disk. Another good reason for using [...]

1,542 views

JWSCL provides access to auto pointers or objects. It means that allocated space or objects are automtically destroyed/freed as soon as the auto object runs out of scope. What is a scope? A scope exists as long as the (I say) parent object exists. Parent objects can be:

The process. The auto pointer and thus the [...]

2,104 views

This simple example shows how you can change the target session of a new process.

792 views

Did you know? #7

You cannot impersonate a pipe until you have read from it. Even a write call doesn’t work. So a service has to wait for a dummy client write call until it can check the client’s token.
The following codes shows how multi instance pipe server could look like. Be aware that I wrote this to show [...]

Paypal donation (EUR)

Amount:
Website(Optional):

Archives

 

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031