I assume your question refers to Cory Sarver's tutorial Download Files with VBA URLDownloadToFile. I normally use Dennis Wallentin's Windows API Viewer for MS Excel to answer questions like yours, but that app doesn't include URLDownloadToFile in its library. Therefore, Compatibility Between the 32-bit and 64-bit Versions of Office 2010 is my alternate source.
Here is URLDownloadToFile Syntax:
_Reserved_ DWORD dwReserved,
Since pCaller and lpfnCB are both pointers, I believe the correct VBA declaration for 64-bit Windows is:
Private Declare PtrSafe Function URLDownloadToFile _
Lib "urlmon" Alias "URLDownloadToFileA" ( _
ByVal pCaller As LongPtr, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As LongLong, _
ByVal lpfnCB As LongPtr _
) As LongLong
Notice all parameters are ByVal, so we don't need to worry about any of them being changed by the function. Using VBA you will almost certainly be setting pCaller and lpfnCB to zero as NULL pointers, so it probably doesn't matter if they are declared Long instead of LongPtr. And since dwReserved must be set to zero, it probably can be declared Long instead of LongLong.
The function returns S_OK=0 if the download started successfully; otherwise, it returns E_OUTOFMEMORY=0x8007000E or INET_E_DOWNLOAD_FAILURE=0x800C0008. You will likely test whether or not the return value is zero (only), so it probably doesn't matter if the return value is declared Long instead of LongLong.
I have tried this declaration in 64-bit Windows with the various combinations of Long, LongPtr, and LongLong described above and it worked in every case.
When you post a question, please oblige us by responding to comments and answers. Also, you might be interested in My Excel Toolbox.