I agree with Sneuberg. Better to stick with 32bit office unless you need the additional processing power for Excel - i.e. spreadsheets with 500k+ rows.
the easy bit is to adding ptrsafe to the function declaration. The harder bit is knowing when to change longs to longlongs.
Simply you could just replace longs with longptr which will convert as required depending on the version of access, but it is better to only apply when required. You will also need to convert any dimmed variables where required as well. i.e. assigning an api function value which is long or longlong
This is quite a useful link and has further links to other resources
Note that if you create a .accde then even with the changes made, a .accde created in 64bit access will only work on another 64bit office installation. Similarly a 32bit .accde will not run on a 64bit office application. And you cannot have both 32 and 64bit office on the same machine (not even if one of them is runtime).