Le Café Central de Deva
... Deva blogs!!
I changed the way of blogging. Re-designed the site & started using the latest Windows Live Writer 2011!! Additionally added Microsoft Translator gadget available @ top of page, so that you can change the page in your preferred language!!
In MSDN, I came across the following two posts as part of Store API which talks about two algorithms that Microsoft Office Outlook uses, Algorithm to Calculate the Store Hash Number to calculate a store hash number based on the store mapping signature or entry ID and the store file name… Algorithm to Encode Entry IDs and Attachment IDs to Encode Entry IDs and Attachment IDs
Now you can download the Microsoft Exchange Serve 2013 Architecture in .PDF format. This poster highlights the significantly updated and modernized architecture in Exchange 2013, and highlights the new technologies in Exchange 2013, such as Managed Availability, the new storage and high availability features, and integration with SharePoint and Lync. In addition, it illustrates the new transport architecture in Exchange 2013.
A zoom.it version of the poster can be found at http://zoom.it/BuoF.
Recently I was assisting an developer who used Outlook Object Model (OOM) API and tried to get the SMTP address of the Sender of a given mail item. In order to get the values, he first made the following OOM call – it worked fine for him for couple of mail items, but fails to get the SMTP value as given below:
/O=MFC2013/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=B370134F8FFD4CF3A0023F27B6B61F7D-ADMINISTRATOR
In this scenario, to determine the SMTP address for a mail item, you can use the SenderEmailAddress property of the MailItem object. However, if the sender is internal to your organization, SenderEmailAddress does not return an SMTP address, and you must use the PropertyAccessor object to return the sender’s SMTP address (adding the related C#.Net code for your reference).
1: private string GetSMTPAddress(Outlook.MailItem mail)
3: string PR_SMTP_ADDRESS = @"http://schemas.microsoft.com/mapi/proptag/0x39FE001E";
4: if (mail.SenderEmailType == "EX")
6: Outlook.AddressEntry sender =
8: if (sender != null)
10: //Now we have an AddressEntry representing the Sender
11: if (sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeUserAddressEntry
12: || sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry)
14: //Use the ExchangeUser object PrimarySMTPAddress
15: Outlook.ExchangeUser exchUser = sender.GetExchangeUser();
16: if (exchUser != null)
18: return exchUser.PrimarySmtpAddress;
22: return null;
27: return sender.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS) as string;
32: return null;
37: return mail.SenderEmailAddress;
This will help you to move ahead and get the correct SMTP address:
Recently I was working with a customer (at his Windows XP) where his CDO app (CDOSEND.vbs – given below) is failing to send email and throws the error “CDO_E_FAILED_TO_CONNECT” (you can refer the below given Output also). We tried setting CONFIG parameters like user name, SLL, password – but it doesn’t help. Code Snippet:
Const cdoSendUsingPort = 2
If wscript.arguments.count <> 3 Then
wscript.echo "Arguments must be: <smtp server> <sender address> <recipient address>"
strSmartHost = trim(wscript.arguments(0))
strFrom = trim(wscript.arguments(1))
strTo = trim(wscript.arguments(2))
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
' set the CDOSYS configuration fields to use port 25 on the SMTP server
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHost
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
' build HTML for message body
strHTML = "<HTML><BODY>" &_
"<b>This is the test HTML message body</b></br>" &_
' apply the settings to the message
Set .Configuration = iConf
.To = strTo
.From = StrFrom
.Subject = "This is a test CDO message (Sent via Port 25)"
.HTMLBody = strHTML
' cleanup of variables
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
1: CDO.Message.1 error '80040213'
3: The transport failed to connect to the server.
Yesterday in the keynote session at BUILD 2013, we announced the availability of Visual Studio 2013 Preview and .Net Framework 4.5.1 Preview which can be downloaded here. For detailed on this, I recommend you to visit Somasegar's blog for a look at what's new in this release of Visual Studio and you can also find additional resources on getting started with Visual Studio 2013 Preview, on MSDN. Also make sure to check out our other blogs that will have lots of news and updates about Visual Studio 2013 Preview: http://blogs.msdn.com/b/developer-tools
Download the preview, try it and please share your feedback on the same. Enjoy!!
Yesterday Steve Ballmer kicked off Build 2013 in San Francisco (The Moscone Center, June 26-June 28) by announcing the availability of the Windows 8.1 Preview, which I blogged earlier. This years Build 2013 will showcase how developers can take advantage of the future of Windows, Windows Phone, Windows Azure, Visual Studio and much more. At Build, we'll share updates and talk about what's next for Windows, Windows Server, Windows Azure, Visual Studio, and more. Build is the path to creating and implementing your great ideas, and then differentiating them in the market.
You can watch it live or offline by sessions @ Build 2013. You can check the schedule by clicking here. For more additional event information you can refer more @ http://www.buildwindows.com/. Enjoy the session. Cheers
As updated earlier, Windows 8.1 will be a free update for Windows 8 consumers later this year through the Windows Store - but today you can to take a first-hand look at many of the new features and improvements with the Windows 8.1 Preview. You can get more info by referring Brandon LeBlanc’s post or by visiting http://blogs.windows.com
Download: You can download it from here. Windows 8.1 has new ways for you to personalize your PC and includes a wave of awesome new apps and services.
For more on what's new, check out the Windows 8.1 Preview Product Guide and read the FAQ.
Recently I was playing for a VSS issue at my Exchange Server 2010 environment – when I run the ESEUtil (with its parameter /mh) command then I got the error “Jet error –1032”.
> eseutil /mh "D:\Temp\tempdb.edb" Extensible Storage Engine Utilities for Microsoft(R) Exchange Server Version 14.00 Copyright (C) Microsoft Corporation. All Rights Reserved. Initiating FILE DUMP mode... Error: Access to source database 'D:\Temp\tempdb.edb’ failed with Jet error -1032. The error code –1032 points to JET_ERRFileAccessDenied, which tells us that I cannot access the file, as the file is locked or in use. This is the first time I noticed the issue at my end. When I investigated further I realized the issue - I have mounted the database and ran the ESEUtil. The database needs to be offline to read the header information. So I dismounted the database and ran the ESEUtil worked like a charm – bingo!! Happy debugging!!
This wonderful eBook is written by Kraig. He provides comprehensive coverage of the platform for Windows Store apps, and devoted chapters on live tiles, notifications, background tasks, background transfers, networking, devices, printing, WinRT components, accessibility, localization, and the Windows Store itself. The final eBook contains 17 chapters. And of course all of the earlier chapters have also been reviewed and refined—over 800 pages in total, along with new and updated companion content!
So you can download the eBook in PDF format here: http://go.microsoft.com/FWLink/?Linkid=270056 (17.9 MB)
EPUB format is here: http://go.microsoft.com/FWLink/?Linkid=272592 (37.3 MB)
MOBI format is here: http://go.microsoft.com/FWLink/?Linkid=272591 (69.5 MB)
The eBook's companion content is here: http://go.microsoft.com/FWLink/?Linkid=270057 (59.9 MB) Just make use of it and develop new Windows 8 apps. Happy programming!!
Recently one of my developer customer pointed out that he used Extra.exe as part of troubleshoot performance issues at his Exchange Server 2010 environment. But he noticed that Extra.exe doesn’t work or collect the data as expected. During investigation I noticed that they were running it under the scheduled task. Based on investigation, they updated to Exchange Server 2010 SP2 Update Rollup 5 version 2 which resolved the issue.
Developers love code samples, but they have been sitting in front of desktop for too long. A Sample Browser app can give them some time to sit relaxingly in a sofa and continue to learn the beloved code samples. The Sample Browser gives developers a new experience to search, download, learn, and share thousands of code samples. The large sample repository includes Microsoft official code samples for Windows Store apps, over 1200 Microsoft All-In-One Code Framework samples driven by developers' real-world pains and needs, and various product samples and community samples. So now you can download them as wish, either to your Windows 8/RT device or Windows Traditional desktop: Windows 8 app: Download the Windows 8 app for your Windows 8 or Windows RT device it gives developers a new experience to search, download, learn, share and request code samples. Swipe and search and share - It's that easy! The app also supports the offline mode, so you can learn code samples anytime, anywhere. Traditional desktop: Download Sample browser for traditional desktop, this will be very useful when you are using Visual Studio Express. Adding few screenshots for your view:
Recently I was working with one of the developer who earlier designed an CDOSYS based mail component in his C++ application built using earlier Visual Studio (2005) version . After migration to VS 2008 environment, they noticed compile errors with the same code/no changes made. When I debugged further and noticed that the msado15.tlh and cdosys.tlh are not generated correctly for some reasons. When I compared the .tlh file generated by previous VS version, i noticed differences in it – as couple of keywords are missing in method definitions in the .tlh file generated by VS previous versions. That’s the reason, they noticed the compile time/linker errors.
The generation of .tlh files is affected by some codes in this project, which is compiled earlier than the import sentences. So i moved the import sentences to the very beginning of stdafx.h and used #import attribute “rename” to avoid any name collusion problems.
#import "c:/program files/common files/system/ado/msado15.dll" rename("ADODB","CDO") rename( "EOF", "adoEOF" )
After the above changes, I can successfully compile it without any errors. It helped them to move ahead.
In this post, we will see how to programmatically filter/restrict items “To” property. Let we take this scenario. In Outlook, we notice it contains 6 items “To” property containing “Deva G”:
Note:In specifying a filter in a Jet or DASL query, if you use a pair of single quotes to delimit a string that is part of the filter, and the string contains another single quote or apostrophe, then add a single quote as an escape character before the single quote or apostrophe. Use a similar approach if you use a pair of double quotes to delimit a string. If the string contains a double quote, then add a double quote as an escape character before the double quote. For example, in the DASL filter string that filters for the Subject property being equal to the word can't, the entire filter string is delimited by a pair of double quotes, and the embedded string can't is delimited by a pair of single quotes. There are three characters that you need to escape in this filter string: the starting double quote and the ending double quote for the property reference of http://schemas.microsoft.com/mapi/proptag/0x0037001f, and the apostrophe in the value condition for the word can't. Applying the appropriate escape characters, you can express the filter string as follows:
filter = "@SQL=""http://schemas.microsoft.com/mapi/proptag/0x0037001f"" = 'can''t'"
Alternatively, you can use the chr(34) function to represent the double quote (whose ASCII character value is 34) that is used as an escape character. Using the chr(34) substitution for a double-quote escape character, you can express the last example as follows:
filter = "@SQL= " & Chr(34) & "http://schemas.microsoft.com/mapi/proptag/0x0037001f" & Chr(34) & " = " & "'can''t'"
& Chr(34) & " = " & "'can''t'"
For this above test, first we need to get the property reference for “to” so that we can create DASL Filter for it. For this, you can make use of latest MFC MAPI and get the same using its Property Editor. I am making use of Outlook Object Model (OOM) API to filter/restrict “To” field items containing “Deva G”. In order to do that, you can make use of Items.Restrict method provided in OOM along with the Filter that you want to apply. The Restrict method is significantly faster if there is a large number of items in the collection, especially if only a few items in a large collection are expected to be found.
Filter = "@SQL= " & Chr(34) & "http://schemas.microsoft.com/mapi/proptag/0x0E04001E" & Chr(34) & " = " & "'Deva G'"
Using the above filter, we can build the code using Items.Restrict method – enclosing the Outlook VBA sample for your reference:
Public Sub RestrictFilter()
Dim myNameSpace As Outlook.NameSpace
Dim myItems As Outlook.Items
Dim currentItem As Outlook.Items
Dim Filter As String
Dim i As Integer
Set myNameSpace = Application.GetNamespace("MAPI")
Set myItems = myNameSpace.PickFolder.Items
Set currentItem = myItems.Restrict(Filter)
For i = currentItem.Count To 1 Step -1
When you execute the code, you can retrieve the filtered item’s “subject” property values(PR_SUBJECT)….
You can give a try and let me know how it goes…. Happy programming!!
Now you can download the beta for Office 2010 and SharePoint 2010 SP2. For more info, you can refer the Microsoft Office Sustained Engineering post.
Recently I tried joining my Windows Server 2008 R2 with the targeted domain controller (as part of new Exchange install), but it thrown the following error:
In order to move ahead, I tried the following step to move ahead… Try temporarily setting the IP address of domain controller as your first DNS server or Preferred DNS Server, join the domain (later you can change the DNS Server setting back). Here it goes: Step 1: In Windows Server 2008 R2 > View Network Connections > Network Connection > Active Connection > Properties > Internet Protocol Version (TCP/IPv4) > Preferred DNS Server > Update the IP address of primary domain controller > OK Step 2: Now try join your domain. (In addition, after successful joining domain, I change DNS servers back to earlier). It made the trick. Enjoy!!
Wow, it’s birthday time. Visual C++ turned 20 this month, which certainly has come a long way. To get more info, refer the related post: http://channel9.msdn.com/Shows/C9-GoingNative/GoingNative-15-VC-turns-20-Ale-turns-40-C9-turns-9. Also it’s no coincident that as VC++ turned 20 and Channel 9 turned 9 too. Enjoy!!
I got the above update couple of days earlier to my HTC Mozart device. At this, check its build number - 7.10.8862.144 (You'll see same on your phone in Settings > About > More info). It contains the following update:
Start. Provides resizable small, medium, and large Live Tiles so you can customize your Start experience in new ways.
Accent colors. Expands the number of available accent colors to 20.
Lock screen. Improves the lock screen experience with accidental wipe protection features and the Bing image of the day wallpaper.
Marketplace and Xbox. Expands Windows Phone Marketplace and Xbox support to new countries and regions.
Fonts. Enhances the Chinese font and improves the appearance of Arabic and other languages.
Live Tiles. Fixes performance issues from a previous update.
Other improvements. Includes many other improvements to Windows Phone. For more information, you can refer: http://www.windowsphone.com/en-us/how-to/wp7/basics/update-history…. Enjoy!!
One of my customer reported that they created a ATL Project/MFC CDHtmlDialog based C++ application and they notice the following errors in afxdhtml.h (they created it using VS 2003).
afxdhtml.h(272) : error C2238: unexpected token(s) preceding ';' afxdhtml.h(289) : error C2061: syntax error : identifier '_ATL_FUNC_INFO' afxdhtml.h(290) : error C2061: syntax error : identifier '_ATL_FUNC_INFO'
I tried the code piece at my end locally and tested with latest visual studio – I failed to see the issue and it just works for me. Later I done further research on this and found the following:
The #include <afxdhtml.h> directive is placed in the stdafx.h pre-compiled header file before the "using namespace ATL;" directive, and the #define _ATL_NO_AUTOMATIC_NAMESPACE was given previously. Thus, the symbols in the header file which belong to the ATL namespace are not properly resolved. When adding a class from the MFC dialog class wizard, you are given the choice of several dialog base classes, most of which do not require the ATL namespace "using" directive. Thus, the wizard script in default.htm doesn’t make any attempt to ensure that the header file corresponding to the class name come after a using directive.
In Visual Studio 2005 and later versions, the problem doesn’t occur because all references to CComPtr are now prefixed with ::ATL::, alleviating the need to either direct “using namespace ATL;” or to define the macro to eliminate the automatic use of the ATL namespace. So I recommended them to try one of the following to move ahead: • Remove the #define _ATL_NO_AUTOMATIC_NAMESPACE directive from the stdafx.h header, or • Move the using namespace ATL; directive before the #include <afxdhtml.h> • Upgrade to Visual Studio 2005 and above. Also make sure they're fully patched with latest service pack/fixes.
Here is a developer article published “how to build/write an Exchange Server 2013 based transport agent?” in a detailed fashion about a sample transport Agent to illustrate various Exchange 2013 transport agent functionality as well as stripping all the hyperlinks from the message body. The article also talks starting from what’s a transport agent, changes to Exchange Server 2013 environment – transport agent management, setting up the environment etc . They too published the code base here. You can try this out and make use of the same. Enjoy!!
You can join this Jump Start session provided by Microsoft Virtual Academy – it’s tailored for experienced application developers interested in leveraging ASP.NET and Visual Studio 2012 to offer modern apps that target modern browsers. Two of Microsoft’s most seasoned ASP.NET speakers, Scott Hanselman and Jon Galloway, will provide an accelerated introduction to building modern web applications with ASP.NET 4.5 and ASP.NET MVC 4. In this course, they will target key scenarios like building mobile ready websites, social web applications as well as modern HTML5 browser features.
• New and advanced features in ASP.NET Web Forms • ASP.NET MVC 4 and ASP.NET Web API • jQuery • SignalR • Entity Framework • Visual Studio 2012 • Internet Explorer 10 and HTML5 • Building apps for Office with HTML5 • Windows Azure Web Sites for ASP.NET developers
February 19, 2013 8:00am-5:00pm PST
Register: In order to participate you need to register first. Where : Live online What : Engaging, demo virtual class Cost : Free Target Audience: Intended for developers who have at least six months of professional experience.
Hope this helps.
Recently one of my customer reported that Outlook is not showing latest free/busy information for selected users. Initially they tried the following steps for the affected users: Exit Outlook Open Command prompt > Open Outlook with cleanfreebusy switch (outlook.exe /cleanfreebusy) It failed to resolve the issue. During troubleshooting we noticed that these issue may occur because a mailbox property does not correctly reference a hidden message in the mailbox, which is related to free/busy publishing. We tried the below steps for the affected user to re-generate free/busy information: Exit Outlook. Make sure that the profile is in online mode. You can change this or create new one using Mail item in Control Panel. Download latest MFC MAPI editor (http://mfcmapi.codeplex.com) Start the MFCMAPI.exe > click OK. On the Session menu, click Logon. In the Profile Name list, select the profile for the mailbox, and then click OK. Double-click the Mailbox Store. In the navigation pane, click Root Container. In the details pane, right-click PR_FREEBUSY_ENTRYIDS, click Delete Property, and then click OK. In the navigation pane, expand Root Container, expand Top of Information Store, and then click Inbox. In the details pane, right-click PR_FREEBUSY_ENTRYIDS, click Delete Property, and then click OK. In the Information Store: Inbox dialog box, click Exit on the File menu. Exit MFC MAPI. Finally at Windows, you should click Start, click Run, type outlook.exe /cleanfreebusy, and then press ENTER – this will regenerate the free/busy information for that specific user mailbox. Hope this helps.
Exchange Online Sign up now for a 30-day free trial of Office 365, which includes Exchange Online. Try Now
You can also try the new Exchange Online with Office 365 Enterprise Preview. Try now | Learn more
Exchange Server 2013 Try a free 180-day evaluation of Exchange Server 2013.
There are a range of licensing options for Exchange Server. Learn more Office Professional Plus 2013 Download Now
Now you can download the 101 Exchange Web Service samples to download them all, or select the samples that you want and download them individually. This pack includes 101 code samples that show you how to develop Exchange 2013 solutions. The code samples in the Exchange 2013: 101 code samples package show you how to use the Exchange Web Services (EWS) Managed API to send email messages, search mail folders, get contact information, check user availability, and more.
These samples require the following:
Note: These samples assume that the assembly is in the default download directory. You will need to verify the path before you run the solution for an individual sample.
Each sample will typically contain the following files:
Follow these steps to configure the Exchange 2013: 101 code samples.
You need to press F5 to build and deploy the samples.
You need to press F5 to run the samples. Note: The above samples applies to the following exchange version/technologies: Exchange Server 2007 SP1, Exchange Server 2010, Exchange Server 2013 and EWS Managed API