[AccessD] Changing VBA code for 64 bit compatibility

Steve Schapel steve at datamanagementsolutions.biz
Sat Mar 9 17:04:22 CST 2024


Thank you, Bill.  As much information as I can get, I'd say.  I'll 
contact you.

Regards
Steve


On 10/03/2024 2:14:55 am, "Bill Benson" <bensonforums at gmail.com> wrote:

>If this site accepts attachments to err is also a full list of ptrsafe api
>calls in text file format on github somewhere that I downloaded. Email me
>off list if you want it.
>
>bensonforums at gmail.com
>
>On Sat, Mar 9, 2024 at 7:56 AM Jim Dettman via AccessD <
>accessd at databaseadvisors.com> wrote:
>
>>  There is also this list:
>>
>>https://jkp-ads.com/articles/apideclarations.asp
>>
>>   Which has many of the calls.
>>
>>  There is also a free API scanner and API Viewer here:
>>
>>https://accessusergroups.org/europe/
>>
>>  Written by Peter Cole.   His Youtube presentation on these is:
>>
>>https://www.youtube.com/watch?v=NE-ixCSkEgI
>>
>>  Jim.
>>
>>
>>
>>  -----Original Message-----
>>  From: AccessD On Behalf Of Stuart McLachlan
>>  Sent: Friday, March 8, 2024 8:56 PM
>>  To: Access Developers discussion and problem solving
>>  <accessd at databaseadvisors.com>
>>  Subject: Re: [AccessD] Changing VBA code for 64 bit compatibility
>>
>>  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/wi
>>  n32api_ptrsafe-wit
>>  <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
>>
>>  --
>>  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