Skip to content
Jul 13 05

Calling the WDS API from VB .NET

by Brandon

This post was from my old blog.  Click here for the original post (with original comments). 

Some people in the Aqua-Soft forum had questions about how to call the Windows Desktop Search API from VB .NET.  There are two ways to do this right now, using our beta SDK.

1) Download the SDK and Sample (see my post below) files.  Reference WDSQuery.dll and include QueryBuilder.cs in your project.  Then you can instantiate a QueryBuilder object and use that (the comments in that file, or IntelliSense, will guide you).  It’s pretty simple.

OR

2) Use the COM API directly. Here’s what I posted over there:

Open VS 2003 and create a new VB.NET “Windows Forms” project. Add a reference to WDSQuery.dll.
Drop a DataGrid control from the toolbox onto the form, and size it reasonably. Leave the name as “DataGrid1” for now.
Copy and paste this code into the vb file:


   

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim mSearchClass As New Microsoft.Windows.DesktopSearch.Query.SearchDesktopClass
        Dim resultSet As Microsoft.Windows.DesktopSearch.Query._Recordset
        resultSet = mSearchClass.ExecuteQuery(“test”, “DocTitle,DocAuthor,Url”, “DocTitle”, Nothing)
        Dim DataSet1 As New System.Data.DataSet
        Dim DataTable1 As New System.Data.DataTable
        DataSet1.Tables.Add(DataTable1)
        Dim DataAdapter1 As New System.Data.OleDb.OleDbDataAdapter
        DataAdapter1.Fill(DataTable1, resultSet)
        DataGrid1.DataSource = DataSet1
        DataGrid1.DataMember = “Table1”
    End Sub


   

Build and run. Your datagrid should be filled with results for the query “test” – you can of course change that to something more pertinent to your index.

VB isn’t really my thing, but that works on my system and should give you a basic idea of how to use the COM interfaces.

Option 1 is nice because QueryBuilder gives you easier query syntax to work with, and it gives you a decent list of Column Names that are supported in the current release (2.05) – remember, these are subject to change in future releases.

C# developers have a little easier time because they can read the sample code but not necessarily use it verbatim.  If you don’t understand C# though it may not be as useful to you – it really depends on your usage. 

I’ll be posting more about the SDK soon.  Tomorrow my cable gets installed at the new apartment, so I’ll actually be able to leave the office and get more blogging done 🙂

Jul 9 05

We have an SDK!

by Brandon

A little over a week ago we released our international version of the MSN Search Toolbar with Windows Desktop Search.  As part of that release, we shipped BETA support for our developer API.  Actually, CNET and some others found our SDK without us making any fuss about it.  The reason we didn’t (until today) is that we wanted to fix up a couple things before doing so.  So Steve Ickman went back and made a few changes, including seperating the IDL file into two (one for the query interface, and one for protocol handlers).  He also ran them through MIDL and TLBimp to generate interop assemblies for .NET – saving you .NET folks the trouble.  So now you can download the updated SDK.

But that’s not all!  I took some time earlier this week and put together some basic C# Samples.  There are two files… One is a wrapper for the WDS query interface.  It lets you build a query, execute it, and get the results in a .NET DataSet complete with databinding functionality.  There’s also a simple app that demos how you can use this wrapper and the functionality it provides.  Both samples are basic and the UI is a bit crude.  The idea is to give you a place to start, not do all of your work for you 🙂

Here are some other useful links:

The official Windows Desktop Search API documentation.

SDK Update at the official MSN Search blog

Steve Ickman’s blog post about the SDK (very useful!)

Sean Mcleod – The first implementation of our interfaces that I’ve seen. Updated!

Christopher Lauer writes about our SDK including a screenshot of our sample.  Added!

 

You can bet i’ll be posting more about this soon, including some detailed info about the samples, and maybe more.

Jul 2 05

Dear Yahoo,

by Brandon

Tonight, going without my music collection (which is on a truck on its way to Washington) finally got too tough.  So I decided to try out one of those fancy monthly subscriptions where I can download millions of songs, transfer them to my portable player/phone/car and enjoy that warm feeling that comes from making sure that recording industry executives don’t ever have to worry about putting less-than-premium fuel in their private jets ever again.

Because of the extremely competitive price, and my not-so-great experiences with a certain headphone-wearing feline, I decided to check out your Yahoo Music Unlimited service.

First off, so far I like what you’ve done.  The “Music Engine” has done its job so far.  But the whole thing has some issues for me:

-I didn’t ask for the Yahoo Messenger.  I don’t know a single person that uses it, so I have no use for it.  Not only did you install it without giving me an option, but you made it run at start up without asking me.
-When I signed up for the account, you had a million spam options enabled by default.  I had to turn them off, and I almost didn’t even see them.
-I never asked for desktop icons.  You gave me two.
-I never asked for Quicklaunch icons.  You gave me two.
-You added Yahoo Messenger to both my programs list and my start menu list (so on XP it shows up in the same list twice).
-When I start the music app, you start the messenger app.  why?  If I wanted it, I would’ve started it myself.  Or not shut it off when it ran on start-up.
-Your two apps add two tray icons.  The music one doesn’t seem to do anything.  It just sits there taking up space (and memory) providing no function other than running your music app.

These are all examples of a little something I call “AOL-itis” – it’s commonly found in products that contain the words “AOL” and “Real.”  Fortunately, I don’t think it’s too late for you.  If you drink lots of fluids, and stop trying to trick people into using your unpopular services, it should clear right up.

Jun 26 05

Ok so it did rain.

by Brandon

I think it was Wednesday, maybe Thursday.  Given what I said before, take that as you will 🙂 

I think my first week at Microsoft went pretty well.  Working here with these people is simply amazing.  Discussing the future of technology with the people that are making the future of technology can be quite invigorating.  Working on that technology is quite a responisibility. 

Here are couple of Windows Desktop Search related links…

http://spaces.msn.com/members/WDSTech/Blog/  – the blog of Steve Ickman, with whom I’m currently sharing an office (our team is growing faster than our real estate!).

http://blogs.msdn.com/msnsearch – The official MSN Search weblog.

 

Jun 20 05

More sunshine in Redmond.

by Brandon

My flight, rental, and temporary housing accomodation all went off without a hitch.  The only thing missing is internet access, but my Sprint phone with bluetooth works well as a temporary solution.  Also it seems that Wi-Fi access is certainly not lacking in this area, which is good.

Tomorrow I have “New Employee Orientation” – which I think is where they brainwash me to tell outsiders that it rains in Seattle (which is a big fat lie).  After two weeks of almost non-stop rain in Albany, I arrived in Redmond to sunny weather and clear skies yesterday.  Today was just as perfect, and tomorrow looks great too.  So if I come back tomorrow and tell you it rained you’ll know they’ve gotten to me.

Jun 20 05

Car rant.

by Brandon

They say my car won’t arrive until the 29th… I’m hoping that it will come sooner, but the auto shipper’s tracking site says it hasn’t left my hometown yet.  Until then, the Chevy Classic will have to do.  It’s similar to the rental they gave me when I interviewed.  I’m happy to have something to drive while I wait for my car, but man oh man do these American cars feel so cheaply made.  Most of my friends drive Acuras or Toyotas or VWs, and that Chevy that I drove last time I was here was only the second American car I’d ever driven (the other being my cousin’s Saturn).  Needless to say, I was none too impressed.

The Ford Focus is the only car that looks like a decent offering from a US manufacturer.  Unfortunately, we don’t get the cool version (the Focus RS) here in the states.  Seems odd doesn’t it?  That the coolest sport hatchback from an American manufacturer isn’t sold in the Americas?!  Never figured that one out.

The new Five Hundred looks nice, but only because it’s an exact copy of the VW Passat and old Audi A4. 

2005 Ford Five Hundred

2000 Audi A4

2002 Passat (based on the same platform as the 2000 A4) 

 

Of course, the Ford is designed by the same guy.  Guess he likes making the same car over and over 🙂

As for other American manufacturers… GM seems desperate as of late.  Their “employee discount for everyone” reeks of ill confidence in their products. 

At the higher end Cadillac finally learned how to build a compelling sports car (the CTS) but still hasn’t figured out how to make a quality interior.  Still, progress is progress and they deserve credit for that.  Meanwhile Chrysler is making eye-catching but otherwise second-rate cars like the 300.  Dodge is still advertising HEMI like it’s a good thing, going back to an idea that was abandoned decades ago for a reason.  Meanwhile the Germans (Audi) have mastered a new technology called Stratified Fuel Injection which provides the same benefits without the inherent sacrifices of a hemi (like only have two valves per cylinder, and added heat).  It improves both power and fuel efficiency, and includes the injection of fuel directly into the combustion chamber (not into the intake manifold like most fuel injected engines).

Happily my A3 has that “FSI“ technology, and soon all Audis and many VWs will.

Jun 18 05

Resistance is futile.

by Brandon

And so a new chapter in the life of Brandon Paddock begins.  At this moment I’m at O’hare waiting to board my flight to Seattle.  Very soon I will cease to be a New Yorker and will become a.. Washingtonian?

These last few weeks have just flown by.  This is the first time I’ve ever had to leave behind clients and it’s not the most pleasant of experiences.  For once the very small size of my business actually paid off.

These next few weeks are going to be hectic.  I still have to find a place to live, re-learn what it’s like to work for someone else, and cope with knowing almost no one within 3000 miles.  What’s worse, until then I’ll be surviving without such staples of life itself as my desktop computer (this trusty M200 is all I’ve got) and my Xbox(es).  How ever will I last?!

With any luck my A3 will make it in a reasonable amount of time.  The auto shippers only took it yesterday… so it’s doubtful I’ll see it any time this week.

It’s time to board.  See ya on the west coast.

 

Jun 13 05

“How dare you compare us to repressive regimes?! Cut their mikes!”

by Brandon

I don’t normally blog political, but this is just absurd:

http://www.dembloggers.com/story/2005/6/10/54149/5115

Jun 6 05

Apple to switch to Intel!

by Brandon

Steve Jobs just announced the transition.  The first Macs with Intel Inside will be in June ’06, with the transition completed by this time ’07.

Jun 3 05

Apple to switch to Intel?

by Brandon

I first heard this rumor from Scoble a while back at a geek dinner.  Then the Wall Street Journal reported on it a few weeks ago.

Apple Computer plans to announce Monday that it’s scrapping its partnership with IBM and switching its computers to Intel’s microprocessors, CNET News.com has learned.

The announcement is expected Monday at Apple’s Worldwide Developer Conference in San Francisco, at which Chief Executive Steve Jobs is giving the keynote speech. The conference would be an appropriate venue: Changing the chips would require programmers to rewrite their software to take full advantage of the new processor.

All I know is… I’ll be watching.

CNET article