Answered by:
API for Register DLL in c++

Question
-
hi..
what is the API for register DLL directly in C++.
Thanks & Regards
sathis
sathis
Wednesday, June 27, 2012 6:07 AM
Answers
-
I always use for registering of COM DLLs:
Regsvr32.exe <yourdll>.dll
or for unregisteringAnd for unregistering:Regsvr32.exe /u <yourdll>.dllor for unregistering
But if you do not want to use Regsvr32 you could also use LoadLibrary GetProcaddress in your program and register your COM DLL. But keep in mind that you may need elevated privileges if you try to register a COM DLL in Vista / 7.- Edited by Bordon Wednesday, June 27, 2012 8:32 AM
- Proposed as answer by BenoitRoosens Wednesday, June 27, 2012 9:39 AM
- Marked as answer by Helen Zhao Wednesday, July 4, 2012 2:32 AM
Wednesday, June 27, 2012 8:31 AM
All replies
-
Hello sAtsas
Could you please elaborate?
Wednesday, June 27, 2012 6:27 AM -
i have dll developed by using vc++ COM.i want to register this DLL to system via c++ program.so have any API function do this.
Thanks
sathis
sathis
Wednesday, June 27, 2012 6:31 AM -
Is your COM DLL plain Windows API or did you use i.e. MFC or ATL?Wednesday, June 27, 2012 7:03 AM
-
Are you looking for regsvr32.exe? You might have to implement DLLRegister if you require custom registration as well.
- Edited by Vic Vega Wednesday, June 27, 2012 7:37 AM
Wednesday, June 27, 2012 7:37 AM -
by using ATL developed DLL. Normaly we are using Regsvr32.exe for register .DLL.in program how can i register this DLL
Thanks & Regards sathis
Wednesday, June 27, 2012 7:57 AM -
I always use for registering of COM DLLs:
Regsvr32.exe <yourdll>.dll
or for unregisteringAnd for unregistering:Regsvr32.exe /u <yourdll>.dllor for unregistering
But if you do not want to use Regsvr32 you could also use LoadLibrary GetProcaddress in your program and register your COM DLL. But keep in mind that you may need elevated privileges if you try to register a COM DLL in Vista / 7.- Edited by Bordon Wednesday, June 27, 2012 8:32 AM
- Proposed as answer by BenoitRoosens Wednesday, June 27, 2012 9:39 AM
- Marked as answer by Helen Zhao Wednesday, July 4, 2012 2:32 AM
Wednesday, June 27, 2012 8:31 AM -
by using ATL developed DLL. Normaly we are using Regsvr32.exe for register .DLL.in program how can i
If you are wondering how to do this programmatically, simply load the DLL using LoadLibrary and call into the DllRegisterServer entry point. All ATL COM servers support this entry point.- Proposed as answer by Helen Zhao Wednesday, July 4, 2012 2:33 AM
Wednesday, June 27, 2012 3:17 PM