I m a new to Windows CE. I have a ATL Server that works fine on PC
Platform. I wanted to port that component to Windows CE. So I started
of with eVC++ 4.0 and Microsoft CE.NET 4.20. I stumbled upon some
compilation issues due to RTTI and _com_error. However I could resolve
them and now I can compile and register the component.

I have used Smart pointers and here is the piece of code that I
originally had.

CILError::ICIErrorMessageSetPtr errMsgSet;
HRESULT hr = errMsgSet.CreateInstance(__uuidof(
CILError::ErrorMessageSet));

However, when i executed the above code, i got a error ' Class Not
Registered'. So I looked up in the registry and to my surprise the
CLSID under HKEY_CLASSES_ROOT was different than what I had in my code.
So thats my first question - Has anyone seen this before that the CLSID
under which the component is present in the registry is different from
the actual one?

Anyway, i then changed my code to look like this.

CILError::ICIErrorMessageSetPtr errMsgSet;
CLSID clsID;
CLSIDFromProgID(L"Cummins.ErrorMessageSet", &clsID);
HRESULT hr = errMsgSet.CreateInstance(clsID);

With this change, I can see in the debugger that the correct CLSID is
being passed to CoCreateInstance. However, now i get a HResult of
80040111 which translates to CLASS_E_CLASSNOTAVAILABLE.

Can anybody throw some light on whats going on here?

TIA
Sriram