first, please use CODE tags when posting code snippets (well, this time I did it for you!)
Second, do you compile/build your project as UNICODE or MBCS (ANSI)?