VB6 Writing to a Log File

Overview

I’ve had to debug several VB6 DLL’s during development and found it’s invaluable to be able to write to a log to figure out where the processing is getting hung up.

This forum post gave me the code to do this

I’ll also copied the code below in case the website above goes away. Further more, I added a way to append to a file to have a rolling log. This isn’t meant to be used for long term since there is no logic to roll to a new file.

Read More

DLL Hell with a VB6 client

See: DLL Hell (wikipedia)

Overview

The app I admin is written in VB6 which uses a ton of ActiveX controls and COM+ DLL libraries. These libraries and controls are registered into the Windows registry which generates a GUID in HKEY_CLASSES_ROOT\CLSID along with entries of the filename and path, Company, etc.

To register the libraries/controls, you use regsvr32 with the file path. For my app’s case, it’s best to use the SysWow64 version of regsvr32 (which means you must run it from that directory) since most of our stuff is 32bit. Good news is that GUID will stay the same as long as Binary Compatibility is enabled for the VB6 project.

Read More

Code for this blog can be found here!