December 21, 2005

DevX - Software Development Resource

Retrieving a Domain Name

This VB function returns the DNS domain name (westcoast.mycorp.com) from the passed LDAP distinguishedName (CN=Administrator,DN=Users,DC=westcoast,DC=mycorp,DC=com). Function DN2DomainName(ByVal strDN As String) On Error Resume Next Dim strDomainName As String Dim strDNParts()

DevX - Software Development Resource

Implementing the GetFreePhysicalMemory API in Linux

Because everything in Linux is composed of files, you can get any required information from the /proc/meminfo file. Here’s the code: int getFreePhysicalMemory(){ ifstream meminfo(“/proc/meminfo”); if ( ! meminfo.is_open() )

DevX - Software Development Resource

Overloading a Constructor or Method

Overloading a constructor or a method so it takes an extra argument based upon some specific requirement can result in duplicate code. For instance, a project that contains a lot

DevX - Software Development Resource

Retrieving Custom Objects Added to the Clipboard

You may have found that sometimes, copying a custom .NET object to the clipboard doesn’t work. That’s because retrieving a custom object from the clipboard returns nothing if the object