Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
1676to1680
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

64 bit - Declare - PtrSafe Attribut = pffffff

64 bit - Declare - PtrSafe Attribut = pffffff
02.03.2019 11:33:05
Fred

Hallo Excel Profis,
ich bekomme bei folgenden Code eine Fehlermeldung die besagt, dass der Code auf 64-Bit-System aktualisiert werden soll,- ich die Declare-Anweisung aktualisieren soll und mit dem PtrSafe-Attribut markieren soll.
Option Explicit
Private Declare Function MakeSureDirectoryPathExists _
Lib "imagehlp.dll" (ByVal Pfad As String) As Long
Private Declare Function DeleteUrlCacheEntry Lib "wininet" Alias _
"DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long
Private Declare Function URLDownloadToFile Lib "urlmon" _
Alias "URLDownloadToFileA" ( _
ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Public Sub GetFiles()
On Error GoTo Fin
LoadFiles "http://api.clubelo.com/" & Format(Now, "YYYY-MM-DD")
Fin:
If Err.Number  0 Then MsgBox "Error: " & _
Err.Number & " " & Err.Description
End Sub
Public Sub LoadFiles(ByVal strURL As String)
Dim strBackup As String
Dim lngTMP As Long
strBackup = Environ("UserProfile") & "\Desktop\ELO33\"
Call DeleteUrlCacheEntry(strURL)
Call MakeSureDirectoryPathExists(strBackup)
lngTMP = URLDownloadToFile(0, strURL, _
strBackup & "Aktuell.csv", 0, 0)
End Sub
Kann mir jemand helfen, entsprechender Umstellung auf 64 Bit System ...
Mit freundlichen Gruß
Fred Neumann

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: 64 bit - Declare - PtrSafe Attribut = pffffff
02.03.2019 11:45:42
Nepumuk
Hallo Fred,
teste mal:
Private Declare PtrSafe Function MakeSureDirectoryPathExists _
    Lib "imagehlp.dll" (ByVal Pfad As String) As Long
Private Declare PtrSafe Function DeleteUrlCacheEntry Lib "wininet" Alias _
    "DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" _
    Alias "URLDownloadToFileA" ( _
    ByVal pCaller As LongPtr, _
    ByVal szURL As String, _
    ByVal szFileName As String, _
    ByVal dwReserved As Long, _
    ByVal lpfnCB As LongPtr) As Long

Gruß
Nepumuk
Anzeige
AW: 64 bit - Declare - PtrSafe Attribut = pffffff
02.03.2019 12:20:36
Fred
Nepumuk, Super!
Danke und schönes Wochenende.
Gruß
Fred

14 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige