Creating a Proxy / Stub Proxy in VS 2008

I have an ATLCOM project ported from VC6 to VS2008. My question is: how do I build ps dllon VS 2008?

New ATL projects in VS2008 have a separate PS project that builds ps dll. But the transition from VC6 did not create this project.

I tried calling nmake in the ps mk file, but this gives an override error for the enum type that exists both in our source file and in the automatically included Windows header file. In the solution, we fixed this by defining a preprocessor WIN32_LEAN_AND_MEANthat eliminates unnecessary header files. Can I do the same when using nmake?

Is there any other way to create ps dll?

+3
source share
2 answers

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.

+2

, , , , , :

  • DLL- PS. MFC ATL.
  • : proj_h.h, proj_i.c, proj_p.c, proj.def, dlldata.c
  • libs : rpcndr.lib, rpcns4.lib, rpcrt4.lib
  • def .
  • " " "".
  • tlb ,

, . , , . OTOH, PS, , . - , .

0

Source: https://habr.com/ru/post/1711322/


All Articles