Le Café Central de

                    ... Deva blogs!!

  • Le Café Central de DeVa

    Setting Locale information


    Found one of the interesting function "Setlocale".

    Setlocale function sets the global locale and returns the previous locale. This function has a parameter "lcid" to identify uniquely a locale, which is a 32 bit value/short string.

    Syntax: Setlocale(lcid)

    If "lcid" is set as Zero(0), then it will set the current system setting.

    Please find the working sample available, click here

  • Le Café Central de DeVa

    Monitoring Event Sink # 1 - Listing registered Event sink information


    Use the following command at command window to get list of registered Event sink registration:

    Cscript [//NOLOGO] ListMailboxes.vbs {/F:filename | /S:servername} [/DEBUG]



    Suppresses the version of Windows Script Host (WSH) and copyright information.


    The name of the text file that contains the names of the servers, will be available one per line, for which you want to list mailboxes. You must create the text file before you use this script.


    Name of the server that contains the mailboxes that you want to list.


    Outputs verbose debug information that you can use for diagnosis.


    You must specify either the /F or /S switch.

    For more information, please read this Technet article click here.

  • Le Café Central de DeVa

    Event Sink - How to guides


    Event Sink - How to guides:

  • Le Café Central de DeVa

    Get all mailbox information from WMI & C#.Net


    In one scenario, there was a need for me to get all mailbox related information using WMI and C#.Net.

    Here is a code snippet to get all mailbox information from an Exchange Server - WMI & C#.Net.

    using System;
    using System.Management;

    namespace ConsoleTwo
        class Class1

            static void Main(string[] args)
                    System.Management.ConnectionOptions objcon = new System.Management.ConnectionOptions();
                     objcon.Impersonation = ImpersonationLevel.Impersonate;
                    // Exchange Server Name
                    string cServername = "Server Name";
                    // Create a management scope into Exchange WMI namespace
                    System.Management.ManagementScope exScope =
                        new System.Management.ManagementScope(@"\\" + cServername + @"\root\MicrosoftExchangeV2", objcon);

                    // Create a query to get the data from the Exchange WMI
                    System.Management.ObjectQuery objQry =
                        new System.Management.ObjectQuery("SELECT * FROM Exchange_Mailbox");

                    // Retrieves a collection of management objects based on the query.
                    System.Management.ManagementObjectSearcher objSrch =
                        new System.Management.ManagementObjectSearcher(exScope, objQry);
                    System.Management.ManagementObjectCollection qryCol = objSrch.Get();

                     // Loop each item in the collection
                    foreach (System.Management.ManagementObject mailBox in qryCol)
                         Console.WriteLine("{0} {1} {2}", mailBox["MailboxDisplayName"].ToString() , mailBox["TotalItems"].ToString() , mailBox["size"].ToString() );
                catch (Exception eVal)
                    Console.Write(eVal.InnerException + eVal.Message + eVal.Source + eVal.StackTrace );

  • Le Café Central de DeVa

    Event sink: Will it sink?


    Lets we discuss about Event sink: It will sink?

    Just for words, it might be fascinating or it will be funny to hear such remarks. Some guys even crib about that too; but it's not actually. Event sink is one of the strongest feature available in Exchange environment; they're helpful in many scenarios and quite lot of applications wrapped around it.

    I have worked with couple of scenarios with Event sink; it can be used to monitor the incoming/outgoing mails, virus scanning applications, stripping attachments, spam filters etc.

    So what is a Event sink

    It's a piece of code which defines how the server or the computer is to handle the given events.

    What it can be used for?

    They can be used as spam filters to fire certain actions;

      • act as spam filter
      • to find certain types of attachments
      • can get response to the receipt of an e-mail message with certain characteristics
      • to strip out the incoming/outgoing attachments
      • download the attachments to specific physical folders
      • block the attachments within their org/enterprise level
      • to delete excessive data sent............................................. for more information, please click here

    What are the Technologies can we create event sinks:

    • VB Script
    • Managed Sink - Created & compiled in .Net framework
    • C++

    Types of Event sinks:

    • Synchronous
    • Asynchronous
    • System

    For detailed information, please find @ Matt's blog

  • Le Café Central de DeVa



    WMI: Microsoft Windows Management Instrumentation (WMI) is an extensions to Windows Driver Model (WDM); it provides the Operating System interface to access any instrumented (have ability to monitor) Enterprise components that provide the information as well as notification.

    WMI is the Microsoft implementation to two industry standards of DMTF (Desktop Management Task Force). They are,
    1. CIM  - Common Information Model  2. WBEM - Web-Based Enterprise Management

    Usage: Some of the common usages are,

    • Access most elements of your operating system and its environment
    • Can access a local or remote computer
    • Can configure and manage the hidden settings


    • Can be used with the Programming languages(VB.Net, C#.Net, etc.)
    • Can be used with the Scripting languages(Windows Shell, VBScript, etc.)
    • Also available as Command Line Interface - Windows Management Instrumentation Command-line (WMIC)
    • Pre-installed in most of the latest Windows OS
    • Downloads (redistributables) available for Windows 95, Windows 98

    For more WMI Scripting info click, WMI Scripting Primer  |  Need Troubleshooting and tips for WMI, click WMI FAQs

  • Le Café Central de DeVa

    Microsoft Surface


    Surface computing has arrived.
     Microsoft Surface

  • Le Café Central de DeVa

    Exchange - Terminology changes Roadmap


    Here is an interesting article which tabulates terminology changes from MS Exchange Server 5.5  to Exchange Server 2007; there are quite many changes been made between these versions, added/removed quite many features.

    Although this table doesn't include all the features, but it can be used as a starting point to help yourself...

    Please click here to read the article

  • Le Café Central de DeVa

    My First Post



    I am DeVa working as Support Engineer for Microsoft. Currently located in Bangalore, India. I am a generalist and support code related (programmatic) access to Enterprise Business Application - especially Exchange and Outlook related stuff, like VBA, Sinks, VSTO, WebDAV,  CDOx.

    Have hands of development experience in SAP and Microsoft Technologies in Aeronautical, Retail, Manufacturing domains....

    Interests: .Net Programming - Web/Windows/Mobile applications, Enterprise Library

Page 28 of 28 (684 items) «2425262728