views:

170

answers:

2

Is it possible to use early binding with LogParser.dll on VB6/VBA? When I try to set a reference to it, it just disappears with no error.

A: 

Have you registered the DLL with COM?

Before using the Log Parser scriptable COM components on a computer, the "LogParser.dll" binary must be registered with the computer's COM infrastructure by executing the following command in the directory containing the "LogParser.dll" binary

C:\LogParser>regsvr32 LogParser.dll
Robert Harvey
Yes, first thing I tried... Does it work on your system?
Oorang
+2  A: 

Oorang,

I ran Dependency Walker on the DLL. It says that dwmapi.dll is missing. Googling dwmapi.dll comes up with all sorts of matches, all related to problems with early binding of COM objects. dwmapi is a delay-loaded dll that exists on Vista machines.

I tried putting a copy of dwmapi.dll on my machine in the system32 directory. It won't register with regsvr32 (no surprise there, really), but it did eliminate the missing reference in Dependency Walker. However, Dependency Walker still returns an error message that says:

Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

Didn't really expect it to work anyway, did we?

dwmapi is not even listed in Microsoft's DLL database.

I saw you in the IIS forums. No answer yet.

Any chance you could late bind this thing?

Robert Harvey
Microsoft's DLL database is so out-of-date it's embarrassing. I'm not sure they even try to update it.
MarkJ
+1 For a heck of an effort:) And absolutely you can late bind it. Learned how through a great effort by stanl (Don't know his real name). You can check it out here: http://www.vbaexpress.com/forum/showthread.php?t=26086 I took one look at it and was like, "this solves so many shared drive auditing issues".
Oorang
Well I guess I'm going to have to let this one go. Answer accepted.
Oorang