Migrating from 32 bit to 64 bit

smig

Registered User.
Local time
Today, 03:55
Joined
Nov 25, 2009
Messages
2,209
I'm trying to migrate a big AC2003 project to AC2010 64

I saw I need to change all Declare into Declare PtrSafe.
Do I need to change it for all Functions and Subs ?

I also saw I need to change Long vars into LongPtr or LongLong, but this confused me more :banghead:
They didn't change the Long Function type, only the vars the function get.
When I tried to change the type of vars inside Functions or Subs I couldn't do any math calculations on them, Like lngVar + 1.

Thank you
Tal
 
yes you have to change all your api declaration, together with the subs and functions that are using your api.
 
Search my name and 64. The last or so post has a link to Microsoft listing of all API's changed for 64 bits
 
Search my name and 64. The last or so post has a link to Microsoft listing of all API's changed for 64 bits

Thank you,
I found your Adapting API functions to Office 64 thread
I found exactly the same MS, so called help, that caused me to ask the exact same questions :D

Let me know if I got it right, after reading the Using the Win32API_PtrSafe doc.
I only need to change the Windows API calls, and I can take these directly from the Using the Win32API_PtrSafe.txt file.
No need to change any of my oun variables in any function or sub.
 
try compiling your code, if error occurs just define a new type of variable, ie:

#If win64 then
dim yourVariable As LongPtr
#Else
dim yourVariable As Long
#End If
 

Users who are viewing this thread

Back
Top Bottom