By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

referencing a DLL from a ms access 2000 database?

P: n/a
Hi!
I had some thoughts on creating a dll-file in Delphi 7, and have this
dll contain some functions to use in my access 2000 db. How do I call
the dll-file from within my access 2000 db? Anybody that knows or know
of an article on this?

Kind regards,

Me.Name
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You declare the DLL's functions in the Declarations section of a module.
Something like this:

Public Declare Function GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal strBuffer As String, lngSize As Long) As Long

The function name you want to use in the VBA project is "GetUserName."

The DLL you want to get the function from is "advapi32.dll." I believe
you can indicate the path to that .dll or .exe file (not sure).

In the DLL that function is really named "GetUserNameA."

The stuff in parentheses are the functions parameters, just like regular
parameters in VBA.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQRp6koechKqOuFEgEQIOPQCgm4yBtGZ5qhoSASu/VR/cpdOGUdkAoL+O
pz79wY0JtRq6agCIHsTEUV7b
=CIm3
-----END PGP SIGNATURE-----
Geir Baardsen wrote:
Hi!
I had some thoughts on creating a dll-file in Delphi 7, and have this
dll contain some functions to use in my access 2000 db. How do I call
the dll-file from within my access 2000 db? Anybody that knows or know
of an article on this?


Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.