Eran’s suggestions seem logical, but I couldn’t find some of the objects he was talking about. So I tried a different approach.
In VS 2008, I created the Empty ATL (Server) project. This automatically creates the ps project along with the regular atl project.
I copied the vcproj file for the ps project to the project folder and renamed it to myprojectnameps.vcproj.
Then I opened my solution and added a recently copied project to it. I renamed the project (in VS 2008) to myprojectnameps and deleted all the files that were already included in it.
Next, I have included in the project files _i.c, _p.c, dlldata.c and .def . In the Linker settings > Input> Module definition file, I added the file name def.
What is it! Worked like a charm.