How to create or correctly import BackEndProxyStub project from ChatterBox VoIP sample to another solution (WP8)

284 Views Asked by At

I'm trying to develop a VoIP application based on ChatterBox VoIP sample and VoIP apps for Windows Phone 8.

I understand how projects Agents, BackEnd and UI work, but I cannot understand BackEndProxyStub.

I read the following description:

This is an out-of-process server written in C that enables communication between the foreground app and the background process.

But found no other documentation that explains in more detail.

I'm trying to edit the "ChatterBox VoIP sample app" (to integrate with another BackEnd and UI), so I wanted to know how to create or import BackEndProxyStub and edit correctly for my solution.

I tried to import, but when I rebuild my solution, appears 2 unresolved externals:

Error 2 error LNK2001: unresolved external symbol _PhoneVoIPApp2EBackEnd_ProxyFileInfo D:\Workspace\C# and C++\BackEndProxyStub\dlldata.obj BackEndProxyStub

Error 3 error LNK2001: unresolved external symbol _PhoneVoIPApp2EBackEnd2EOutOfProcess_ProxyFileInfo D:\Workspace\C# and C++\BackEndProxyStub\dlldata.obj BackEndProxyStub

And when I tried to rename the files to my project name (even with the warning "DO NOT ALTER THIS FILE"), I got the same errors (differing only by name).

I would appreciate if someone could explain me how to properly handle "BackEndProxyStub" project.

If I missed something that could help, please tell me.

2

There are 2 best solutions below

0
On

The files in BackEndProxyStub project was generated by the BackEnd project. It used the MIDL(Microsoft Interface Definition Language).

This can be prove in the BackEnd Project's project file(BackEnd.vcxproj). The "CustomBuildStep" node in this file showed the clue:

<CustomBuildStep>
  <Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">pushd "$(OutDir)"WinMdIdl.exe "$(OutDir)$(RootNamespace).winmd"
    MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir "$(FrameworkSdkDir)Windows Metadata" /out "$(SolutionDir)$(ProjectName)ProxyStub" "$(OutDir)$(RootNamespace).idl"
    MIdl.exe /env $(MidlEnv) /winrt /ns_prefix /metadata_dir "$(FrameworkSdkDir)Windows Metadata" /out "$(SolutionDir)$(ProjectName)ProxyStub" "$(OutDir)$(RootNamespace).OutOfProcess.idl"
    "$(ProjectDir)OopServerRegistrationHelper.exe" /winmd:"$(OutDir)$(RootNamespace).winmd" /dll_name:$(TargetName) /namespace:$(RootNamespace).OutOfProcess 
    /app_manifest:"$(SolutionDir)UI\Properties\WMAppManifest.xml" /helper_dir:"$(SolutionDir)Agents" popd
  </Command></CustomBuildStep> .......

It also can be founded in Visual Studio:

BackEnd Project Set the Custom Build Step

Here is documents of the MIDL. I think you can use the MIDL to generate your own BackEndProxyHub Project. Good luck.

1
On

Seems like we're having the same problem. At the moment I can't help much because I just started as well; but I think the BackEndProxyStub is compiler-generated (refer to here). This might be a good start as well (refer to the comment for the question).

Based on that currently I'm studying COM starting from here, hoping one day can fully understand the chatterbox example.

Hope that helps.