Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Thu, 20 Mar 2008 00:12:16 -0700 (PDT),    group: microsoft.public.platformsdk.com_ole        back       


Get over fatal error 0x8002802b   
I search through all groups for an COM error 0x8002802b without any
similar case. Now I've got over my problem, but I still don't know
why. I would like to share my case so that if anyone knows why this
got happen please tell me . I will be very appriciate.


The environment : windows 2003 server SP2.

There are two services. A and B. one in proc server C.
After A is started, A creates a thread to monitor something. A will
call B and C when something changes. At first, I test it in my
computer which is windows xp, it seems ok. But when I deploy them in
the target machine which is Windows  2003 server, I got 0x8002802B
errors when creating both B and C

	CComPtr<INotifyEquipment> pNotify;
	hr = pNotify.CoCreateInstance(progID);
	if(FAILED(hr))
	{
			logger.Error(_T("Failed to create Object; ProgID=%s; Error Info: 0x
%x"), (TCHAR*)progID, hr);
			_com_issue_error(hr);
	}

It failed when CreateInstance.

I checked the whole source codes and found in the very beginning of
the thread, there was a call :
	HRESULT hr = CoInitialize(NULL);
I also noticed in Registry, C's ThreadingModel is free. So I think I
mighe be some inconsistant with threading model.

I changed the call of CoInitialize to CoInitializeEx(NULL,
COINIT_MULTITHREADED); Then it worked to C. Unfortunately, the calling
to B was still an error.

I added ThreadingModel Free to B in registry. But it didn't work.

When I was wandering the source code of B to try to find something, I
suddenly found the definition of B:

// CEquipmentChange
class ATL_NO_VTABLE CEquipmentChange :
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CEquipmentChange, &CLSID_NotifyEquipment>,
	public ISupportErrorInfo,
	public IDispatchImpl<INotifyEquipment, &IID_INotifyEquipment,
&LIBID_RTDBCORELib>
{
 ....
}

See, it derives from CComSingleThreadModel rather than
CComMultiThreadModel. I had a sence this was the reason, so I modified
it without regarding to whether it should be SingleThreadModel or
MultithreadModel...

I problem was solve as I guessed.

But I still have no idea about why this got happen? And why can't I
use SingleThreadModel?  Service to Service, must be multithread?


I
date: Thu, 20 Mar 2008 00:12:16 -0700 (PDT)   author:   HL

Re: Get over fatal error 0x8002802b   
"HL"  wrote in message
news:75ed759f-1e38-4ee4-928d-cfdd328f566e@i12g2000prf.googlegroups.com
> I search through all groups for an COM error 0x8002802b without any
> similar case.

Try searching by the error's symbolic name, TYPE_E_ELEMENTNOTFOUND. 
Check that the type libraries for your COM servers are registered 
properly.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Thu, 20 Mar 2008 08:40:13 -0400   author:   Igor Tandetnik

Re: Get over fatal error 0x8002802b   
On 3ÔÂ20ÈÕ, ÏÂÎç8ʱ40·Ö, "Igor Tandetnik"  wrote:
> "HL"  wrote in message
>
> news:75ed759f-1e38-4ee4-928d-cfdd328f566e@i12g2000prf.googlegroups.com
>
> > I search through all groups for an COM error 0x8002802b without any
> > similar case.
>
> Try searching by the error's symbolic name, TYPE_E_ELEMENTNOTFOUND.
> Check that the type libraries for your COM servers are registered
> properly.
> --
> With best wishes,
>     Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925

Thank you, but I've already registered both COM server and its type
libraries. I guess it the reason is that the client and the server are
in different apartment. But I am not sure.
date: Fri, 21 Mar 2008 02:14:14 -0700 (PDT)   author:   HL

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us