Welcome to Base Addresser, Add-In for VB. Base Addresser creates a unique "Base Address" for ActiveX (COM), In-Process DLL's and OCX's. When you load a ActiveX DLL into your application, it get's mapped into that Applications virtual memory. The Base Address is where in memory it will be mapped too. If you do not change the base address from the default when you compile the DLL one of two things will happen.
There is nothing in that memory space and the DLL is mapped correctly
There is something in that memory space and the whole DLL must be re-addressed (all the properties,methods and events) before the DLL can be loaded; this is time consuming. But wait, there is more, If the ActiveX object is a OCX, just a fancy DLL, it can really slow your system down. Let's say you load an OCX and it must be re-addressed, then you add more of the same controls, the system looks at the base address, does not find it, so it will load a second instance of that DLL or Control. It will then re-Address the whole thing again. The more times this happens, the more times you are loading the same DLL or Control into memory & slow the load times.
Now, considering how many Developers just use the default Base Address, the chances of this happening are very high, so this is why I created this VB Add-In. It is nothing fancy, but it does the job, and it's free for you to use. The Add-in will create a random Hex number for the base address for your DLL or OCX. It will then check it against the other addresses you have already created, if a match is found, it will create an other one. When a free address is found, you can except it or reject it. It will keep doing this until you accept the generated number. When you have accepted the number, it will prompt you for the name of the DLL, it will then save the address and DLL/OCX name to a database. You then take the number that was generated and put it in the Base Address option of the compile options for the DLL/OCX.
To install the Add-In, do the following:
Extract Addresser.dll Addresser.mdb & the RunMe.exe file to a directory.
Register Addresser.dll with Regsvr32.exe .
You have two choices at this point. If you want to keep this on a single system, leave the Addresser.mdb file in the folder you just created. If you want to share the database with other developers, move the Addresser.mdb file to a share on the network.
Run the RunMe.exe file
Start VB and bring up the Add-In Manager, click on the InProc Addresser to load it. If this is the first time you have run the Add-In, you will be prompted to set the path to the Addresser.mdb file.
Have fun.
This Add-In is as is, you may not modify it in any way with out my written permission.
If you have any questions, what to tell me what a great/crappy Developer I am, or improvement suggestions.You can email me at mailto:khenderson@sprint.ca or, because I change ISP like I change my underwear, my ICQ number is 38301511.
Kevin Henderson, MCP