[AccessD] comdlg32.dll

Stuart McLachlan stuart at lexacorp.com.pg
Fri Sep 28 03:39:58 CDT 2012


I forgot to mention that you also need to change the definition of tagOPENFILENAME.

>From memory, there are a couple of places there where you need to use LONGPTR instead 
of LONG.

-- 
Stuart

On 28 Sep 2012 at 18:35, Stuart McLachlan wrote:

> You can still use comdlg32.dll. It's available in both 32 and 64 bit Windows.
> 
> But you need to compile with the PtrSafe keyword.  Try this:
> 
> Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" _    
>                Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As Boolean
> 
> If you code is likely to run in different versions of Windows/Office (32 and 64 bit), you  need to 
> wrap the declarations in  compiler conditionals.
> 
> #If VBA7 Then
> Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" _    
>                Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As Boolean
> #Else
> Declare Function GetOpenFileName Lib "comdlg32.dll" _    
>                Alias "GetOpenFileNameA" (OFN As tagOPENFILENAME) As Boolean
> #End if
> 
> See http://msdn.microsoft.com/en-us/library/ee691831%28office.14%29.aspx for all the gory 
> details.
> 
> -- 
> Stuart
> On 28 Sep 2012 at 10:29, Kostas Konstantinidis wrote:
> 
> > Hi all,
> > I use the comdlg32.dll on a Dev Ashish and Terry Kreft 1999 code
> > but now while we have upgraded to win 7 64-bit and office 64
> > it need an update for all that...
> > Is really there a "comdlg32.dll" available for office 64-bit?
> > 
> > thank's a lot
> > 
> > /kostas
> > -- 
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> > 
> 
> 
> -- 
> 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