See the question and my original answer on StackOverflow

Your class seems to be missing the constructor your're implicitly using. Anyway, you're heading for a long trip. Shell extensions are COM objects, so you need to understand COM, and they also can be hard to write. One good way to write COM is to use the ATL library provided by Microsoft with Visual Studio.

I suggest you read some good tutorials and articles on all this:

The Complete Idiot's Guide to Writing Shell Extensions - Part I

How to write a shell extension in C++?