[AccessD] 32->64 bit conversion

Stuart McLachlan stuart at lexacorp.com.pg
Wed Dec 22 15:18:05 CST 2021


It's Line 6772 of Win32API_PtrSafe.TXT

Declare PtrSafe Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd 
As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, lParam As Any) As LongPtr

I was mistaken, wparam is still declared as LONG, not LongPtr and it is declared as the  "A", 
function, not the "W"


On 22 Dec 2021 at 7:14, Arthur Fuller wrote:

> Thanks, Stuart.\Looks like I'll have to do another pass through my
> updates to adhCode.
> 
> On Tue, Dec 21, 2021 at 9:47 PM Stuart McLachlan
> <stuart at lexacorp.com.pg> wrote:
> 
> > Since strings in Access these days are all wide strings (Unicode -
> > UTF-16), I'd change that to  Alias "SendMessageW"
> >
> > And yes HWnd,wMSg,wparam and the return value  are 32 bit or 64 bit
> > depending on application and so should be LongPtrs.
> >
> >
> > On 21 Dec 2021 at 13:17, Arthur Fuller wrote:
> >
> > > This function is from ADH 2000 (Getz, Litwin et. al.):
> > > <code>
> > > Private Declare Function SendMessageStr _
> > >  Lib "user32" Alias "SendMessageA" _
> > >  (ByVal hwnd As Long, ByVal wMsg As Long, _
> > >  ByVal wparam As Long, ByVal strName As String) As Long
> > > </code>
> > > Not surprisingly it's not in the PtrSafe file. I inserted the word
> > > PtrSafe after the Declare  keyword. Judging by their names, I'm
> > > guessing that the parameters  declared as Longs should be
> > > LongPtrs, and perhaps the return value should be as well. Is that
> > > right? Arthur -- 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
> >
> 
> 
> -- 
> Arthur
> -- 
> 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