| |
|
|
| LNK (Verknüpfungen; Links) anlegen, eine Variation von Andreas Miethes [...]
KompilierenMarkierenSeparierendEf CoCreateInstance(5) ! OLE32,CoCreateInstance
dEf CoInitialize(1) ! OLE32,CoInitialize
dEf CoUnInitialize(0) ! OLE32,CoUninitialize
dEf GSFP(4) ! Shell32,SHGetSpecialFolderPathA
dEf MultiByteToWideChar(6) ! Kernel32,MultiByteToWideChar
CreateLink
Declare Pshell&,PFile&,Command&,LinkFile$,WideFile$
Parameters LinkFile$,TargetFile$,Description$,WorkingDirectory$,Arguments$,IconFile$,IconNo &
Dim CLSID_IShellLink#,16
Long CLSID_IShellLink#,0 = $00021401
Word CLSID_IShellLink#,4 = $0000
Word CLSID_IShellLink#,6 = $0000
Byte CLSID_IShellLink#,8 = $C0
Byte CLSID_IShellLink#,9 = $00
Byte CLSID_IShellLink#,10 = $00
Byte CLSID_IShellLink#,11 = $00
Byte CLSID_IShellLink#,12 = $00
Byte CLSID_IShellLink#,13 = $00
Byte CLSID_IShellLink#,14 = $00
Byte CLSID_IShellLink#,15 = $46
Dim IID_IShellLink#,16
Long IID_IShellLink#,0 = $000214EE
Word IID_IShellLink#,4 = $0000
Word IID_IShellLink#,6 = $0000
Byte IID_IShellLink#,8 = $C0
Byte IID_IShellLink#,9 = $00
Byte IID_IShellLink#,10 = $00
Byte IID_IShellLink#,11 = $00
Byte IID_IShellLink#,12 = $00
Byte IID_IShellLink#,13 = $00
Byte IID_IShellLink#,14 = $00
Byte IID_IShellLink#,15 = $46
Dim IID_IPersistFile#,16
Long IID_IPersistFile#,0 = $0000010b
Word IID_IPersistFile#,4 = $0000
Word IID_IPersistFile#,6 = $0000
Byte IID_IPersistFile#,8 = $C0
Byte IID_IPersistFile#,9 = $00
Byte IID_IPersistFile#,10 = $00
Byte IID_IPersistFile#,11 = $00
Byte IID_IPersistFile#,12 = $00
Byte IID_IPersistFile#,13 = $00
Byte IID_IPersistFile#,14 = $00
Byte IID_IPersistFile#,15 = $46
CoInitialize(0)
CoCreateInstance(CLSID_IShellLink#,0,1,IID_IShellLink#,Addr(PShell&))
Command& = Long(Pshell&,0)
CALL(LONG(COMMAND&,0),PShell&,IID_IPersistFile#,Addr(PFile&))
CALL(LONG(COMMAND&,&PShell_SetPath),PShell&,Addr(TargetFile$))
CALL(LONG(COMMAND&,&PShell_SetDescription),PShell&,Addr(Description$))
CALL(LONG(COMMAND&,&PShell_SetWorkingDirectory),PShell&,Addr(WorkingDirectory$) )
CALL(LONG(COMMAND&,&PShell_SetArguments),PShell&,Addr(Arguments$))
CALL(LONG(COMMAND&,&PShell_SetIconLocation),PShell&,Addr(IconFile$),IconNo&)
WideFile$ = Space$(Len(LinkFile$)*2)
MultiByteToWideChar(0,1,addr(LinkFile$),-1,addr(WideFile$),Len(WideFile$))
Command& = Long(PFile&,0)
CALL(LONG(COMMAND&,&PFile_Save),PFile&,Addr(WideFile$),1)
Command& = Long(PShell&,0)
CALL(LONG(COMMAND&,&PShell_Release),PShell&)
Command& = Long(PFile&,0)
CALL(LONG(COMMAND&,&PFile_Release),PFile&)
CoUnInitialize()
Dispose CLSID_IShellLink#
Dispose IID_IShellLink#
Dispose IID_IPersistFile#
EndProc
GSFP(0,ADDR(LinkFile$),2,0)
CreateLink LinkFile$,TargetFile$,Description$+ starten,WorkingDirectory$,Arguments$,IconFile$,IconNo&
|
|
|
| |
|
|
|
Andreas Miethe
| Schau an, ein alter Bekannter ! |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 16.06.2004 ▲ |
|
|
|
|
| Joar sag Andreas, stammte der Grundstock von Dir?
PS: Deine [...] rockt.
iF |
|
|
| |
|
|
|
Andreas Miethe
| [quote:3bc81d68d0=iF (!ReGeXiT)]Joar sag Andreas, stammte der Grundstock von Dir?
PS: Deine [...] rockt.
iF [/quote:3bc81d68d0] Ja, siehe [...] Ist aber wirklich kein Problem. |
|
|
| Gruss Andreas ________ ________ ________ ________ _ Profan 3.3 - XProfanX2 Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher Homepage : [...] | 16.06.2004 ▲ |
|
|
|