376 views

Do you need help? We can support you creating application using JWA and/or JWSCL.
Visit the Get Service site on SourceForge for more information like pricing.

Send post as PDF to convert this post to pdf.

  • Comments Off
620 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 [...]

623 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 [...]

426 views

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

uses

  JwaWindows,

  JwsclToken,

  JwsclComUtils;

 

var

   NewToken,

   UserToken : TJwSecurityToken;

 

   S : TStartupInfo;

   P : TProcessInformation;

begin

  UserToken := TJwSecurityToken.CreateWTSQueryUserTokenEx(nil, 1);

  TJwAutoPointer.Wrap(UserToken); //automatic destroy

 

  NewToken := TJwSecurityToken.CreateDuplicateExistingToken(UserToken.TokenHandle, MAXIMUM_ALLOWED);

  TJwAutoPointer.Wrap(NewToken);  

 

  //needs TCB privilege -> Service

  JwEnablePrivilege(SE_TCB_NAME, pst_Enable);

  NewToken.TokenSessionId := 2;

 

  //simple CreateProcessAsUser

  [...]

312 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 [...]

481 views

Service and application in single EXE? Update

Creating a binary file that consists of a service and a normal application can be done very simple without using the service manager. Just check for SYSTEM account. It is very unlikely that your app is run as SYSTEM (only RunAsSys does ).

uses …, JwsclToken;

begin

  if JwIsSystem then

  begin

    try

    Application.Initialize;

    Application.CreateForm(TMyService, [...]

1,084 views

RunAsSYS 1.0 preview [update#1]

This is the preview Version of RunAsSys for Windows XP and Vista made with the help of JWSCL.
RunAsSys runs applications as SYSTEM user in the current user’s session. If you start it without any parameters it creates a command prompt with SYSTEM privileges by default. Otherwise you can add an application with [...]

726 views

Wishlist

The following topics you can choose to research. Each topic has several possible options you can work on. The options are

Library: Creating Windows headers for JEDI Windows API or (wrapper) classes for JEDI Windows Security
Blogpost: Writing a blog post about the topic.
Example: Writing an example about the topic that demonstrates using the JEDI API, JWSCL [...]

483 views

Setting file security with JWSCL

Sometimes it is necessary to change the security settings of a file or folder for getting or denying write access. With JWSCL this task is made very easy. However there are some pitfalls to avoid.
The following code will also be available in the example section of the source code. The application gets a file or [...]

317 views

Where is the RELEASE conditional?

JWSCL uses (rarely) the DEBUG compiler condition definition like in “What is the internal variable TJwSecurityID.fDbgData for?“. However there is no “RELEASE” directive. Why? The reason is simple: There is no need for. If you don’t define DEBUG, JWSCL will be compiled without any debug codes. If you need a release condition, you can [...]

Paypal donation (EUR)

Amount:
Website(Optional):

 

July 2008
M T W T F S S
« Jun    
 123456
78910111213
14151617181920
21222324252627
28293031