News scan

Uncategorized March 24th, 2005

On the news:

And as an ex-Israeli soldier this reminded me my service there…
Indeed, government agencies are a silly place to work at…

News scan

Uncategorized March 23rd, 2005

Site links:

  • Eric Virro has a great site that covers all aspects of ripping digital audio. Highly recommended reading if you are curios about lossless, transcoding, cleaning, converting etc.
  • The Paint.NET site has been redesigned…

On the news:

What does SAP stands for?

SAP March 18th, 2005

A question I am being asked alot latelly… Well here’s the answer:

German: Systeme, Anwendungen, Produkte in der Datenverarbeitung
English: Systems, Applications & Products in Data Processing

Or from the company description (as files with the SEC):

SAP Aktiengesellschaft Systeme, Anwendungen, Produkte in der Datenverarbeitung is our legal corporate name, which is translated in English to SAP Corporation Systems, Applications and Products in Data Processing.

Microsoft DirectX Slides from the Game Developers Conference 2005

Game Development, Programming March 18th, 2005

Get them here:

Game Developers Conference 2005
This download includes presentations given by the Windows gaming and graphics team at the Game Developers Conference 2005. Included is the Microsoft DirectX Developer Day content and the High-Level Shader Language (HLSL) Workshop content.

Besides the HLSL Workshop content mentioned above it also contains an introduction to Visual Studio 2005 features (especially C++ compiler optimizations), Advanced PTR, Best Practices and more….

Tags: ,

Outlook addin programming and Marshal.ReleaseComObject

Microsoft Office, Programming March 17th, 2005

I have been having lots of troubles with the Outlook addin I was working on.
This post about using Marshal.ReleaseComObject helped me fix some of my problems:

Tags: , ,

Managed Applications Survey: Who is building or shipping .NET applications today?

.NET, Programming March 17th, 2005

Keith Brown has setup a wiki page encouraging people to list their managed applications.
The intent here is to simply start creating a list of all the many, and varied applications that people work on using .NET code.

Check it out here:

New DirectX Developers Center on MSDN

Game Development, Programming March 17th, 2005

Microsoft’s MSDN site features the new DirectX developers center which now looks and feels like the other developers center on the site.

Check it out at:

Tags: ,

[Code snippet] Obtaining Active Directory User Information Using System.DirectoryServices

.NET, Programming March 10th, 2005

Here’s a snippet I wrote recently to read a user’s information (name, phone etc.) from the active directory:

public static string GetUserInfo(string user, string propertyName)
DirectoryEntry adRootDSE = new DirectoryEntry(“LDAP://rootDSE”);
DirectoryEntry adRoot = new DirectoryEntry(“LDAP://” + (string)adRootDSE.Properties[“defaultNamingContext”].Value);
DirectorySearcher searcher = new DirectorySearcher(adRoot);
searcher.Filter = “(&(objectClass=user)(samAccountName=” + user + “))”;
SearchResult result = searcher.FindOne();

if (result == null)
return “null”;

ResultPropertyValueCollection values = result.Properties[propertyName];

return ((values != null) && (values.Count > 0)) ? values[0].ToString() : “null”;

Example use for this function:

string firstName = ActiveDirectory.GetUserInfo(userName, “givenName”);
string middleName = ActiveDirectory.GetUserInfo(userName, “middleName”);
string lastName = ActiveDirectory.GetUserInfo(userName, “sn”);
string primaryMail = ActiveDirectory.GetUserInfo(userName, “mail”);
string secondaryMail = ActiveDirectory.GetUserInfo(userName, “otherMailbox”);
string phoneWork = ActiveDirectory.GetUserInfo(userName, “telephoneNumber”);
string phoneHome = ActiveDirectory.GetUserInfo(userName, “homePhone”);
string phoneMobile = ActiveDirectory.GetUserInfo(userName, “mobile”);
string phonePager = ActiveDirectory.GetUserInfo(userName, “pager”);
string fax = ActiveDirectory.GetUserInfo(userName, “facsimileTelephoneNumber”);
string www = ActiveDirectory.GetUserInfo(userName, “wwwHomePage”);
string company = ActiveDirectory.GetUserInfo(userName, “company”);
string department = ActiveDirectory.GetUserInfo(userName, “department”);

Security note:
This code requires Full Trust for the immediate caller and cannot be used by partially trusted code.

Note that DirectoryEntry implements IDisposable and I am not disposing them in my code.
I should have used using statements here…

Visual Studio 2005 February CTP

.NET, Programming March 8th, 2005

There’s a new Visual Studio 2005 CTP out?! When did that happend? Where is it?

Well, apperantly it is availble at the MSDN subscribers downloads section and was released on the 3rd of March.
I wonder why the big secret…. I haven’t heard any buzz about it, haven’t seen any blog posts, its not even on the
MSDN subscriber downloads RSS feed….


Populating an InfoPath form with data.

Microsoft Office, Programming March 6th, 2005

In one of the prototypes I was working on I had to programmatically populate an InfoPath form with data.

After loading the required data and serializing it to the required schema I thought calling “thisXDocument.DOM.loadXML(strXmlData)” should do the job of populating the form with the data.

That call, however, triggers a “The DOM can’t be loaded twice” error.

After a quick search in the SDK help I came up with the following solution (which merges two DOMs):

IXMLDOMDocumentnewDOM = thisXDocument.CreateDOM();

Tags: , ,