Today, I had a very tight deadline to achieve a very simple task: pass a managed .NET string to an API function that expects a null-terminated char*. Trivial, you would expect? Unfortunately it wasn't.
My first though was to do the pinning …
Recently I've found myself stumbling around some C++/CLI code. C++ is a language which I learned years ago and never really worked with seriously, so I've been cursing and moaning as I worked. Strange for me to go back to a (partially) …
A while ago, I wrote about a simple pattern to allow us to put a timeout limitation on a long running operations. Simply put, it allows us to replace this:
public MyObject GetData()
{
try
{
MyObject data = …
The topic of the post might not make sense, initially. If I invoke a method asynchronously, why would I want to wait for a return value? And if I'm waiting, what's the point of launching it asynchronously?
Well, the most common scenario is …
I downloaded the new Sharepoint 2007 SDK today, published last week though it's dated from April 2007. There appears to be no change history for this version of the SDK.
I was hoping for more information on new Web Service methods available …
How did I miss this until now? It's great that WSSv3 and MOSS give us granular permissions, and it's great that I can access those permissions via an SPListItem's RoleAssignments collection - but is there really no way of getting this …
When we call the GetListItems or GetListItemChanges methods in Sharepoint's Lists Web Service, we pass an XmlNode parameter specifying which fields we want to return, in this format:
Now, if we leave this field as null, we get a certain set …
This one was suggested by a coworker leery of accidental recursion. Too many people aren't used to thinking in terms of recursion and will miss a recursive call inside a method and accidently start an infinite loop, or miss the meaning of a …
I remember discovering C#'s null coalescing operator a while ago. I can't say I use it a lot, but it's useful to clean up my code when I do need it. However, there is another similar scenario that it doesn't cover:
SearchResult res = …
As a follow-up to my previous post about changing a Windows Service's user account - there was one think I forgot.
In order for a user to run a service, that user must be granted the "Run as Service" right by the operating system. Usually …
I've been busting my brains for over two hours trying to accomplish a relatively simple task - changing the username and password of a currently running Windows Service. Should be trivial enough, but the managed ServiceController class …
I'm writing an installer class for an MSI Setup Project, and find myself needing to manipulate my web.config containing a custom ConfigurationSection. This should be trivial seeing as my SectionHandler code is bundled with the rest of the …
I'm writing an Installer class for an MSI installer project, and passing a checkbox's value from the MSI UI. I noticed that when I pass the checkbox's linked variable into my code, it's received as a string, and not only a string - the …
I have come to the realization, at some point, that I never want to close Outlook. Really, there's no reason for me to shut it down except when doing something special, like freeing every available byte of memory, or when developing …
Another odd client request that came in a while ago. When we browse our Sharepoint site, IE's title reads "Home - My Site Name - Windows Internet Explorer". We can't find any way to remove the "Home" string, regardless of how we change the …
I'm a relative latecomer to the unit-testing business, and only got to play with Mocking frameworks in my last project.
After testing several frameworks, we opted on RhinoMocks for emulating our classes during testing. This, coupled with a …
A coworker (Hey, Evgeny!) came to me with a puzzler today. He has an object that exposes an event, and he wants to know whether he's already subscribed to that event. Two things immediately came to mind - the first was that he really …
Finally, we have a full, RTM version of the Visual Studio extensions! The download page says March 15th, but I haven't seen anyone mention it around yet - could it be just me that missed the boat? I got it from Mark Bower's blog, but …
Ran into a problem with a client today. They installed MOSS 2007 and created a publishing portal, but then decided to erase the Reports Center, since they had no use for it. A few days later, of course, they figured they DID want it after …
Any news on when a new release of the extensions are due? The state of the current tools is downright abyssmal. Even ignoring the requirement to run VS on the Sharepoint server machine, half the things don't work or are horribly slow. The …