[AccessD] 32->64 bit
pcs.accessd at gmail.com
Mon Nov 8 17:02:50 CST 2021
Also, If you have many of Getz and Litwin's APIs - you will note they are
prefixed with adh_
Just remove the prefix when searching the .txt file for the new API
Paste it into your Access project and then add the adh_ prefix; if Getz
and Litwin also prefixed any constants or type declaration be sure to add
the prefix to the constant / type in the api declaration that you pasted in
from the .txt file.
So your task may go something like this (with a repeat and rinse many
Search for Lib "User32" - restrict to one module at a time so you have an
idea which modules you've covered...
You may come across this API function from Getz and Litwin; (it's used in
connection with removing the caption bar of a form):
Declare Function adh_apiGetWindowRect Lib "user32" Alias "GetWindowRect"
(ByVal hwnd As Long, lpRect As adhTypeRect) As Long
Note the adh_ prefix on the function and the adh prefix on the Type
Now in the .txt file search for the api function without the prefix:
apiGetWindowRect Lib "user32"
Paste back into your Access project and add the adh_ and adh prefixes:
Declare PtrSafe Function adh_apiGetWindowRect Lib "user32" Alias
"GetWindowRect" (ByVal hWnd As LongPtr, lpRect As adhTypeRect) As Long
Since the api function is declared as Long you're done.
Here's the "rinsing" part of the "repeat and rinse":
For an api function like this one (also used in connection with removing
the caption bar of a form)
Declare Function adh_apiGetWindowLong Lib "user32" Alias "GetWindowLongA"
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Declare PtrSafe Function adh_apiGetWindowLong Lib "user32" Alias
"GetWindowLongPtrA" (ByVal hWnd As LongPtr, ByVal nIndex As Long) As LongPtr
you will note that the PtrSafe function has a return value of LongPtr.
You therefore need to search your Access project for all variables you have
declared that will receive this function value and declare those variables
When done: Repeat and rinse....
Have fun... or not!
On Tue, Nov 9, 2021 at 8:09 AM Stuart McLachlan <stuart at lexacorp.com.pg>
> On 8 Nov 2021 at 16:23, Arthur Fuller wrote:
> > Should I open that file in a text editor and then load my Access app,
> > then search for each DECLARE [Private] Function, then search the text
> > file for the corresponding declaration, then copy/paste? I really
> > don't know how to proceed.
> Yes. That's it exactly.
> That file contains updated/replacement declaration for a huge range of API
> All you need to do is locate the few Type and Function declarations your
> currently uses and update them (if they are changed) by copying the new
> version from that
> Constants (if any) will not have changed values. You only need to worry
> about missing
> constants if you decide to add another API function that is not currently
> in your application.
> AccessD mailing list
> AccessD at databaseadvisors.com
> Website: http://www.databaseadvisors.com
More information about the AccessD