Archive

Posts Tagged ‘Windows’

QuickTip: Mapping your GAC folder in Windows with Subst

December 30th, 2010 1 comment

Here’s a quick tip if you want to browse the files in your GAC easily without messing about with commands all the time. Map the folder  containing the assemblies with the Subst command.

To do that, bring up a console window (Windows Key + R or Start > Run), then:

subst G: C:\windows\Assembly

This will map the Global Assembly Cache folder to your G drive in Windows Explorer. You can also peek around and see how the GAC works.

The folders you’ll find in the mapped drive include – on a 64bit system *:

  • GAC – Non-native assemblies used by .NET 1.x
  • GAC_32 – Non-native 32bit assemblies
  • *GAC_64 – Non-native 64bit assemblies visible only on 64bit Windows.
  • GAC_MSIL – Non-native MSIL (AnyCPU) assemblies.
  • NativeImages_v* – Native assemblies for the framework version and the architecture (Eg. NativeImages_v4.0.30319_64 is for the .NET 4.0 64bit native Assemblies)
  • temp / tmp – Temporary directories (duh!)

To remove the binding, use the Subst command with the -D option.

subst G: /D

That’s it! Have a safe & happy New Year!

{lang: 'en-GB'}
Share

DOOM: Bill Gates introduces DirectX in 1995.

November 17th, 2010 No comments

Here’s something you wouldn’t see every day. Bill Gates introducing the world to DirectX in 1995.

httpv://www.youtube.com/watch?v=_JokM_fExpI

Don’t interrupt him! My how things have changed.

{lang: 'en-GB'}
Share

Windows Phone 7 Resources

November 15th, 2010 1 comment

I’ve been busy hacking away the past month or so with Windows Phone 7 and Android. They’re both very different when it comes to the out of box developer experience – with Microsoft tools being supremo right now. Thought I’d contribute some resources when it comes to (on this post) writing Windows Phone 7 Applications. I’ll try and keep this up to date with new things I find.

Feel free to comment with other great resources.

Last Updated: 16th November, 2010

Books/eBooks

Online Resources

Developer

Developer Frameworks/Tools

Developer Components/Controls

Designer/UX

Hardware

{lang: 'en-GB'}
Share

Windows Phone 7 Developer Tools Released!

September 17th, 2010 No comments

The moment we’ve all been waiting for, the final release of the Windows Phone 7 SDK has been released! What are you waiting for, go download it and try out some cool things!

No Visual Studio installed? Not an issue, it comes with the Express edition of VS2010 and Expression Blend 4 for Windows Phone as well as XNA and Silverlight tools for Windows Phone and an emulator – all for free too!

For more information, see ScottGu’s great post about it!

{lang: 'en-GB'}
Share

Oracle releases VirtualBox 3.2

May 20th, 2010 1 comment

With the Sun now set, Oracle has released VirtualBox 3.2 finally 🙂 In particular some lovely optimisations for the newer Intel Core i5/i7 processors, Large  Page support (which helps significantly on Windows x64 and Linux) as well as a very welcome optimisation on the networking in VirtualBox as well as multi-monitor support for Windows Guests. Whats more RDP sessions are now accelerated (VRDP).

Amongst the changes from the changelog:

This version is a major update. The following major new features were added:

  • Following the acquisition of Sun Microsystems by Oracle Corporation, the product is now called Oracle VM VirtualBox and all references were changed without impacting compatibility
  • Experimental support for Mac OS X guests (see the manual for more information)
  • Memory ballooning to dynamically in- or decrease the amount of RAM used by a VM (64-bit hosts only) (see the manual for more information)
  • Page Fusion automatically de-duplicates RAM when running similar VMs thereby increasing capacity. Currently supported for Windows guests on 64-bit hosts (see the manual for more information)
  • CPU hot-plugging for Linux (hot-add and hot-remove) and certain Windows guests (hot-add only) (see the manual for more information)
  • New Hypervisor features: with both VT-x/AMD-V on 64-bit hosts, using large pages can improve performance (see the manual for more information); also, on VT-x, unrestricted guest execution is now supported (if nested paging is enabled with VT-x, real mode and protected mode without paging code runs faster, which mainly speeds up guest OS booting)
  • Support for deleting snapshots while the VM is running
  • Support for multi-monitor guest setups in the GUI for Windows guests (see the manual for more information)
  • USB tablet/keyboard emulation for improved user experience if no Guest Additions are available (see the manual for more information).
  • LsiLogic SAS controller emulation (see the manual for more information)
  • RDP video acceleration (see the manual for more information)
  • NAT engine configuration via API and VBoxManage
  • Use of host I/O cache is now configurable (see the manual for more information)
  • Guest Additions: added support for executing guest applications from the host system (replaces the automatic system presimparation feature; see the manual for more information)

Download from VirtualBox or get the Windows build. I’m really hoping the good Oracle keeps VirtualBox open, this is one kickass bit of kit.

{lang: 'en-GB'}
Share

Beautiful wallpapers for you to relax with.

March 8th, 2010 No comments

Some really cool wallpapers from Windows 7 Technical Evangelist Mike Swanson.

I’ve got the new Audi RS5 wallpapers on my work and home PCs if cars are your thing 😉

{lang: 'en-GB'}
Share

Some changes in .NET BCL 4.0

November 21st, 2009 1 comment

I’ve been porting a few products to .NET 4.0 and came across some cool new additions in .NET 4.0 which will be quite useful for developers.

Strings

Streams

Remember writing this before to copy one stream to another?

public static void CopyTo(this Stream input, Stream output)
{
byte[] buffer = new byte[2048];
while (true)
{
int read = input.Read (buffer, 0, buffer.Length);
if (read <= 0)
return;
output.Write (buffer, 0, read);
}
}

Now you don’t need to, just use the Stream.CopyTo() method.

inputStream.CopyTo(output);

Checking for 64bit-ness

Previously to detect a 64bit operating system you would either P/Invoke out and call the IsWow64Process in Kernel32, looked at the “PROCESSOR_ARCHITECTURE” environment variable or even easier (and completely managed code) way of checking the size of a Pointer.

public static bool IsWin64
{
return (IntPtr.Size == 8);
}
public static bool IsWin32
{
return (IntPtr.Size == 4);
}

Now you can simply use the Environment class that comes with two new properties.

WPF 4.0 Improvements

There are simply too many to list, see the article on ScottGu‘s blog about WPF4 and VS2010/.NET 4.0.

One very important tweak are the Text Rendering improvements that TextBlock‘s now have a new TextOptions.TextFormattingMode that greatly improves the quality of text rendering.

<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<TextBox TextOptions.TextFormattingMode="Ideal" FontSize="11">ThushanFernando.com - Ideal</TextBox>
<TextBox TextOptions.TextFormattingMode="Display" FontSize="11">ThushanFernando.com - Display</TextBox>
<TextBox TextOptions.TextFormattingMode="Ideal" FontSize="16">ThushanFernando.com - Ideal</TextBox>
<TextBox TextOptions.TextFormattingMode="Display" FontSize="16">ThushanFernando.com - Display</TextBox>
</StackPanel>
</Grid>
</Window>

Here’s a pretty picture showing the difference between using Ideal and Display. The difference is noticable for text sizes below 15.

MainWindowAlternatively you can place it in the Window so all child controls will render nicely.

<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow - Display" Height="350" Width="525"
TextOptions.TextFormattingMode="Display">
<Grid>
<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<TextBox FontSize="11">ThushanFernando.com</TextBox>
<TextBox FontSize="16">ThushanFernando.com</TextBox>
</StackPanel>
</Grid>
</Window>

There are LOTS more coming in .NET 4.0 that will make anyone doing .NET development today just wet their pants over, just read the article on MSDN by Justin Van Patten about Whats new in the BCL in .NET 4.0 and also posted on the BCL team blog.

{lang: 'en-GB'}
Share

Windows 7 NetBIOS Kernel Crash, 1997 all over again :(

November 12th, 2009 No comments

Looks like Windows 7 is vulnerable to an SMB remote exploit.

Unfortunatly this SMB2 security issue is specificaly due to a MS patch, for another SMB2.0 security issue:
KB942624 (MS07-063)
Installing only this specific update on Vista SP0 create the following issue:

SRV2.SYS fails to handle malformed SMB headers for the NEGOTIATE PROTOCOL REQUEST functionnality.
The NEGOTIATE PROTOCOL REQUEST is the first SMB query a client send to a SMB server, and it’s used to identify the SMB dialect that will be used for futher communication.

Reminds me of the days of WinNuke.

{lang: 'en-GB'}
Share

Apple’s and Linus’s take on Windows 7

October 23rd, 2009 No comments

Apple Propaganda, I mean PR

I posted about Microsoft’s four new Windows 7 commercials the other day and yes, they *are* commercials – they tell you a bit about the product they’re advertising. Now let’s take a look at Apple’s attempts – great PR btw! I think they were going for: ‘lets create the most douchebaggy thing to publicise our product and have people post blogs about it’. Well here’s some free PR work courtesy of Apple.

Bill Gates may go down in history for the BSoD for Windows 98 but lest we forget that little kid in school who was always jumping up and down for attention, teasing the smarter kids because he just wasn’t getting any attention.

“Now what is this? I dunno, but it works.” – Steve Jobs

“It’s pretty awesome when it works.” – Steve Jobs

It sure is Steve, it suuuuure is. Think Different. It just works. I wonder how they’ll cover having an ad-supported Mac OS X operating system in the future?

Linus Torvalds

Anyway I much prefer the suttle attitude that Linus Torvalds took at the Japan Linux Symposium.

He’s got a sense of humour (and coolness) and as a Linux user (#412328) I’m ever grateful for his operating system. Damn I miss Japan 🙁

{lang: 'en-GB'}
Share

Four new Windows 7 Ads

October 22nd, 2009 No comments

Here’s four new Microsoft Windows 7 commercials, 7 seconds to talk about Windows 7.  Short, sweet functionality and to the point. Oh  and look, they don’t seem to need to be bashing their competitors (awww!).

Having used Windows 7 now for close to 2 months I have to say its nothing but pure awesomeness. If you have MSDN there’s no excuse not to try it out. I’ve been too busy to even blog about it 🙁

{lang: 'en-GB'}
Share