[AccessD] Changing VBA code for 64 bit compatibility

Steve Schapel steve at datamanagementsolutions.biz
Sat Mar 9 17:01:14 CST 2024


Many thanks, Stuart, for that great information and sumnmary.  Much 
appreciated.

I admit I am approaching the task with trepidation.

Regards
Steve


On 9/03/2024 2:56:20 pm, "Stuart McLachlan" <stuart at lexacorp.com.pg> 
wrote:

>Assuming there are all WIn32 API decalrations, that's correct.  And you need to look at any
>API  Types as well as function prototypes 🙁
>
>If doing it yourself by eye, you need to change LONGs to LONGPTRs only where they are
>actual handles/ memory pointers, any others need to remain as LONGs  and the only way to
>tell that is to examine each function and work out what each parameter actually is.
>
>However, you can find a lot of the corrected  versions in the MS Document:
>Wini32API_Ptrsafe.txt..  You can search that document to find your functions/type
>declarations  and copy/paste the updated versions
>
>(But it's not a complete list!)
>
>
>See
>https://learn.microsoft.com/en-us/office/troubleshoot/office-suite-issues/win32api_ptrsafe-wit
>h-64-bit-support
>
>If you are using declarations to third party DLLs, it's a different issue.  You can't call 32bit
>DLLs from 64bit Access.
>
>
>On 8 Mar 2024 at 23:33, Steve Schapel wrote:
>
>>  Hi all.
>>
>>  Sorry, a bit green on this topic.  But I want to change the code in an
>>  application that contains a very large number of Declare statements,
>>  so that it will be compatible with 64 bit Access.
>>
>>  I think I know what has to be changed.  But so far it looks like a
>>  long tedious task.
>>
>>  Has anyone worked out a way to streamline this process.  I know I
>>  could flick through and replace e.g. "Declare Function" with "Declare
>>  PtrSafe Function".  But as far as I can see, I would still need to
>>  manually check each instance for "As Long", and where applicable edit
>>  to "As LongPtr".  Is that right?
>>
>>  Many thanks.
>>
>>  Regards
>>  Steve
>>  --
>>  AccessD mailing list
>>AccessD at databaseadvisors.com
>>https://databaseadvisors.com/mailman/listinfo/accessd
>>  Website: http://www.databaseadvisors.com
>>
>
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>https://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com


More information about the AccessD mailing list