My object is failing to send out events. I am using the ATLCPImplMT
connection point implementation which stores the connections in the
GlobalInterfaceTable. If I register my object using regsvr32 everything
works normally. Likewise if I use that standard ATL IConnectionPointImpl
everything works normally.
When I try to use the GIT base ATLCPIMplMT, the GIT GetInterfaceFromGlobal
is always returning E_UNEXPECTED.
Any ideas what is causing this?
LoadLibrary for your P/S DLL
GetProcAddress for DllGetClassObject
Call DllGetClassObject for each IID
CoRegisterClassObject for each IID
CoRegisterPSClsid for each IID
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
"gscott2112" <gscot...@discussions.microsoft.com> wrote in message
news:141BB1DF-C660-4141...@microsoft.com...
In the meantime, we modified ATLCPImplMT.h to store IUnknown references in
the GIT instead of the IID of the event interface. The implementation is
using IUnknown in it's vector anyways, and this seems to work well.
Since we are trying to use reg-free COM, could I in theory use this method
to register all my COM objects during application startup as opposed to using
application manifests and embedded dll manifests?
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@mvps.org
MVP VC FAQ: http://vcfaq.mvps.org
=====================================
"gscott2112" <gscot...@discussions.microsoft.com> wrote in message
news:E7712A3B-A3D7-4834...@microsoft.com...
Advise function:
m_pGIT->RegisterInterfaceInGlobal(p,iid,&dwGITCookie)
to
m_pGIT->RegisterInterfaceInGlobal(p,__uuidof(IDispatch), &dwGITCookie);
and
GetInterfaceAt function:
m_pGIT->GetInterfaceFromGlobal(dwGITCookie,iid, reinterpret_cast<void **>(&pUnk));
to
m_pGIT->GetInterfaceFromGlobal(dwGITCookie,__uuidof(IDispatch), reinterpret_cast<void **>(&pUnk));
In any case this solution should work for all cases due to the fact that the connection point is Disp Interface.
Hope this help to anyone that work with reg-free COM on multithreaded cases.
>> On Sunday, October 28, 2007 2:16 PM Alexander Nickolov wrote:
>> You need to register marshaling support for your interfaces.
>> You do so by:
>>
>> LoadLibrary for your P/S DLL
>> GetProcAddress for DllGetClassObject
>> Call DllGetClassObject for each IID
>> CoRegisterClassObject for each IID
>> CoRegisterPSClsid for each IID
>>
>> --
>> =====================================
>> Alexander Nickolov
>> Microsoft MVP [VC], MCSD
>> email: agnic...@mvps.org
>> MVP VC FAQ: http://vcfaq.mvps.org
>> =====================================
>>
>> "gscott2112" <gscot...@discussions.microsoft.com> wrote in message
>> news:141BB1DF-C660-4141...@microsoft.com...
>>> On Thursday, November 01, 2007 2:08 PM gscott211 wrote:
>>> Interesting. I've never used CoRegisterClassObject or CoRegisterPSClsid
>>> before.
>>> I'll see if I can find some examples of this.
>>>
>>> In the meantime, we modified ATLCPImplMT.h to store IUnknown references in
>>> the GIT instead of the IID of the event interface. The implementation is
>>> using IUnknown in it's vector anyways, and this seems to work well.
>>>
>>> "Alexander Nickolov" wrote:
>>>> On Thursday, November 01, 2007 2:27 PM gscott211 wrote:
>>>> Alexander,
>>>>
>>>> Since we are trying to use reg-free COM, could I in theory use this method
>>>> to register all my COM objects during application startup as opposed to using
>>>> application manifests and embedded dll manifests?
>>>>
>>>> "Alexander Nickolov" wrote:
>>>>> On Friday, November 02, 2007 12:54 PM Alexander Nickolov wrote:
>>>>> Well, that's what we do and it works for us. E.g. it works in
>>>>> practice, I'll leave the theoretical part to you... :)
>>>>>
>>>>> --
>>>>> =====================================
>>>>> Alexander Nickolov
>>>>> Microsoft MVP [VC], MCSD
>>>>> email: agnic...@mvps.org
>>>>> MVP VC FAQ: http://vcfaq.mvps.org
>>>>> =====================================
>>>>>
>>>>> "gscott2112" <gscot...@discussions.microsoft.com> wrote in message
>>>>> news:E7712A3B-A3D7-4834...@microsoft.com...
>>>>> Submitted via EggHeadCafe
>>>>> Client-server autodiscovery in C# and UDP Sockets
>>>>> http://www.eggheadcafe.com/tutorials/aspnet/9da74d3d-7415-4dfe-984e-2a5db900bdb2/clientserver-autodiscovery-in-c-and-udp-sockets.aspx