Q. How to self-register an EXE application.
Paul Jeng -- pjeng@viagrafix.com Saturday, March 22, 1997 Environment: VC++ 4.2b, Win 95, NT 4.0 I would like to be able to self-registering my xxx.EXE (not a DLL) application. Manually, I can run my xxx.REG (created by AppWizard) file and register my WinApp, automation and typeLib to the Registry. However, what shall I do if I would like to register WinApp, automation and typelib internally in my program. So that, running the xxx.REG file is not necessary. I belive I can create each line of entries using RegCreateKey to register and RegDeleteKey to unregister. Is there any more secure way to do it. Thanks! Paul
David Razzetti -- raz@jump-jet.demon.co.uk Tuesday, March 25, 1997 [Mini-digest: 2 responses] Am I missing something here? The standard code produced by AppWizard under VC++ 4.2b includes code that automatically registers the (OLE automation server) application when its run in stand-alone mode. Take a look at the code in the application's InitInstance method. Dave Razzetti raz@jump-jet.demon.co.uk On Sat, 22 Mar 1997 23:03:04 +0000, you wrote: >Environment: VC++ 4.2b, Win 95, NT 4.0 > >I would like to be able to self-registering my xxx.EXE (not a DLL) = application. > >Manually, I can run my xxx.REG (created by AppWizard) file and register >my WinApp, automation and typeLib to the Registry. However, what shall = I do >if I would like to register WinApp, automation and typelib internally in= my program. >So that, running the xxx.REG file is not necessary. I belive I can = create >each line of entries using RegCreateKey to register and RegDeleteKey to >unregister. Is there any more secure way to do it. > > >Thanks! > >Paul -----From: jean.libera@tdata.com (Jean Libera) Have you tried AfxOleRegisterTypeLib? In a program I recently wrote, I called it in my InitInstance() method. AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_myobj, "myobj.tlb"); The LIBID is the first one in the idl/odl file, right before the word "library". Jean Libera jlibera.tdata.com At 11:03 PM 3/22/97 +0000, you wrote: >Environment: VC++ 4.2b, Win 95, NT 4.0 > >I would like to be able to self-registering my xxx.EXE (not a DLL) application. > >Manually, I can run my xxx.REG (created by AppWizard) file and register >my WinApp, automation and typeLib to the Registry. However, what shall I do >if I would like to register WinApp, automation and typelib internally in my program. >So that, running the xxx.REG file is not necessary. I belive I can create >each line of entries using RegCreateKey to register and RegDeleteKey to >unregister. Is there any more secure way to do it. > > >Thanks! > >Paul >
Become an MFC-L member | Вернуться в корень Архива |