Seite 1 von 1

Explorer mit Bilder/Movies- Vorschau

Verfasst: 22.04.2013 04:52
von BSP
Hallo Allerseits.
Möglicherweise nerft es den einen oder anderen,
das nun schon wieder jemannd mit dem Thema kommt.

Ich möchte gerne in einem eigenem Explorer
Bild oder Movie Dateien als Vorschaubilder anzeigen können.
Und ihr dürft mir glauben, ich habe mich echt fast totgesucht,
bevor ich hier nun schreibe.
Aber ich habe nichts funktionierendes gefunden.
(Oder ich bin einfach zu blöd und habe etwas nicht verstanden).

In einigen Beiträgen wird da wohl auf eine Procedure von DarkDragon verwiesen.
http://www.purebasic.fr/german/viewtopi ... llLinkInfo

Nur leider bekomme ich die nicht zum laufen.
Da hat sich in der Zwischenzeit wohl etwas verändert
und ich verstehe das leider zu wenig, um das selber an zu passen.

Darum bitte ich Euch nun um Hilfe.
Die Procedure habe ich in meinem unten aufgeführten Code eingefügt.
Könnt Ihr mir bitte helfen meinen Code + ggf. Den von DarkDragon so an zu passen,
das Bilder / Movie Dateien als Vorschau- Icons angezeigt werden?

Danke für die Mühe im Voraus.
Bernd

Code: Alles auswählen

 ;- === Konstanten

; Window
Enumeration
  #hwnd
EndEnumeration

; Gadgets
Enumeration
  #explorer
EndEnumeration

;- === Globals
Define pfad.s, file.s , flag

;- === Structuren / Listen
Structure explorerliste
  file.s
EndStructure
Global NewList ExplorerListe.explorerliste()

;- === Proceduren
;-
;================================================
;-== Der eingefügte Beitrag von DarkDragon
;================================================
; DarkDragon
; 28 Jul 2005

; Siehe Forum:
; http://www.purebasic.fr/german/viewtopic.php?f=8&t=4156&hilit=GetShellLinkInfo

Structure ShellLinkInfo
  ;Longs
  IconIndex.l
  showCmd.l
  Hotkey_VK.l
  Hotkey_MOD.l
 
  ;Strings
  target.s
  description.s
  WorkingDirectory.s
  Arguments.s
  IconLocation.s
EndStructure

Procedure.l LowByte(Word.w)
  ProcedureReturn PeekB(@Word  )
EndProcedure

Procedure.l HighByte(Word.w)
  ProcedureReturn PeekB(@Word+1)
EndProcedure

Procedure GetShellLinkInfo(ShellLink.s, *p.ShellLinkInfo)
  
  Protected Dim LinkFile.w(Len(ShellLink))
  Protected *Buf, Hotkey.w, Result = #False, psl.IShellLinkW, ppf.IPersistFile, addr
  Protected bufl = #MAX_PATH*SizeOf(Character)
  
  MultiByteToWideChar_(#CP_ACP, 0, ShellLink, -1, LinkFile(), Len(ShellLink)) ;We need a WideChar version of the ShellLink.s
  
  *Buf = AllocateMemory(bufl)
  
  If *Buf <> 0
    CoInitialize_(0)
    If CoCreateInstance_(?CLSID_ShellLink,0,1,?IID_IShellLink,@psl.IShellLinkW) >= 0
      
      If psl\QueryInterface(?IID_IPersistFile, @ppf.IPersistFile) >= 0
        
        If ppf\Load(ShellLink, 0) >= 0 ;Icon loaded?
          
          ;Get the target
          psl\GetPath(*Buf, bufl, 0, 0)
          *p\Target = PeekS(*Buf)
          RtlFillMemory_(*Buf, bufl, 0)
          
          ;Get the description
          psl\GetDescription(*Buf, bufl)
          *p\Description = PeekS(*Buf)
          RtlFillMemory_(*Buf, bufl, 0)
          
          ;Get the working directory
          psl\GetWorkingDirectory(*Buf, bufl)
          *p\WorkingDirectory = PeekS(*Buf)
          RtlFillMemory_(*Buf, bufl, 0)
          
          ;Get the arguments
          psl\GetArguments(*Buf, bufl)
          *p\Arguments = PeekS(*Buf)
          RtlFillMemory_(*Buf, bufl, 0)
          
          ;Get the hotkey
          psl\GetHotkey(@Hotkey)
          *p\Hotkey_VK  = PeekB(@Hotkey)
          *p\Hotkey_MOD = PeekB(@Hotkey+1)
          
          ;Get the showcommand
          addr = *p
          psl\GetShowCmd(addr+4)
          
          ;Get the icon file and the icon index
          psl\GetIconLocation(*Buf, bufl, *p)
          ;Debug PeekS(*Buf)
          *p\IconLocation = PeekS(*Buf)
          ;RtlFillMemory_(*Buf, 1024, 0) ;<- We don't need this here
          
          
          ;Result will be 1 because we have finished the processing
          Result = #True
        EndIf
        ppf\Release()
      EndIf
      psl\Release()
    EndIf
    CoUninitialize_()
    
    FreeMemory(*Buf)
  EndIf
  
  ProcedureReturn Result
  
EndProcedure
DataSection
  CompilerIf Defined(CLSID_ShellLink, #PB_Label) = #False
    CLSID_ShellLink:
    ; 00021401-0000-0000-C000-000000000046
    Data.l $00021401
    Data.w $0000,$0000
    Data.b $C0,$00,$00,$00,$00,$00,$00,$46
  CompilerEndIf
  
  CompilerIf Defined(IID_IShellLink, #PB_Label) = #False
    IID_IShellLink:
    
    CompilerIf #PB_Compiler_Unicode
      Data.l $000214F9
    CompilerElse
      Data.l $000214EE
    CompilerEndIf
    
    Data.w $0000,$0000
    Data.b $C0,$00,$00,$00,$00,$00,$00,$46
  CompilerEndIf
  
  CompilerIf Defined(IID_IPersistFile, #PB_Label) = #False
    IID_IPersistFile:
    ; 0000010b-0000-0000-C000-000000000046
    Data.l $0000010b
    Data.w $0000,$0000
    Data.b $C0,$00,$00,$00,$00,$00,$00,$46
  CompilerEndIf
  
EndDataSection
Procedure.s GetSpecialFolder(CSIDL)
  
  Protected *itemid.ITEMIDLIST
  Protected location.s = Space(#MAX_PATH)
  
  If SHGetSpecialFolderLocation_ (0, CSIDL, @*itemid) = #NOERROR
    If SHGetPathFromIDList_(*itemid, @location)
      CoTaskMemFree_(*itemid)
      If Right(location, 1) <> "\" : location + "\" 
      EndIf
      ProcedureReturn location
    EndIf
  EndIf
  
EndProcedure

; ;GetShellLinkInfo(GetHomeDirectory() + "Desktop\CCleaner.lnk", @SLI.ShellLinkInfo)
; 
; File.s = "CCLeaner.lnk"
; 
; Path1.s = GetSpecialFolder(#CSIDL_DESKTOP)
; Path2.s = GetSpecialFolder(#CSIDL_COMMON_DESKTOPDIRECTORY)
; 
; LnkName.s = ""
; If FileSize(Path1 + File) > 0
;   LnkName.s = Path1 + File
; ElseIf FileSize(Path2 + File) > 0 
;   LnkName.s = Path2 + File
; EndIf
; If LnkName <> ""
;   GetShellLinkInfo(LnkName, @SLI.ShellLinkInfo)
; EndIf
; 
; Debug LnkName
; Debug FileSize(LnkName)
; Debug "--------------------"
; Debug SLI\target
; Debug SLI\description
; Debug SLI\WorkingDirectory
; Debug SLI\Arguments
; Debug SLI\IconLocation
; Debug SLI\IconIndex
; Debug "--------------------"


;================================================
;-

Procedure stop(a$)
  MessageRequester("Stop", a$)
EndProcedure

Procedure.s Pfadebene_zurueck(pfad$)
  For I = Len(pfad$)-1 To 1 Step -1
    a$ = Mid(pfad$, i, 1)
    If a$ = "\"
      pfad$ = Left(pfad$, i)
      Break
    EndIf
  Next
  ProcedureReturn pfad$
EndProcedure

;;;

Procedure Ordner_Einlesen(pfad$)
 
  Protected shInfo.SHFILEINFO
 
  SetWindowTitle(#hwnd, pfad$)
 
  ClearGadgetItems(#explorer)
  ClearList(ExplorerListe())
 
  If ExamineDirectory(0, pfad$, "*.*") 
    While NextDirectoryEntry(0)
      If Not DirectoryEntryName(0) = "."
     
      ; --- Liste einlesen
        a$ = pfad$ + DirectoryEntryName(0)
        If DirectoryEntryType(0) = #PB_DirectoryEntry_Directory
          a$ + "\"
        EndIf
        AddElement(explorerliste())
        explorerliste()\file = a$
       
      ; --- Extract Icon
        flag = 0
        If DirectoryEntryName(0) = ".."
        a$ = ""
        EndIf
        ;flag = #SHGFI_USEFILEATTRIBUTES
        ;flag | #SHGFI_SMALLICON
        flag | #SHGFI_ICON
        SHGetFileInfo_(a$, 0, shInfo, SizeOf(SHFILEINFO), flag)
       
      ; --- Für die Anzeige aufbereiten
        a$ = DirectoryEntryName(0)
        If LCase(GetExtensionPart(a$)) = "lnk"
          a$ = Left(a$, Len(a$)-4)
        EndIf
       
      ; --- Anzeigen
        AddGadgetItem(#explorer, -1, a$, shInfo\hIcon)
       
;       Debug "----------"
;       Debug shInfo\dwAttributes
;       Debug shInfo\hIcon
;       Debug shInfo\iIcon
;       Debug shInfo\szDisplayName
;       Debug shInfo\szTypeName
      EndIf
    Wend
    FinishDirectory(0)
  EndIf
  EndProcedure
 
  ;;;

Procedure Open_Explorer()

  If OpenWindow(#hwnd, 0, 0, 640, 400, "My little Explorer", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    x = 2
    y = 2
    w = WindowWidth(#hwnd)  -4
    h = WindowHeight(#hwnd) -4
    ListIconGadget(#explorer, x, y, w, h, "Name", w-2)
    SetGadgetAttribute(#explorer, #PB_ListIcon_DisplayMode, #PB_ListIcon_LargeIcon)
  Else
    End
  EndIf

EndProcedure

;;;

pfad = GetHomeDirectory() + "Desktop\"

Open_Explorer()

Ordner_Einlesen(pfad)

;-=== Hauptschleife ===

Repeat
ev = WaitWindowEvent()
Select ev
Case #PB_Event_CloseWindow
  ende = 1
 
Case #PB_Event_Gadget
  Select EventGadget()
  Case #explorer
    If EventType() = #PB_EventType_LeftDoubleClick
      i = GetGadgetState(#explorer)
      If Not i = -1
       
        SelectElement(ExplorerListe(), i)
        file = ExplorerListe()\file
       
        If Right(file, 3) = "..\"
          file = Left(file, Len(file)-3)
          file = Pfadebene_zurueck(file)
          ;stop(file)
       
        ElseIf LCase(Right(file,3)) = "lnk"
          file = GetFilePart(file)

          Path1.s = GetSpecialFolder(#CSIDL_DESKTOP)
          Path2.s = GetSpecialFolder(#CSIDL_COMMON_DESKTOPDIRECTORY)

          LnkName.s = ""
          If FileSize(Path1 + file) > 0
            LnkName.s = Path1 + file
          ElseIf FileSize(Path2 + file) > 0 
            LnkName.s = Path2 + file
          EndIf
          If LnkName <> ""
            GetShellLinkInfo(LnkName, @SLI.ShellLinkInfo)
          EndIf
          ;stop(SLI\target)
          file = SLI\target
;           Debug LnkName
;           Debug FileSize(LnkName)
;           Debug "--------------------"
;           Debug SLI\target
;           Debug SLI\description
;           Debug SLI\WorkingDirectory
;           Debug SLI\Arguments
;           Debug SLI\IconLocation
;           Debug SLI\IconIndex
;           Debug "--------------------"

          ;stop(file)
        EndIf
       
        If FileSize(file) = -2
          pfad = file
          Ordner_Einlesen(pfad)
        ElseIf FileSize(file) => 0
          RunProgram(file, "", GetPathPart(file))
        EndIf
       
      EndIf
    EndIf
   
  EndSelect
EndSelect

Until ende



Re: Explorer mit Bilder/Movies- Vorschau

Verfasst: 22.04.2013 08:36
von Bisonte
Das wird daran liegen, das Du nur in "Users\Benutzername\Desktop" dein Glück versuchst.
Viele der Desktoplinks sind unter "Users\Public\Desktop" zu finden (bei mir jedenfalls ist der CCLeaner.lnk dort...

Ausserdem ist die Version der "GetShellLinkInfo()" nicht wirklich funktionsbereit...
Die Umbauarbeiten beinhalten eine, sagen wir neuere Version von Darkdragon und eine Prozedur von uns Codecommander
ts-soft um die Systemverzeichnisse zu ermitteln (in unserem Falle den Desktop)

Code: Alles auswählen

 ;- === Konstanten

; Window
Enumeration
  #hwnd
EndEnumeration

; Gadgets
Enumeration
  #explorer
EndEnumeration

;- === Globals
Define pfad$, a$ , flag

;- === Structuren / Listen
Structure explorerliste
  file.s
EndStructure
Global NewList ExplorerListe.explorerliste()

;- === Proceduren
;-
;================================================
;-== Der eingefügte Beitrag von DarkDragon
;================================================
; DarkDragon
; 28 Jul 2005

; Siehe Forum:
; http://www.purebasic.fr/german/viewtopic.php?f=8&t=4156&hilit=GetShellLinkInfo

Structure ShellLinkInfo
  ;Longs
  IconIndex.l
  showCmd.l
  Hotkey_VK.l
  Hotkey_MOD.l
 
  ;Strings
  target.s
  description.s
  WorkingDirectory.s
  Arguments.s
  IconLocation.s
EndStructure

Procedure.l LowByte(Word.w)
  ProcedureReturn PeekB(@Word  )
EndProcedure

Procedure.l HighByte(Word.w)
  ProcedureReturn PeekB(@Word+1)
EndProcedure

Procedure GetShellLinkInfo(ShellLink.s, *p.ShellLinkInfo)
  
  Protected Dim LinkFile.w(Len(ShellLink))
  Protected *Buf, Hotkey.w, Result = #False, psl.IShellLinkW, ppf.IPersistFile, addr
  
  MultiByteToWideChar_(#CP_ACP, 0, ShellLink, -1, LinkFile(), Len(ShellLink)) ;We need a WideChar version of the ShellLink.s
  
  *Buf = AllocateMemory(#MAX_PATH*SizeOf(Character))
  
  If *Buf <> 0
    CoInitialize_(0)
    If CoCreateInstance_(?CLSID_ShellLink,0,1,?IID_IShellLink,@psl.IShellLinkW) >= 0
      
      If psl\QueryInterface(?IID_IPersistFile, @ppf.IPersistFile) >= 0
        
        If ppf\Load(ShellLink, 0) >= 0 ;Icon loaded?
          
          ;Get the target
          psl\GetPath(*Buf, #MAX_PATH*SizeOf(Character), 0, 0)
          *p\Target = PeekS(*Buf)
          RtlFillMemory_(*Buf, #MAX_PATH*SizeOf(Character), 0)
          
          ;Get the description
          psl\GetDescription(*Buf, #MAX_PATH*SizeOf(Character))
          *p\Description = PeekS(*Buf)
          RtlFillMemory_(*Buf, #MAX_PATH*SizeOf(Character), 0)
          
          ;Get the working directory
          psl\GetWorkingDirectory(*Buf, #MAX_PATH*SizeOf(Character))
          *p\WorkingDirectory = PeekS(*Buf)
          RtlFillMemory_(*Buf, #MAX_PATH*SizeOf(Character), 0)
          
          ;Get the arguments
          psl\GetArguments(*Buf, 1024)
          *p\Arguments = PeekS(*Buf)
          RtlFillMemory_(*Buf, #MAX_PATH*SizeOf(Character), 0)
          
          ;Get the hotkey
          psl\GetHotkey(@Hotkey)
          *p\Hotkey_VK  = PeekB(@Hotkey)
          *p\Hotkey_MOD = PeekB(@Hotkey+1)
          
          ;Get the showcommand
          addr = *p
          psl\GetShowCmd(addr+4)
          
          ;Get the icon file and the icon index
          psl\GetIconLocation(*Buf, #MAX_PATH*SizeOf(Character), *p)
          ;Debug PeekS(*Buf)
          *p\IconLocation = PeekS(*Buf)
          ;RtlFillMemory_(*Buf, 1024, 0) ;<- We don't need this here
          
          
          ;Result will be 1 because we have finished the processing
          Result = #True
        EndIf
        ppf\Release()
      EndIf
      psl\Release()
    EndIf
    CoUninitialize_()
    
    FreeMemory(*Buf)
  EndIf
  
  ProcedureReturn Result
  
EndProcedure
DataSection
  CompilerIf Defined(CLSID_ShellLink, #PB_Label) = #False
    CLSID_ShellLink:
    ; 00021401-0000-0000-C000-000000000046
    Data.l $00021401
    Data.w $0000,$0000
    Data.b $C0,$00,$00,$00,$00,$00,$00,$46
  CompilerEndIf
  
  CompilerIf Defined(IID_IShellLink, #PB_Label) = #False
    IID_IShellLink:
    
    CompilerIf #PB_Compiler_Unicode
      Data.l $000214F9
    CompilerElse
      Data.l $000214EE
    CompilerEndIf
    
    Data.w $0000,$0000
    Data.b $C0,$00,$00,$00,$00,$00,$00,$46
  CompilerEndIf
  
  CompilerIf Defined(IID_IPersistFile, #PB_Label) = #False
    IID_IPersistFile:
    ; 0000010b-0000-0000-C000-000000000046
    Data.l $0000010b
    Data.w $0000,$0000
    Data.b $C0,$00,$00,$00,$00,$00,$00,$46
  CompilerEndIf
  
EndDataSection
Procedure.s GetSpecialFolder(CSIDL)
  
  Protected *itemid.ITEMIDLIST
  Protected location.s = Space(#MAX_PATH)
  
  If SHGetSpecialFolderLocation_ (0, CSIDL, @*itemid) = #NOERROR
    If SHGetPathFromIDList_(*itemid, @location)
      CoTaskMemFree_(*itemid)
      If Right(location, 1) <> "\" : location + "\" 
      EndIf
      ProcedureReturn location
    EndIf
  EndIf
  
EndProcedure

;GetShellLinkInfo(GetHomeDirectory() + "Desktop\CCleaner.lnk", @SLI.ShellLinkInfo)

File.s = "CCLeaner.lnk"

Path1.s = GetSpecialFolder(#CSIDL_DESKTOP)
Path2.s = GetSpecialFolder(#CSIDL_COMMON_DESKTOPDIRECTORY)

LnkName.s = ""
If FileSize(Path1 + File) > 0
  LnkName.s = Path1 + File
ElseIf FileSize(Path2 + File) > 0 
  LnkName.s = Path2 + File
EndIf
If LnkName <> ""
  GetShellLinkInfo(LnkName, @SLI.ShellLinkInfo)
EndIf

Debug LnkName
Debug FileSize(LnkName)
Debug "--------------------"
Debug SLI\target
Debug SLI\description
Debug SLI\WorkingDirectory
Debug SLI\Arguments
Debug SLI\IconLocation
Debug SLI\IconIndex
Debug "--------------------"


;================================================
;-

Procedure stop(a$)
  MessageRequester("Stop", a$)
EndProcedure

Procedure.s Pfadebene_zurueck(pfad$)
  For I = Len(pfad$)-1 To 1 Step -1
    a$ = Mid(pfad$, i, 1)
    If a$ = "\"
      pfad$ = Left(pfad$, i)
      Break
    EndIf
  Next
  ProcedureReturn pfad$
EndProcedure

Procedure.s extract_filename(file$)
 
  If ReadFile(0,file$)
    file$ = ""
   
; Möglichkeit 1 - Nach "BOOT" suchen
    While Not Eof(0)
    a$ = ReadString(0, #PB_Ascii)
    If FindString(a$, "BOOT")
      file$ = ReadString(0, #PB_Ascii) : Break
    EndIf
    Wend
    If Len(file$)
      CloseFile(0)
      ProcedureReturn file$
    EndIf
   
; Möglichkeit 2 -
    FileSeek(0,0)
    a$ = ""
   
    ; Erst alle NULL-Zeichen ausschneiden.
    While Not Eof(0)
      a = ReadAsciiCharacter(0)
      If a : a$ + Chr(a) : EndIf
    Wend
   
    ; Nun möglichen Anfang suchen.
    start = 0
    For i = 1 To Len(a$)
      If Mid(a$, i, 3) = "..\"
        start = i + 3
      EndIf
    Next
    a$ = "C:\" + Mid(a$, start)
   
    ; Nun Datei oder Ordner finden
    For i = 1 To Len(a$)
      b$ = Left(a$, i)
      If FileSize(b$) => 0 Or FileSize(b$) = -2
        file$ = b$
        Break
      EndIf
    Next
   
    CloseFile(0)
  EndIf
  ProcedureReturn file$
EndProcedure

;;;

Procedure Ordner_Einlesen(pfad$)
 
  Protected shInfo.SHFILEINFO
 
  SetWindowTitle(#hwnd, pfad$)
 
  ClearGadgetItems(#explorer)
  ClearList(ExplorerListe())
 
  If ExamineDirectory(0, pfad$, "*.*") 
    While NextDirectoryEntry(0)
      If Not DirectoryEntryName(0) = "."
     
      ; --- Liste einlesen
        a$ = pfad$ + DirectoryEntryName(0)
        If DirectoryEntryType(0) = #PB_DirectoryEntry_Directory
          a$ + "\"
        EndIf
        AddElement(explorerliste())
        explorerliste()\file = a$
       
      ; --- Extract Icon
        flag = 0
        If DirectoryEntryName(0) = ".."
        a$ = ""
        EndIf
        ;flag = #SHGFI_USEFILEATTRIBUTES
        ;flag | #SHGFI_SMALLICON
        flag | #SHGFI_ICON
        SHGetFileInfo_(a$, 0, shInfo, SizeOf(SHFILEINFO), flag)
       
      ; --- Für die Anzeige aufbereiten
        a$ = DirectoryEntryName(0)
        If LCase(GetExtensionPart(a$)) = "lnk"
          a$ = Left(a$, Len(a$)-4)
        EndIf
       
      ; --- Anzeigen
        AddGadgetItem(#explorer, -1, a$, shInfo\hIcon)
       
;       Debug "----------"
;       Debug shInfo\dwAttributes
;       Debug shInfo\hIcon
;       Debug shInfo\iIcon
;       Debug shInfo\szDisplayName
;       Debug shInfo\szTypeName
      EndIf
    Wend
    FinishDirectory(0)
  EndIf
  EndProcedure
 
  ;;;

Procedure Open_Explorer()

  If OpenWindow(#hwnd, 0, 0, 640, 400, "My little Explorer", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    x = 2
    y = 2
    w = WindowWidth(#hwnd)  -4
    h = WindowHeight(#hwnd) -4
    ListIconGadget(#explorer, x, y, w, h, "Name", w-2)
    SetGadgetAttribute(#explorer, #PB_ListIcon_DisplayMode, #PB_ListIcon_LargeIcon)
  Else
    End
  EndIf

EndProcedure

;;;

pfad$ = GetHomeDirectory() + "Desktop\"

Open_Explorer()

Ordner_Einlesen(pfad$)

;-=== Hauptschleife ===

Repeat
ev = WaitWindowEvent()
Select ev
Case #PB_Event_CloseWindow
  ende = 1
 
Case #PB_Event_Gadget
  Select EventGadget()
  Case #explorer
    If EventType() = #PB_EventType_LeftDoubleClick
      i = GetGadgetState(#explorer)
      If Not i = -1
       
        SelectElement(ExplorerListe(), i)
        a$ = ExplorerListe()\file
       
        If Right(a$, 3) = "..\"
          a$ = Left(a$, Len(a$)-3)
          a$ = Pfadebene_zurueck(a$)
          ;stop(a$)
       
        ElseIf LCase(Right(a$,3)) = "lnk"
          a$ = extract_filename(a$)
          If FileSize(a$) = -2
            a$ + "\"
          EndIf
          ;stop(a$)
        EndIf
       
        If FileSize(a$) = -2
          pfad$ = a$
          Ordner_Einlesen(pfad$)
        ElseIf FileSize(a$) => 0
          RunProgram(a$, "", GetPathPart(a$))
        EndIf
       
      EndIf
    EndIf
   
  EndSelect
EndSelect

Until ende
Somit sollte die Funktion um Desktoplinks auszulesen funktionieren, was das Anzeigen von Vorschaubildern
angeht, müsste jemand anderes aushelfen ;)

Re: Explorer mit Bilder/Movies- Vorschau

Verfasst: 22.04.2013 18:59
von BSP
Hallo Bisonte.

Vielen Dank schon mal für Deine Mühe.

Wie ich sehe, hast Du in der
Procedure GetShellLinkInfo(...)
zwei entscheidene Änderungen vorgenommen:
1. Die Var. psl mit einer anderen Structure verbunden,
statt "IShellLinkA" nun "IShellLinkW"
2. ppf\Load nicht mehr mit dem Array "LinkFile()"
sondern mit dem "ShellLink" verbunden.

Nun läuft diese Procedure schon mal und die Fehlermeldungen
"String erwartet" sind weg.

Auch Deine
Procedure.s GetSpecialFolder(CSIDL)
finde ich klasse.

Durch Deine Änderungen kann nun meine
Procedure.s extract_filename(file$)
entfallen.

Also Danke nochmal.

Nun fehlt also noch die Möglichkeit der Bilder / Movie - Vorschau.
Kann da jemannd anderer wieter helfen?

Danke
Bernd

Re: Explorer mit Bilder/Movies- Vorschau

Verfasst: 22.04.2013 23:28
von BSP
@Bisonte.
Da ist wohl eine Entschuldigung von mir fällig.
Ausser bei
psl\GetArguments(*Buf, 1024)
hattest Du alle buf- längen neu benannt.
Da bin ich bei dem ganzen Vergleichen, wo die Unterschiede sind, durcheinander geraten.
Ich habe den Vorwurf aus meinem letzten Beitrag entfernt.
Tschuldigung.

@all.
Ich habe meine Variante ganz Oben nun durch die neue ersetzt.

Nun könnte es also mit dem Anzeigen der Vorschaubilder weiter gehen.
(Falls ich potentielle Helfer nun nicht verschreckt habe). Smile.

Gruß:
Bernd