COM question

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?????
 
Y

Yan K. Avlasov

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top