Yup you are missing one important point in the first sample I have told you to see. I will clarify some more points here.
Download the sample from Creating a simple DLL.
Now have the Dll project to have the necessary resource to show the dialog.
Then have the necessary classes for the Dialog.
The create the object of the class and class and call its DoModal.