using lib files?

  • Thread starter Thread starter CuriousMark
  • Start date Start date
C

CuriousMark

In order to provide certain functionality to my projects, I've been directed
to the Internet and come across code that has following format for function
and sub definitions declarations:

Private Declare Function myFunction Lib "xxx.yyy" Alias "myFunctionA"
(ByVal...) as ...

What does this do? I haven't been able to find this in any of my (relatively
beginner) Access programming books. My guess is that is passes parameters to
an existing Windows program ("xxx.yyy") for execution, but in order to use
the code I need to understand it better.

Thanks.
CM
 
This is a reference to Win32 API. Basically, what follows LIB specify which
of the Window's library (DLL) you want to use (such as User32, OLEaut32,
.... ), which entry point, if different than the name you supplied follow the
word ALIAS (and generally, function returning strings use the function with
an A at their end), and which argument, with their type, the said entry
point expects to get.


There are some examples at http://www.mvps.org/access/api/index.html


There are more examples at http://vbnet.mvps.org/ and even if it is called
vbnet, that is, indeed, 'classic vb' (and not about vb-dot net ). Note, on
the other hand, that Access VBA can have a couple of light differences in
comparison to vb-classic.



Vanderghast, Access MVP
 
Back
Top