My TechEd 2010 Session

Friday, November 19, 2010

TechEd 2010 in Eilat is approaching fast. My session is about what MEF (from .NET 4)and Unity (from the Enterprise Library, but does not depend on it) can do for you and your code. If you’re new to MEF and wonder what that is and what it can do (and you’re not on your plane back to Israel center at that time), you might want to stop by. If you’re using the dependency injection idea with Unity, I’ll show some of the things Unity can do. It’s gonna be fun, mostly demos, and hey – it’s the last session...

64 bit process addresses

Sunday, April 12, 2009

native 64 bit processes get a huge address space of 8 TB (instead of the usual 2GB of 32 bit processes). However, to actually get this address space range, the executable image must be linked with the LARGEADDRESSAWARE flag. If it's not, only the lower 2GB will be available. Why is that? Why doesn't a native 64 bit process get automatically the larger address space? I'll leave you to think about this a bit - I'll answer in a few paragraphs. Here's a simple test program: int _tmain(int argc, _TCHAR* argv) {     void* p;     __int64 total...

I’m an MVP!

Wednesday, April 1, 2009

Just got a nice e-mail from Microsoft, announcing me as an MVP! I guess it feels somewhat like winning the Golden Globe award. I'll probably won't get the Hollywood award type any time soon, but I can act like it and thank practically everyone I ever known. But, seriously, I would like to thank Guy Burstein who recommended me for the title and anyone else at Microsoft who may have pinched in a good word. Thank you all!
8 comments

New Version of SOSEX published

Monday, March 9, 2009

For all those WinDbg + SOS/SOSEX lovers, a new version of SOSEX was published, which includes some new commands and enhancements to existing ones. Here’s a brief description of each command. More info can be found in the readme file and using !help <command> inside WinDbg. dlk       (no parameters)                                   Displays sync block deadlocks dumpgen   <GenNum>       Dumps the contents of the specified generation gcgen     <ObjectAddr>                                      Displays the GC generation of the specified object mbc       <Managed breakpoint ID | *>                       Clears the specified or all managed...
no comments

Presentation & Demos from C# LINQ Open House

Wednesday, February 18, 2009

Today I presented a Microsoft Open House event focused on C# 3.0 features and LINQ. Thank you all for coming! I have attached the presentation and demos. Note that to make the LINQ to SQL samples work, you must change the connection string appropriately in the app.config file, or pass another one in the NorthwindDataContext constructor. Presentation & Demos

Why 2D Transforms use 3×3 Matrices

Sunday, February 15, 2009

If you’re working with WPF or other sophisticated graphics framework (e.g. DirectX, OpenGL) you probably know that to create 2D transforms, you build a 3x3 Matrix, either explicitly or implicitly by using classes such as RotateTransform, ScaleTransform or TranslateTransform. it might seem somewhat strange, that for 2D transformations we need a 3x3 matrix: after all, we take an X and a Y and transform them into some X2 and Y2. So, why a 3x3 matrix? Why not just 2x2? The reason has to do with the ability to create a 2x2 matrix that can represent...
16 comments

Non-Square Caption Buttons

Thursday, February 12, 2009

In the last few months, my Windows captions look something like this: The caption buttons are not square. Someone asked me how I did it… Well, Windows UI (Personalize…, etc.) allows changing the size of the caption buttons, but the width must be the same as the height. To make the caption buttons rectangular, one needs to call the SystemParametersInfo native API. Here’s some C++ code that does what you see here (width = 3 times height): NONCLIENTMETRICS metrics = { sizeof(metrics) }; ::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof (metrics), &metrics,...
one comment

Upcoming Courses and an Event

Monday, February 9, 2009

I’ll be teaching next week (starting from the 16th) a five day course (split) entitled “The C# 3.0 programming language” on .NET and C# fundamentals. On the 18th of this month, I’ll do an open house at Microsoft on C# 3.0 and LINQ (same thing I did a few months back at Air Force house, so if you were there, no need to come again – unless you really like the food). You can register here. On March 1st, I’ll be teaching my Windows Internals class (for developers) on the (obviously) internals of the Windows OS. Mostly...
no comments

Math.Net – Math Library for .NET

Sunday, February 8, 2009

Recently I was searching for a mathematics library for use in .NET applications and I stumbled upon Math.Net, an open source math library that includes two main components: The first, called Iridium, deals with the basics: numbers, vectors, matrices and the like. The second, Neodym, is a digital signal processing toolkit, containing things like various filters, modulators, time-frequency processing tools and the like. Worth checking out if you’re in the math business.
2 comments

XAML Intellisense Gone

Tuesday, January 20, 2009

My XAML intellisense went away – just like that. The last thing I remember was installing Team Explorer for VS 2008. From that moment on, XAML intellisense disappeared. No Tools->Options settings appear to have any effect. It turns out this may happen after other types of installations related to Visual Studio. If you got this issue, it can probably be corrected with VS 2008 repair, but here’s how to correct it manually (much faster): Open regedit.exe and navigate to: (32 bit system) HKEY_CLASSES_ROOT\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32 (64 bit system) HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{73B7DC00-F498-4ABD-AB79-D07AFD52F395}\InProcServer32 if the (Default) value is empty – you...