[AccessD] 32->64 bit conversion

Bill Benson bensonforums at gmail.com
Thu Oct 28 10:58:55 CDT 2021


Arthur, haven’t opened the file myself, but will take a stab at what I
think you should do.

Copy the ones you want/need into top of standard module just below any
Option statements and before any of your other declarations. You can keep
them declared Private or change to Public. Private means they can only be
called from inside that module.

As for the gazillion constants, that sounds odd. It wouldn’t hurt  if you
copied them all I guess. I am guessing that they are of type LongPtr and
LongLong or other 64 bit?

When I was on a massive upscaling project, one with a lot of 32 bit API
functions pre-existing in the code, I would put wrappers around that luke

#If VBA7 Then
     The declarations that are 64 bit
      Office Compatible
#Else
      The declarations that were 32 bit
      Office Compatible
#End If


Sometimes in addition or in substitution one would have also

#If WIN64 Then…

Etc.

That is what conditional compilation is. Unfortunately this was only
sometimes all my code required. Often I had to change how many of the
variables in the rest of my code were declared as well. It is a long
learning curve (or was for me) and took a long time to properly upgrade
large apps to work in both environments. I think reading some of the links
others provided may be worth your time.

On Thu, Oct 28, 2021 at 8:37 AM Arthur Fuller <fuller.artful at gmail.com>
wrote:

> I forget who, but somebody sent me a link to a package called Office 2010
> Developer Resources. This includes a huge file called Win32API_PtrSafe.TXT,
> which contains about a jillion Constants, followed by numerous Private
> Declare statements.
>
> What am I supposed to do with this?. Break the Constants into a separate
> Access module? And what to do with all the Private Declares? Find each, one
> by one, and replace the existing ones with these new ones?
>
> I apologize for being so dense, but I'm way out of my comfort zone here.
>
> --
> Arthur
> --
> 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