[AccessD] Replacement for comdlg32?
Stuart McLachlan
stuart at lexacorp.com.pg
Mon May 8 17:00:17 CDT 2023
Found the problem.
When populating the OpenFileName structure, we have previously used
Function GetFileName(Directory As String) As String
...
OpenFile.lStructSize = Len(OpenFile)
...
End Function
Now it needs to be
OpenFile.lStructSize = LenB(OpenFile)
(Note the "B")
with that change, it now works wirh 64bit Access2021
On 8 May 2023 at 14:47, Jim Dettman via AccessD wrote:
> Rocky,
>
> You can use it in 64 bit. You just need to update the API calls.
> Those
> can be found here:
>
> https://jkp-ads.com/articles/apideclarations.asp
>
> Just do a find on the page for "GetOpenFileName"
>
> If you don't want to go through that, and are on a later version of
> Access, then you can use the one built in:
>
> https://learn.microsoft.com/en-us/office/vba/api/access.application.fi
> ledial og
>
> Jim.
>
> -----Original Message-----
> From: AccessD On Behalf Of Rocky Smolin
> Sent: Monday, May 8, 2023 2:33 PM
> To: Access Developers discussion and problem solving
> <accessd at databaseadvisors.com>; Off Topic
> <dba-ot at databaseadvisors.com> Subject: [AccessD] Replacement for
> comdlg32?
>
> I have just discovered that
>
> Private Declare PtrSafe Function ts_apiGetOpenFileName Lib
> "comdlg32.dll" _
> Alias "GetOpenFileNameA" (tsFN As tsFileName) As Boolean
>
> will not run in 64-bit.
>
> Is there a good replacement?
>
> MTIA
>
> Rocky
> --
> 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