Welcome to DevAuthority.Com Sign in | Join | Help

Blogging using Word 2007

Try it – it works very well! For details, go here

posted by gkhanna | 0 Comments
Filed Under:

Windows Live Writer

This is my first post using Windows Live Writer! It looks really neat, supports various blogging services and can be download from here.

posted by gkhanna | 2 Comments
Filed Under: ,

Joined the Common Language Runtime (CLR) Team

Its been almost two months since I last blogged. This was majorly due to a change in my professional life.

After having a great time (travelling across the country, meeting developers at stretch, presenting at TechED and MEDC just to name few things) in my role as Developer Evangelist with Microsoft India, I relocated to Microsoft Corporation at Redmond to join the Common Language Runtime (CLR) team as a Software Development Engineer (SDE). In my new role, I would be working on a new type of CLR - and look forward to share my learnings about the runtime via this blog and my website, http://www.wintoolzone.com/.

Cheers!

posted by gkhanna | 11 Comments
Filed Under: ,

DesktopSMS - Send, Receive and Reply to SMS from the desktop

Ever wanted to compose SMS from the ease of desktop instead of the phone? Wanted to be notified on the desktop, while you are working, when a SMS is received and reply to it from there itself?


DesktopSMS, for Windows Mobile 5.0 based SmartPhone and PocketPC devices, will let you do just that! Based upon .NET Framework 2.0, .NET Compact Framework 2.0 and Windows Mobile 5.0, it allows you to compose, receive and reply to SMS while the phone is connected to your machine via ActiveSync. Below are some screenshots of the same:


Main window to send SMS

Likewise, when a SMS is received, a popup comes on your screen that will allow you to reply as well:

Popup on message receipt

You can even select recepients from Microsoft Outlook's Contact folder as message receipient, provided they have mobile phone number specified. It comes with complete documentation and installer.

Download DesktopSMS from http://www.wintoolzone.com/showpage.aspx?url=listdotnet.aspx?Listtype=1

Technorati : , , , , , ,
Del.icio.us : , , , , , ,

TechED 2006 India Presentations available

The presentations from TechED 2006 India have been made available at http://www.microsoft.com/india/teched2006/presentations.aspx

posted by gkhanna | 2 Comments
Filed Under: , ,

[WebService] CAPTCHA image generator for spam control

As part of the revamp efforts of www.wintoolzone.com, I have added the [Web]Services section where I have made available, for free use in your applications, various SOAP based services, built using the .NET Framework.

The first service I have added is a CAPTCHA image generation service. If you are running a website or a blog where you take input from the user in a HTML form, you would know about bots who can spam the form and send invalid details. One of the ways to handle this problem is challenge-response where you throw a challenge to the entity filling up the form and if their response is valid, only then the HTML form's details are taken for subsequent processing.

One of the ways websites and various blog engines are trying to combat spam is by dynamically generating an image which shall containing a randomly generated text - and then prompting the user to enter the text. Only if there is a match, will the HTML form be processed.

The CAPTCHA image generation service can be used to generate this random text and create an image out of it, which can then be displayed on your webpage for verification. It is Basic Profile 1.1 specification compliant. Its free for use in your applications - you simply need to be registered with WinToolZone.

Complete service documentation is at http://www.wintoolzone.com/showpage.aspx?url=Services/Help/Help_CaptchaGenerator.aspx

Technorati : , , , , , ,
Del.icio.us : , , , , , ,
Buzznet : , , , , ,

[TIP] Installing ASP.NET 2.0 Membership, Personalization schema remotely

I recently updated www.wintoolzone.com to use ASP.NET 2.0's Membership API, amongst other things. Now, for the Membership API (or the Personalization API for that matter) to work, they need a schema created in a SQL Server or SQL Express database. You can, ofcourse, override this by authoring your own provider for your own custom schema.

To install the default schema on the database is easy - you run aspnet_regsql.exe utility and it will do the installation for you on your local database or database server. But if you are having your application hosted remotely (as in my case), how would install the schema on the remote server database?

The solution: SQLServices class under System.Web.Management namespace. This class can generate SQL scripts for the kind of services (e.g. Membership API, Personalization API, etc) you wish to install or can even install them for you. To do so on your remote server, simply:

1) Create Setup.aspx (give it any name you want)
2) Upload it on your remote server where you wish to install the schema
3) Invoke one of the overloads of the Install method of the SQLServices class from the .ASPX uploaded in step (1) above.

And you are all ready to go!

You can use the Uninstall method of SQLServices class to remove the schema as well. The best part is that you can specify the feature set to be installed (that is, the schema to be installed), or uninstalled, using the SqlFeatures enumeration as an argument to either of these two methods.

Technorati : , , , ,
Del.icio.us : , , , ,

posted by gkhanna | 0 Comments
Filed Under: , ,

Updated WinToolZone

I just finished updating WinToolZone (www.wintoolzone.com) to use the ASP.NET 2.0's membership API to manage access to the various resources that are available for developers on the portal. You will need to signup with WinToolZone (which is free) before you can access them.

Secondly, I learnt a lot of HttpHandlers in the process - and how can they be best used to protect resource access. I plan to write an article sharing my experience around it.

Thirdly, I am in the middle of WinToolZone.Bluetooth API's documentation. Hopefully, over the weekend, I will be able to release the library.

Technorati : , , ,

posted by gkhanna | 0 Comments
Filed Under: , ,

WinToolZone.Bluetooth - Support for authentication

WinToolZone.Bluetooth now has authentication support. You can use a BluetoothDevice object (which is used represent a Bluetooth device that has been detected) and use the SendPassKey method to send a pass key for authentication:

bth.Devices[ i ].SendPassKey("123", null);

Also, I have added OnIncomingAuthenticationRequest event handler against a BluetoothDevice object that can be used to setup an event handler, which will be invoked when the Bluetooth device sends an authentication request to the machine running WinToolZone.Bluetooth:

bth.Devices[ i ].OnIncomingAuthenticationRequest += new 
BluetoothDevice.IncomingAuthenticationRequestHandler(
Program_OnIncomingAuthenticationRequest);

The event handler is implemented as shown below:

 static void Program_OnIncomingAuthenticationRequest(
BluetoothDevice refDeviceRequestingAuthentication) { Console.WriteLine("{0} is requesting me to send pass key.",
refDeviceRequestingAuthentication.Name);

bool bSentResponse =
refDeviceRequestingAuthentication.SendAuthenticationResponse("123", null); Console.WriteLine("Sent response: {0}",bSentResponse.ToString()); }

The handler gets as an argument the BluetoothDevice instance representing the device that sent the authentication request. To send the pass key back as part of completing the incoming authentication process, SendAuthenticationResponse method of BluetoothDevice is used.

For a partnership/bonding that has been established with a Bluetooth device, DeleteDeviceAuthentication method has been introduced that should be invoked against the BluetoothDevice instance representing the partnered device to break the partnership.

Technorati : , , , ,
Del.icio.us : , , , ,
Ice Rocket : , , , ,

Working with properties in Managed C++?

Then read this article by someone who knows Managed C++ very well. His blog is here.

Technorati : ,
Del.icio.us : ,
Ice Rocket : ,

WinToolZone.Bluetooth - Added device enumeration support

WinToolZone.Bluetooth, the managed Bluetooth API for the desktop that I am working on, now has the support for enumerating devices as well. The snippet below exemplifies it:

    Bluetooth bth = new Bluetooth();
            
    // EnumRadios(bth);

    if (bth.RefreshDevices(false, true, true, true, true, null) == false)
    {
         Console.WriteLine("Unable to enum devices");
         return;
    }

    foreach (BluetoothDevice device in bth.Devices)
    {
         Console.WriteLine("Devicename: {0}", device.Name);
         Console.WriteLine("LastSeen: {0}", device.LastSeen.ToString());
         Console.WriteLine("LastUsed: {0}", device.LastUsed.ToString());
         Console.WriteLine("Connected: {0}", device.IsConnected.ToString());
         Console.WriteLine("Remembered: {0}", device.IsRemembered.ToString());
         Console.WriteLine("Authenticated: {0}", device.IsAuthenticated.ToString());
         Console.WriteLine("DeviceClass: {0}", device.DeviceClassID);
         Console.WriteLine("Address: {0}\n", device.Address.ToString());
                
    }

And below is an output screenshot:
Bluetooth device enumeration output using WinToolZone.Bluetooth

Technorati : , , , ,
Del.icio.us : , , , ,
Ice Rocket : , , , ,
43 Things : , , , ,

WinToolZone.Bluetooth - Managed Bluetooth API for the desktop

One of the communication protocols not present in .NET Framework class libraries is Bluetooth. So today, I started to work on my implementation of a managed API for Bluetooth programming - WinToolZone.Bluetooth. I am authoring it using Managed C++ and leveraging the Microsoft Bluetooth stack APIs.

I just completed implementing the support for enumerating the Bluetooth radios on a machine. Below is a C# program that exemplifies how they can be enumerated:

using System;
using System.Collections.Generic;
using System.Text;
using WinToolZone;

namespace BTHCSClient
{
    class Program
    {
        static void Main(string[] args)
        {
            Bluetooth bth = new Bluetooth();
            if (bth.RefreshRadios())
            {
                foreach (BluetoothRadio radio in bth.Radios)
                {
                    Console.WriteLine("RadioName: {0}", radio.Name);
                    Console.WriteLine("Address: {0}", radio.Address.ToString());
                    Console.WriteLine("ManuID: {0}", radio.ManufacturerID);
                    Console.WriteLine("LMPSubversion: {0}", radio.LMPSubversion);
                    Console.WriteLine("DeviceClass: {0}", radio.DeviceClass);
                }
            }
            else
            {
                Console.WriteLine("Unable to enumerate BTH radios");
            }
        }
    }
}

Technorati : , , , , , ,
Del.icio.us : , , , , , ,
Buzznet : , , , , , ,
43 Things : , , , , , ,

[Download] IEFeedManager 1.0.0.3 - feature enhanced!

I just published v1.0.0.3 of IEFeedManager with some improvements and feature additions.

  • You can right-click a feed or a feed folder and force an update of the feed(s)
  • If any changes are made to the Common Feed List (CFL), then they shall be automatically reflected in the tree display as shown below:
  • Support for auto-refresh of display

  • Feed Viewer now supports sorting of columns by clicking on the column header. Also, added support to mark feed items are read or unread (unread items appear in bold) and to support reading pane at the bottom or the right side:
  • RSS Reader enhancements
Install the latest version from here.

Technorati : , , , , , ,
Del.icio.us : , , , , , ,

posted by gkhanna | 0 Comments
Filed Under: ,

Programming the Windows RSS Platform

One of the interesting things that has been introduced with Internet Explorer 7 (IE7) is the central repository of RSS feeds that will be maintained on the machine running IE7. This is called as the Common Feed List (CFL) and it can be accessed by any application via the COM based API that is being provided alongside. Infact, I wrote IEFeedManager that leverages this API to manage the CFL and also use it to view the RSS feeds.

In this post, I will explain how you can get started to program for this new RSS platform using the managed world. Note: You will need to have IE7 installed on your machine.

First, you will need to add the reference to the COM API library. Right-click your project->Add Reference.. and select the COM tab. You will see Microsoft Feeds listed as shown below:

Microsoft Feeds in the COM tab

Once you add the reference, you will see Microsoft.Feeds.Interop assembly being referenced in your project. Include the namespace with the same name in your project and your are ready to go.

The starting point in the CFL is the FeedManager object. This will allow you to enumerate all the feeds contained in the root folder of CFL, enumerate subfolders and the feeds contained within them. It implements the IFeedManager interface and a typical instantiation will be like this:

private IFeedsManager feedManager = new FeedsManagerClass();

Once you have the IFeedManager instance, you can access the root CFL folder (of the type IFeedFolder) as shown below:

feedRootFolder = (IFeedFolder)feedManager.RootFolder;

Next, you can enumerate the contained subfolders:

IFeedsEnum colSubFolder = (IFeedsEnum)feedRootFolder.Subfolders;

foreach(IFeedFolder feedFolder in colSubFolder)

{ // Do something with "folder" object }

Likewise, the Feeds property of an IFeedFolder can used to access the feeds (of the type IFeed) contained in the folder and work with them:

IFeedsEnum colFeeds = (IFeedsEnum)feedFolder.Feeds;
foreach (IFeed feed in colFeeds)

{ // Do something with the "feed" object }

Now that you have the IFeedFolder object and the contained IFeed objects, you can use a variety of properties and method to work with them. For example, to refresh the feed, invoke the Download method against the IFeed object. To delete a folder and its contained feeds (and subfolders as well), invoke the Delete method against the IFeedFolder object.

You could also set the auto-refresh (of the feed) interval using the Interval property of the feed. Not just that, you can even wire up for a notification against a feed folder or a feed so that if they are modified externally (e.g. another application) or are updated (or deleted), your application can be notified about all such behavior!

Possibilities are endless. The new RSS platform is quite powerful in terms of the APIs it provides to do a variety of tasks. Check the detailed documentation here.

Technorati : , , , ,
Del.icio.us : , , , ,
Buzznet : , , , ,

[Download] IEFeedManager - RSS Reader+Internet Explorer 7 Feed Manager

With Internet Explorer 7 (IE7), subscribing to RSS feeds has become much simpler than before. Infact, IE7 can be used as a RSS reader!

This has been made possible by introducing Common Feed List (CFL), a central repository of RSS feeds maintained on all machines running IE7 or later. Thus, these include (as of today) Windows XP SP2, Windows Server 2003 and Windows Vista. The beauty of CFL is that there are COM based APIs that can be used to interface with it and manage it - and any application can choose to use it and there by adding RSS support within it!

IEFeedManager is a .NET Framework 2.0 based application that will allow you to manage feeds in CFL in a much easier manner and demonstrates how to use the Feeds API from the .NET Framework. For eg. in a single go, it will let you set feed refresh intervals for all feeds in a given folder, which is not so easy in the browser. Plus, it has a built-in RSS reader! And all this is free! Below is a screenshot of IEFeedManager in action:

IEFeedManager in action


You can install it over the web using ClickOnce from http://www.wintoolzone.com/showpage.aspx?url=clickonce/iefeedmanager/

Technorati : , , , ,
Del.icio.us : , , , ,
Buzznet : , , , ,
43 Things : , , , ,

posted by gkhanna | 0 Comments
Filed Under: ,
More Posts Next page »