Hi,
I am porting an application from PocketPC 2002 to
PocketPC 2003 using evc 4.0. The code worked perfectly in
PocketPC 2002. But even with the newly compiled code using
evc 4.0 it keeps giving Class Not Registered error on
PocketPC 2003 even though I have made sure it is
registered. I did that using regsvrce.exe and also EVC 4.0
reports successful registration on download.
I came across a similar problem posted on the
microsoft.public.pocketpc.developer newsgroup as given
below.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-
8&threadm=LyKAs9kcDHA.460%
40cpmsftngxa06.phx.gbl&rnum=1&prev=/groups%3Fq%
3DCoCreateInstance%2Bclass%2Bnot%2Bregistered%2Bin%
2Bpocketpc%2B2003%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%
3DUTF-8%26selm%3DLyKAs9kcDHA.460%2540cpmsftngxa06.phx.gbl%
26rnum%3D1

This article suggested changing Single Thread model to
MultiThread model and Apartment to Free. It said that
PocketPC 2003 does not support Single and Apartment model.

I am facing the same problem as mentioned in the
newsgroup now but the solution mentioned there did not
resolve the issue in my case. Here is my scenario. Could
anyone please let me know what I might be missing?

1. The earlier code was built using evc 3.0 for PocketPC
2002 and ran fine on both iPAQ and Symbol devices with
this OS.
2. The client has now switched to a new model Symbol PPT
8846 having PocketPC 2003.
3. So I am porting the application to PocketPC 2003 using
EVC 4.0.
4. At first I did not make the changes proposed in the
article and the code compiled fine in EVC 4.
5. However it was unable to perform a CoCreateInstance and
the error code said "Class not registered". However both
EVC 4.0 registered it successfully and I even used the
regsvrce.exe and it said successful registration.
6. After I read the posting, I made the changes proposed,
in all the COM components and registered them on the
device. But still no luck, it still keeps giving the same
error.

Would anyone have an idea what I might be missing?
This project is on a deadline so I would appreciate any
help you can provide.

Regards,
Swami

Re: CoCreateInstance Class not registered error even though it is by KS

KS
Fri Feb 20 16:47:15 CST 2004

Did you try this before doing a CoCreateInstance()

CoInitializeEx(NULL, COINIT_MULTITHREADED);

KS

"Swami Balasubramanian" <swami@riverrun.com> wrote in message
news:1415e01c3f801$91858bd0$a401280a@phx.gbl...
> Hi,
> I am porting an application from PocketPC 2002 to
> PocketPC 2003 using evc 4.0. The code worked perfectly in
> PocketPC 2002. But even with the newly compiled code using
> evc 4.0 it keeps giving Class Not Registered error on
> PocketPC 2003 even though I have made sure it is
> registered. I did that using regsvrce.exe and also EVC 4.0
> reports successful registration on download.
> I came across a similar problem posted on the
> microsoft.public.pocketpc.developer newsgroup as given
> below.
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-
> 8&threadm=LyKAs9kcDHA.460%
> 40cpmsftngxa06.phx.gbl&rnum=1&prev=/groups%3Fq%
> 3DCoCreateInstance%2Bclass%2Bnot%2Bregistered%2Bin%
> 2Bpocketpc%2B2003%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%
> 3DUTF-8%26selm%3DLyKAs9kcDHA.460%2540cpmsftngxa06.phx.gbl%
> 26rnum%3D1
>
> This article suggested changing Single Thread model to
> MultiThread model and Apartment to Free. It said that
> PocketPC 2003 does not support Single and Apartment model.
>
> I am facing the same problem as mentioned in the
> newsgroup now but the solution mentioned there did not
> resolve the issue in my case. Here is my scenario. Could
> anyone please let me know what I might be missing?
>
> 1. The earlier code was built using evc 3.0 for PocketPC
> 2002 and ran fine on both iPAQ and Symbol devices with
> this OS.
> 2. The client has now switched to a new model Symbol PPT
> 8846 having PocketPC 2003.
> 3. So I am porting the application to PocketPC 2003 using
> EVC 4.0.
> 4. At first I did not make the changes proposed in the
> article and the code compiled fine in EVC 4.
> 5. However it was unable to perform a CoCreateInstance and
> the error code said "Class not registered". However both
> EVC 4.0 registered it successfully and I even used the
> regsvrce.exe and it said successful registration.
> 6. After I read the posting, I made the changes proposed,
> in all the COM components and registered them on the
> device. But still no luck, it still keeps giving the same
> error.
>
> Would anyone have an idea what I might be missing?
> This project is on a deadline so I would appreciate any
> help you can provide.
>
> Regards,
> Swami



Re: CoCreateInstance Class not registered error even though it is by Swami

Swami
Sat Feb 21 21:03:44 CST 2004

Yes I have done that. CoInitializeEx is successful but
CoCreateInstance after that fails.

Swami
>-----Original Message-----
>Did you try this before doing a CoCreateInstance()
>
>CoInitializeEx(NULL, COINIT_MULTITHREADED);
>
>KS
>
>"Swami Balasubramanian" <swami@riverrun.com> wrote in
message
>news:1415e01c3f801$91858bd0$a401280a@phx.gbl...
>> Hi,
>> I am porting an application from PocketPC 2002 to
>> PocketPC 2003 using evc 4.0. The code worked perfectly
in
>> PocketPC 2002. But even with the newly compiled code
using
>> evc 4.0 it keeps giving Class Not Registered error on
>> PocketPC 2003 even though I have made sure it is
>> registered. I did that using regsvrce.exe and also EVC
4.0
>> reports successful registration on download.
>> I came across a similar problem posted on the
>> microsoft.public.pocketpc.developer newsgroup as given
>> below.
>> http://groups.google.com/groups?hl=en&lr=&ie=UTF-
8&oe=UTF-
>> 8&threadm=LyKAs9kcDHA.460%
>> 40cpmsftngxa06.phx.gbl&rnum=1&prev=/groups%3Fq%
>> 3DCoCreateInstance%2Bclass%2Bnot%2Bregistered%2Bin%
>> 2Bpocketpc%2B2003%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%
>> 3DUTF-8%26selm%3DLyKAs9kcDHA.460%
2540cpmsftngxa06.phx.gbl%
>> 26rnum%3D1
>>
>> This article suggested changing Single Thread
model to
>> MultiThread model and Apartment to Free. It said that
>> PocketPC 2003 does not support Single and Apartment
model.
>>
>> I am facing the same problem as mentioned in the
>> newsgroup now but the solution mentioned there did not
>> resolve the issue in my case. Here is my scenario.
Could
>> anyone please let me know what I might be missing?
>>
>> 1. The earlier code was built using evc 3.0 for
PocketPC
>> 2002 and ran fine on both iPAQ and Symbol devices with
>> this OS.
>> 2. The client has now switched to a new model Symbol
PPT
>> 8846 having PocketPC 2003.
>> 3. So I am porting the application to PocketPC 2003
using
>> EVC 4.0.
>> 4. At first I did not make the changes proposed in the
>> article and the code compiled fine in EVC 4.
>> 5. However it was unable to perform a CoCreateInstance
and
>> the error code said "Class not registered". However
both
>> EVC 4.0 registered it successfully and I even used the
>> regsvrce.exe and it said successful registration.
>> 6. After I read the posting, I made the changes
proposed,
>> in all the COM components and registered them on the
>> device. But still no luck, it still keeps giving the
same
>> error.
>>
>> Would anyone have an idea what I might be missing?
>> This project is on a deadline so I would appreciate any
>> help you can provide.
>>
>> Regards,
>> Swami
>
>
>.
>