Español
Foro

Verknüpfung redactar

 

Alfred
Wagner
tener una Problemchen con folgendem Code
KompilierenMarcaSeparación
######################################################
Eine Verknüpfung anlegen
######################################################
Original von Andreas Miethe * Juli 2002
######################################################
Geändert von Alfred Wagner * April 2007
######################################################
Definitionen
DEF MultiByteToWideChar(6) ! Kernel32,MultiByteToWideChar
DEF CoInitialize(1)        ! OLE32,CoInitialize
DEF CoUnInitialize(0)      ! OLE32,CoUninitialize
DEF CoCreateInstance(5)    ! OLE32,CoCreateInstance
Konstanten
DEF &PShell_Release     8
DEF &PShell_SetDescription 28
DEF &PShell_SetWorkingDirectory 36
DEF &PShell_SetArguments 44
DEF &PShell_SetIconLocation 68
DEF &PShell_SetPath 80
DEF &PFile_Release 8
DEF &PFile_Save 24
globale Variablen
Declare CLSID_IShellLink#
Declare IID_IShellLink#
Declare IID_IPersistFile#

Proc CreateLink

    Declare Pshell&,PFile&,Command&
    Declare WideFile$
    Parameters Verknüpfung$,Datei$,Beschreibung$,Arbeitsordner$,Argumentenliste$,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&))QueryInterface ermitteln
    CALL(LONG(COMMAND&,&PShell_SetPath),PShell&,Addr(Datei$))Datei
    CALL(LONG(COMMAND&,&PShell_SetDescription),PShell&,Addr(Beschreibung$))Beschreibung
    CALL(LONG(COMMAND&,&PShell_SetWorkingDirectory),PShell&,Addr(Arbeitsordner$))Arbeits-Ordner
    CALL(LONG(COMMAND&,&PShell_SetArguments),PShell&,Addr(Argumentenliste$))Argumentenliste
    CALL(LONG(COMMAND&,&PShell_SetIconLocation),PShell&,Addr(IconFile$),IconNo&)IconLocation
    WideFile$ = Space$(Len(Verknüpfung$)*2)
    MultiByteToWideChar(0,1,addr(Verknüpfung$),-1,addr(WideFile$),Len(WideFile$))LinkFile umwandeln
    Command& = Long(PFile&,0)
    CALL(LONG(COMMAND&,&PFile_Save),PFile&,Addr(WideFile$),1)LinkFile speichern
    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

DEF @GSFP(4) ! Shell32,SHGetSpecialFolderPathA
Declare Verknüpfung$,Datei$,Beschreibung$,Arbeitsordner$,Argumentenliste$,IconFile$,IconNo&,Inifile$
Def Home(0) Translate$(Upper$(Par$(0)),Upper$(FindFirst$(Par$(0))),)
IniFile$ = Home()+ Profan.exe

Proc Link_erstellen

    Datei$ = IniFile$
    Beschreibung$ =
    IconFile$ =
    IconNo& = 1
    Arbeitsordner$ =
    Argumentenliste$ =
    Verknüpfung$ = Space$(255)
    GSFP(0,ADDR(Verknüpfung$),2,0)Pfad zu Startmenü-Programme
    GSFP(0,ADDR(Verknüpfung$),5,0)Pfad zu Eigene Dateien
    GSFP(0,ADDR(Verknüpfung$),6,0)Pfad zu Favorieten
    GSFP(0,ADDR(Verknüpfung$),7,0)Pfad zu Autostart
    GSFP(0,ADDR(Verknüpfung$),8,0)Pfad zu Recent
    GSFP(0,ADDR(Verknüpfung$),9,0)Pfad zu Senden an
    GSFP(0,ADDR(Verknüpfung$),11,0)Pfad zu Startmenü
    GSFP(0,ADDR(Verknüpfung$),0,0)Pfad zu Desktop
    ***************  PROBLEM  ************************************************************************************
    Hier wird Hier sollte Profan stehen (oder was man sonst vor dem .lnk hinschreibt)
    unter das Icon auf dem Desktop geschrieben!
    Hat jemand eine Lösung wie Profan ohne das (+\Hier sollte Profan stehen.lnk) geschrieben werden kann?
    Verknüpfung$ = Trim$(Verknüpfung$)+\Hier sollte Profan stehen.lnk
    Problem ENDE
    Link anlegen
    CreateLink Verknüpfung$,Datei$,Beschreibung$,Arbeitsordner$,Argumentenliste$,IconFile$,IconNo&

Endproc

Link_erstellen
Cls
Print IniFile$ +
Verknüpfung der Profan.exe auf dem Desktop erstellen
Print
Print Bitte Beachten !
Print Das zu verknüpfende Programm muß sich im selben Ordner befinden wie
das ausführende (hier die Prfrun32.exe)
Print
Print Die Verknüpfung wird bei einem beliebigen Tastendruck wieder gelöscht
Waitinput
Link löschen
Assign #1, Verknüpfung$
Borrar #1
End

Funktioniert einwandfrei sólo como kann Yo el en el Code angesprochene Problema lösen?
Weiß alguien Rat

mfg.
Alfred con Familie
 
WinXP-Home ,XProfan10

Alfreds ... Freeware :  [...] 
20.04.2007  
 



Si el Problema en el Code es entonces escribir lo veces simplemente hier hin - si va con algo otro Worten como Yo el problema en el Rem no wirklich verstehe.
 
20.04.2007  
 




Alfred
Wagner
¡Hola IF

Lo es se bajo el Texto bajo el Veknüpfung

Verknüpfung$ = Trim$(Verknüpfung$)+\Hier debería Profano posición.lnk

Como podría uno una Texto bajo el Verknüpfung bringen el de el Expediente ausgelesen se (also el Name el Expediente).

así ungefähr

Verknüpfung$ = Trim$(Verknüpfung$)+\Name$.lnk

Hoffe tener mich verständlich ausgedrückt (bin kein großer Schreiber)

mfg.

Alöfred con Familie
 
WinXP-Home ,XProfan10

Alfreds ... Freeware :  [...] 
20.04.2007  
 



Yo glaub Yo habs todavía no kappiert.

¿Te ha

name$=meinName
Verknüpfung$ = Trim$(Verknüpfung$)+\+Name$+.lnk

?
 
20.04.2007  
 



Übrigens - Yo hatte unos pocos Fehlerchen en Andrés Code gefunden (ni idea mehr welche) y deshalb una Shortcut-Unit gebaut. Yo persönlich nutze por lo tanto más bien mi Unit.

Geh auch veces en el Profileinstellungen (oben rechts grünes Popupmenü) y schreib en Su Signatur el OS y el XProfanVersion. Das haben nosotros hier así angewöhnt.
 
20.04.2007  
 




Alfred
Wagner


Yo glaub Yo habs todavía no kappiert.

¿Te ha

name$=meinName
Verknüpfung$ = Trim$(Verknüpfung$)+\+Name$+.lnk


Sí genau IF el wars DANKE
sorry mi späte Antwort (tener lo zuerst no así correcto überissen!)

mfg

Alfred con Familie
 
WinXP-Home ,XProfan10

Alfreds ... Freeware :  [...] 
22.04.2007  
 



Respuesta


Título del Tema, max. 100 Signo.
 

Systemprofile:

Kein Systemprofil creado. [anlegen]

XProfan:

 Contribución  Font  Smilies  ▼ 

Bitte registro en una Contribución a verfassen.
 

Tema opciones

4.295 Views

Untitledvor 0 min.
Uwe Lang29.01.2022
Walter28.12.2018
boh118.05.2013
Andre Rohland09.09.2012
Más...

Themeninformationen

Dieses Thema ha 2 subscriber:

iF (3x)
Alfred Wagner (3x)


Admins  |  AGB  |  Applications  |  Autores  |  Chat  |  Política de Privacidad  |  Descargar  |  Entrance  |  Ayuda  |  Merchantportal  |  Pie de imprenta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Juegos  |  Búsqueda  |  Support

Ein Projekt aller XProfan, el lo son!


Mi XProfan
Privado Noticias
Eigenes Ablageforum
Temas-Merkliste
Eigene Beiträge
Eigene Temas
Zwischenablage
Cancelar
 Deutsch English Français Español Italia
Traducciones

Política de Privacidad


Wir uso Cookies sólo como Session-Cookies wegen el technischen Notwendigkeit y en uns hay no Cookies de Drittanbietern.

Wenn du hier en unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung de Informationen en unseren Cookies en XProfan.Net a.

Weitere Informationen a unseren Cookies y dazu, como du el Kontrolle darüber behältst, findest du en unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Yo möchte no Cookie