[AccessD] Alias Question

Stuart McLachlan stuart at lexacorp.com.pg
Sun Dec 19 14:52:55 CST 2021


Doh - too early in the morning, lots of typos :(

GetWInName/myGetWinName
n/in
not/note cpitalisation
their/there


On 20 Dec 2021 at 6:46, Stuart McLachlan 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
> 




More information about the AccessD mailing list