HRESULT hr;
// Initialize the COM libraries
hr = CoInitializeEx(NULL,COINIT_MULTITHREADED);
ASSERT(SUCCEEDED(hr));
// Create COM objects
hr = CoCreateInstance( CLSID_Connection, NULL,
CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
IID__Connection, (LPVOID *)&m_iADOCEConn);
ASSERT(SUCCEEDED(hr));
hr = CoCreateInstance( CLSID_Recordset, NULL,
CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
IID__Recordset, (LPVOID *)&m_iADOCERS);
ASSERT(SUCCEEDED(hr));