Unit ShellLnk

-------------------------------------------------------------------------------------} { An "Windows 95's shortcuts" component for Delphi32. } { Copyright 1997, Patrick Brisacier and Jean-Fabien Connault. All Rights Reserved. } { This component can be freely used and distributed in commercial and private } { environments, provided this notice is not modified in any way. } { -------------------------------------------------------------------------------------} { Feel free to contact us if you have any questions, comments or suggestions at } { PBrisacier@mail.dotcom.fr (Patrick Brisacier) } { JFConnault@mail.dotcom.fr (Jean-Fabien Connault) } { You can always find the latest version of this component at: } { http://www.worldnet.net/~cycocrew/delphi/ } { -------------------------------------------------------------------------------------} { Thanks to Radek Voltr (voltr.radek/4600/epr@epr1.ccmail.x400.cez.cz) for basis. } { -------------------------------------------------------------------------------------} { Date last modified: 07/05/97 } { -------------------------------------------------------------------------------------} { -------------------------------------------------------------------------------------} { TPBShellLink v1.05 } { -------------------------------------------------------------------------------------} { Description: } { A component that allows you to manipulate Windows 95's shortcuts. } { Properties: } { property Arguments: String; } { property Description: String; } { property FileIcon: TFileIcon; } { property FileName:String; } { property HotKey: TShortCut; } { property ShellFolder: TShellFolder; } { property Target:String; } { property WindowState: TWindowState; } { property WorkingDir: String; } { Procedures and functions: } { procedure Read; } { procedure Write; } { Needs: } { FileIcon unit from Patrick Brisacier } { } { See example contained in example.zip file for more details. } { -------------------------------------------------------------------------------------} { Revision History: } { 1.00: + Initial release } { 1.01: + Added ShellFolder property and removed Options property } { 1.02: + Added support for french and english languages } { 1.03: + Removed RegFiles package uses } { 1.04: + Cleaned source code } { 1.05: + Modified to work with Delphi 3 } { -------------------------------------------------------------------------------------

Classes

IShellLink -
TPBShellLink -

Functions

Register -

Types

PShellLink
TShellFolder

Constants

CLSID_ShellLink
IID_IShellLink
MSG_COCREATEINSTANCE_FAILED
MSG_ERROR_READ
MSG_ERROR_WRITE
MSG_LINK_NOT_FOUND
MSG_PERSISTFILE_QUERYINTERFACE_FAILED
ShellFolderKeys
SLGP_SHORTPATH
SLGP_UNCPRIORITY
SLR_ANY_MATCH
SLR_NO_UI
SLR_UPDATE

Variables


Functions


procedure Register;


Types


PShellLink = ^IShellLink
English Messages } {MSG_COCREATEINSTANCE_FAILED = '"CoCreateInstance" failed.'; MSG_PERSISTFILE_QUERYINTERFACE_FAILED = '"PersistFile QueryInterface" failed.'; MSG_ERROR_WRITE = 'Write error.'; MSG_ERROR_READ = 'Read error.'; MSG_LINK_NOT_FOUND = 'Link not found.';
TShellFolder = (sfNone, sfDesktop, sfFavorites, sfFonts, sfPersonal, sfPrograms,
                  sfRecent, sfSendTo, sfStartMenu, sfStartup, sfTemplates);

Constants

CLSID_ShellLink = (D1:$00021401; D2:$0; D3:$0; D4:($C0,$0,$0,$0,$0,$0,$0,$46))

IID_IShellLink = (D1:$000214EE; D2:$0; D3:$0; D4:($C0,$0,$0,$0,$0,$0,$0,$46))

MSG_COCREATEINSTANCE_FAILED = '"CoCreateInstance" a échoué.'

French Messages

MSG_ERROR_READ = 'Erreur en lecture.'

MSG_ERROR_WRITE = 'Erreur en écriture.'

MSG_LINK_NOT_FOUND = 'Lien non trouvé.'

MSG_PERSISTFILE_QUERYINTERFACE_FAILED = '"PersistFile QueryInterface" a échoué.'

ShellFolderKeys = ('', 'Desktop', 'Favorites', 'Fonts', 'Personal', 'Programs', 'Recent', 'SendTo', 'Start Menu', 'Startup', 'Templates')

SLGP_SHORTPATH = $0001

SLGP_UNCPRIORITY = $0002

SLR_ANY_MATCH = $0002

SLR_NO_UI = $0001

SLR_UPDATE = $0004


Variables