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 | Вернуться в корень Архива |