2006 ...
januari (6) februari (3) maart april (2) mei (15) juni (7) juli (4) augustus september (1) oktober (3) november (6) december (15)
Delphi: "number" of parties enganged in due diligence
2006-06-01 11:23 i635 [permalink]
Borland cuts hit overseas ops | The Register
is dat dan goed nieuws? voor Delphi dan? Ik veronderstel toch dat die in de 'Tools department' zitten... (Delphi maar een tool, phah!)
of zoals het hier schitterend omschreven staat:
And the users of Delphi replied, saying: Excellent thinking. We've long been worried that the corporate tool business would damage the reputation of your compilers.
And the Sons of Kahn spake, saying: You don't understand. We're ditching the compilers. And you. Bye.
And the users of Delphi were flabbergasted, saying: Uh?
2006-06-08 10:04 i650 [permalink]
I've worked with the Shell COM interfaces before, and always thought it shouldn't be that hard to create a ShortCut from code, but I never got round to actually trying to do it... Until now, this is what it could look like:
uses ComObj, ActiveX, ShlObj; type IPersistFile = interface(IPersist) ['{0000010B-0000-0000-C000-000000000046}'] function IsDirty: HResult; stdcall; function Load(pszFileName: PWideChar; dwMode: LongWord): HResult; stdcall; function Save(pszFileName: PWideChar; fRemember: Integer): HResult; stdcall; function SaveCompleted(pszFileName: PWideChar): HResult; stdcall; function GetCurFile(out ppszFileName: PWideChar): HResult; stdcall; end; var ln:IShellLink; begin ln:=CreateComObject(CLSID_ShellLink) as IShellLink; OleCheck(ln.SetDescription(PChar('test'))); OleCheck(ln.SetPath(PChar('C:\somefolder\somefile.exe'))); (ln as IPersistFile).Save('test.lnk',0); end;
Oddly enough, I got the IPersistFile
definition from MSDASC_TLB
(a TypeLibrary to create/edit database/datasource connections with) and didn't find a default Delphi6 unit that defines it.
IShellLink
also provides access to other properties of the ShortCut:
OleCheck(ln.SetWorkingDirectory(PChar('C:\somefolder'));
OleCheck(ln.SetArguments(PChar('...'));
OleCheck(ln.SetIconLocation(PChar('C:\somefolder\somefile.exe'),0))
OleCheck(ln.SetHotkey());
OleCheck(ln.SetShowCmd());
2006-06-09 13:55 i651 [permalink]
pff eindelijk! en ik maar zoeken:
Disable CD autoplay in Windows XP Pro
die 'GPEdit.msc' blijf ik vergeten, zitten nog fun dingen in!
2006-06-13 18:47 r455 [permalink]
2006-06-13 20:58 r456 [permalink]
2006-06-14 19:38 r457 [permalink]
→ Odo
Reading 'locked' files with TFileStream fails.
2006-06-15 13:55 i656 [permalink]
On some files, the system keeps a 'read lock' for the time the file is in use (e.g. an executable that is running). This prevents making changes to the file, but reading is still possible.
Except when using TFileStream.Create('...',fmOpenRead);
Apparently, the fmOpenRead flag, does require full access to the file, even if you won't be writing to the file over the stream...
To let the system know you won't be writing (or you want to allow writing), specify the fmShareDenyWrite (or fmShareDenyNone) flag also: TFileStream.Create('...',fmOpenRead or fmShareDenyNone);
.