[AccessD] Alias Question

James Button jamesbutton at blueyonder.co.uk
Sun Dec 19 18:15:42 CST 2021


Re the use of the Alias.

That  is something I have used to  create functional  processes that are
replacements for  supplied modules that didn't quite seem to do what was needed
-
As in it not checking the parameters for conformity  and not generate
appropriate error messages as in  it's nice to know what file is inaccessible
rather than have to figure it out from a generic 'can't be bothered'  error
code.

JimB

-----Original Message-----
From: AccessD
<accessd-bounces+jamesbutton=blueyonder.co.uk at databaseadvisors.com> On Behalf Of
Arthur Fuller
Sent: Sunday, December 19, 2021 11:31 PM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] Alias Question

Thanks Gary and Stuart. That clears things up.

On Sun, Dec 19, 2021 at 5:53 PM Gary Kjos <garykjos at gmail.com> wrote:

> 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
> --
> 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