[AccessD] 64 Bit Access and comdlg32.dll

Stuart McLachlan stuart at lexacorp.com.pg
Mon Feb 4 17:04:22 CST 2019


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.



More information about the AccessD mailing list