COM question

  • Thread starter Thread starter Duncan Winn
  • Start date Start date
D

Duncan Winn

Hi,

I have been using COM to access data between VC++ and Borland C++.
All of a sudden when my application runs, as I am initialising COM it fails
with the error message "device is not ready".

//COM INITIALIZATION STEP 1: initialise the COM components
hr = CoInitialize(NULL);

//COM INITIALIZATION STEP 2: Get the CLSID
CLSID clsid;
hr = CLSIDFromProgID(OLESTR("COMCDFSvr3.CCSConnection"), &clsid);

//COM INITIALIZATION STEP 3: Create an instance of the component
hr = CoCreateInstance(clsid, NULL, CLSCTX_ALL, __uuidof(ICCSConnection),
(void**)&ccsConnection);
//it fails at this
point///////////////////////////////////////////////////////////////////////
///////////////

It all compiles ok, so I am unsure how to fix this bug.....

Any suggestions?????
 
You may want to check dependencies of DLL or EXE that implements your
object. Older OS (95/98/NT?) would return this error if explicitly linked
DLL was missing some exported functions (say it is older version).
 
Back
Top