Could some1 please help.
Thanks a lot in advance.
I wanted to pass a query to a running instance of WDS (i dont want to launch a new UI window. my code snippet below starts a new UI which i dont want).
And how do i pass parameters to a running instance
private void button1_Click(object sender, EventArgs e){
// string fileName = @"C:\Program Files\MSN Toolbar Suite\DS\02.05.0001.1119\en-us\bin\WindowsSearch.exe";
// Get all processes running on the local computer.
// Instead of we hardcoding the path that might change we let the user start the wds
// then find the process by name and extract the path
// that way we can trap that the user might not have started WDS and prompt them to start.
Process[] localWDS = Process.GetProcessesByName("WindowsSearch");
if (localWDS.GetLength(0) > 0)
{string fileName = localWDS[0].MainModule.FileName;
string arguments = "/Url search:foo";
// localWDS[0]. <-- how can i send the arguments to this running instance ProcessStartInfo processStartInfo = new ProcessStartInfo(fileName, arguments);
Process.Start(processStartInfo);}
else
{
MessageBox.Show("WDS process not found. Please launch WDS and try again");
}
}

Ho do I pass a query to a running instance of WDS ?
Richard2ne1
As always - thanks for your help David.
Krishna - please mark this post as "Answered" if David's reply answered your question.
Thanks,
Bill Connors
Program Manager, Windows Desktop Search - Communities
Brian Cheek - MSFT
Hello Krishna,
In summary, you don't.
The API for WDS is COM based, as in you get a reference to a running instance and use that interface to make calls. By it's nature, Microsoft COM takes care of the startup/reference mechanism and provides the interface definition. You can use .NET with COM by adding a COM library reference to you .NET project. This is commonly called '.NET COM Interop'
See here for more info on the WDS API: http://addins.msn.com/devguide.aspx
See here for an example in C# of calling WDS: http://addins.msn.com/support/WDSSample.zip
Making these COM calls does not bring up the UI.
Hope this helps.
Aditya Ganty
Krishna,
As there's some useful info. in this thread I'm going to mark this as "Answered" for now. Please let us know if you need additional assistance.
Thanks,
Bill Connors
Program Manager, Windows Desktop Search - Communities