This article was written by Benjamin aka chaosben. He kindly agreed to publish it here. You can also publish articles here. Mail us @ mail(-at+)delphi-jedi.net
Getting started with BITS
BITS, the Background Intelligent Transfer Service, provides an easy way to
download/upload files from/to the network/internet. You may have heard of this
service in the context of the automatic Windows [...]
Nobody uses them so they weren’t corrected.
At the moment I prepare Rudy Velthuis’ API headers for JEDI API integration. By accident I found some functions which are only available as UNICODE version. However they were also declared as ANSI !? To make it quick, it wasn’t Rudy’s mistake but Microsoft’s. The following functions are only [...]
As you may know code is shared among JEDI projects and so is part of the code that I am going to describe in this post. A few years ago I got involved in the JCL project and contributed code that I had written quite a while before. One of the things I always found [...]
CreateProcess is a little tricky to use. Thus I write the full example code here so you don’t have to worry.
uses SysUtils, JwaWindows, JwsclStrings;
procedure StartApp(const App, Parameters, CurDir : TJwString);
var
StartupInfo: {$IFDEF UNICODE}TStartupInfoW{$ELSE}TStartupInfoA{$ENDIF};
ProcInfo : TProcessInformation;
pEnv : Pointer;
pCurDir,
pCmdLine : TJwPChar;
begin
ZeroMemory(@StartupInfo, sizeof(StartupInfo));
StartupInfo.cb := SizeOf(StartupInfo);
StartupInfo.lpDesktop [...]
09 Apr
Posted by: Christian Wimmer in: Common, JEDI Windows API Headers, JEDI Windows Security Code Lib
This is the road map of JWA and JWSCL for the year 2008.
Add and test Rudy Velthuis headers for Delphi to JWA (done but needs review)
Implement COM interfaces and classes for JWSCL
Implement new Winsta (Terminal Service) declarations for JWA and JWSCL
Convert embedded source documentation to Doc-o-Matic (of course buy that nice software) (JWSCL)
Create tons of [...]
Since Windows Vista, a new API called Windows Contacts (WC) was born. It replaces the Windows Address BookAPI.
You can get your personal properties by using the Windows Address Book Editor. It can be opened using “wab” in command line.
Send post as PDF to convert this post to pdf.
In this blog entry “Why JWSCL mainly uses exceptions instead of returned error values” I told you why JWSCL uses mainly exceptions instead of return values. However this design also have problems. A bad programmer may simply swallow the exception like this:
Send post as PDF to convert this post to pdf.
05 Apr
Posted by: Christian Wimmer in: JEDI Windows API Headers
Unfortunately Borland didn’t implement a public register and start function into the class TServiceApplication. So we have to do it ourselves.
First we publish the protected RegisterServices function to allow (un-)install our service(s) programmatically.
Send post as PDF to convert this post to pdf.
03 Apr
Posted by: Christian Wimmer in: JEDI Windows API Headers
The BlockInput function blocks the user’s input. However this worked in Windows XP and older but not more in Windows Vista. Now the process must run with Administrator privileges or be in the SYSTEM account.
Additionally JwaWinAble.pas reports about this function:
This returns FALSE if the caller doesn’t have permissions to do this esp. if someone else [...]
24 Mar
Posted by: Christian Wimmer in: JEDI Windows API Headers, JWA Downloads
There are many error messages in a Windows System. Actually a MSDN article describes them - or better: part of them. However they weren’t enough for me, so I decided to get all of them.
FormatMessage is the way to convert between the error number and the error text. So why do not simply [...]