[AccessD] 32/64 bit app; Getting closer

Jim Dettman jimdettman at verizon.net
Tue Feb 12 14:24:52 CST 2019


Rocky, 

Some of the declares will need to be changed.  For example, EnumFontFamilies
is now:

Declare PtrSafe Function EnumFontFamilies Lib "gdi32" Alias
"EnumFontFamiliesA" (ByVal hdc As LongPtr, ByVal lpszFamily As String, ByVal
lpEnumFontFamProc As LongPtr, ByVal lParam As LongPtr) As Long

 and you don't automatically change all Long's into LongPtr.  Note that the
above declare still returns a Long.  Here's a link to a doc that gives you
all the new declares:

http://www.microsoft.com/download/en/confirmation.aspx?displaylang=en&id=997
0

and this link is all the new 64 bit calls that were added:

http://msdn.microsoft.com/en-us/library/aa383663(VS.85).aspx

<< So.  Does anyone see the problem, here?  >>

 It depends on what's in the structure mafiFonts.   If it's still expecting
a long, then under 64 bit you'd be trying to stuff 8 bytes into 4.

<< I’m trying not to go to conditional
compile if possible, but find code that will work in both environments.>>

 That may not be possible....it depends on the Declare's and structures your
using.   If they are different between 32 and 64 bit, then you will have to
use conditional complier constants to get a single code base.

That's all covered here:

https://docs.microsoft.com/en-us/office/client-developer/shared/compatibilit
y-between-the-32-bit-and-64-bit-versions-of-office


Jim.

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Rocky Smolin
Sent: Tuesday, February 12, 2019 2:26 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] 32/64 bit app; Getting closer


Dear List:

Got the open file dialog box working in both 32 and 64 bit environments. 
<<snip>>




More information about the AccessD mailing list