How to determine if we are running on 64 or 32 bit?
In my work I need to be able to pick different files depending on if I run in 64 bit or 32 bit system. The first thing I did try was to use the size of IntPtr which is 4 for 32 bit and 8 for 64 bit. But since I was using the visual studio unit test framework it did not work that god. The unit test framework run in a 32 bit process but the application I’m testing is running in 64 bit, so decided to use P/Invoke to call GetNativeSystemInfo.
The structure that you get is according to
[StructLayout(LayoutKind.Sequential)] private struct SystemInfoNative { internal ushort ProcessorArchitecture; internal ushort Reserved; internal uint PageSize; internal IntPtr MinimumApplicationAddress; internal IntPtr MaximumApplicationAddress; internal IntPtr ActiveProcessorMask; internal uint NumberOfProcessors; internal uint ProcessorType; internal uint AllocationGranularity; internal ushort ProcessorLevel; internal ushort ProcessorRevision; } |
Out from this you can check the processor architecture.
And the complete source code
Read more
.NET Framework 3.5 SP1 source code
Have you ever wondered how Microsoft does thing inside .NET? Now it’s possible to see the source code by configuring Microsoft reference source server inside visual studio. Just go to ‘Serversetup’ and setup you visual studio 2008 to use symbol files from Microsoft symbol server when you debugging. You can also download the symbol files and use them offline by follow this guide ‘Downloadsetup’.
The symbol files are available for this dll’s in .NET 3.5 SP1.
• mscorlib.dll
• Microsoft.Visualbasic.dll
• system.dll
• System.ComponentModel.DataAnnotations.dll
• system.data.dll
• system.drawing.dll
• System.Web.Abstractions.dll
• system.web.dll
• system.web.extensions.dll
• System.Web.Extensions.Design.dll
• System.Web.DynamicData.dll
• System.Web.DynamicData.Design.dll
• System.Web.Routing.dll
• system.windows.forms.dll
• system.xml.dll
New hotkeys in Windows 7
In Windows 7 Microsoft have added some additional hotkey compared with Vista. This a small list of the new keys.
General
| Win+Up | Maximize |
| Win+Down | Restore / Minimize |
| Win+Left | Snap to left |
| Win+Right | Snap to right |
| Win+Shift+Left | Jump to left monitor |
| Win+Shift+Right | Jump to right monitor |
| Win+Home | Minimize / Restore all other windows |
| Win+T | Focus the first taskbar entry Pressing again will cycle through them, you can can arrow around. Win+Shift+T cycles backwards. |
| Win+Space | Peek at the desktop |
| Win+G | Bring gadgets to the top of the Z-order |
| Win+P | External display options (mirror, extend desktop, etc) |
| Win+X | Mobility Center (same as Vista, but still handy!) |
| Win+# (# = a number key) |
Launches a new instance of the application in the Nth slot on the taskbar. Example: Win+1 launches first pinned app, Win+2 launches second, etc. |
| Win + + Win + – (plus or minus key) |
Zoom in or out. |
Microsoft .NET Framework – Application Development Foundation
After 2 month of preparation and a weekend that disappeared I have passed my first MCTS exam. It has been an interesting trip with a lot of new knowledge and frustration when the sample questions don’t make sense (But I did pass the exam pass rate criteria with good marginal). I did use the “MCTS Self-Paced Training Kit (Exam 70-536): Microsoft .NET Framework 2.0 Foundation” book for my preparation and Measureup’s online test questions. The book also contain test question both in the book and one a CD. The questions in the book was really good and helpful both the question on the CD was according to me many times outside of the scope and had no connection to the content in the book or the real exam I did take. Measureup’s questions were the closest ones to the real exam and also the question that I did learn most from.
Read more