Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

register dll 1

Status
Not open for further replies.

Horrid

Programmer
May 20, 1999
373
I have made 2 dlls in Visual Basic, and they register just fine, but they need to make additional registry entries. No one in the VB forums seems to know how, or if this can be done. Is there a C++ method for getting COM dlls to add additional registry keys when they register? (in this case an "implementedservice" key and string value and a string value in HKEY_LOCALMACHINE/software/microsoft/internet explorer/toolbar/)

my C++ is very very poor but with a pointer I should be able to get where I need to go.
Thanks in advance.
 
In C++ it is easy.
Dll have DllRegisterServer and DllUnregisterServer and you can change them manually. So you can simply add additional code which may insert additional registry entries.
and when regsvr32 yourdll.dll then DllRegisterServer (with additional code) will be executed.
 
Thanks

I have had a look at that function under VB and it seems to not do the same thing (its used to tell a dll to register). Could you post some simple C++ code that I could look at, maybe it will give me the idea I need.
 
Start VC++.
File->New->(AtlComAppWizard, name the project, click ok)->finish.
In your test project you can find DllRegisterServer and DllUnregisterServer.
 
Thanks,

I ended up finding a much easier way of doing it. I just used the AddReg function of in a cab file to do the entries for me. thanks for your help.
 
Well, I'm back to the C++ dll now because of bugs in the .inf file system.

I have made my dll but have no idea what code I would put in dllregisterserver, I checked MSDN only to be told what it does with no code examples. I should only to need to see enough code to make one custom registry entry, then I will be able to work out the remainder.

Thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top