Re: Sql SP1: Failed to initialize the provider



Laxmi Narsimha Rao Oruganti ha scritto:
Just call WIN32 API CoCreateInstance with CLSID_SQLSERVERCE and you need to include sqlce_oledb.h. and see if you have really got the class instance back and also validate HRESULT.

Thanks,
Laxmi


Hi Laxmi,
thank you very much for your help

here is the code I used for testing:

// ----------------------------------------------------
CoInitializeEx(NULL, COINIT_MULTITHREADED);
CoCreateInstance(CLSID_SQLSERVERCE, NULL, CLSCTX_INPROC_SERVER, IID_IUnknown, (void **)&pDSO);
// ----------------------------------------------------

The call to CoInitializeEx returns with S_OK, while the second one returns with "0x80040154 (not registered interface)".

And now? There's a way to fix this problem?

Thanks

.