Saturday, February 13, 2010

SharePoint Sample Usage Blob Parser Error

SharePoint Usage Report

If you have SharePoint sites, one of the things that you want to know is how users is using the sites. To get that information, you want to analyze the users’ usage. From there you can find out which sites and pages that are popular, users’ usage patterns and trends. You can use those information to improve your SharePoint sites.

There are several ways in which you can get SharePoint sites usage information. The most common one probably through SharePoint Designer. Alternatively, SharePoint also gives us the usage information in a blob format. Blob can be a bit challenging to work with. You will need to parse the blob. But fear not, Microsoft has provided us with a sample usage blob parser. It is Windows SharePoint Services: Usage Blob Parser, which can be found here. The Usage Blob Parser is a simple windows application written in C++.

Compilation Error

After I downloaded the Usage Blob Parser, I tried to open the project with Visual Studio 2008. When I first open the project with Visual Studio 2008, the Conversion Wizard appear. It asked whether I want to convert the project into a Visual Studio 2008 project, which I did and the conversion process went without a hitch.

However, when I tried to build and run the project, I got 2 errors. Both errors are pointing to the same line of code. It is pointing to line 126 of Form1.h file. Here’re the errors that I got:

error C3867: ‘GetUsageBlobSample::Form1::button1_Click’: function call missing argument list; use ‘&GetUsageBlobSample::Form1::button_Click’ to create a pointer to member

error C3350:’System::EventHandler’ : a delegate constructor expects 2 argument(s)


To fix the errors, here what I did. I opened Form1.h file and go to line 126. On that line, I see the following line of code:

this->button1->Click += new System::EventHandler(this, button1_Click);

All I need to do is to modify it to the following:

this->button1->Click += new System::EventHandler(this, &Form1::button1_Click);

Once I did that, I was able to build and run the project.

Some Additional Notes

  • I came across this blog entry by Diego. He has written the SharePoint Blob Parser in C#. It was pretty good. I was able to download the code, made some minor tweaks and use it.

1 comment:


    The above link might be helpful !!!