In a previous post, I discussed how an XP is in three distinct parts. This post is about the third part: XP DllMain Boilerplate.
Here is the third part (right below your usings) of an Example XP dll. Remember that this is the very last part of a XP dll:
In truth, there is only one part that is optional. That is Line 1.
Line 1: This line is only needed if you are mixing standard C/C++ with .net code.
Otherwise, just copy it all at the bottom of the file and it will just work.