[AccessD] Alias Question

Gary Kjos garykjos at gmail.com
Sun Dec 19 16:52:42 CST 2021


Here us Stuarts earlier long response Arthur.....

On Sun, Dec 19, 2021 at 2:46 PM Stuart McLachlan <stuart at lexacorp.com.pg> wrote:
>
> It is the exact name of the function as the it appears in the  DLL. You can declare the
> function with any function name you want in your code, but you must give the correct actual
> name, with correct capitalisation, as it appears in the function as the ALIAS because that is
> how your code finds it in the DLL.
>
> In your example, the actual exported function n the DLL is called GetDesktopWindow (not
> captialization).
>
> You could call get the Desktop WIndow handle with hWNd = GetWinNAme() if you declared
> your function like this:
> Declare Function myGetWInName _
> Lib "user32" Alias "GetDesktopWindow" () As Long
>
> If you did this (note incorrect capitalization), calling your function would give an error since
> their is no such function in the DLL.
> Declare Function WM_apiGetDesktopWindow _
> Lib "user32" Alias "Getdesktopwindow" () As Long
>
>
>
> On 19 Dec 2021 at 13:30, Arthur Fuller wrote:
>
> > Given a function declaration such as this(from ADH, by Getz et. al.):
> > <code> Declare Function WM_apiGetDesktopWindow _ Lib "user32" Alias
> > "GetDesktopWindow" () As Long </code>
> >
> > What purpose does the Alias serve?
> >
> > --
> > 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



-- 
Gary Kjos
garykjos at gmail.com


More information about the AccessD mailing list