Saving the DLL

Well, there was not too much to that – but we need to store our

.dll
in usable format. Let's do that now.

Try It Out - Compiling our DLL for action!

1.   In VB, rename the project to

trackVisitors
:

2.  Now save the class module as

visitors.cls
, and the project as
visitor.vbp
. When we compile the
.DLL
, it will ask us to compile
visitor.dll
, which is the name of our project.

Your project explorer will now have the project and class module within the DLL named correctly:

3.  Select Project-trackVisitors Properties… from the main VB menu. Be sure to add a Project Description so you can identify your DLL in the Project References dialog box:

Now we need to compile the

.DLL
. Again, it's always a good idea to place a descriptive name in the Project Description. This will show up in our references later on.

4.  Select File-Make visitor.dll and press OK to compile. This process also registers your new

.DLL
in the registry. Now if you want to use this in any other VB projects, it is there for you to select. However, now that it is registered, our VBScript files can find it when we create an instance of it:

Now we have got a DLL file and a new database, we can move on to our newUser form. You might remember that in our

visitors.asp
, we check to see if there is a valid cookie. If now, we redirect the control to the form newUser.asp. This will actually display the form to the user asking for their name. Let's build this form now.

© 1998 by Wrox Press. All rights reserved.