You can register a provider without a special entry for the OSP Data Object. In this case, you do not use the RegisterProvider.reg template file supplied with the OLE DB Simple Provider Toolkit.
If you choose this method of registration, you need consumer code to instantiate the provider. The provider must be instantiated with CoCreateInstance, using the GUID of the MSDAOSP.DLL. At run time, the ProgID of the OSP Data Object must be handed off to direct the DLL to the correct OSP object through the DBPROP_INIT_DATASOURCE property.
Perform the following steps to register a provider without using the RegisterProvider.reg file:
Following are the entries that are written to the Windows registry after performing steps 1 and 2 in the previous section.
The first group of registry entries, shown below, consists of entries listed under the CLSID subkey that are generated by running regsvr32.exe on MSDAOSP.DLL (step 1).
HKEY_CLASSES_ROOT
CLSID
{CLSID of MSDAOSP.DLL}
InprocServer32
(Default) = "C:\PROGRAMFILES\COMMON FILES\
SYSTEM\OLE DB\MSDAOSP.DLL”
OLE DB Provider
(Default) = " Microsoft OLE DB Simple Provider”
ProgID
(Default) = "MSDAOSP.1”
VersionIndependentProgID
(Default) = "MSDAOSP”
The second group of registry entries, shown below, consists of entries listed under the CLSID subkey that are generated by running regsvr32.exe on the provider DLL (step 2).
HKEY_CLASSES_ROOT
CLSID
{CLSID of OSP Data Object }
InprocServer32
(Default) = "Path of OSP Data Object DLL”
Threading Model = “Both”
ProgID
(Default) = "ProgID specified for the OSP Data Object”
VersionIndependentProgID
(Default) = "Version independent ProgID for this provider”