458 views

Did you know? #6

If you create a new process without adding the environment block (by calling CreateEnvironmentBlock) the new process may fail to call Shellexecute and some other functions. Don’t think that the enviroment variables aren’t that important.
Find out more about CreateProcess in the post about “CreateProcess in full glory“.

Send post as PDF to convert this [...]

559 views

Did you know? #5

Did you know that handles are 64 bit wide in native 64 bit applications? While this doesn’t affect any Delphi developer just yet, things will change next year with the release of Delphi “Commodore” as outlined on CodeGear’s Delphi and C++Builder Roadmap page. This means, among other things, that type-casting a THandle or HANDLE from [...]

359 views

Did you know? #3

The WinSta0_DesktopSwitch Event allows an application to check for a desktop switch. The following examples demonstrates how we can wait for such an Event. To test it, simply lock and unlock the workstation. Both wait function will return on the two desktop switching.

uses

  SysUtils

  JwaWindows;

 

var H : THandle;

begin

  H := OpenEvent(SYNCHRONIZE, false, ‘WinSta0_DesktopSwitch’);

  if H [...]

451 views

Did you know? #2

If you include Forms and SvcMgr (Service classes) in the same project (in any sub unit) you may get a memory leak. It happens only if you call the Free method directly.

Forms.Application.Free;

To make it work, you have to check for a side effect that I describe here.
The memory leak results from the SvcMgr.TServiceApplication.Destroy destructor which [...]

293 views

Did you know? #1

A call to CreateProcessAsUser will fail with ERROR_INVALID_PARAMETER if your new process belongs to another session and you allowed inheritance of handles. In this case you have to set parameter bInheritHandles to FALSE.

Send post as PDF to convert this post to pdf.

Paypal donation (EUR)

Amount:
Website(Optional):

 

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