[AccessD] 64 Bit Access and comdlg32.dll

Rocky Smolin rockysmolin at bchacc.com
Mon Feb 4 18:03:48 CST 2019


I had the PtrSafe in there (this was a snip from a web site), but LongPtr
may do the trick.  I forgot about that when trying to make an app that runs
on both 32 and 64.

Thanks.  Hopefully that will do the job.  Otherwise you'll be hearing from
me for more ideas. :)

R


-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Stuart McLachlan
Sent: Monday, February 04, 2019 3:04 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] 64 Bit Access and comdlg32.dll

You don't have Ptrsafe here:

Private Declare Function GetOpenFileName _
Lib "COMDLG32.DLL" Alias "GetOpenFileNameA" _
(pOpenfilename As OPENFILENAME) As Long

Also, you need to modify OPENFILENAME by changing LONG to LONGPTR for

hWndOwner and hInstance since they are handles.


On 4 Feb 2019 at 9:32, Rocky Smolin wrote:

> Dear List:
> I have two apps which need to operate in both 32 and 64 bit Office
> environments.

> I have added PrtSafe to all of the declares and that part works.

> However, the Open File Dialog box does not.  It calls the standard:

> Private Declare Function GetOpenFileName _
> 
>     Lib "COMDLG32.DLL" Alias "GetOpenFileNameA" _
> 
>     (pOpenfilename As OPENFILENAME) As Long

> But the dialog box does not open.  Control simply transfers to the
> next line of code after the Call to GetOpenFileName.

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list