Rob Sim -- Braintech

Hi,

In my quest to find a workaround for the webcam crashes[1] I'm attempting to wrap the dss environment in my own executable. There is a howto here: [2]
... but it's missing all the 'using' directives and I can't work out the correct references. For instance, my best guess is that ds.DirectoryPort corresponds to Microsoft.Dss.Services.Directory.DirectoryPort, but this leads to compile errors related to the arguments to ds.Get().

Is there an up-to-date version of that code snippet

[1] http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1429179&SiteID=1
[2] http://channel9.msdn.com/wiki/default.aspx/Channel9.DssPatterns




Re: Microsoft Robotics - Decentralized Software Services (DSS) Hosting DSS

Henrik F Nielsen

This should work

using Microsoft.Ccr.Core;

using Microsoft.Dss.Core;

using Microsoft.Dss.Hosting;

using Microsoft.Dss.ServiceModel.Dssp;

using ds = Microsoft.Dss.Services.Directory;

We will add some real DssEnvironment samples soon...

Henrik






Re: Microsoft Robotics - Decentralized Software Services (DSS) Hosting DSS

Rob Sim -- Braintech

Thanks Henrik,

As posted, the code does not compile. However, with the following changes it will compile (I haven't tested to see if it will run, though):

Add your lines above, plus:
using System;
using dssp=Microsoft.DSS.ServiceModel.Dssp;

Change this line:
ds.Get get = new ds.Get(dssp.GetRequestType.Instance);
to
ds.Get get = new ds.Get();

and this line:
delegate(ds.GetResponse rsp) { Console.WriteLine("Got directory response"); },
to
delegate(ds.GetResponseType rsp) { Console.WriteLine("Got directory response"); },

cheers,
R