Inside and Out...

An attempt to understand technology better...

  Home  |   Contact  |   Syndication    |   Login
  160 Posts | 0 Stories | 12 Comments | 181 Trackbacks

News


WinToolZone - Spelunking Microsoft Technologies
I work as a developer on the Common Language Runtime (CLR) team, specifically in the areas of exception handling and CLR hosting.
Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Twitter





Tag Cloud


Archives

Post Categories

Image Galleries

Links

.NET Framework

For one of my pet projects I am writing, I was contemplating how to integrate Windows Live Authentication with my standalone application, similar to Windows Live Messenger. Turns out, it is really easy! Below are the three steps that were needed for the integration: Download the Windows Live Client SDK from here and install it. Create a new project and add reference to Microsoft.WindowsLive.Id.Cl... assembly Write code similar to the one below: using System; using Microsoft.WindowsLive.Id.Cl...;...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

One always strives to write exception safe application but there are times when an exception can go unhandled. In the .NET Framework, the AppDomain class exposes the UnhandledException event that can be used by by the managed application to know when an exception has gone unhandled. In the writeup, AppDomains and Unhandled Exception Notifications, I discuss the specifics of when and how this notification is made, what is the relationship between the thread that had unhandled exception and the AppDomain(s)...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Surprisingly, enumerating AppDomains is not that straightforward. The System.AppDomain type does not expose functionality to enumerate them at all. The way to enumerate them will be to use the V1 Hosting interface, ICorRuntimeHost and then invoke the EnumDomains and NextDomain methods against it to get the list. If you are using CLR 2.0, you needn't worry as CLR 2.0 does implement the V1 interfaces as well. Below is the snippet that exemplifies the concept (note: AppDomains will only be enumerated...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

[Originally posted on 10th July 2006] 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: . 1: bth.Devices[ i ].SendPassKey("123", null); Also, I have added OnIncomingAuthenticationReq... event handler against a BluetoothDevice object that can be used to setup an event handler, which will be invoked when the Bluetooth device...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

[Originally posted on 6th July 2006] 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: . 1: Bluetooth bth = new Bluetooth(); 2: 3: // EnumRadios(bth); 4: 5: if (bth.RefreshDevices(false, true, true, true, true, null) == false) 6: { 7: Console.WriteLine("Unable to enum devices"); 8: return; 9: } 10: 11: foreach (BluetoothDevice device in bth.Devices) 12: { 13: Console.WriteLine("Devicename:...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

[Originally posted on 5th July 2006] 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: . 1:...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

[Originally posted on 31st July 2006] 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...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

I have updated TransNTFS, my managed implementation for the transactional NTFS APIs that have been introduced with Windows Vista. TransNTFS now also supports the following operations under a transaction: Creation and deletion of folders Deletion of files Creation of symbolic links Creation of hard links It comes with complete documentation (as always) and can be downloaded from http://www.wintoolzone.com/...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Sometime back, I had made a post regarding a native C++ class I had authored for using some of the Transactional NTFS (TxF)APIs introduced in Windows Vista. Almost two weeks from that post, I just finished my managed implementation, TransNTFS, that enables you to use the TxF APIs from managed code. As always, Managed C++ enabled the implementation with excellent ease. It comes with complete documentation and can be downloaded from http://www.wintoolzone.com/... Below is an...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Did you have a scenario where you wished you could customize the creation of AppDomains? Or, you could control how many AppDomains any code that runs in your application context (e.g. if you are writing a plugin load framework) could create? Or, how about reusing AppDomains for various assemblies? I have just finished an article on how any of the above scenarios can be accomplished using the System.AppDomainManager type, introduced in .NET Framework 2.0, by intercept AppDomain creation requests....
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Full .NET Framework Archive