Calling static functions without using New
Hi
I am presently trying to implement a DLL which will intercept an
application's calls to DAO and redirect them to ADO.
For example, I would like to write my own DAO.Database and DAO.DBEngine
classes, remove a project's reference to the real DAO classes, and
replace it with my own. However, I've run into problems with the
following bit of code...
Sub DAOOpenJetDatabase()
Dim db As DAO.Database
Set db = DBEngine.OpenDatabase("C:\Nwind.mdb")
db.Close
End Sub
When I try to write my own DBEngine class with an OpenDatabase
function, I always get the error "Object Required" on the OpenDatabase
call. I have been told that there is something "mysterious" about the
real DAO classes (and Microsoft classes in general) that this sort of
call will work with them but not with ones of my own creation.
Does anybody know how to write a class so that I can call static
members of my new class without having to recode my application (ie,
keep the code above exactly as it is) ?
Cheers,
Sean
* Sent from RemarQ http://www.*-*-*.com/ The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!