A common mistake is that you might have forgotten to set the OLE Public check in your class, you didn't register the object or misspelled the DLL's name or class.
The code you display should work okay if everything is in place. Be sure you have the runtime libs (like Jake said) installed, also.