15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Add runtime OLETYPELIB

IGNACIO NICOLAS RODRIGUEZ -- irodriguez@envirolink.org
Wednesday, February 26, 1997

Environment: NT 4.0 ; VC 4.0

Hi!
I have a local Automation server, whose methods I'd like to see published
at runtime, so they can be seen by, say, Ole2View's IDispatch viewer.
I've seen this is done through DECLARE_OLETYPELIB() and
IMPLEMENT_OLETYPELIB() for OLE controls. Can I use the same approach for =
a
local server? what GUID shall I pass to IMPLEMENT_... ?

Ignacio Nicol=E1s Rodr=EDguez
irodriguez@envirolink.org

Nothing more powerfull, nothing easier than OLE/COM.
Nothing but OLE/COM.
I'm beggining to like IceHockey.



Jean Libera -- jean.libera@tdata.com
Friday, March 07, 1997

IMPLEMENT_OLETYPELIB and DECLARE_OLETYPELIB get the library's GUID (the 1st
one in the .odl or .idl file). 

Also, I needed to override CCmdTarget's GetDispatchIID to return the
dispinterface GUID.

Finally, in a program I recently wrote, I needed to add the following:
	AfxOleRegisterTypeLib(AfxGetInstanceHandle(), , ); 
to actually register the type lib with the Windows.
I put the AfxOleRegisterTypeLib statement right after
COleObjectFactory::UpdateRegistryAll() in my InitInstance method.

Jean Libera
jlibera@tdata.com




Become an MFC-L member | Вернуться в корень Архива |