MDAC 2.5 SDK - OLE DB Providers
OSP Toolkit


 

Using the RegisterProvider.reg File

The RegisterProvider.reg file is supplied with the OSP Toolkit to automate the process of registering a provider. Use this file only when fully registering a provider (that is, including a registration entry for the OSP Data Object).

Use this topic as a guide to entering the correct information in the RegisterProvider.reg file. When you are finished completing the template, you should rename it and double-click the file to import those settings into the registry.

Running the registry file is necessary so that the OLE DB Simple Provider DLL recognizes the OSP Data Object. You must also register the OSP Data Object separately by using Regsvr32.exe, or Javareg if you coded the object in Microsoft® Visual J++®.

If you are coding in Microsoft Visual C++®, you can add the required registry entries by using DLLRegisterServer instead of running RegisterProvider.reg.

You need to supply the following values before running RegisterProvider.reg:

Following is a copy of the registration template, and following that, an illustration of a completed registration template showing a set of example values.

Template ========================================================>
REGEDIT4

[HKEY_CLASSES_ROOT\<INSERT: ProgID for OLE DB Provider>]
@="<INSERT: Name of OLE DB Provider>"

[HKEY_CLASSES_ROOT\<INSERT: ProgID for OLE DB Provider>\CLSID]
@="<INSERT: GUID for OLE DB Provider>"

[HKEY_CLASSES_ROOT\CLSID\<INSERT: GUID for OLE DB Provider>]
@="<INSERT: ProgID of OLE DB Provider>"

[HKEY_CLASSES_ROOT\CLSID\<INSERT: GUID for OLE DB 
Provider>\InprocServer32]
@="<INSERT: Path to OLE DB Directory example --> 
c:\\Program Files\\Common Files\\System\\OLE DB\\>MSDAOSP.DLL"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\<INSERT: GUID for 
OLE DB Provider>\ProgID]
@="<INSERT: ProgId of OLE DB Provider>.1"

[HKEY_CLASSES_ROOT\CLSID\<INSERT: GUID for 
OLE DB Provider>\VersionIndependentProgID]
@="<INSERT: ProgId of OLE DB Provider>"

[HKEY_CLASSES_ROOT\CLSID\<INSERT: GUID for 
OLE DB Provider>\OLE DB Provider]
@="<INSERT: Name of OLE DB Provider>"

[HKEY_CLASSES_ROOT\CLSID\<INSERT: GUID for 
OLE DB Provider>\OSP Data Object]
@="<INSERT: ProgID for OSP Data Object>"

==========================================>
Example Values 
==========================================>
ProgID for OLE DB Provider = TestPWProv
Name of OLE DB Provider = Microsoft Test OLE DB Provider for OSP
GUID for OLE DB Provider = {6B94E051-E170-11d0-94EA-00C04FB66A50}
ProgId for OSP Data Object= MyOSPProject.OSPClass

==========================================>
Example 
==========================================>
REGEDIT4

[HKEY_CLASSES_ROOT\TestPWProv]
@="Microsoft Test OLE DB Provider for OSP"

[HKEY_CLASSES_ROOT\TestPWProv\CLSID]
@="{6B94E051-E170-11d0-94EA-00C04FB66A50}"

[HKEY_CLASSES_ROOT\CLSID\
{6B94E051-E170-11d0-94EA-00C04FB66A50}]
@="TestPWProv"

[HKEY_CLASSES_ROOT\CLSID\
{6B94E051-E170-11d0-94EA-00C04FB66A50}\InprocServer32]
@="c:\\Program Files\\Common Files\\
System\\OLE DB\\MSDAOSP.DLL"
"ThreadingModel"="Both"

[HKEY_CLASSES_ROOT\CLSID\{6B94E051-E170-11d0-94EA-00C04FB66A50}\ProgID]
@="TestPWProv.1"

[HKEY_CLASSES_ROOT\CLSID\{6B94E051-E170-11d0-94EA-00C04FB66A50}
\VersionIndependentProgID]
@="TestPWProv"

[HKEY_CLASSES_ROOT\CLSID\{6B94E051-E170-11d0-94EA-00C04FB66A50}
\OLE DB Provider]
@="Microsoft Test OLE DB Provider for OSP"

[HKEY_CLASSES_ROOT\CLSID\{6B94E051-E170-11d0-94EA-00C04FB66A50}
\OSP Data Object]
@="MyOSPProject.OSPClass"