Codestone Ltd logo

ActiveX Diagnostics

Usage

To run the diagnostics on a particular ocx or dll you may either:
  • Specify a filename on the command line
  • Drop a file onto the program
  • Use the [...] button or the File|Open menu to browse for a file.

Notes

This is a small utility to help in the diagnosis of OCX installation/registration problems, use it during the development cycle or as a tool to diagnose problems once you've shipped your control to a customer site.

Most of the information the program reports can be gathered from other utilities. The advantages of this program are that:

  1. It collates all this information in one place and produces a summary report which can be examined later.
  2. It does not require your customer to have SDK tools on their machine!
Notes on the information provided and alternative sources of the information are listed in each of the sections below.


System

The System tab shows the following information.
  • Computer Name
  • OS Version
  • Platform
  • Processor Architecture
  • System Directory
  • User Name
  • Windows Directory

Notes

Useful to check the platform and that all required service packs are installed.

Alternative source of information: 'Help|About Windows NT/95' in Windows Explorer


Environment

Notes

The Environment tab simply shows the environmental variables active when the program is run, the PATH variable is perhaps the most useful.

Alternative source of information: NT/95 SET Command. Control Panel|System|Environment


Version

The Version tab shows the following information.
  • FileVersion
  • FileDescription
  • OLESelfRegister
  • CompanyName
  • InternalName
  • LegalCopyright
  • OriginalFilename
  • ProductName
  • ProductVersion
  • Comments
  • LegalTrademarks
  • PrivateBuild
  • SpecialBuild
  • File create time
  • File modify time
  • File access time
The 'Binary Version' box shows the binary version of the file - this is independent of the language and other internationalisation issues and is the value required by, for example, .dep file for the VB Setup wizard.

Notes

Allows you check the version of the OCX that is being run.

Alternative source of information: Right click the file in Explorer, choose 'Properties' and select the 'Version' tab


DLL

The DLL tab shows the entry points for the following exported functions.
  • DllRegisterServer()
  • DllUnregisterServer()
  • DllGetClassObject()

Notes

Probably not a lot of use! Proves the OCX is exporting the required entry points.

Alternative source of information:


Registry

The Registry tab shows the Documentation String and Class ID (CLSID) of each class registered by the control.

Whilst populating this tab the program also attempts the following operations.

  1. Calls CoGetClassObject with the CLSID to try to create a class factory (IClassFactory) for the class.
  2. Calls IClassFactory->CreateInstance to try to create an instance of the class on it's IUnknown interface.
  3. Calls IClassFactory->CreateInstance to try to create an instance of the class on it's IDispatch interface.
if IClassFactory->CreateInstance fails with CLASS_E_NOTLICENSED the program takes the following extra operations.
  1. Calls CoGetClassObject with the CLSID to try to create a licensing class factory (IClassFactory2) for the class.
  2. Calls IClassFactory2->RequestLicKey to try to obtain a license key for the class.
  3. Calls IClassFactory2->CreateInstanceLic to try to create an instance of the class on it's IUnknown interface.

Notes

Saves you or your customer from trailing through the registry looking up all those CSLIDs.

Works by traversing the entire directory tree looking for classes which use the OCX.

Alternative source of information: Regedit32. OLE/COM Object Viewer in SDK


Dependencies

The Dependencies tab lists the DLLs that the control requires. The list is recursive; that is the dependents of dependent DLLs are also included. For each DLL the following information is shown.
  • Name
  • Version
  • Date/Time
  • Size
  • Directory

Notes

Lists all the DLLs imported by the OCX - useful for detecting missing DLLs and mismatched versions.

Alternative source of information: Dependency Walker in SDK


Report

The Report tab simply lists all of the above the information in plain ASCII text.

Notes

Your customer can cut and paste this into an email and send it to you.

Version History

VersionDateNotes
1.0b Build 39517 September 2001
  • Removed MFC42 Dependencies
1.0b04 December 1999 These include 'silent' changes made to later builds of V 1.0a.
  • Added the CreateInstance functionality
  • Added Environment tab
  • Added the 'Binary Version' field to the Version tab
  • Fixed a few GUI Glitches
  • Removed dependency on the dreaded SHLWAPI.DLL
1.0a Initial Release