First of all VB6 can only make ActiveX DLLs and not "regular" DLL files. But yes you can simply port the code. Just start VB6 and select a new ActiveX DLL project. You will be presented with an empty class file. Write (or cut & paste) the code into this class. Compile. To use this dll you need to set a reference to it and create an instance of the class you've just created.