HandledException

*.*

  Home  |   Contact  |   Syndication    |   Login
  9 Posts | 0 Stories | 12 Comments | 11 Trackbacks

News

My Non-tech Blog





Archives

Post Categories

Monday, February 06, 2006 #

Check out Barry Bond's post about a few numbers in the WM 5.0 Device Emulator that can be used to test busy numbers, never answer numbers etc.

Monday, January 30, 2006 #

I delivered a session on Windows Mobile programming with a focus on WM 5.0 in Coimbatore during the MSDN @ Campus event. I demonstrated a Bluetooth application using the 32feet API and Message Interception API in WM 5.0. I am reminded to point out that Peter Foot of the OpenNETCF fame, has separated a few APIs including the Bluetooth library into 32feet, which is worth noting for Bluetooth enthusiasts.

I have uploaded my demos here-

Bluetooth demo (scenario was communication between a PPC and a Desktop machine at a Pizza Company)
[Demo will be upload the shortly]

Download the SMS interception demo

The SMS Interception demo has inline documentation to help you understand its working.

/*
 *
 * ---------------------------------
 * Running the application
 * ---------------------------------
 *
 * 1. Make sure you have VS 2005 and Windows Mobile 5.0 PocketPC SDK installed
 * 2. Run the application and use the Windows Mobile 5.0 PocketPC Phone Emulator
 * 3. Click on the "Start" button to start the SMS Interceptor
 * 4. This application will peek at all SMS's received henceforth and process them
 *    if the SMS body is prefixed with the word "ASTRO"
 * 5. Valid format for getting prediction: ASTRO dd-mm
 * 6. Open the "Messages" in the PocketPC and create a new SMS, say, ASTRO 20-8
 *    (for 20th Aug) and send it to +14250010001, which is a fake number.
 *    Any Phone calls or SMS's to this number is a reference to the emulator itself.
 * 7. Once the SMS is sent, it appears in the list box. If it were to be an SMS
 *    without prefix "ASTRO", the application will leave it to be read by the user.
 * 8. This can be observed when the prediction is sent. This SMS lands in the Inbox.
 * 9. To stop the Message Interception, click the Stop button
 *
 * More reading info on SMS interception API in WM 5.0:
 * http://blogs.msdn.com/windowsmobile/archive/2005/07/09/437189.aspx
 * http://www.pcquest.com/content/search/showarticle1.asp?arid=75833&mode=disp
 *
 * Windows Mobile 5.0 PPT - TechEd
 * http://download.microsoft.com/download/9/f/a/9fadc29f-8df1-486f-b200-94f79ee7a7de/MED%20303%20New%20Managed%20APIs%20Controls,%20Messaging%20and%20Telephony.ppt
 *
 */


Thursday, January 19, 2006 #

I just completed a bluetooth demo for a Windows Mobile presentation that I'd doing at MSDN @ Campus, Coimbatore.

Code snippets is a very good feature which is helpful especially while doing demos. It is good to see the snippets wrapped within a neat XML schema. But, I thought it is slightly cumbersome to create a code snippet. The Powertoys blog has a pointer to a very cool tool - Snippy, which makes snippet creation quite simple.

Creating code snippets [MSDN]
Creating and Using Code Snippets in Visual Studio 2005 [4Guys From Rolla]
Code snippet XML schema reference [MSDN]

You can find some ready-to-use code snippets in GotCodeSnippets. It doesnt contain many snippets, but a cool initiative.


Wednesday, November 30, 2005 #

I demonstrated the Power Management API of the Microsoft Platform SDK during the launch of Microsoft's Academic Projects Program here in Bangalore.

Microsoft Platform SDK is a colelction of powerful APIs which you can play around with to do a bit of system-level programming. You could use the Microsoft VC++ compiler to compile your programs.

The Power Management Demo I showed is pretty simple and straight-forward. The user is intimated through an alert when there is a change in power source. In a real-time scenario one could perform actions to change the execution state/processor consmption of the application when the computer is running on battery. This is done using one simple function:

BOOL GetSystemPowerStatus(
  LPSYSTEM_POWER_STATUS lpSystemPowerStatus

);

to which you would have to pass the reference of an object of type SYSTEM_POWER_STATUS structure. The power source is indicated by the value of the structure variable ACLineStatus (0 - Battery, 1 - AC Power & 255 - Unknown).

In the main window message processing function (WndProc), you can invoke this function when the WM_POWERBROADCAST message is received.

case WM_POWERBROADCAST:

BOOL ret;

SYSTEM_POWER_STATUS sps;

ret = GetSystemPowerStatus(&sps);

if(sps.ACLineStatus)

MessageBox(hWnd,TEXT("You are on AC power"),TEXT("Power Management Demo"),0);

else

MessageBox(hWnd,TEXT("You are on battery power"),TEXT("Power Management Demo"),0);

By responding to the PBT_APMQUERYSUSPEND message, an application can put off a suspend request from the operating system. The application will need to respond with a BROADCAST_QUERY_DENY, if the application cannot allow the system operations to be suspended. The Power Management API has other useful features to support automatic wake-up using the System Wake-up Events.

[Download Source]

Read about using Microsoft Visual C++ 2005 Express with Platform SDK.


The other demo I showed during the launch of Microsoft Academic Projects was to demonstrate the web services. Though this demo may not have real business application, one will be able to guess the power of Web Services and its extensibility.

I setup my webcam at home and used TinCam, to dump images shot from the webcam into a folder at a given interval. I referred this article and used Binary Serialization to transmit the images from my PC to the Web Service consumer application which is a simple WinForms application.



A very simple application, but cool to watch. Download the source here.


Saturday, October 29, 2005 #

Its been a long time since I posted here and I have lots of excuses for that. ;)

India is hosting Microsoft's most awaited Global Student Competition - Imagine Cup. Imagine Cup 2005 Global finals was hosted by Japan and everyone throughout the world witnessed real cool applications developed by students.

It’s amazing to see all these passionate students doing such great work. The Imagine Cup brings fun competition and tough challenges to the next generation of software innovators, and I’m excited that Microsoft is helping them succeed.
- Microsoft® founder and Chief Software Architect Bill Gates

The theme for Imagine Cup 2006 -

“Imagine a world where technology enables people to live healthier lives”

[Source]

There are already lots of sites/blogs on the web which have published details of this years Imagine Cup, though I havent found an official competition details fromMicrosoft. If you are tempted to get clicking, here are a few pointers -

http://blogs.msdn.com/msozacademic/comments/475194.aspx
http://www.fmi.uni-sofia.bg/microsoft/initiatives/imaginecup2006india.html
http://www.schrankmonster.de/PermaLink,guid,cd64d0f2-dcba-454f-83b6-ff21b75f5015.aspx

Apart from these, to get a regular dose of updated information about IC '06, you must stay tuned to thespoke.net, becuase that is where all the 'stuff' is going to happen.

Sharath and I have teamed up for Imagine Cup 2006.


Sunday, July 10, 2005 #

What is Monad?
Monad is the new command line shell developed by Microsoft. Microsoft does come out with interesting codenames for its products, which reminds me of the Whisteler, Longhorn and Blackcomb funda.

I got this from wikipedia-

The word monad comes from the Greek word µ???? (from the word µ????, which means "one", "single", "unique") and has had many meanings in different contexts.

Goal of Monad is to deliver an extensible scripting environment that is secure,interactive, programmable and production-ready to enable consistent and reliable automation of administrative tasks.

Some key things about it:

  • A Scripting Language called Msh Script
  • An interactive shell called Msh.exe
  • SDK to produce task-oriented commands and providers
  • A set of domain independent utility commands
  • A mechanism to do remote scripting.

If you are wondering how to get your hands on a copy of this, visit the Microsoft Betas Site. Arul Kumaravel (a Dev Lead at Microsoft) posted a Quick Start for those who want to get started with Monad. The essence of object-orientedness can be seen in the syntax and usage. Eg.: $a.SubString(0,3). Someone did complain that Monad has been left out in the PDC '05 agenda.


Sunday, June 26, 2005 #

If you have been following my earlier blog, you know that I am Sunil Jagadish, a Microsoft Student Ambassador, pursuing Master of Computer Applications in RV College of Engineering (RVCE), Bangalore.. As I mentioned in the last post on Dotnetjunkies.com, comment spam succeded in forcing me to say “Good Bye!” to Dotnetjunkies. [listening to Hotel California (Eagles) as I type this...]

If you search through the archives of most of the technical blogs and look for the first post, you will find a “Hello World” post. I was wondering why I should be calling this post “Hello World” and looked into Wikipedia and this is what I found -

A "hello world" program is a computer program that prints out "Hello, world!" on a display device. It is used in many introductory tutorials for teaching a programming language and many students use it as their first programming experience in a language.

A "hello world" program can be a useful sanity test to make sure that a language's compiler, development environment, and run-time environment are correctly installed.

However, the first known instance of the usage of the words "hello" and "world" together in computer literature is in A Tutorial Introduction to the Language B, by Brian Kernighan, 1973. [1] (http://cm.bell-labs.com/cm/cs/who/dmr/bintro.html)

Gramatically - “Hello, world!“ is the right way to say it, but some programming language syntax places constraints on the usage of strings.

All this is history. Something that is really cool and something that I had once planned to do is already there. A comprehensive collection of “Hello, world!” programs written in various programming languages. Its just awesome! A nice way to get an idea of what a programming language tastes like. The list if growing. Check it out.

If you would like to write to me, please feel free to drop a line at - suniljagadish AT gmail DOT com


I just got this idea from nowhere - A OCR (Optical Character Recognition) web service. I did a search to find out that one such web service already exists. It would be a very good web service demo is one is giving a session on Web Services. Though the focus of a good web service demo should be on the interoperability aspect of it, the OCR demo would be cool. Channel 9 has a video which shows an interop between a legacy application on the CISC and a desktop Avalon application. Check it out.