Microsoft KB Archive/172394

From BetaArchive Wiki

ADOReg.exe License Key Registration DLL and ADO Use Tips

ID: Q172394




The information in this article applies to:


  • ActiveX Data Objects (ADO), version 1.0





SUMMARY

ADOReg.exe is a file that contains a DLL that adds the ADO License Key. This License Key might or might not be necessary depending on the language you use to manipulate ADO objects.

This article provides a solution to the ADO 1.0 Redistribution/License Key issue.



MORE INFORMATION

The following file is available for download from the Microsoft Software Library:


ADOReg.exe


For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:


Q119591 How to Obtain Microsoft Support Files from Online Services




File Name File Size File Date
ADOReg.cpp 5KB 7/31/97
AdoReg.def 1KB 7/17/97
ADOReg.dll 28KB 7/31/97
ADOReg.dsp 4KB 7/17/97
ADOReg.dsw 1KB 7/15/97
Readme.txt 6KB 8/6/97

What is Adoreg.dll?

Adoreg.dll simply adds the ADO registry key when registered by regsvr32 or when the DLL's DllRegisterServer() function is called.

This DLL will not be sufficient to allow Visual Basic developers to redistribute ADO-based applications; however, an expanded version designed to work with the Visual Basic Setup Wizard (AdoRegEx.DLL) is available separately and described in a separate Microsoft Knowledge Base article.


Where and When is the ADO License Key Needed?

The license key is needed in the registry on any development computer (as well as OLE-DB and ADO). The best way to get this is by installing the OLE-DB SDK, Active Server Pages 1.0 or Visual InterDev 1.0.

When considering if you need to install the license key on your client computer, keep the following points in mind:


  • The License Key is needed in the registry at compile time if your application performs early binding to ADODB 1.0 objects:
  • The License Key is needed in the registry at run-time if your application performs late binding to ADODB 1.0 objects:
  • The License Key needs to be provided through IClassFactory2 for the first ADODB object created if the license key does not exist in the registry.

When is Early or Late Binding Used?


The following discussion lists various development products, and how to handle license keys, early and late binding. All of these discussions assume both ADO and OLE-DB DLLs are installed correctly on your computer.

Visual Basic:

You will not need a License key on the client computer if you use early binding to create your ADO objects. This, and techniques for redistributing ADO successfully with the Visual Basic Setup Wizard are documented in the following article in the Microsoft Knowledge Base:


Q172406 FILE: Redistributing ADO 1.0 with Visual Basic 5.0



Visual C++:

You will need to either pass the ADO License Key to the first object you create, or you will need to add the ADO License Key to each client computer. Adoreg.dll lets you do the latter, and the following Microsoft Knowledge Base article discusses how to build ADO objects and pass the license key.


Q169496 HOWTO: Passing a License Key to Classes Generated by #import



While this article is specific to #import, the technique provided can be used when invoking ADO using the OLE SDK or with MFC OLE without #import.

Visual J++:

Visual J++ 1.x encapsulates typelibs with a set of classes, providing early binding at compile time. Therefore you should not need a license key on your client computers.

Active Server Pages 1.0 and VBScript:

As Active Server Pages (ASP) are interpreted, not compiled, you will need to have the license key on any server where the ASP page resides. This is typically done when you install ASP automatically. However, if you distribute your VBScript based application independent of ASP, you will need to have the license key available on any client computer.


Will We Have a License Key in the Future?


No. While ADO 1.0 is freely redistributable (even with the license key), future releases of ADO will be freely redistributable without a license key.



REFERENCES

This article is one of a series dealing with the redistribution of Microsoft Data Access Components (MDAC); ODBC, OLE DB, ADO, RDS, the MDAC Standalone, MDAC Redistribution and the Data Access SDK. The whitepaper "Redistributing Microsoft Data Access Components" presents a comprehensive overview of this subject, including referencing the content of this Knowledge Base article. This whitepaper is located at the following Web address:


http://msdn.microsoft.com/library/techart/msdn_redistmdac.htm

Additional query words: kbdse kbMDAC100 kbDatabase kbDeployment

Keywords          : kbfile kbADO kbVBp kbVC kbVisID kbVJ kbIIS 
Version           : WINDOWS:1.0
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: February 15, 1999